update system information
This commit is contained in:
@@ -563,4 +563,29 @@ class ConfigController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function actionSystemInfo() {
|
||||
if (Yii::$app->request->isAjax) {
|
||||
Yii::$app->response->format = "json";
|
||||
$options = [
|
||||
'http' => [
|
||||
'header' => "Content-Type: application/json",
|
||||
'method' => "POST"
|
||||
]
|
||||
];
|
||||
@file_get_contents("http://localhost:4004/Reboot", false, stream_context_create($options));
|
||||
return ["status" => true];
|
||||
} else {
|
||||
$this->view->title = Yii::t("app", "THONG_TIN_HE_THONG");
|
||||
$version = \app\models\SyncUrl::findOne(['key_config' => 'version']);
|
||||
$info = $version ? $version->data : "Pro 4.27.13 (Jul 19 2021 11:49)";
|
||||
$temp = explode("(", $info);
|
||||
$ver = trim($temp[0]);
|
||||
$build_time = str_replace(")", "", $temp[1]);
|
||||
return $this->render('system-info', [
|
||||
"version" => $ver,
|
||||
"build_time" => $build_time
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user