You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2015/07/02 22:48:05 UTC

[09/10] incubator-nifi git commit: NIFI-695: - Providing immediate feedback when canceling a request to [en|dis]able a controller service. - Reporting to the user after a request has been canceled.

NIFI-695:
- Providing immediate feedback when canceling a request to [en|dis]able a controller service.
- Reporting to the user after a request has been canceled.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/566c4fe8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/566c4fe8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/566c4fe8

Branch: refs/heads/develop
Commit: 566c4fe8d78b769fc31c8d5bed90daccbc817e27
Parents: c3dff40
Author: Matt Gilman <ma...@gmail.com>
Authored: Thu Jul 2 13:45:14 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Thu Jul 2 13:45:14 2015 -0400

----------------------------------------------------------------------
 .../disable-controller-service-dialog.jsp       |  3 +++
 .../canvas/enable-controller-service-dialog.jsp |  3 +++
 .../src/main/webapp/css/controller-service.css  |  6 +++++
 .../js/nf/canvas/nf-controller-service.js       | 24 ++++++++++++++++++++
 4 files changed, 36 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/566c4fe8/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/disable-controller-service-dialog.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/disable-controller-service-dialog.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/disable-controller-service-dialog.jsp
index 1ecb730..0c77a10 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/disable-controller-service-dialog.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/disable-controller-service-dialog.jsp
@@ -70,4 +70,7 @@
             </div>
         </div>
     </div>
+    <div class="controller-service-canceling hidden unset">
+        Canceling...
+    </div>
 </div>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/566c4fe8/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/enable-controller-service-dialog.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/enable-controller-service-dialog.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/enable-controller-service-dialog.jsp
index 6613a04..0121e21 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/enable-controller-service-dialog.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/enable-controller-service-dialog.jsp
@@ -69,4 +69,7 @@
             </div>
         </div>
     </div>
+    <div class="controller-service-canceling hidden unset">
+        Canceling...
+    </div>
 </div>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/566c4fe8/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
index 9d87994..b0d980b 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
@@ -161,6 +161,12 @@ div.referencing-component-references {
     clear: left;
 }
 
+div.controller-service-canceling {
+    position: absolute;
+    bottom: 10px;
+    right: 8px;
+}
+
 /*
     Comments
 */

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/566c4fe8/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
index 078064a..75c7bee 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
@@ -1032,6 +1032,8 @@ nf.ControllerService = (function () {
             handler: {
                 click: function () {
                     canceled = true;
+                    disableDialog.modal('setButtonModel', []);
+                    $('#disable-controller-service-dialog div.controller-service-canceling').show();
                 }
             }
         }]);
@@ -1053,6 +1055,7 @@ nf.ControllerService = (function () {
         
         // sets the close button on the dialog
         var setCloseButton = function () {
+            $('#disable-controller-service-dialog div.controller-service-canceling').hide();
             disableDialog.modal('setButtonModel', [{
                 buttonText: 'Close',
                 handler: {
@@ -1100,6 +1103,15 @@ nf.ControllerService = (function () {
         }).always(function () {
             reloadControllerServiceAndReferencingComponents(controllerService);
             setCloseButton();
+            
+            // inform the user if the action was canceled
+            if (canceled === true && $('#nf-ok-dialog').not(':visible')) {
+                nf.Dialog.showOkDialog({
+                    overlayBackground: false,
+                    headerText: 'Action Canceled',
+                    dialogContent: 'The request to disable has been canceled. Parts of this request may have already completed. Please verify the state of this service and all referencing components.'
+                });
+            }
         });
     };
     
@@ -1116,6 +1128,8 @@ nf.ControllerService = (function () {
             handler: {
                 click: function () {
                     canceled = true;
+                    enableDialog.modal('setButtonModel', []);
+                    $('#enable-controller-service-dialog div.controller-service-canceling').show();
                 }
             }
         }]);
@@ -1143,6 +1157,7 @@ nf.ControllerService = (function () {
 
         // sets the button to close
         var setCloseButton = function () {
+            $('#enable-controller-service-dialog div.controller-service-canceling').hide();
             enableDialog.modal('setButtonModel', [{
                 buttonText: 'Close',
                 handler: {
@@ -1200,6 +1215,15 @@ nf.ControllerService = (function () {
         }).always(function () {
             reloadControllerServiceAndReferencingComponents(controllerService);
             setCloseButton();
+            
+            // inform the user if the action was canceled
+            if (canceled === true && $('#nf-ok-dialog').not(':visible')) {
+                nf.Dialog.showOkDialog({
+                    overlayBackground: false,
+                    headerText: 'Action Canceled',
+                    dialogContent: 'The request to enable has been canceled. Parts of this request may have already completed. Please verify the state of this service and all referencing components.'
+                });
+            }
         });
     };