mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
5a950aeb29
commit
be7865bf4f
@ -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',
|
||||
|
@ -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) {
|
||||
|
@ -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",
|
||||
|
@ -335,6 +335,7 @@ class i18n_messages(Command):
|
||||
"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"),
|
||||
|
Loading…
Reference in New Issue
Block a user