h2.uk-text-success Commands configured in Splash - unless @log_saved.nil? javascript: UIkit.notify("Command definition #{@command_saved} saved", {status:'success'}); - unless @log_failed.nil? javascript: UIkit.notify("Command definition #{@command_saved} not saved", {status:'danger'}); javascript: $(document).on( 'click','input.delete-command',function(){ var id = this.id; var url = "/api/config/deletecommand/" + id + ".json"; UIkit.modal.confirm('Are you sure?', function(){ console.debug(url) $.ajax({ url: url, type: 'DELETE', success: function( data ) { console.debug(data) if (data['status'] == 'success') { $('div#commandrecords h3#' + id).remove(); $('div#commandrecords div#' + id).remove(); UIkit.notify("Deleting log for " + id + " done", {status:'success'}); } else { UIkit.notify("Deleting log for " + id + " failed !", {status:'danger'}); } }, error: function(e) { UIkit.notify("Deleting log for " + id + " failed !", {status:'danger'}); } }); }); }); div.uk-width-medium-1-1 div.uk-panel.uk-panel-box span.uk-text-large.uk-text-bold List of commands availables br div#commandrecords.uk-accordion(data-uk-accordion) - @data.reverse.each do |command| h3.uk-accordion-title id="#{command[:name].to_s}" Name : #{command[:name]} div.uk-accordion-content id="#{command[:name].to_s} " table.uk-table.uk-table-hover.uk-table-striped thead tr th Definition th Actions tbody tr td dl.uk-description-list-horizontal dt Description dd #{command[:desc]} - if command[:command] dt Command Line - if command[:delegate_to] dd.uk-text-danger #{command[:command]} (ignored because delegate_to is set) - else dd #{command[:command]} - if command[:schedule] dt Schedule dd