...
|
...
|
@@ -14,7 +14,7 @@ class SystemController extends BaseController |
|
|
{
|
|
|
$key = 'servers';
|
|
|
if (Yii::$app->request->isPost && trim(Yii::$app->request->post('content'))) {
|
|
|
$content = Yii::$app->request->post('content');
|
|
|
/*$content = Yii::$app->request->post('content');
|
|
|
$ip_arr = explode(",",trim($content));
|
|
|
$ip_arr = array_map(function($v){return trim($v);},$ip_arr);
|
|
|
|
...
|
...
|
@@ -26,10 +26,12 @@ class SystemController extends BaseController |
|
|
}else{
|
|
|
Yii::$app->session->setFlash('error', '保存失败。');
|
|
|
}
|
|
|
$this->redirect('/system/servers');
|
|
|
$this->redirect('/system/servers');*/
|
|
|
}else{
|
|
|
$model = SysConfig::find()->where(['conf_key' => $key])->one();
|
|
|
$ips = json_decode($model->conf_value, true);
|
|
|
/*$model = SysConfig::find()->where(['conf_key' => $key])->one();
|
|
|
$ips = json_decode($model->conf_value, true);*/
|
|
|
$cache_prefix = Yii::$app->params['cache_prefix'];
|
|
|
$ips = Yii::$app->redisIm->smembers($cache_prefix . ":server_list");
|
|
|
return $this->render('servers', ['ips' => $ips]);
|
|
|
}
|
|
|
}
|
...
|
...
|
|