You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jp...@apache.org on 2016/07/29 15:38:13 UTC
nifi git commit: 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.
Repository: nifi
Updated Branches:
refs/heads/master 70d70732b -> a73c8bba3
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 <jo...@yahoo.com>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/a73c8bba
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/a73c8bba
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/a73c8bba
Branch: refs/heads/master
Commit: a73c8bba30fdd46ae53c3090c548c7ae6bc706c7
Parents: 70d7073
Author: Matt Gilman <ma...@gmail.com>
Authored: Thu Jul 28 15:07:16 2016 -0400
Committer: jpercivall <jo...@yahoo.com>
Committed: Fri Jul 29 11:27:09 2016 -0400
----------------------------------------------------------------------
.../partials/history/history-content.jsp | 16 +++++++++----
.../nifi-web-ui/src/main/webapp/css/history.css | 12 +++++++---
.../src/main/webapp/js/nf/history/nf-history.js | 25 +++++++++++++++++++-
3 files changed, 44 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/a73c8bba/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/history/history-content.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/history/history-content.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/history/history-content.jsp
index 75c3e95..65257d2 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/history/history-content.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/history/history-content.jsp
@@ -18,12 +18,18 @@
<div id="history">
<div id="history-header-text">NiFi History</div>
<div id="history-filter-container">
- <div id="history-filter-overview">
- A filter has been applied.
- <span id="clear-history-filter" class="link">Clear filter</span>
+ <div id="cluster-history-message" class="hidden">
+ Viewing history for the current node only. Browse to another node to view its history.
</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 style="float: right">
+ <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 id="history-table"></div>
</div>
http://git-wip-us.apache.org/repos/asf/nifi/blob/a73c8bba/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/history.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/history.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/history.css
index e0cfcd6..d243f9f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/history.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/history.css
@@ -63,7 +63,16 @@
#history-filter-container {
position: absolute;
right: 0px;
+ left: 0px;
top: 15px;
+ font-family: Roboto;
+ font-size: 13px;
+ font-weight: normal;
+}
+
+#cluster-history-message {
+ float: left;
+ margin-top: 30px;
}
#history-filter-button {
@@ -73,10 +82,7 @@
#history-filter-overview {
visibility: hidden;
- font-family: Roboto;
- font-size: 13px;
margin-bottom: 5px;
- font-weight: normal;
}
#history-purge-button {
http://git-wip-us.apache.org/repos/asf/nifi/blob/a73c8bba/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js
index b82d285..0f436e9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js
@@ -31,7 +31,8 @@ nf.History = (function () {
urls: {
banners: '../nifi-api/flow/banners',
about: '../nifi-api/flow/about',
- currentUser: '../nifi-api/flow/current-user'
+ currentUser: '../nifi-api/flow/current-user',
+ clusterSummary: '../nifi-api/flow/cluster/summary'
}
};
@@ -49,6 +50,26 @@ nf.History = (function () {
};
/**
+ * 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.
*/
var initializeHistoryPage = function () {
@@ -116,6 +137,8 @@ nf.History = (function () {
// load the current user
loadCurrentUser().done(function () {
+ loadClusterSummary();
+
// create the history table
nf.HistoryTable.init();