Compare commits
No commits in common. "5aee2cb9f2085884eef7c4ab0e87af71bce53f6e" and "146ffe7b0911d91e62d55e91c329b409e82a47f9" have entirely different histories.
5aee2cb9f2
...
146ffe7b09
@ -164,7 +164,6 @@ class Indicator extends PanelMenu.Button {
|
||||
});
|
||||
this._searchField.connect('secondary-icon-clicked', Lang.bind(this, this._onSearchFieldActivate ) );
|
||||
this._searchField.clutter_text.connect('activate', Lang.bind(this, this._onSearchFieldActivate ) );
|
||||
this._searchField.clutter_text.connect('text-changed', Lang.bind(this, this._onSearchFieldActivate ) );
|
||||
|
||||
this._buttonMenu.actor.add_child (this._searchField);
|
||||
|
||||
@ -445,9 +444,9 @@ class Indicator extends PanelMenu.Button {
|
||||
for ( let entry of processedStatus )
|
||||
{
|
||||
if ( this._searchString &&
|
||||
! ( entry [ 'host_name' ].toLowerCase().includes ( this._searchString ) ||
|
||||
entry [ 'service_display_name' ].toLowerCase().includes ( this._searchString ) ||
|
||||
entry [ 'status_information' ].toLowerCase().includes ( this._searchString ) ) )
|
||||
! ( entry [ 'host_name' ].includes ( this._searchString ) ||
|
||||
entry [ 'service_display_name' ].includes ( this._searchString ) ||
|
||||
entry [ 'status_information' ].includes ( this._searchString ) ) )
|
||||
continue;
|
||||
|
||||
if ( ( ! _status [ 'WARNING' ] && ! _status [ 'CRITICAL' ] && ! _status [ 'UNKNOWN' ] && entry.status == 'OK' ) ||
|
||||
@ -533,7 +532,7 @@ class Indicator extends PanelMenu.Button {
|
||||
|
||||
_onSearchFieldActivate ( e ) {
|
||||
monitoLog ( 'Search: ' + e.text );
|
||||
this._searchString = e.text.toLowerCase();
|
||||
this._searchString = e.text;
|
||||
this.refreshUI ( );
|
||||
return;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ class Icinga2API extends GenericServer {
|
||||
{
|
||||
let message = Soup.form_request_new_from_hash ( 'POST', this.urlcgi + '/actions/reschedule-check', { } );
|
||||
|
||||
let params = '{ "type": "Service", "filter": "host.name==\\"%s\\" && service.name==\\"%s\\"", "force": true, "pretty": true }' . format ( entry.real_host_name, entry.real_service_display_name );
|
||||
let params = '{ "type": "Service", "filter": "host.name==\\"%s\\" && service.name==\\"%s\\"", "force": true, "pretty": true }' . format ( encodeURI ( entry.real_host_name ), encodeURI ( entry.real_service_display_name ) );
|
||||
|
||||
message.request_body.truncate();
|
||||
message.request_body.append ( params );
|
||||
@ -63,6 +63,7 @@ class Icinga2API extends GenericServer {
|
||||
message.button = entry.button;
|
||||
|
||||
message.request_headers.append ( 'Accept', 'application/json' );
|
||||
// log ( message.request_headers );
|
||||
|
||||
this.authenticateAndSend ( message, this.handleCMDMessage );
|
||||
}
|
||||
@ -79,6 +80,7 @@ class Icinga2API extends GenericServer {
|
||||
message.button = button;
|
||||
|
||||
message.request_headers.append ( 'Accept', 'application/json' );
|
||||
// log ( message.request_headers );
|
||||
|
||||
this.authenticateAndSend ( message, this.handleCMDMessage );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user