|
|
|
@@ -257,7 +257,7 @@ function openTerminal(tag,name,more) {
|
|
|
|
|
name = name.replace(/[ #]/g,"_");
|
|
|
|
|
tty_window = makeWindow(name+(more=='.log'?more:''),Math.min(screen.availHeight,800),Math.min(screen.availWidth,1200));
|
|
|
|
|
var socket = ['ttyd','syslog'].includes(tag) ? '/webterminal/'+tag+'/' : '/logterminal/'+name+(more=='.log'?more:'')+'/';
|
|
|
|
|
$.get('/webGui/include/OpenTerminal.php',{tag:tag,name:name,more:more},function(){tty_window.location=socket; tty_window.focus();});
|
|
|
|
|
$.get('/webGui/include/OpenTerminal.php',{tag:tag,name:name,more:more},function(){setTimeout(function(){tty_window.location=socket; tty_window.focus();},100);});
|
|
|
|
|
}
|
|
|
|
|
function bannerAlert(text,cmd,plg,func,start) {
|
|
|
|
|
$.post('/webGui/include/StartCommand.php',{cmd:cmd,pid:1},function(pid) {
|
|
|
|
@@ -637,10 +637,7 @@ foreach ($buttons as $button) {
|
|
|
|
|
if (isset($button['Nchan'])) nchan_merge($button['root'], $button['Nchan']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "<div class='nav-user show'>";
|
|
|
|
|
echo "<a id='nav' href='#'><b id='bell' class='icon-u-bell system'></b></a>";
|
|
|
|
|
echo "<span class='panel'><b id='dot1' class='fa fa-circle fa-fw dot grey-orb'></b><b id='dot2' class='fa fa-circle fa-fw dot grey-orb'></b><b id='dot3' class='fa fa-circle fa-fw dot grey-orb'></b></span>";
|
|
|
|
|
echo "</div>";
|
|
|
|
|
echo "<div class='nav-user show'><a id='board' href='#'><b id='bell' class='icon-u-bell system'></b></a></div>";
|
|
|
|
|
|
|
|
|
|
if ($themes2) echo "</div>";
|
|
|
|
|
echo "</div></div>";
|
|
|
|
@@ -844,16 +841,14 @@ defaultPage.on('message', function(msg,meta) {
|
|
|
|
|
}
|
|
|
|
|
<?endif;?>
|
|
|
|
|
});
|
|
|
|
|
if (bell1) $('#dot1').removeClass('grey-orb').addClass('red-orb'); else $('#dot1').removeClass('red-orb').addClass('grey-orb');
|
|
|
|
|
if (bell2) $('#dot2').removeClass('grey-orb').addClass('yellow-orb'); else $('#dot2').removeClass('yellow-orb').addClass('grey-orb');
|
|
|
|
|
if (bell3) $('#dot3').removeClass('grey-orb').addClass('green-orb'); else $('#dot3').removeClass('green-orb').addClass('grey-orb');
|
|
|
|
|
|
|
|
|
|
$('#bell').removeClass('red-orb yellow-orb green-orb');
|
|
|
|
|
$('#bell').removeClass('red-orb yellow-orb green-orb').prop('title',"<?=_('Alerts')?> ["+bell1+']\n'+"<?=_('Warnings')?> ["+bell2+']\n'+"<?=_('Notices')?> ["+bell3+']');;
|
|
|
|
|
if (bell1) $('#bell').addClass('red-orb'); else
|
|
|
|
|
if (bell2) $('#bell').addClass('yellow-orb'); else
|
|
|
|
|
if (bell3) $('#bell').addClass('green-orb');
|
|
|
|
|
|
|
|
|
|
$('#nav').prop('title',"<?=_('Alerts')?> ["+bell1+']\n'+"<?=_('Warnings')?> ["+bell2+']\n'+"<?=_('Notices')?> ["+bell3+']');
|
|
|
|
|
if (bell1) $('#dropdown-board li.dropdown-submenu:eq(0)').removeClass('disabled').find('.dropdown-menu'); else $('#dropdown-board li.dropdown-submenu:eq(0)').addClass('disabled').find('.dropdown-menu').hide();
|
|
|
|
|
if (bell2) $('#dropdown-board li.dropdown-submenu:eq(1)').removeClass('disabled').find('.dropdown-menu'); else $('#dropdown-board li.dropdown-submenu:eq(1)').addClass('disabled').find('.dropdown-menu').hide();
|
|
|
|
|
if (bell3) $('#dropdown-board li.dropdown-submenu:eq(2)').removeClass('disabled').find('.dropdown-menu'); else $('#dropdown-board li.dropdown-submenu:eq(2)').addClass('disabled').find('.dropdown-menu').hide();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@@ -993,12 +988,12 @@ $(function() {
|
|
|
|
|
<?endif;?>
|
|
|
|
|
<?endif;?>
|
|
|
|
|
var opts = [];
|
|
|
|
|
context.init({preventDoubleContext:false,left:true,above:false});
|
|
|
|
|
context.init({above:false});
|
|
|
|
|
opts.push({header:"<?=_('Notifications')?>"});
|
|
|
|
|
opts.push({text:"<?=_('Alerts')?>",icon:'fa-bell-o',subMenu:[{text:"<?=_('View')?>",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('alert');}},{text:"<?=_('History')?>",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('alert');}},{text:"<?=_('Acknowledge')?>",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('alert');}}]});
|
|
|
|
|
opts.push({text:"<?=_('Warnings')?>",icon:'fa-star-o',subMenu:[{text:"<?=_('View')?>",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('warning');}},{text:"<?=_('History')?>",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('warning');}},{text:"<?=_('Acknowledge')?>",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('warning');}}]});
|
|
|
|
|
opts.push({text:"<?=_('Notices')?>",icon:'fa-sun-o',subMenu:[{text:"<?=_('View')?>",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('normal');}},{text:"<?=_('History')?>",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('normal');}},{text:"<?=_('Acknowledge')?>",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('normal');}}]});
|
|
|
|
|
context.attach('#nav',opts);
|
|
|
|
|
context.attach('#board',opts);
|
|
|
|
|
|
|
|
|
|
if (location.pathname.search(/\/(AddVM|UpdateVM|AddContainer|UpdateContainer)/)==-1) {
|
|
|
|
|
$('blockquote.inline_help').each(function(i) {
|
|
|
|
|