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/12/01 17:43:53 UTC
[15/51] [abbrv] nifi git commit: NIFI-655: - Showing a logging in
notification during the log in process.
NIFI-655:
- Showing a logging in notification during the log in process.
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/242949ee
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/242949ee
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/242949ee
Branch: refs/heads/master
Commit: 242949ee98836794fd18d2503c275c84bfd41a9f
Parents: 3da1981
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed Nov 18 18:23:59 2015 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Wed Nov 18 18:23:59 2015 -0500
----------------------------------------------------------------------
.../src/main/webapp/WEB-INF/pages/login.jsp | 1 +
.../WEB-INF/partials/login/login-progress.jsp | 22 ++++++++++++++++++
.../WEB-INF/partials/login/login-submission.jsp | 2 +-
.../partials/login/nifi-registration-form.jsp | 2 +-
.../nifi-web-ui/src/main/webapp/css/login.css | 24 ++++++++++++--------
.../src/main/webapp/js/nf/login/nf-login.js | 24 ++++++++++++++++----
.../src/main/webapp/js/nf/nf-common.js | 17 ++++++++++----
7 files changed, 71 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/242949ee/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp
index da2ae00..978d019 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp
@@ -45,6 +45,7 @@
<jsp:include page="/WEB-INF/partials/login/login-form.jsp"/>
<jsp:include page="/WEB-INF/partials/login/nifi-registration-form.jsp"/>
<jsp:include page="/WEB-INF/partials/login/login-submission.jsp"/>
+ <jsp:include page="/WEB-INF/partials/login/login-progress.jsp"/>
</div>
<jsp:include page="/WEB-INF/partials/ok-dialog.jsp"/>
<div id="faded-background"></div>
http://git-wip-us.apache.org/repos/asf/nifi/blob/242949ee/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-progress.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-progress.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-progress.jsp
new file mode 100644
index 0000000..874a0cb
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-progress.jsp
@@ -0,0 +1,22 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
+<div id="login-progress-container" class="login-container hidden">
+ <div id="login-progress-spinner" class="loading-container ajax-loading"></div>
+ <div id="login-progress-label">Logging in...</div>
+ <div class="clear"></div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi/blob/242949ee/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-submission.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-submission.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-submission.jsp
index 65c6077..508ead3 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-submission.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-submission.jsp
@@ -15,6 +15,6 @@
limitations under the License.
--%>
<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
-<div id="login-submission-container" class="hidden">
+<div id="login-submission-container" class="login-container hidden">
<div id="login-submission-button" class="button">Log in</div>
</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi/blob/242949ee/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/nifi-registration-form.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/nifi-registration-form.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/nifi-registration-form.jsp
index f1b73c0..3806bd5 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/nifi-registration-form.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/nifi-registration-form.jsp
@@ -15,7 +15,7 @@
limitations under the License.
--%>
<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
-<div id="nifi-registration-container" class="hidden">
+<div id="nifi-registration-container" class="login-container hidden">
<div id="nifi-registration-title" class="login-title nifi-submit-justification">Submit Justification</div>
<div id="nifi-user-submit-justification-container" class="nifi-submit-justification">
<div class="setting">
http://git-wip-us.apache.org/repos/asf/nifi/blob/242949ee/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css
index 62f6118..68086a7 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css
@@ -56,14 +56,14 @@ body.login-body input, body.login-body textarea {
width: 400px;
}
+div.login-container {
+ width: 412px;
+}
+
/*
NiFi Registration
*/
-#nifi-registration-container {
- width: 412px;
-}
-
#nifi-user-submit-justification-container {
margin-bottom: 10px;
}
@@ -77,13 +77,19 @@ body.login-body input, body.login-body textarea {
}
/*
- Submission
+ Login Progress
*/
-#login-submission-container {
- width: 412px;
+#login-progress-label {
+ float: right;
+ font-weight: bold;
+ line-height: 16px;
}
-#login-submission-button {
-
+#login-progress-spinner {
+ float: right;
+ width: 16px;
+ height: 16px;
+ background-color: transparent;
+ margin-left: 3px;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi/blob/242949ee/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js
index bd39a44..7be8e46 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js
@@ -87,6 +87,10 @@ nf.Login = (function () {
};
var login = function () {
+ // show the logging message...
+ $('#login-progress-container').show();
+ $('#login-submission-container').hide();
+
// login submit
$.ajax({
type: 'POST',
@@ -119,6 +123,10 @@ nf.Login = (function () {
// show the registration form
initializeNiFiRegistration();
showNiFiRegistration();
+
+ // update the form visibility
+ $('#login-submission-container').show();
+ $('#login-progress-container').hide();
} else {
// reload as appropriate - no need to schedule token refresh as the page is reloading
if (top !== window) {
@@ -139,6 +147,10 @@ nf.Login = (function () {
if (xhr.status === 401) {
initializeNiFiRegistration();
showNiFiRegistration();
+
+ // update the form visibility
+ $('#login-submission-container').show();
+ $('#login-progress-container').hide();
} else {
$('#login-message-title').text('Unable to log in');
$('#login-message').text(xhr.responseText);
@@ -146,6 +158,7 @@ nf.Login = (function () {
// update visibility
$('#login-container').hide();
$('#login-submission-container').hide();
+ $('#login-progress-container').hide();
$('#login-message-container').show();
}
});
@@ -155,6 +168,10 @@ nf.Login = (function () {
dialogContent: nf.Common.escapeHtml(xhr.responseText),
overlayBackground: false
});
+
+ // update the form visibility
+ $('#login-submission-container').show();
+ $('#login-progress-container').hide();
} else {
$('#login-message-title').text('Unable to log in');
$('#login-message').text(xhr.responseText);
@@ -162,6 +179,7 @@ nf.Login = (function () {
// update visibility
$('#login-container').hide();
$('#login-submission-container').hide();
+ $('#login-progress-container').hide();
$('#login-message-container').show();
}
});
@@ -194,12 +212,8 @@ nf.Login = (function () {
});
};
- var logout = function () {
- nf.Storage.removeItem('jwt');
- };
-
var showLogoutLink = function () {
- $('#user-logout-container').show();
+ nf.Common.showLogoutLink();
};
return {
http://git-wip-us.apache.org/repos/asf/nifi/blob/242949ee/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
index d71c8ef..321044f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
@@ -424,11 +424,7 @@ nf.Common = (function () {
* Closes the canvas by removing the splash screen and stats poller.
*/
closeCanvas: function () {
- if (nf.Storage.getItem('jwt') === null) {
- $('#user-logout-container').hide();
- } else {
- $('#user-logout-container').show();
- }
+ nf.Common.showLogoutLink();
// ensure this javascript has been loaded in the nf canvas page
if (nf.Common.isDefinedAndNotNull(nf.Canvas)) {
@@ -447,6 +443,17 @@ nf.Common = (function () {
},
/**
+ * Shows the logout link if appropriate.
+ */
+ showLogoutLink: function () {
+ if (nf.Storage.getItem('jwt') === null) {
+ $('#user-logout-container').hide();
+ } else {
+ $('#user-logout-container').show();
+ }
+ },
+
+ /**
* Populates the specified field with the specified value. If the value is
* undefined, the field will read 'No value set.' If the value is an empty
* string, the field will read 'Empty string set.'