mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
system: handle privileges for notifications
This commit is contained in:
parent
6d75f5d0c7
commit
1b2abc89c1
@ -33,7 +33,10 @@ class Status {
|
||||
|
||||
updateStatus() {
|
||||
const fetch = new Promise((resolve, reject) => {
|
||||
ajaxGet('/api/core/system/status', {path: window.location.pathname}, function (data) {
|
||||
ajaxGet('/api/core/system/status', {path: window.location.pathname}, function (data, status) {
|
||||
if (status !== "success") {
|
||||
reject(status);
|
||||
}
|
||||
resolve(data);
|
||||
});
|
||||
});
|
||||
@ -43,6 +46,12 @@ class Status {
|
||||
data.subsystems = { };
|
||||
}
|
||||
this.notify(data);
|
||||
}, (reject) => {
|
||||
// Either inaccessible or something went wrong on the backend.
|
||||
$('#system_status').css({
|
||||
'cursor': 'default',
|
||||
'pointer-events': 'none'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user