mirror of https://github.com/apache/nifi.git
NIFI-4894:
- Ensuring that any proxy paths are retained when querying for bulletins. This closes #2482 Signed-off-by: Scott Aslan <scottyaslan@gmail.com>
This commit is contained in:
parent
ff95be2a11
commit
d75f118ae1
|
@ -251,7 +251,8 @@
|
|||
|
||||
var query = function (ids) {
|
||||
var url = new URL(window.location);
|
||||
var endpoint = url.origin + '/nifi-api/flow/bulletin-board?' + $.param({
|
||||
var origin = nfCommon.substringBeforeLast(url.href, '/nifi');
|
||||
var endpoint = origin + '/nifi-api/flow/bulletin-board?' + $.param({
|
||||
sourceId: ids.join('|')
|
||||
});
|
||||
|
||||
|
|
|
@ -1022,7 +1022,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Extracts the contents of the specified str after the strToFind. If the
|
||||
* Extracts the contents of the specified str after the last strToFind. If the
|
||||
* strToFind is not found or the last part of the str, an empty string is
|
||||
* returned.
|
||||
*
|
||||
|
@ -1062,13 +1062,30 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Extracts the contents of the specified str before the strToFind. If the
|
||||
* Extracts the contents of the specified str before the last strToFind. If the
|
||||
* strToFind is not found or the first part of the str, an empty string is
|
||||
* returned.
|
||||
*
|
||||
* @argument {string} str The full string
|
||||
* @argument {string} strToFind The substring to find
|
||||
*/
|
||||
substringBeforeLast: function (str, strToFind) {
|
||||
var result = '';
|
||||
var indexOfStrToFind = str.lastIndexOf(strToFind);
|
||||
if (indexOfStrToFind >= 0) {
|
||||
result = str.substr(0, indexOfStrToFind);
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
/**
|
||||
* Extracts the contents of the specified str before the strToFind. If the
|
||||
* strToFind is not found or the first path of the str, an empty string is
|
||||
* returned.
|
||||
*
|
||||
* @argument {string} str The full string
|
||||
* @argument {string} strToFind The substring to find
|
||||
*/
|
||||
substringBeforeFirst: function (str, strToFind) {
|
||||
var result = '';
|
||||
var indexOfStrToFind = str.indexOf(strToFind);
|
||||
|
|
Loading…
Reference in New Issue