Compare commits
2 Commits
168b509b22
...
31b39b8eb7
Author | SHA1 | Date | |
---|---|---|---|
31b39b8eb7 | |||
3f50ae0016 |
14
extension.js
14
extension.js
@ -28,16 +28,16 @@ let _httpSession;
|
|||||||
let _status;
|
let _status;
|
||||||
let _ok_text;
|
let _ok_text;
|
||||||
|
|
||||||
const Gettext = imports.gettext.domain(GETTEXT_DOMAIN);
|
|
||||||
const _ = Gettext.gettext;
|
|
||||||
const Lang = imports.lang;
|
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const Me = ExtensionUtils.getCurrentExtension();
|
const Lang = imports.lang;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
const Mainloop = imports.mainloop;
|
||||||
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const Mainloop = imports.mainloop;
|
|
||||||
|
const Gettext = imports.gettext.domain(GETTEXT_DOMAIN);
|
||||||
|
const _ = Gettext.gettext;
|
||||||
|
|
||||||
const { GObject, St, Clutter, Gio } = imports.gi;
|
const { GObject, St, Clutter, Gio } = imports.gi;
|
||||||
|
|
||||||
@ -46,9 +46,9 @@ const SETTINGS_SCHEMA_ACCOUNT = "org.gnome.shell.extensions.monito.account";
|
|||||||
const SETTINGS_SCHEMA_ACCOUNT_PATH = "/org/gnome/shell/extensions/monito/account";
|
const SETTINGS_SCHEMA_ACCOUNT_PATH = "/org/gnome/shell/extensions/monito/account";
|
||||||
|
|
||||||
const Convenience = Me.imports.convenience;
|
const Convenience = Me.imports.convenience;
|
||||||
const Preferences = Me.imports.prefs;
|
|
||||||
const Icinga = Me.imports.servers.icinga.Icinga;
|
const Icinga = Me.imports.servers.icinga.Icinga;
|
||||||
const Icinga2 = Me.imports.servers.icinga2.Icinga2;
|
const Icinga2 = Me.imports.servers.icinga2.Icinga2;
|
||||||
|
const Preferences = Me.imports.prefs;
|
||||||
|
|
||||||
let settings = Convenience.getSettings(SETTINGS_SCHEMA);
|
let settings = Convenience.getSettings(SETTINGS_SCHEMA);
|
||||||
let account_settings = [ ];
|
let account_settings = [ ];
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
const { Soup } = imports.gi;
|
const { Soup } = imports.gi;
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const Me = ExtensionUtils.getCurrentExtension();
|
|
||||||
const Preferences = Me.imports.prefs;
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
|
const Preferences = Me.imports.prefs;
|
||||||
|
|
||||||
let _httpSession;
|
let _httpSession;
|
||||||
|
|
||||||
@ -65,9 +65,16 @@ class Icinga {
|
|||||||
_httpSession.queue_message(message, Lang.bind
|
_httpSession.queue_message(message, Lang.bind
|
||||||
(this, function(_httpSession, message)
|
(this, function(_httpSession, message)
|
||||||
{
|
{
|
||||||
// log ( '>>> ' + message.response_body.data );
|
log ( '>>> ' + message.status_code );
|
||||||
let json = JSON.parse(message.response_body.data);
|
|
||||||
|
|
||||||
|
if ( message.status_code != Soup.Status.OK )
|
||||||
|
{
|
||||||
|
log ( '>>> error: ' + message.reason_phrase );
|
||||||
|
Main.notify ( 'Monito: ' + name, message.reason_phrase );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let json = JSON.parse(message.response_body.data);
|
||||||
this.status = json.status;
|
this.status = json.status;
|
||||||
|
|
||||||
extension.refreshUI ( this );
|
extension.refreshUI ( this );
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
const { Soup } = imports.gi;
|
const { Soup } = imports.gi;
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const Me = ExtensionUtils.getCurrentExtension();
|
|
||||||
const Preferences = Me.imports.prefs;
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
|
const Preferences = Me.imports.prefs;
|
||||||
|
|
||||||
let _httpSession;
|
let _httpSession;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user