mirror of https://github.com/apache/nifi.git
NIFI-2302: - Showing a message on the history page when in a cluster to indicate that only the actions from the current node are displayed.
This closes #740 Signed-off-by: jpercivall <joepercivall@yahoo.com>
This commit is contained in:
parent
70d70732b5
commit
a73c8bba30
|
@ -18,12 +18,18 @@
|
||||||
<div id="history">
|
<div id="history">
|
||||||
<div id="history-header-text">NiFi History</div>
|
<div id="history-header-text">NiFi History</div>
|
||||||
<div id="history-filter-container">
|
<div id="history-filter-container">
|
||||||
<div id="history-filter-overview">
|
<div id="cluster-history-message" class="hidden">
|
||||||
A filter has been applied.
|
Viewing history for the current node only. Browse to another node to view its history.
|
||||||
<span id="clear-history-filter" class="link">Clear filter</span>
|
|
||||||
</div>
|
</div>
|
||||||
<button id="history-filter-button" title="Filter History" class="fa fa-filter"></button>
|
<div style="float: right">
|
||||||
<button id="history-purge-button" title="Purge History" class="fa fa-eraser hidden"></button>
|
<div id="history-filter-overview">
|
||||||
|
A filter has been applied.
|
||||||
|
<span id="clear-history-filter" class="link">Clear filter</span>
|
||||||
|
</div>
|
||||||
|
<button id="history-filter-button" title="Filter History" class="fa fa-filter"></button>
|
||||||
|
<button id="history-purge-button" title="Purge History" class="fa fa-eraser hidden"></button>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="history-table"></div>
|
<div id="history-table"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -63,7 +63,16 @@
|
||||||
#history-filter-container {
|
#history-filter-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
|
left: 0px;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
|
font-family: Roboto;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cluster-history-message {
|
||||||
|
float: left;
|
||||||
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#history-filter-button {
|
#history-filter-button {
|
||||||
|
@ -73,10 +82,7 @@
|
||||||
|
|
||||||
#history-filter-overview {
|
#history-filter-overview {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
font-family: Roboto;
|
|
||||||
font-size: 13px;
|
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-weight: normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#history-purge-button {
|
#history-purge-button {
|
||||||
|
|
|
@ -31,7 +31,8 @@ nf.History = (function () {
|
||||||
urls: {
|
urls: {
|
||||||
banners: '../nifi-api/flow/banners',
|
banners: '../nifi-api/flow/banners',
|
||||||
about: '../nifi-api/flow/about',
|
about: '../nifi-api/flow/about',
|
||||||
currentUser: '../nifi-api/flow/current-user'
|
currentUser: '../nifi-api/flow/current-user',
|
||||||
|
clusterSummary: '../nifi-api/flow/cluster/summary'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,6 +49,26 @@ nf.History = (function () {
|
||||||
}).fail(nf.Common.handleAjaxError);
|
}).fail(nf.Common.handleAjaxError);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads the flow configuration and updated the cluster state.
|
||||||
|
*
|
||||||
|
* @returns xhr
|
||||||
|
*/
|
||||||
|
var loadClusterSummary = function () {
|
||||||
|
return $.ajax({
|
||||||
|
type: 'GET',
|
||||||
|
url: config.urls.clusterSummary,
|
||||||
|
dataType: 'json'
|
||||||
|
}).done(function (response) {
|
||||||
|
var clusterSummary = response.clusterSummary;
|
||||||
|
|
||||||
|
// if clustered, show message to indicate location of actions
|
||||||
|
if (clusterSummary.clustered === true) {
|
||||||
|
$('#cluster-history-message').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the history page.
|
* Initializes the history page.
|
||||||
*/
|
*/
|
||||||
|
@ -116,6 +137,8 @@ nf.History = (function () {
|
||||||
|
|
||||||
// load the current user
|
// load the current user
|
||||||
loadCurrentUser().done(function () {
|
loadCurrentUser().done(function () {
|
||||||
|
loadClusterSummary();
|
||||||
|
|
||||||
// create the history table
|
// create the history table
|
||||||
nf.HistoryTable.init();
|
nf.HistoryTable.init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue