summaryrefslogtreecommitdiffstats
path: root/install/ui
diff options
context:
space:
mode:
authorPavel Vomacka <pvomacka@redhat.com>2016-08-09 12:43:09 +0200
committerPetr Vobornik <pvoborni@redhat.com>2017-01-05 19:13:37 +0100
commitbe7865bf4f9b6774a17f31380e96b76d0473f982 (patch)
tree4e6344d17ee6adcd0a7e55415301d094a11ebdd2 /install/ui
parent5a950aeb29963ed22a2c3c1b80723589ac4097de (diff)
downloadfreeipa-be7865bf4f9b6774a17f31380e96b76d0473f982.tar.gz
freeipa-be7865bf4f9b6774a17f31380e96b76d0473f982.tar.xz
freeipa-be7865bf4f9b6774a17f31380e96b76d0473f982.zip
Change activity text while loading metadata
After log in into webui there was 'Authenticating' sign even during loading metadata. Now while data are loading there is 'Loading data' text. This change requires new global topic 'set-activity' of activity widget. So for now there is possibility to change every activity string during running phase just by publishing 'set-activity' topic and setting new text as first parameter. Part of: https://fedorahosted.org/freeipa/ticket/6144 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'install/ui')
-rw-r--r--install/ui/src/freeipa/ipa.js3
-rw-r--r--install/ui/src/freeipa/widget.js5
-rw-r--r--install/ui/test/data/ipa_init.json1
3 files changed, 9 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js
index 178bd03f6..46b033a00 100644
--- a/install/ui/src/freeipa/ipa.js
+++ b/install/ui/src/freeipa/ipa.js
@@ -276,6 +276,9 @@ var IPA = function () {
* @param {Function} params.on_error
*/
that.init_metadata = function(params) {
+ var loading = text.get('@i18n:login.loading_md');
+
+ topic.publish('set-activity', loading);
var objects = rpc.command({
name: 'ipa_init_objects',
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 1d98cc408..6ad8aadaf 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -6990,6 +6990,7 @@ exp.activity_widget = IPA.activity_widget = function(spec) {
that.activate_event = spec.activate_event || 'rpc-start';
that.deactivate_event = spec.deactivate_event || 'rpc-end';
+ that.set_activity_event = 'set-activity';
that.create = function(container) {
that.widget_create(container);
@@ -7024,6 +7025,10 @@ exp.activity_widget = IPA.activity_widget = function(spec) {
if (that.connection_counter === 0) that.hide();
if (that.connection_counter < 0) that.connection_counter = 0;
});
+
+ topic.subscribe(that.set_activity_event, function(new_text) {
+ that.text = new_text;
+ });
};
that.toggle_timer = function(start) {
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 514206a0c..6d11e7338 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -186,6 +186,7 @@
"form_auth": "<i class=\"fa fa-info-circle\"></i> To login with <strong>username and password</strong>, enter them in the corresponding fields, then click Login.",
"header": "Logged In As",
"krb_auth_msg": "<i class=\"fa fa-info-circle\"></i> To login with <strong>Kerberos</strong>, please make sure you have valid tickets (obtainable via kinit) and <a href='http://${host}/ipa/config/unauthorized.html'>configured</a> the browser correctly, then click Login.",
+ "loading_md": "Loading data",
"login": "Login",
"logout": "Logout",
"logout_error": "Logout error",