mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: publish network activity topics
Network activity is now published through global topics. It allows other components like activity_widget to listen to them. https://fedorahosted.org/freeipa/ticket/3903 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
This commit is contained in:
parent
93c4a6388b
commit
a1c2512278
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
define([
|
define([
|
||||||
'dojo/keys',
|
'dojo/keys',
|
||||||
|
'dojo/topic',
|
||||||
'./jquery',
|
'./jquery',
|
||||||
'./json2',
|
'./json2',
|
||||||
'./_base/i18n',
|
'./_base/i18n',
|
||||||
@ -34,7 +35,8 @@ define([
|
|||||||
'./rpc',
|
'./rpc',
|
||||||
'./text',
|
'./text',
|
||||||
'exports'
|
'exports'
|
||||||
], function(keys, $, JSON, i18n, datetime, metadata_provider, builder, reg, rpc, text, exports) {
|
], function(keys, topic, $, JSON, i18n, datetime, metadata_provider,
|
||||||
|
builder, reg, rpc, text, exports) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class
|
* @class
|
||||||
@ -318,6 +320,9 @@ var IPA = function () {
|
|||||||
that.display_activity_icon = function() {
|
that.display_activity_icon = function() {
|
||||||
that.network_call_count++;
|
that.network_call_count++;
|
||||||
$('.network-activity-indicator').css('visibility', 'visible');
|
$('.network-activity-indicator').css('visibility', 'visible');
|
||||||
|
if (that.network_call_count === 1) {
|
||||||
|
topic.publish('network-activity-start');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -330,6 +335,7 @@ var IPA = function () {
|
|||||||
|
|
||||||
if (0 === that.network_call_count) {
|
if (0 === that.network_call_count) {
|
||||||
$('.network-activity-indicator').css('visibility', 'hidden');
|
$('.network-activity-indicator').css('visibility', 'hidden');
|
||||||
|
topic.publish('network-activity-end');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user