lib/splash/webadmin/portal/views/home.slim in prometheus-splash-0.7.0 vs lib/splash/webadmin/portal/views/home.slim in prometheus-splash-0.8.0

- old
+ new

@@ -1,15 +1,62 @@ -h2 This is Splash -p Choose a activity in the main menu +javascript: + + $('body').on( 'click','button', function(){ + var tmp = this.id + $("#stop").prop('disabled', true); + $("#start").prop('disabled', true); + var url = "/daemon/" + tmp; + $("#stop").prop('disabled', true); + $("#start").prop('disabled', true); + $.get(url, function( data ) { + + console.log(data); + if (data == 'stop') { + $("#stop").prop('disabled', true); + $("#start").prop('disabled', false); + $("#daemon").removeClass('uk-badge-success').addClass('uk-badge-danger'); + $("#daemon").text('OFF'); + } + if (data == 'start') { + $("#stop").prop('disabled', false); + $("#start").prop('disabled', true); + $("#daemon").removeClass('uk-badge-danger').addClass('uk-badge-success'); + $("#daemon").text('ON'); + } + }); + }); + div.uk-grid + div.uk-width-medium-1-1 + div.uk-panel.uk-panel-box + div.uk-text-large.uk-text-bold <i class="uk-icon-cogs uk-icon-justify uk-icon-large"></i>&nbsp;&nbsp;Splash Daemon status + table.uk-table + tr + td + b Actions : + div.uk-button-group + - if @status == false + button.uk-button(id="start" disabled): i.uk-icon-play + button.uk-button(id="stop"): i.uk-icon-stop + - else + button.uk-button(id="start"): i.uk-icon-play + button.uk-button(id="stop" disabled): i.uk-icon-stop + td + b Status : + - if @status == false + div.uk-badge.uk-badge-success.uk-badge-notifications(id="daemon") ON + - else + div.uk-badge.uk-badge-danger.uk-badge-notifications(id="daemon") OFF + + +div.uk-grid div.uk-width-medium-1-2 div.uk-panel.uk-panel-box span.uk-text-large.uk-text-bold Global Configuration br - br span.uk-text-bold <i>Logger and display</i> : ul li <b>Level:</b> #{@data[:loggers][:level]} li <b>Daemon log filename:</b> #{@data[:loggers][:daemon][:file]} li <b>Web log filename:</b> #{@data[:loggers][:web][:file]} @@ -21,11 +68,10 @@ div.uk-width-medium-1-2 div.uk-panel.uk-panel-box span.uk-text-large.uk-text-bold Transport and Backend br - br span.uk-text-bold <i>Backend</i> : ul li <b>Backend type:</b> #{@data[:backends][:stores][:execution_trace][:type]} - if @data[:backends][:stores][:execution_trace][:type] == :file li <b>Path:</b> #{@data[:backends][:stores][:execution_trace][:path]} @@ -63,10 +109,9 @@ div.uk-width-medium-1-2 div.uk-panel.uk-panel-box span.uk-text-large.uk-text-bold Web UI - br br span.uk-text-bold <i>Webadmin</i> : ul li <b>IP:</b> #{@data[:webadmin_ip]} li <b>Port:</b> #{@data[:webadmin_port]}