lib/splash/webadmin/portal/views/logs.slim in prometheus-splash-0.8.3 vs lib/splash/webadmin/portal/views/logs.slim in prometheus-splash-0.8.4

- old
+ new

@@ -34,10 +34,34 @@ } }); }); }); + $(document).on( 'click','input.monitor-log',function(){ + var url = "/api/logs/monitor.json"; + UIkit.modal.confirm('Are you sure?', function(){ + console.debug(url) + $.ajax({ + url: url, + type: 'POST', + success: function( data ) { + console.debug(data) + if (data['status'] == 'success') { + UIkit.notify("Forced monitoring done", {status:'success'}); + } + else + { + UIkit.notify("Forced monitoring failed !", {status:'danger'}); + } + }, + error: function(e) { + UIkit.notify("Forced monitoring failed !", {status:'danger'}); + } + }); + }); + }); + div.uk-width-medium-1-1 div.uk-panel.uk-panel-box span.uk-text-large.uk-text-bold List of logs monitored br table#logrecords.uk-table.uk-table-hover.uk-table-striped @@ -70,10 +94,11 @@ td input.delete-log.uk-button.uk-button-mini.uk-button-danger id="#{log[:label].to_s}" value="Delete" br input.modify-log.uk-button.uk-button-mini.uk-button-primary id="#{log[:label].to_s}" value="Modify" onclick="location.href='/add_modify_log/#{log[:label].to_s}';" br - input.history-log.uk-button.uk-button-mini.uk-button-primary id="#{log[:label].to_s}" value="History" onclick="location.href='/history/#{log[:label].to_s}';" + input.history-log.uk-button.uk-button-mini.uk-button-primary id="#{log[:label].to_s}" value="History" onclick="location.href='/get_log_history/#{log[:label].to_s}';" div.uk-align-right form.uk-form.uk-form-horizontal#query action="/add_modify_log" method="GET" div   + input.monitor-log.uk-button value="Force monitoring"  input.add-log.uk-button type="submit" value="Add new log"