mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
parent
4473008d65
commit
bbe018567f
@ -44,22 +44,26 @@ define(['jquery', 'logging', 'URIjs/URI', 'icinga/componentLoader'], function($,
|
|||||||
/**
|
/**
|
||||||
* Refresh the container content and layout
|
* Refresh the container content and layout
|
||||||
*/
|
*/
|
||||||
this.refresh = function() {
|
this.refresh = function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: this.dashboardUrl
|
url: this.dashboardUrl,
|
||||||
}).done((function(response) {
|
context: this
|
||||||
this.container.empty();
|
})
|
||||||
this.container.html(response);
|
.done(function (response) {
|
||||||
dashboardContainer.freetile('layout');
|
this.container.empty();
|
||||||
$(window).on('layoutchange', function() {
|
this.container.html(response);
|
||||||
|
components.load();
|
||||||
|
})
|
||||||
|
.fail(function (response, reason) {
|
||||||
|
this.container.html(response.responseText);
|
||||||
|
})
|
||||||
|
.always(function () {
|
||||||
dashboardContainer.freetile('layout');
|
dashboardContainer.freetile('layout');
|
||||||
});
|
$(window).on('layoutchange', function() {
|
||||||
|
dashboardContainer.freetile('layout');
|
||||||
this.triggerRefresh();
|
});
|
||||||
components.load();
|
this.triggerRefresh();
|
||||||
}).bind(this)).fail((function(response, reason) {
|
})
|
||||||
this.container.html(response);
|
|
||||||
}).bind(this));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.triggerRefresh = function() {
|
this.triggerRefresh = function() {
|
||||||
@ -70,4 +74,4 @@ define(['jquery', 'logging', 'URIjs/URI', 'icinga/componentLoader'], function($,
|
|||||||
};
|
};
|
||||||
this.refresh();
|
this.refresh();
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user