Compare commits
15 Commits
FSI
...
LitePro_2.
| Author | SHA1 | Date | |
|---|---|---|---|
| d8fe80034e | |||
| 7c8014ca87 | |||
| 8918a58746 | |||
| 5a3074ff4a | |||
| 8ec330d21d | |||
| 0dce5700b5 | |||
| d4cc9654d8 | |||
| a26cf27d08 | |||
| c29719d73e | |||
| e4e080266a | |||
| 82a5b0d0ad | |||
| 21cc5f2050 | |||
| ea202ccc3f | |||
| 58a5522642 | |||
| 476f01098f |
@@ -6,5 +6,7 @@ return [
|
|||||||
"maxLogs" => 50000,
|
"maxLogs" => 50000,
|
||||||
"maxPicture" => 9999,
|
"maxPicture" => 9999,
|
||||||
"version" => "1.0.7",
|
"version" => "1.0.7",
|
||||||
"autoSyncLog" => false
|
"autoSyncLog" => false,
|
||||||
|
"timeoutRequestServer" => 4,
|
||||||
|
"test" => 6
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ class ApiController extends Controller {
|
|||||||
|
|
||||||
public function actionGetLogs() {
|
public function actionGetLogs() {
|
||||||
if (Yii::$app->request->post()) {
|
if (Yii::$app->request->post()) {
|
||||||
|
Yii::$app->response->format = "json";
|
||||||
$post = Yii::$app->request->bodyParams;
|
$post = Yii::$app->request->bodyParams;
|
||||||
$time = date_format(date_create_from_format('Y-m-d H:i:s', $post['time']), 'U');
|
$time = date_format(date_create_from_format('Y-m-d H:i:s', $post['time']), 'U');
|
||||||
$key = common::generateRandomString();
|
$key = common::generateRandomString();
|
||||||
@@ -73,6 +74,11 @@ class ApiController extends Controller {
|
|||||||
@unlink("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $lastLogs->image);
|
@unlink("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $lastLogs->image);
|
||||||
$lastLogs->delete();
|
$lastLogs->delete();
|
||||||
}
|
}
|
||||||
|
$lastLogs = CaptureLogs::find()->andWhere(["staff_id" => $post['id']])->orderBy(["time" => SORT_DESC])->limit(1)->one();
|
||||||
|
if ($lastLogs && ($time - $lastLogs->time) < 1) {
|
||||||
|
file_put_contents("log_connect_server.txt", "\n[" . date("H:i:s d/m/Y") . "] duplicate face " . $post["id"], FILE_APPEND);
|
||||||
|
return ["status" => "success"];
|
||||||
|
}
|
||||||
|
|
||||||
$model = new CaptureLogs();
|
$model = new CaptureLogs();
|
||||||
$logs = $model->create([
|
$logs = $model->create([
|
||||||
@@ -85,7 +91,10 @@ class ApiController extends Controller {
|
|||||||
$ip = "https://dev-dc.beetai.com";
|
$ip = "https://dev-dc.beetai.com";
|
||||||
if ($server_ip)
|
if ($server_ip)
|
||||||
$ip = $server_ip->data;
|
$ip = $server_ip->data;
|
||||||
if ($this->is_connected() && $logs) {
|
$parseUrl = parse_url($ip);
|
||||||
|
$host = $parseUrl['host'];
|
||||||
|
$port = isset($parseUrl['port']) ? $parseUrl['port'] : 80;
|
||||||
|
if ($this->is_connected($host, $port) && $logs) {
|
||||||
$device_id = \app\models\SyncUrl::findOne(['key_config' => 'device_id']);
|
$device_id = \app\models\SyncUrl::findOne(['key_config' => 'device_id']);
|
||||||
$id_camera = 0;
|
$id_camera = 0;
|
||||||
if ($device_id)
|
if ($device_id)
|
||||||
@@ -104,39 +113,25 @@ class ApiController extends Controller {
|
|||||||
$data[] = "123"; //person_id
|
$data[] = "123"; //person_id
|
||||||
$data[] = "+7"; //timezone
|
$data[] = "+7"; //timezone
|
||||||
$text = implode("|", $data);
|
$text = implode("|", $data);
|
||||||
$res = json_decode(file_get_contents($ip . "/api/oem/face_recognition?token=" . $tk, false, stream_context_create([
|
$res = json_decode(@file_get_contents($ip . "/api/box/face_recognition_auth_v2?token=" . $tk, false, stream_context_create([
|
||||||
'http' => [
|
'http' => [
|
||||||
'header' => "Content-Type: application/json",
|
'timeout' => Yii::$app->params['timeoutRequestServer'],
|
||||||
'method' => "POST",
|
'header' => "Content-Type: application/json",
|
||||||
'content' => json_encode([
|
'method' => "POST",
|
||||||
'image' => base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $fileName)),
|
'content' => json_encode([
|
||||||
'camera_id' => strval($id_camera),
|
'image' => base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $fileName)),
|
||||||
'frametime' => date("Y-m-d H:i:s", $time),
|
'data' => common::rsaEncode($text),
|
||||||
'idCard' => $staffInfo ? strval($staffInfo->code) : "0",
|
'confidence' => isset($post["confidence"]["percent1"]) ? $post["confidence"]["percent1"] : 0
|
||||||
'idObject' => $staffInfo ? $staffInfo->staff_id : "",
|
])
|
||||||
"person_id" => "123",
|
]
|
||||||
"timezone" => "+7",
|
|
||||||
'confidence' => isset($post["confidence"]["percent1"]) ? $post["confidence"]["percent1"] : 0
|
|
||||||
])
|
|
||||||
]
|
|
||||||
])), true);
|
])), true);
|
||||||
// $res = json_decode(file_get_contents($ip . "/api/box/face_recognition_auth_v2?token=" . $tk, false, stream_context_create([
|
if ($res && $res['status'] == 10000) {
|
||||||
// 'http' => [
|
|
||||||
// 'header' => "Content-Type: application/json",
|
|
||||||
// 'method' => "POST",
|
|
||||||
// 'content' => json_encode([
|
|
||||||
// 'image' => base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $fileName)),
|
|
||||||
// 'data' => common::rsaEncode($text),
|
|
||||||
// 'confidence' => isset($post["confidence"]["percent1"]) ? $post["confidence"]["percent1"] : 0
|
|
||||||
// ])
|
|
||||||
// ]
|
|
||||||
// ])), true);
|
|
||||||
if ($res['status'] == 10000) {
|
|
||||||
$logsInfo->sync_status = 1;
|
$logsInfo->sync_status = 1;
|
||||||
$logsInfo->save();
|
$logsInfo->save();
|
||||||
|
} else {
|
||||||
|
file_put_contents("log_connect_server.txt", "\n[" . date("H:i:s d/m/Y") . "] /api/box/face_recognition_auth_v2 timeout " . $ip, FILE_APPEND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Yii::$app->response->format = "json";
|
|
||||||
return ["status" => "success"];
|
return ["status" => "success"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -353,17 +348,19 @@ class ApiController extends Controller {
|
|||||||
|
|
||||||
public function actionSync() {
|
public function actionSync() {
|
||||||
Yii::$app->response->format = "json";
|
Yii::$app->response->format = "json";
|
||||||
if ($this->is_connected()) {
|
$server_ip = \app\models\SyncUrl::findOne(['key_config' => 'server_api']);
|
||||||
$server_ip = \app\models\SyncUrl::findOne(['key_config' => 'server_api']);
|
$ip = "https://dev-dc.beetai.com";
|
||||||
$ip = "https://dev-dc.beetai.com";
|
if ($server_ip)
|
||||||
if ($server_ip)
|
$ip = $server_ip->data;
|
||||||
$ip = $server_ip->data;
|
$parseUrl = parse_url($ip);
|
||||||
|
$host = $parseUrl['host'];
|
||||||
|
$port = isset($parseUrl['port']) ? $parseUrl['port'] : 80;
|
||||||
|
if ($this->is_connected($host, $port)) {
|
||||||
$device_id = \app\models\SyncUrl::findOne(['key_config' => 'device_id']);
|
$device_id = \app\models\SyncUrl::findOne(['key_config' => 'device_id']);
|
||||||
$id_camera = 0;
|
$id_camera = 0;
|
||||||
if ($device_id)
|
if ($device_id)
|
||||||
$id_camera = intval($device_id->data);
|
$id_camera = intval($device_id->data);
|
||||||
$ls = CaptureLogs::find()->andWhere(['sync_status' => null])->all();
|
$ls = CaptureLogs::find()->andWhere(['sync_status' => null])->all();
|
||||||
|
|
||||||
$tk = "";
|
$tk = "";
|
||||||
$token = \app\models\SyncUrl::findOne(['key_config' => 'token']);
|
$token = \app\models\SyncUrl::findOne(['key_config' => 'token']);
|
||||||
if ($token)
|
if ($token)
|
||||||
@@ -372,25 +369,31 @@ class ApiController extends Controller {
|
|||||||
if (file_exists("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $value->image)) {
|
if (file_exists("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $value->image)) {
|
||||||
$staffInfo = ListManagement::findOne($value->staff_id);
|
$staffInfo = ListManagement::findOne($value->staff_id);
|
||||||
$confidence = json_decode($value->confidence, true);
|
$confidence = json_decode($value->confidence, true);
|
||||||
$res = json_decode(file_get_contents($ip . "/api/oem/face_recognition?token=" . $tk, false, stream_context_create([
|
$data = [];
|
||||||
'http' => [
|
$data[] = strval($id_camera); //camera_id
|
||||||
'header' => "Content-Type: application/json",
|
$data[] = date("Y-m-d H:i:s", $value->time); //frametime
|
||||||
'method' => "POST",
|
$data[] = $staffInfo ? strval($staffInfo->code) : "0"; //idCard
|
||||||
'content' => json_encode([
|
$data[] = $staffInfo ? $staffInfo->staff_id : ""; //idObject
|
||||||
'image' => base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $value->image)),
|
$data[] = "123"; //person_id
|
||||||
'camera_id' => strval($id_camera),
|
$data[] = "+7"; //timezone
|
||||||
'frametime' => date("Y-m-d H:i:s", $value->time),
|
$text = implode("|", $data);
|
||||||
'idCard' => $staffInfo ? strval($staffInfo->code) : "0",
|
$res = json_decode(@file_get_contents($ip . "/api/box/face_recognition_auth_v2?token=" . $tk, false, stream_context_create([
|
||||||
'idObject' => $staffInfo ? $staffInfo->staff_id : "",
|
'http' => [
|
||||||
"person_id" => "123",
|
'timeout' => Yii::$app->params['timeoutRequestServer'],
|
||||||
"timezone" => "+7",
|
'header' => "Content-Type: application/json",
|
||||||
'confidence' => isset($confidence['percent1']) ? floatval($confidence['percent1']) : 0
|
'method' => "POST",
|
||||||
])
|
'content' => json_encode([
|
||||||
]
|
'image' => base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $value->image)),
|
||||||
|
'data' => common::rsaEncode($text),
|
||||||
|
'confidence' => isset($confidence['percent1']) ? floatval($confidence['percent1']) : 0
|
||||||
|
])
|
||||||
|
]
|
||||||
])), true);
|
])), true);
|
||||||
if ($res['status'] == 10000) {
|
if ($res && $res['status'] == 10000) {
|
||||||
$value->sync_status = 1;
|
$value->sync_status = 1;
|
||||||
$value->save();
|
$value->save();
|
||||||
|
} else {
|
||||||
|
file_put_contents("log_connect_server.txt", "\n[" . date("H:i:s d/m/Y") . "][SYNC] face_recognition_auth_v2 timeout " . $ip, FILE_APPEND);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$value->delete();
|
$value->delete();
|
||||||
@@ -400,14 +403,16 @@ class ApiController extends Controller {
|
|||||||
return ["status" => true];
|
return ["status" => true];
|
||||||
}
|
}
|
||||||
|
|
||||||
function is_connected($ip = "google.com") {
|
function is_connected($host, $port) {
|
||||||
$connected = @fsockopen($ip, 80);
|
$connected = @fsockopen($host, $port);
|
||||||
//website, port (try 80 or 443)
|
//website, port (try 80 or 443)
|
||||||
if ($connected) {
|
if ($connected) {
|
||||||
$is_conn = true; //action when connected
|
$is_conn = true; //action when connected
|
||||||
fclose($connected);
|
fclose($connected);
|
||||||
|
// file_put_contents("log_connect_server.txt", "\n" . date("H:i:s d/m/Y") . " connected " . $host . ":" . $port, FILE_APPEND);
|
||||||
} else {
|
} else {
|
||||||
$is_conn = false; //action in connection failure
|
$is_conn = false; //action in connection failure
|
||||||
|
file_put_contents("log_connect_server.txt", "\n[" . date("H:i:s d/m/Y") . "] disconnected " . $host . ":" . $port, FILE_APPEND);
|
||||||
}
|
}
|
||||||
return $is_conn;
|
return $is_conn;
|
||||||
}
|
}
|
||||||
@@ -502,12 +507,14 @@ class ApiController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function actionTest() {
|
public function actionTest() {
|
||||||
// $updating = \app\models\SyncUrl::findOne(['key_config' => 'token']);
|
$server_ip = \app\models\SyncUrl::findOne(['key_config' => 'server_api']);
|
||||||
$updating = \app\models\SyncUrl::find()->all();
|
$ip = "https://dev-dc.beetai.com";
|
||||||
foreach ($updating as $key => $value) {
|
if ($server_ip)
|
||||||
echo $value->key_config . " " . $value->data . "<br>";
|
$ip = $server_ip->data;
|
||||||
}
|
$parseUrl = parse_url($ip);
|
||||||
exit();
|
$host = $parseUrl['host'];
|
||||||
|
$port = isset($parseUrl['port']) ? $parseUrl['port'] : 80;
|
||||||
|
$this->is_connected($host, $port);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function actionReGenFeature() {
|
public function actionReGenFeature() {
|
||||||
|
|||||||
@@ -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
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,5 +160,8 @@ return [
|
|||||||
"XOA_LICH_TRINH" => "Delete schedule",
|
"XOA_LICH_TRINH" => "Delete schedule",
|
||||||
"BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG" => "Are you sure you want to delete this schedule?",
|
"BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG" => "Are you sure you want to delete this schedule?",
|
||||||
"SO_SANH_MAT" => "Face comparison",
|
"SO_SANH_MAT" => "Face comparison",
|
||||||
"BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG" => "Are you sure you want to change the device's IP address?"
|
"BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG" => "Are you sure you want to change the device's IP address?",
|
||||||
|
"THONG_TIN_HE_THONG" => "System Information",
|
||||||
|
"REBOOT" => "Reboot",
|
||||||
|
"BAN_CO_CHAC_CHAN_MUON_REBOOT_KHONG" => "Are you sure you want to reboot?"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -160,5 +160,8 @@ return [
|
|||||||
"XOA_LICH_TRINH" => "スケジュールを削除",
|
"XOA_LICH_TRINH" => "スケジュールを削除",
|
||||||
"BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG" => "このスケジュールを削除してもよろしいですか?",
|
"BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG" => "このスケジュールを削除してもよろしいですか?",
|
||||||
"SO_SANH_MAT" => "顔比較",
|
"SO_SANH_MAT" => "顔比較",
|
||||||
"BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG" => "デバイスの IP アドレスを変更してもよろしいですか?"
|
"BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG" => "デバイスの IP アドレスを変更してもよろしいですか?",
|
||||||
|
"THONG_TIN_HE_THONG" => "システムインフォメーション",
|
||||||
|
"REBOOT" => "リブート",
|
||||||
|
"BAN_CO_CHAC_CHAN_MUON_REBOOT_KHONG" => "再起動してもよろしいですか?"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -160,5 +160,8 @@ return [
|
|||||||
"XOA_LICH_TRINH" => "Xóa lịch trình",
|
"XOA_LICH_TRINH" => "Xóa lịch trình",
|
||||||
"BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG" => "Bạn có chắc chắn muốn xóa lịch trình này không?",
|
"BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG" => "Bạn có chắc chắn muốn xóa lịch trình này không?",
|
||||||
"SO_SANH_MAT" => "So sánh mặt",
|
"SO_SANH_MAT" => "So sánh mặt",
|
||||||
"BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG" => "Bạn có chắc chắn muốn thay đổi địa chỉ IP của thiết bị không?"
|
"BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG" => "Bạn có chắc chắn muốn thay đổi địa chỉ IP của thiết bị không?",
|
||||||
|
"THONG_TIN_HE_THONG" => "Thông tin hệ thống",
|
||||||
|
"REBOOT" => "Khởi động lại thiết bị",
|
||||||
|
"BAN_CO_CHAC_CHAN_MUON_REBOOT_KHONG" => "Bạn có chắc chắn muốn khởi động lại thiết bị không?"
|
||||||
];
|
];
|
||||||
|
|||||||
0
runtime/temp.txt
Normal file → Executable file
0
runtime/temp.txt
Normal file → Executable file
@@ -36,7 +36,7 @@ use yii\widgets\ActiveForm;
|
|||||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||||
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
|
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li class="<?php if (Yii::$app->controller->id == "config") echo "active"; ?>">
|
<li class="<?php if (Yii::$app->controller->id == "config" && Yii::$app->controller->action->id != "system-info") echo "active"; ?>">
|
||||||
<a href="<?php echo yii\helpers\Url::to(['/config/cau-hinh-thiet-bi']); ?>">
|
<a href="<?php echo yii\helpers\Url::to(['/config/cau-hinh-thiet-bi']); ?>">
|
||||||
<i class="fa fa-cogs"></i> <?php echo Yii::t("app", "CAU_HINH"); ?>
|
<i class="fa fa-cogs"></i> <?php echo Yii::t("app", "CAU_HINH"); ?>
|
||||||
</a>
|
</a>
|
||||||
@@ -62,6 +62,11 @@ use yii\widgets\ActiveForm;
|
|||||||
<li><a href="<?php echo \yii\helpers\Url::to(['/capture-logs/face-comparison']); ?>"><i class="fa fa-users"></i> <?php echo Yii::t("app", "SO_SANH_MAT"); ?></a></li>
|
<li><a href="<?php echo \yii\helpers\Url::to(['/capture-logs/face-comparison']); ?>"><i class="fa fa-users"></i> <?php echo Yii::t("app", "SO_SANH_MAT"); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="<?php if (Yii::$app->controller->id == "config" && Yii::$app->controller->action->id == "system-info") echo "active"; ?>">
|
||||||
|
<a href="<?php echo yii\helpers\Url::to(['/config/system-info']); ?>">
|
||||||
|
<i class="fa fa-info-circle"></i> <?php echo Yii::t("app", "THONG_TIN_HE_THONG"); ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
58
views/config/system-info.tpl
Normal file
58
views/config/system-info.tpl
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
|
||||||
|
{use class="yii\helpers\Url"}
|
||||||
|
{use class="app\assets\ConfigAsset"}
|
||||||
|
{ConfigAsset::register($this)|void}
|
||||||
|
{block name='content'}
|
||||||
|
<style>
|
||||||
|
.input-group-addon{
|
||||||
|
width: 120px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.input-group{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.table-striped > tbody > tr:nth-of-type(odd) {
|
||||||
|
background-color: #d1d1d1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3 col-md-push-1">
|
||||||
|
<table class="table table-bordered table-striped" style="background: #fff;">
|
||||||
|
<thead>
|
||||||
|
<tr style="background-color: #3c8dbc;color:#fff;">
|
||||||
|
<th colspan="2">{Yii::t("app", "THONG_TIN_HE_THONG")|upper}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>CPU</th>
|
||||||
|
<td>ARM Mali-450 penta-core</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>MemTotal</th>
|
||||||
|
<td>2.0 GiB</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>DiskTotal</th>
|
||||||
|
<td>16.0 GiB</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Software version number</th>
|
||||||
|
<td>{$version}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Build time</th>
|
||||||
|
<td>{$build_time}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<button class="btn btn-danger" onclick="reboot(this);" data-href="{Url::to(['system-info'])}">
|
||||||
|
<i class="fa fa-refresh"></i> {Yii::t("app","REBOOT")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/block}
|
||||||
@@ -33,6 +33,8 @@
|
|||||||
<input type="hidden" name="HAY_CHON_DOI_TUONG_DE_GAN_LICH_TRINH" value="{Yii::t("app", "HAY_CHON_DOI_TUONG_DE_GAN_LICH_TRINH")}">
|
<input type="hidden" name="HAY_CHON_DOI_TUONG_DE_GAN_LICH_TRINH" value="{Yii::t("app", "HAY_CHON_DOI_TUONG_DE_GAN_LICH_TRINH")}">
|
||||||
<input type="hidden" name="BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG" value="{Yii::t("app", "BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG")}">
|
<input type="hidden" name="BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG" value="{Yii::t("app", "BAN_CO_CHAC_CHAN_MUON_XOA_LICH_TRINH_NAY_KHONG")}">
|
||||||
<input type="hidden" name="BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG" value="{Yii::t("app", "BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG")}">
|
<input type="hidden" name="BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG" value="{Yii::t("app", "BAN_CO_CHAC_CHAN_MUON_DOI_IP_KHONG")}">
|
||||||
|
<input type="hidden" name="BAN_CO_CHAC_CHAN_MUON_REBOOT_KHONG" value="{Yii::t("app", "BAN_CO_CHAC_CHAN_MUON_REBOOT_KHONG")}">
|
||||||
|
|
||||||
|
|
||||||
<div id="blocking" class="fade modal" role="dialog" tabindex="-1">
|
<div id="blocking" class="fade modal" role="dialog" tabindex="-1">
|
||||||
<div class="modal-dialog" style="top: 50%;margin-top: -45px;">
|
<div class="modal-dialog" style="top: 50%;margin-top: -45px;">
|
||||||
@@ -47,6 +49,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="reboot-blocking" class="fade modal" role="dialog" tabindex="-1">
|
||||||
|
<div class="modal-dialog" style="top: 50%;margin-top: -45px;">
|
||||||
|
<div class="modal-content" style="background-color: transparent;box-shadow: none;">
|
||||||
|
<div class="modal-body">
|
||||||
|
<div id='modelContent' class="text-center">
|
||||||
|
<i class="fa fa-spinner fa-pulse fa-5x fa-fw" style="color: #fff;"></i>
|
||||||
|
<br>
|
||||||
|
<b style="color: #fff;font-size: 25px;">Đang khởi động lại thiết bị, vui lòng chờ trong vài phút và tải lại trang!</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="uploadBlock" class="fade modal" role="dialog" tabindex="-1">
|
<div id="uploadBlock" class="fade modal" role="dialog" tabindex="-1">
|
||||||
<div class="modal-dialog" style="top: 50%;margin-top: -45px;">
|
<div class="modal-dialog" style="top: 50%;margin-top: -45px;">
|
||||||
<div class="modal-content" style="background-color: transparent;box-shadow: none;">
|
<div class="modal-content" style="background-color: transparent;box-shadow: none;">
|
||||||
|
|||||||
0
web/assets/temp.txt
Normal file → Executable file
0
web/assets/temp.txt
Normal file → Executable file
@@ -177,4 +177,24 @@ function changeIP(e) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function reboot(e) {
|
||||||
|
if (confirm($("input[name='BAN_CO_CHAC_CHAN_MUON_REBOOT_KHONG']").val())) {
|
||||||
|
$("#reboot-blocking").modal({
|
||||||
|
keyboard: false,
|
||||||
|
backdrop: false
|
||||||
|
});
|
||||||
|
$.ajax({
|
||||||
|
url: $(e).attr("data-href"),
|
||||||
|
type: 'POST',
|
||||||
|
success: function (data) {
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
// $("#reboot-blocking").modal("hide");
|
||||||
|
// common.ajaxError();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user