If running a custom run state, show the state instead of Running. Also select the running state in the state change popup.
This commit is contained in:
parent
22c5d46c65
commit
7f704263d8
|
@ -233,7 +233,12 @@ function getNavBarHTML($reload = null) {
|
||||||
ob_start();
|
ob_start();
|
||||||
if ( $running == null )
|
if ( $running == null )
|
||||||
$running = daemonCheck();
|
$running = daemonCheck();
|
||||||
$status = $running?translate('Running'):translate('Stopped');
|
if ( $running ) {
|
||||||
|
$state = dbFetchOne('SELECT Name FROM States WHERE isActive=1', 'Name');
|
||||||
|
if ( $state == 'default' )
|
||||||
|
$state = '';
|
||||||
|
}
|
||||||
|
$status = $running ? ($state ? $state : translate('Running')) : translate('Stopped');
|
||||||
?>
|
?>
|
||||||
<div class="navbar navbar-inverse navbar-static-top">
|
<div class="navbar navbar-inverse navbar-static-top">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
@ -244,7 +249,9 @@ function getNavBarHTML($reload = null) {
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="navbar-brand"><a href="<?php echo validHtmlStr(ZM_HOME_URL); ?>" target="<?php echo validHtmlStr(ZM_WEB_TITLE); ?>"><?php echo ZM_HOME_CONTENT ?></a></div>
|
<div class="navbar-brand">
|
||||||
|
<a href="<?php echo validHtmlStr(ZM_HOME_URL); ?>" target="<?php echo validHtmlStr(ZM_WEB_TITLE); ?>"><?php echo ZM_HOME_CONTENT ?></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="main-header-nav">
|
<div class="collapse navbar-collapse" id="main-header-nav">
|
||||||
|
@ -326,7 +333,7 @@ if (isset($_REQUEST['filter']['Query']['terms']['attr'])) {
|
||||||
<button type="button" class="btn btn-default navbar-btn" data-toggle="modal" data-target="#modalState"><?php echo $status ?></button>
|
<button type="button" class="btn btn-default navbar-btn" data-toggle="modal" data-target="#modalState"><?php echo $status ?></button>
|
||||||
|
|
||||||
<?php } else if ( canView('System') ) { ?>
|
<?php } else if ( canView('System') ) { ?>
|
||||||
<p class="navbar-text"> <?php echo $status ?></p>
|
<p class="navbar-text"><?php echo $status ?></p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } # end if !$user or $user['Id'] meaning logged in ?>
|
<?php } # end if !$user or $user['Id'] meaning logged in ?>
|
||||||
|
|
|
@ -54,7 +54,9 @@ if ( $running ) {
|
||||||
$states = dbFetchAll('SELECT * FROM States');
|
$states = dbFetchAll('SELECT * FROM States');
|
||||||
foreach ( $states as $state ) {
|
foreach ( $states as $state ) {
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo validHtmlStr($state['Name']) ?>"><?php echo validHtmlStr($state['Name']); ?></option>
|
<option value="<?php echo validHtmlStr($state['Name']) ?>" <?php echo $state['IsActive'] ? 'selected="selected"' : '' ?>>
|
||||||
|
<?php echo validHtmlStr($state['Name']); ?>
|
||||||
|
</option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue