mirror of
https://github.com/unraid/webgui.git
synced 2026-04-26 12:20:42 -05:00
System update
This commit is contained in:
@@ -220,7 +220,7 @@ function resumeParity(form) {
|
||||
});
|
||||
}
|
||||
function parityHistory() {
|
||||
openChanges("parity_history","_(Parity Operation History)_");
|
||||
openChanges("parity_history", "_(Parity Operation History)_", "phistory");
|
||||
}
|
||||
function shutdown_now(form,cmd) {
|
||||
$(form).append('<input type="hidden" name="cmd" value="'+cmd+'">');
|
||||
|
||||
@@ -282,12 +282,22 @@ function openPlugin(cmd,title,plg,func) {
|
||||
$('.sweet-alert').addClass('nchan');
|
||||
});
|
||||
}
|
||||
function openChanges(cmd,title) {
|
||||
function openChanges(cmd,title,nchan) {
|
||||
$.post('/webGui/include/StartCommand.php',{cmd:cmd+' nchan'},function(pid) {
|
||||
if (pid==0) return;
|
||||
changes.start();
|
||||
switch (nchan) {
|
||||
case 'phistory': phistory.start(); break;
|
||||
case 'feedback': feedback.start(); break;
|
||||
case 'sysinfo' : sysinfo.start(); break;
|
||||
default : changes.start(); break;
|
||||
}
|
||||
swal({title:title,text:"<pre id='body'></pre><hr>",html:true,animation:'none',confirmButtonText:"<?=_('Close')?>"},function(){
|
||||
changes.stop();
|
||||
switch (nchan) {
|
||||
case 'phistory': phistory.stop(); break;
|
||||
case 'feedback': feedback.stop(); break;
|
||||
case 'sysinfo' : sysinfo.stop(); break;
|
||||
default : changes.stop(); break;
|
||||
}
|
||||
$('.sweet-alert').hide('fast').removeClass('nchan');
|
||||
});
|
||||
$('.sweet-alert').addClass('nchan');
|
||||
@@ -781,6 +791,21 @@ changes.on('message', function(data) {
|
||||
$('pre#body').html(data);
|
||||
});
|
||||
|
||||
var phistory = new NchanSubscriber('/sub/phistory',{subscriber:'websocket'});
|
||||
phistory.on('message', function(data) {
|
||||
$('pre#body').html(data);
|
||||
});
|
||||
|
||||
var feedback = new NchanSubscriber('/sub/feedback',{subscriber:'websocket'});
|
||||
feedback.on('message', function(data) {
|
||||
$('pre#body').html(data);
|
||||
});
|
||||
|
||||
var sysinfo = new NchanSubscriber('/sub/sysinfo',{subscriber:'websocket'});
|
||||
sysinfo.on('message', function(data) {
|
||||
$('pre#body').html(data);
|
||||
});
|
||||
|
||||
var backtotopoffset = 250;
|
||||
var backtotopduration = 500;
|
||||
$(window).scroll(function() {
|
||||
|
||||
@@ -28,7 +28,7 @@ $month = [' Jan '=>'-01-',' Feb '=>'-02-',' Mar '=>'-03-',' Apr '=>'-04-',' May
|
||||
function write($message){
|
||||
$nchan = curl_init();
|
||||
curl_setopt_array($nchan,[
|
||||
CURLOPT_URL => 'http://localhost/pub/changes?buffer_length=0',
|
||||
CURLOPT_URL => 'http://localhost/pub/phistory?buffer_length=0',
|
||||
CURLOPT_UNIX_SOCKET_PATH => '/var/run/nginx.socket',
|
||||
CURLOPT_POST => 1,
|
||||
CURLOPT_POSTFIELDS => $message,
|
||||
|
||||
Reference in New Issue
Block a user