+ [task#135735] add monitor setting.
This commit is contained in:
@@ -131,7 +131,7 @@ class instanceModel extends model
|
||||
->beginIF($status != 'all')->andWhere('instance.status')->eq($status)->fi()
|
||||
->orderBy('instance.id desc')
|
||||
->beginIF($pager)->page($pager)->fi()
|
||||
->fetchAll('id');
|
||||
->fetchAll('id', false);
|
||||
|
||||
$spaces = $this->dao->select('*')->from(TABLE_SPACE)
|
||||
->where('deleted')->eq(0)
|
||||
|
||||
@@ -115,7 +115,14 @@ div
|
||||
div
|
||||
(
|
||||
$instance->name, setClass('text-xl'),
|
||||
$type === 'store' ? span($instance->appVersion, setClass('ml-3 label gray-pale rounded-full')) : null
|
||||
$type === 'store' ? span($instance->appVersion, setClass('ml-3 label gray-pale rounded-full')) : null,
|
||||
$type === 'store' && isset($monitor) ?
|
||||
span
|
||||
(
|
||||
set::title($monitor['tips']),
|
||||
icon('icon icon-info'),
|
||||
setClass('ml-3 label ' . $monitor['class'] . ' rounded-full')
|
||||
) : null
|
||||
),
|
||||
$type === 'store' ? div
|
||||
(
|
||||
|
||||
@@ -42,6 +42,9 @@ class instanceZen extends instance
|
||||
$pipeline = $this->loadModel('pipeline')->getByUrl($url);
|
||||
$instance->externalID = !empty($pipeline) ? $pipeline->id : 0;
|
||||
}
|
||||
$instance->monitor = empty($instance->monitor || !$this->config->inQuickon) ? array() : $this->loadModel('space')->formatMonitor(json_decode($instance->monitor, true));
|
||||
isset($instance->monitor['warning']['tips']) && $this->view->monitor = array('class' => 'warning-pale', 'tips' => $instance->monitor['warning']['tips']);
|
||||
isset($instance->monitor['danger']['tips']) && $this->view->monitor = array('class' => 'danger-pale', 'tips' => $instance->monitor['danger']['tips']) ;
|
||||
|
||||
$this->view->title = $instance->appName;
|
||||
$this->view->instance = $instance;
|
||||
|
||||
Reference in New Issue
Block a user