* [misc] update system db status field.
This commit is contained in:
@@ -61,7 +61,7 @@ $config->system->dtable->dbList->fieldList['dbType']['group'] = 2;
|
||||
|
||||
$config->system->dtable->dbList->fieldList['dbStatus']['title'] = $lang->system->dbStatus;
|
||||
$config->system->dtable->dbList->fieldList['dbStatus']['name'] = 'status';
|
||||
$config->system->dtable->dbList->fieldList['dbStatus']['map'] = $lang->instance->statusList;
|
||||
$config->system->dtable->dbList->fieldList['dbStatus']['map'] = $lang->system->runningStatus;
|
||||
|
||||
$config->system->dtable->dbList->fieldList['actions']['name'] = 'actions';
|
||||
$config->system->dtable->dbList->fieldList['actions']['title'] = $lang->actions;
|
||||
|
||||
@@ -18,7 +18,7 @@ window.renderDbList = function (result, {col, row, value})
|
||||
{
|
||||
if(col.name === 'status')
|
||||
{
|
||||
var statusClass = value == 'running' ? 'text-success' : '';
|
||||
var statusClass = value == 'normal' ? 'text-success' : 'text-danger';
|
||||
result[0] = {html: '<span class="' + statusClass + '">' + result[0] + '</span>'};
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -301,3 +301,6 @@ $lang->system->platform = new stdclass();
|
||||
$lang->system->platform->navs['dblist'] = 'Database';
|
||||
$lang->system->platform->navs['domainView'] = 'Domain';
|
||||
$lang->system->platform->navs['ossview'] = 'OSS';
|
||||
|
||||
$lang->system->runningStatus['normal'] = 'Normal';
|
||||
$lang->system->runningStatus['error'] = 'Error';
|
||||
|
||||
@@ -301,3 +301,6 @@ $lang->system->platform = new stdclass();
|
||||
$lang->system->platform->navs['dblist'] = 'Database';
|
||||
$lang->system->platform->navs['domainView'] = 'Domain';
|
||||
$lang->system->platform->navs['ossview'] = 'OSS';
|
||||
|
||||
$lang->system->runningStatus['normal'] = 'Normal';
|
||||
$lang->system->runningStatus['error'] = 'Error';
|
||||
|
||||
@@ -301,3 +301,6 @@ $lang->system->platform = new stdclass();
|
||||
$lang->system->platform->navs['dblist'] = 'Database';
|
||||
$lang->system->platform->navs['domainView'] = 'Domain';
|
||||
$lang->system->platform->navs['ossview'] = 'OSS';
|
||||
|
||||
$lang->system->runningStatus['normal'] = 'Normal';
|
||||
$lang->system->runningStatus['error'] = 'Error';
|
||||
|
||||
@@ -301,3 +301,6 @@ $lang->system->platform = new stdclass();
|
||||
$lang->system->platform->navs['dblist'] = '数据库';
|
||||
$lang->system->platform->navs['domainView'] = '域名';
|
||||
$lang->system->platform->navs['ossview'] = '对象存储';
|
||||
|
||||
$lang->system->runningStatus['normal'] = '正常';
|
||||
$lang->system->runningStatus['error'] = '异常';
|
||||
|
||||
@@ -14,6 +14,7 @@ include 'sidebar.html.php';
|
||||
$config->system->dtable->dbList->fieldList['actions']['list']['dblist']['url'] = 'javascript:manageDb("{name}", "{db_type}", "{namespace}")';
|
||||
|
||||
$dbList = initTableData($dbList, $config->system->dtable->dbList->fieldList);
|
||||
foreach($dbList as $db) $db->status = empty($db->ready) ? 'error' : 'normal';
|
||||
|
||||
dtable
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user