BiFace config

This commit is contained in:
dongpd 2020-05-22 14:49:20 +07:00
parent 7b0f188794
commit 2e6e53bc10
10 changed files with 1524 additions and 15 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
/runtime
/web/assets
/web/data
/web/data
/vendor/
/nbproject/private/

23
assets/ConfigAsset.php Normal file
View File

@ -0,0 +1,23 @@
<?php
namespace app\assets;
use yii\web\AssetBundle;
class ConfigAsset extends AssetBundle {
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
];
public $js = [
'js/config.js'
];
public $depends = [
'yii\web\YiiAsset',
'app\assets\AppAsset',
'yii\jui\JuiAsset',
'yii\bootstrap\BootstrapAsset',
];
}

View File

@ -5,9 +5,9 @@ $db = require __DIR__ . '/db.php';
$config = [
'id' => 'basic',
'homeUrl' => ['/dashboard'],
'homeUrl' => ['/config'],
'name' => 'AIParking Server',
'defaultRoute' => 'dashboard',
'defaultRoute' => 'config',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'timeZone' => 'Asia/Ho_Chi_Minh',

View File

@ -0,0 +1,240 @@
<?php
namespace app\controllers;
use Yii;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\helpers\Url;
/**
* ScriptController implements the CRUD actions for Script model.
*/
class ConfigController extends Controller {
public function init() {
parent::init();
if (Yii::$app->user->isGuest) {
return $this->redirect(['/site/login']);
}
}
/**
* {@inheritdoc}
*/
public function behaviors() {
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
public $config_json = [
"camera" => [
"auto_check" => 1,
"num_cam" => 2,
"rgb" => [
"url" => "/dev/video3",
"type" => "usb",
"rotate" => -1,
"config" => [
"enable" => 0,
"brightness" => 9999,
"gain" => 9999,
"saturation" => 9999,
"sharpness" => 9999
]
],
"ir" => [
"url" => "/dev/video1",
"type" => "usb",
"rotate" => -1,
"translate_x" => 0,
"translate_y" => 70,
"ir_scale" => 1.0,
"config" => [
"enable" => 0
]
],
"max_queue_size" => 6,
"count_frame_to_skip" => 0,
"fps" => 14,
"merge_queue_pause" => 10,
"raw_resolution" => [
"width" => 1280,
"height" => 720
],
"cam_resize" => [
"width" => 640,
"height" => 360
],
"crop_frame" => [
"x" => 120,
"y" => 40,
"width" => 400,
"height" => 280
]
],
"face_verify" => [
"show_fake_label" => 0,
"debug" => 0,
"max_fake_time" => 4,
"min_real_time" => 1,
"saturation" => [
"enable" => 1,
"min_std_thresh" => 13,
"min_mean_thresh" => 20
],
"mtcnn" => [
"enable" => 1,
"size" => 96,
"num_thread" => 1
],
"ir_face_verify" => [
"enable" => 1,
"ir_scale" => 1.05,
"ir_neighbor" => 1
]
],
"haarcascade" => [
"enable" => 1,
"show_time_detect" => 0,
"min_size" => 60,
"max_size" => 120,
"scale" => 1.1,
"neighbor" => 5
],
"engine" => [
"max_fps" => 40,
"cam_id" => 311,
"server_authen" => "http://api.cloudv2.beetai.com/api/aibox/authentication"
],
"recognition" => [
"enable" => 1,
"accuracy" => 1.1,
"server_recog" => "http://api.biface.beetai.com/api/face_recognition_auth?token=",
"request_timeout" => 20,
"num_face_recog" => 100,
"first_time_recog" => 5,
"next_time_recog" => 5
],
"screen" => [
"show_video" => 1,
"full_screen" => 1,
"width" => 1920,
"height" => 1080
],
"id_city" => 1581130,
"open_door" => [
"enable" => 0,
"port_name" => "/dev/ttyUSB0"
],
"log" => [
"path" => "log.txt",
"limit" => 3000,
"clear_line" => 500
]
];
/**
* Lists all Script models.
* @return mixed
*/
public function actionIndex() {
$this->view->title = "Cấu hình thiết bị";
$options = [
'http' => [
'header' => "Content-Type: application/json",
'method' => "POST"
]
];
$apiConfig = json_decode(file_get_contents("http://localhost:4004/ReadAPIConfig", false, stream_context_create($options)), true);
return $this->render('index', [
"apiConfig" => $apiConfig
]);
}
public function actionCauHinhMayChu() {
if (Yii::$app->request->post()) {
$post = Yii::$app->request->post();
$options = [
'http' => [
'header' => "Content-Type: application/json",
'method' => "POST",
'content' => json_encode([
"servermqtt" => $post['servermqtt'],
"url" => $post['url']
]),
]
];
json_decode(file_get_contents("http://localhost:4004/SaveAPIConfig", false, stream_context_create($options)), true);
return Url::to(['cau-hinh-nhan-dien']);
}
}
public function actionCauHinhNhanDien() {
if (Yii::$app->request->post()) {
$post = Yii::$app->request->post();
Yii::$app->response->format = "json";
$options = [
'http' => [
'header' => "Content-Type: application/json",
'method' => "POST"
]
];
$tempConfig = json_decode(file_get_contents("http://localhost:4004/ReadEngineConfig", false, stream_context_create($options)), true);
if (!$tempConfig['status'])
return false;
$engineConfig = json_decode($tempConfig['data'], true);
$engineConfig['data']['engines'][0]['isConfig'] = "1";
file_get_contents("http://localhost:4004/SaveEngineConfig", false, stream_context_create([
'http' => [
'header' => "Content-Type: application/json",
'method' => "POST",
'content' => json_encode([
'path' => $engineConfig['data']['engines'][0]['path'],
'config' => $engineConfig,
'configEngine' => $post['config']
])
]
]));
return true;
} else {
$this->view->title = "Cấu hình nhận diện";
$tempConfig = json_decode(file_get_contents("http://localhost:4004/ReadEngineConfig", false, stream_context_create([
'http' => [
'header' => "Content-Type: application/json",
'method' => "POST"
]
])), true);
if (!$tempConfig['status'])
return $this->redirect(['/config']);
$engineConfig = json_decode($tempConfig['data'], true);
$checkConfig = json_decode(file_get_contents("http://localhost:4004/ReadConfig", false, stream_context_create([
'http' => [
'header' => "Content-Type: application/json",
'method' => "POST",
'content' => json_encode([
'path' => $engineConfig['data']['engines'][0]['path']
])
]
])), true);
$config_json = $this->config_json;
if ($checkConfig['status'])
$config_json = json_decode($checkConfig['data'], true);
return $this->render('cau-hinh-nhan-dien', [
"config_json" => $config_json
]);
}
}
}

View File

@ -73,7 +73,7 @@ class SiteController extends Controller {
$model = new LoginForm();
if ($model->load(Yii::$app->request->post()) && $model->login()) {
return $this->redirect(["/dashboard"]);
return $this->redirect(["/config"]);
}
$model->password = '';

View File

@ -25,7 +25,7 @@ use yii\widgets\ActiveForm;
<nav class="navbar navbar-static-top">
<div class="container-fruit">
<div class="navbar-header">
<a href="<?php echo yii\helpers\Url::to(['/dashboard']); ?>" class="navbar-brand">
<a href="<?php echo yii\helpers\Url::to(['/config']); ?>" class="navbar-brand">
<img src="/images/logo.png" width="90%">
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
@ -36,16 +36,16 @@ use yii\widgets\ActiveForm;
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
<ul class="nav navbar-nav">
<!-- <li class="active">
<a href="#" onclick="global.changeMenu(this, 'du-lieu');return false;">
<i class="fa fa-database"></i> Dữ liệu
</a>
</li>
<li>
<a href="#" onclick="global.changeMenu(this, 'cai-dat-suat-an');return false;">
<i class="fa fa-calendar"></i> Cài đặt suất ăn
</a>
</li>-->
<li>
<a href="<?php echo yii\helpers\Url::to(['/dashboard']); ?>">
<i class="fa fa-database"></i> Dữ liệu
</a>
</li>
<li>
<a href="<?php echo yii\helpers\Url::to(['/config']); ?>">
<i class="fa fa-cogs"></i> Cấu hình
</a>
</li>
</ul>
</div>
<div class="navbar-custom-menu">

View File

@ -0,0 +1,627 @@
{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
{use class="yii\helpers\Url"}
{use class="yii\grid\GridView"}
{use class="app\assets\ConfigAsset"}
{ConfigAsset::register($this)|void}
{block name='content'}
<style>
.input-group-addon{
width: 100px;
font-weight: bold;
}
.input-group{
width: 100%;
}
#fontSizeWrapper { font-size: 16px; }
#fontSize {
width: 100px;
font-size: 1em;
}
/* ————————————————————–
Tree core styles
*/
.tree { margin: 1em; list-style: none;}
.tree input {
position: absolute;
clip: rect(0, 0, 0, 0);
}
.tree input ~ ul { display: none; }
.tree input:checked ~ ul { display: block; }
/* ————————————————————–
Tree rows
*/
.tree li {
line-height: 1.2;
position: relative;
padding: 0 0 1em 1em;
}
.tree ul li { padding: 1em 0 0 1em; }
.tree > li:last-child { padding-bottom: 0; }
/* ————————————————————–
Tree labels
*/
.tree_label {
position: relative;
display: inline-block;
background: #fff;
}
label.tree_label { cursor: pointer; }
label.tree_label:hover { color: #666; }
/* ————————————————————–
Tree expanded icon
*/
label.tree_label:before {
background: #000;
color: #fff;
position: relative;
z-index: 1;
float: left;
margin: 0 1em 0 -2em;
width: 1em;
height: 1em;
border-radius: 1em;
content: '+';
text-align: center;
line-height: .9em;
}
:checked ~ label.tree_label:before { content: ''; }
/* ————————————————————–
Tree branches
*/
.tree ul{
list-style: none;
}
.tree li:before {
position: absolute;
top: 0;
bottom: 0;
left: -.5em;
display: block;
width: 0;
border-left: 1px solid #777;
content: "";
}
.tree_label:after {
position: absolute;
top: 0;
left: -1.5em;
display: block;
height: 0.5em;
width: 1em;
border-bottom: 1px solid #777;
border-left: 1px solid #777;
border-radius: 0 0 0 .3em;
content: '';
}
label.tree_label:after { border-bottom: 0; }
:checked ~ label.tree_label:after {
border-radius: 0 .3em 0 0;
border-top: 1px solid #777;
border-right: 1px solid #777;
border-bottom: 0;
border-left: 0;
bottom: 0;
top: 0.5em;
height: auto;
}
.tree li:last-child:before {
height: 1em;
bottom: auto;
}
.tree > li:last-child:before { display: none; }
.tree_custom {
display: block;
background: #eee;
padding: 1em;
border-radius: 0.3em;
}
.editform{
display: inline-block;min-width: 200px;
}
</style>
<div class="container-fluid">
<br>
<div class="row">
<div class="col-md-6">
<div class="mt-element-step">
<div class="row step-thin">
<div class="col-md-6 bg-grey mt-step-col active">
<div class="mt-step-number bg-white font-grey">1</div>
<div class="mt-step-title uppercase font-grey-cascade" style="cursor: pointer;" onclick="window.location = '{Url::to(['/config'])}';">
Cấu hình máy chủ
</div>
<div class="mt-step-content font-grey-cascade">Server config</div>
</div>
<div class="col-md-6 bg-grey mt-step-col active">
<div class="mt-step-number bg-white font-grey">2</div>
<div class="mt-step-title uppercase font-grey-cascade" style="cursor: pointer;" onclick="window.location = '{Url::to(['/config/cau-hinh-nhan-dien'])}';">
Cấu hình nhận diện
</div>
<div class="mt-step-content font-grey-cascade">Engine config</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-6">
<ul class="tree">
<li>
<input type="checkbox" checked="checked" id="c1" />
<label class="tree_label" for="c1">camera</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c11" />
<label class="tree_label" for="c11">auto_check</label>:
<div contenteditable="" id="text-c11" class="editform">{$config_json.camera.auto_check}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c12" />
<label class="tree_label" for="c12">num_cam</label>:
<div contenteditable="" id="text-c12" class="editform">{$config_json.camera.num_cam}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c13" />
<label class="tree_label" for="c13">rgb</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c131" />
<label class="tree_label" for="c131">url</label>:
<div contenteditable="" id="text-c131" class="editform">{$config_json.camera.rgb.url}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c132" />
<label class="tree_label" for="c132">type</label>:
<div contenteditable="" id="text-c132" class="editform">{$config_json.camera.rgb.type}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c133" />
<label class="tree_label" for="c133">rotate</label>:
<div contenteditable="" id="text-c133" class="editform">{$config_json.camera.rgb.rotate}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c134" />
<label class="tree_label" for="c134">config</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c1341" />
<label class="tree_label" for="c1341">enable</label>:
<div contenteditable="" id="text-c1341" class="editform">{$config_json.camera.rgb.config.enable}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c1342" />
<label class="tree_label" for="c1342">brightness</label>:
<div contenteditable="" id="text-c1342" class="editform">{$config_json.camera.rgb.config.brightness}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c1343" />
<label class="tree_label" for="c1343">gain</label>:
<div contenteditable="" id="text-c1343" class="editform">{$config_json.camera.rgb.config.gain}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c1344" />
<label class="tree_label" for="c1344">saturation</label>:
<div contenteditable="" id="text-c1344" class="editform">{$config_json.camera.rgb.config.saturation}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c1345" />
<label class="tree_label" for="c1345">sharpness</label>:
<div contenteditable="" id="text-c1345" class="editform">{$config_json.camera.rgb.config.sharpness}</div>
</li>
</ul>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c14" />
<label class="tree_label" for="c14">ir</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c141" />
<label class="tree_label" for="c141">url</label>:
<div contenteditable="" id="text-c141" class="editform">{$config_json.camera.ir.url}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c142" />
<label class="tree_label" for="c142">type</label>:
<div contenteditable="" id="text-c142" class="editform">{$config_json.camera.ir.type}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c143" />
<label class="tree_label" for="c143">rotate</label>:
<div contenteditable="" id="text-c143" class="editform">{$config_json.camera.ir.rotate}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c144" />
<label class="tree_label" for="c144">translate_x</label>:
<div contenteditable="" id="text-c144" class="editform">{$config_json.camera.ir.translate_x}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c145" />
<label class="tree_label" for="c145">translate_y</label>:
<div contenteditable="" id="text-c145" class="editform">{$config_json.camera.ir.translate_y}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c146" />
<label class="tree_label" for="c146">ir_scale</label>:
<div contenteditable="" id="text-c146" class="editform">{$config_json.camera.ir.ir_scale}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c147" />
<label class="tree_label" for="c147">config</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c1471" />
<label class="tree_label" for="c1471">enable</label>:
<div contenteditable="" id="text-c1471" class="editform">{$config_json.camera.ir.config.enable}</div>
</li>
</ul>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c15" />
<label class="tree_label" for="c15">max_queue_size</label>:
<div contenteditable="" id="text-c15" class="editform">{$config_json.camera.max_queue_size}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c16" />
<label class="tree_label" for="c16">count_frame_to_skip</label>:
<div contenteditable="" id="text-c16" class="editform">{$config_json.camera.count_frame_to_skip}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c17" />
<label class="tree_label" for="c17">fps</label>:
<div contenteditable="" id="text-c17" class="editform">{$config_json.camera.fps}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c18" />
<label class="tree_label" for="c18">merge_queue_pause</label>:
<div contenteditable="" id="text-c18" class="editform">{$config_json.camera.merge_queue_pause}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c19" />
<label class="tree_label" for="c19">raw_resolution</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c191" />
<label class="tree_label" for="c191">width</label>:
<div contenteditable="" id="text-c191" class="editform">{$config_json.camera.raw_resolution.width}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c192" />
<label class="tree_label" for="c192">height</label>:
<div contenteditable="" id="text-c192" class="editform">{$config_json.camera.raw_resolution.height}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c110" />
<label class="tree_label" for="c110">cam_resize</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c1101" />
<label class="tree_label" for="c1101">width</label>:
<div contenteditable="" id="text-c1101" class="editform">{$config_json.camera.cam_resize.width}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c1102" />
<label class="tree_label" for="c1102">height</label>:
<div contenteditable="" id="text-c1102" class="editform">{$config_json.camera.cam_resize.height}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c111" />
<label class="tree_label" for="c111">crop_frame</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c1111" />
<label class="tree_label" for="c1111">x</label>:
<div contenteditable="" id="text-c1111" class="editform">{$config_json.camera.crop_frame.x}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c1112" />
<label class="tree_label" for="c1112">y</label>:
<div contenteditable="" id="text-c1112" class="editform">{$config_json.camera.crop_frame.y}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c1113" />
<label class="tree_label" for="c1113">width</label>:
<div contenteditable="" id="text-c1113" class="editform">{$config_json.camera.crop_frame.width}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c1114" />
<label class="tree_label" for="c1114">height</label>:
<div contenteditable="" id="text-c1114" class="editform">{$config_json.camera.crop_frame.height}</div>
</li>
</ul>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c2" />
<label class="tree_label" for="c2">face_verify</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c21" />
<label class="tree_label" for="c21">show_fake_label</label>:
<div contenteditable="" id="text-c21" class="editform">{$config_json.face_verify.show_fake_label}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c22" />
<label class="tree_label" for="c22">debug</label>:
<div contenteditable="" id="text-c22" class="editform">{$config_json.face_verify.debug}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c23" />
<label class="tree_label" for="c23">max_fake_time</label>:
<div contenteditable="" id="text-c23" class="editform">{$config_json.face_verify.max_fake_time}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c24" />
<label class="tree_label" for="c24">min_real_time</label>:
<div contenteditable="" id="text-c24" class="editform">{$config_json.face_verify.min_real_time}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c25" />
<label class="tree_label" for="c25">saturation</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c251" />
<label class="tree_label" for="c251">enable</label>:
<div contenteditable="" id="text-c251" class="editform">{$config_json.face_verify.saturation.enable}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c252" />
<label class="tree_label" for="c252">min_std_thresh</label>:
<div contenteditable="" id="text-c252" class="editform">{$config_json.face_verify.saturation.min_std_thresh}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c253" />
<label class="tree_label" for="c253">min_mean_thresh</label>:
<div contenteditable="" id="text-c253" class="editform">{$config_json.face_verify.saturation.min_mean_thresh}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c26" />
<label class="tree_label" for="c26">mtcnn</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c261" />
<label class="tree_label" for="c261">enable</label>:
<div contenteditable="" id="text-c261" class="editform">{$config_json.face_verify.mtcnn.enable}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c262" />
<label class="tree_label" for="c262">size</label>:
<div contenteditable="" id="text-c262" class="editform">{$config_json.face_verify.mtcnn.size}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c263" />
<label class="tree_label" for="c263">num_thread</label>:
<div contenteditable="" id="text-c263" class="editform">{$config_json.face_verify.mtcnn.num_thread}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c27" />
<label class="tree_label" for="c27">ir_face_verify</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c271" />
<label class="tree_label" for="c271">enable</label>:
<div contenteditable="" id="text-c271" class="editform">{$config_json.face_verify.ir_face_verify.enable}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c272" />
<label class="tree_label" for="c272">ir_scale</label>:
<div contenteditable="" id="text-c272" class="editform">{$config_json.face_verify.ir_face_verify.ir_scale}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c273" />
<label class="tree_label" for="c273">ir_neighbor</label>:
<div contenteditable="" id="text-c273" class="editform">{$config_json.face_verify.ir_face_verify.ir_neighbor}</div>
</li>
</ul>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c3" />
<label class="tree_label" for="c3">haarcascade</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c31" />
<label class="tree_label" for="c31">enable</label>:
<div contenteditable="" id="text-c31" class="editform">{$config_json.haarcascade.enable}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c32" />
<label class="tree_label" for="c32">show_time_detect</label>:
<div contenteditable="" id="text-c32" class="editform">{$config_json.haarcascade.show_time_detect}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c33" />
<label class="tree_label" for="c33">min_size</label>:
<div contenteditable="" id="text-c33" class="editform">{$config_json.haarcascade.min_size}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c34" />
<label class="tree_label" for="c34">max_size</label>:
<div contenteditable="" id="text-c34" class="editform">{$config_json.haarcascade.max_size}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c35" />
<label class="tree_label" for="c35">scale</label>:
<div contenteditable="" id="text-c35" class="editform">{$config_json.haarcascade.scale}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c36" />
<label class="tree_label" for="c36">neighbor</label>:
<div contenteditable="" id="text-c36" class="editform">{$config_json.haarcascade.neighbor}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c4" />
<label class="tree_label" for="c4">engine</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c41" />
<label class="tree_label" for="c41">max_fps</label>:
<div contenteditable="" id="text-c41" class="editform">{$config_json.engine.max_fps}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c42" />
<label class="tree_label" for="c42">cam_id</label>:
<div contenteditable="" id="text-c42" class="editform">{$config_json.engine.cam_id}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c43" />
<label class="tree_label" for="c43">server_authen</label>:
<div contenteditable="" id="text-c43" class="editform">{$config_json.engine.server_authen}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c5" />
<label class="tree_label" for="c5">recognition</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c51" />
<label class="tree_label" for="c51">enable</label>:
<div contenteditable="" id="text-c51" class="editform">{$config_json.recognition.enable}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c52" />
<label class="tree_label" for="c52">accuracy</label>:
<div contenteditable="" id="text-c52" class="editform">{$config_json.recognition.accuracy}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c53" />
<label class="tree_label" for="c53">server_recog</label>:
<div contenteditable="" id="text-c53" class="editform">{$config_json.recognition.server_recog}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c54" />
<label class="tree_label" for="c54">request_timeout</label>:
<div contenteditable="" id="text-c54" class="editform">{$config_json.recognition.request_timeout}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c55" />
<label class="tree_label" for="c55">num_face_recog</label>:
<div contenteditable="" id="text-c55" class="editform">{$config_json.recognition.num_face_recog}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c56" />
<label class="tree_label" for="c56">first_time_recog</label>:
<div contenteditable="" id="text-c56" class="editform">{$config_json.recognition.first_time_recog}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c57" />
<label class="tree_label" for="c57">next_time_recog</label>:
<div contenteditable="" id="text-c57" class="editform">{$config_json.recognition.next_time_recog}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c6" />
<label class="tree_label" for="c6">screen</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c61" />
<label class="tree_label" for="c61">show_video</label>:
<div contenteditable="" id="text-c61" class="editform">{$config_json.screen.show_video}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c62" />
<label class="tree_label" for="c62">full_screen</label>:
<div contenteditable="" id="text-c62" class="editform">{$config_json.screen.full_screen}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c63" />
<label class="tree_label" for="c63">width</label>:
<div contenteditable="" id="text-c63" class="editform">{$config_json.screen.width}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c64" />
<label class="tree_label" for="c64">height</label>:
<div contenteditable="" id="text-c64" class="editform">{$config_json.screen.height}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c7" />
<label class="tree_label" for="c7">id_city</label>
<div contenteditable="" id="text-c7" class="editform">{$config_json.id_city}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c8" />
<label class="tree_label" for="c8">open_door</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c81" />
<label class="tree_label" for="c81">enable</label>:
<div contenteditable="" id="text-c81" class="editform">{$config_json.open_door.enable}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c82" />
<label class="tree_label" for="c82">port_name</label>:
<div contenteditable="" id="text-c82" class="editform">{$config_json.open_door.port_name}</div>
</li>
</ul>
</li>
<li>
<input type="checkbox" checked="checked" id="c9" />
<label class="tree_label" for="c9">log</label>
<ul>
<li>
<input type="checkbox" checked="checked" id="c91" />
<label class="tree_label" for="c91">path</label>:
<div contenteditable="" id="text-c91" class="editform">{$config_json.log.path}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c92" />
<label class="tree_label" for="c92">limit</label>:
<div contenteditable="" id="text-c92" class="editform">{$config_json.log.limit}</div>
</li>
<li>
<input type="checkbox" checked="checked" id="c93" />
<label class="tree_label" for="c93">clear_line</label>:
<div contenteditable="" id="text-c93" class="editform">{$config_json.log.clear_line}</div>
</li>
</ul>
</li>
</ul>
<div class="text-center">
<button class="btn btn-primary" onclick="saveStep2(this);" data-href="{Url::to(['/config/cau-hinh-nhan-dien'])}">
<i class="fa fa-floppy-o"></i> Lưu lại
</button>
</div>
</div>
</div>
</div>
{/block}

63
views/config/index.tpl Normal file
View File

@ -0,0 +1,63 @@
{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
{use class="yii\helpers\Url"}
{use class="yii\grid\GridView"}
{use class="app\assets\ConfigAsset"}
{ConfigAsset::register($this)|void}
{block name='content'}
<style>
.input-group-addon{
width: 100px;
font-weight: bold;
}
.input-group{
width: 100%;
}
</style>
<div class="container-fluid">
<br>
<div class="row">
<div class="col-md-6">
<div class="mt-element-step">
<div class="row step-thin">
<div class="col-md-6 bg-grey mt-step-col active">
<div class="mt-step-number bg-white font-grey">1</div>
<div class="mt-step-title uppercase font-grey-cascade" style="cursor: pointer;" onclick="window.location = '{Url::to(['/config'])}';">
Cấu hình máy chủ
</div>
<div class="mt-step-content font-grey-cascade">Server config</div>
</div>
<div class="col-md-6 bg-grey mt-step-col">
<div class="mt-step-number bg-white font-grey">2</div>
<div class="mt-step-title uppercase font-grey-cascade" style="cursor: pointer;" onclick="window.location = '{Url::to(['/config/cau-hinh-nhan-dien'])}';">
Cấu hình nhận diện
</div>
<div class="mt-step-content font-grey-cascade">Engine config</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">server_mqtt</div>
<input type="input" class="form-control" name="servermqtt" value="{$apiConfig.servermqtt}">
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">url</div>
<input type="input" class="form-control" name="url" value="{$apiConfig.url}">
</div>
</div>
<div class="text-center">
<button class="btn btn-primary" onclick="saveStep1(this);" data-href="{Url::to(['/config/cau-hinh-may-chu'])}">
<i class="fa fa-floppy-o"></i> Lưu lại
</button>
</div>
</div>
</div>
</div>
{/block}

View File

@ -270,4 +270,407 @@ legend {
body::-webkit-scrollbar {
display: none;
}
.mt-element-step .row {
margin: 0; }
.mt-element-step .step-default .mt-step-col {
padding-top: 30px;
padding-bottom: 30px;
text-align: center; }
.mt-element-step .step-default .mt-step-number {
font-size: 26px;
border-radius: 50% !important;
display: inline-block;
margin: auto;
padding: 3px 14px;
margin-bottom: 20px; }
.mt-element-step .step-default .mt-step-title {
font-size: 30px;
font-weight: 100; }
.mt-element-step .step-default .active {
background-color: #32c5d2 !important; }
.mt-element-step .step-default .active .mt-step-number {
color: #32c5d2 !important; }
.mt-element-step .step-default .active .mt-step-title,
.mt-element-step .step-default .active .mt-step-content {
color: #fff !important; }
.mt-element-step .step-default .done {
background-color: #26C281 !important; }
.mt-element-step .step-default .done .mt-step-number {
color: #26C281 !important; }
.mt-element-step .step-default .done .mt-step-title,
.mt-element-step .step-default .done .mt-step-content {
color: #fff !important; }
.mt-element-step .step-default .error {
background-color: #E7505A !important; }
.mt-element-step .step-default .error .mt-step-number {
color: #E7505A !important; }
.mt-element-step .step-default .error .mt-step-title,
.mt-element-step .step-default .error .mt-step-content {
color: #fff !important; }
.mt-element-step .step-thin .mt-step-col {
padding-top: 10px;
padding-bottom: 10px; }
.mt-element-step .step-thin .mt-step-number {
font-size: 26px;
border-radius: 50% !important;
float: left;
margin: auto;
padding: 3px 14px; }
.mt-element-step .step-thin .mt-step-title {
font-size: 24px;
font-weight: 100;
padding-left: 60px;
margin-top: -4px; }
.mt-element-step .step-thin .mt-step-content {
padding-left: 60px;
margin-top: -5px; }
.mt-element-step .step-thin .active {
background-color: #32c5d2 !important; }
.mt-element-step .step-thin .active .mt-step-number {
color: #32c5d2 !important; }
.mt-element-step .step-thin .active .mt-step-title,
.mt-element-step .step-thin .active .mt-step-content {
color: #fff !important; }
.mt-element-step .step-thin .done {
background-color: #26C281 !important; }
.mt-element-step .step-thin .done .mt-step-number {
color: #26C281 !important; }
.mt-element-step .step-thin .done .mt-step-title,
.mt-element-step .step-thin .done .mt-step-content {
color: #fff !important; }
.mt-element-step .step-thin .error {
background-color: #E7505A !important; }
.mt-element-step .step-thin .error .mt-step-number {
color: #E7505A !important; }
.mt-element-step .step-thin .error .mt-step-title,
.mt-element-step .step-thin .error .mt-step-content {
color: #fff !important; }
.mt-element-step .step-background .mt-step-col {
padding-top: 30px;
padding-bottom: 30px;
text-align: center;
height: 160px; }
.mt-element-step .step-background .mt-step-number {
font-size: 200px;
position: absolute;
bottom: 0;
right: 0;
line-height: 0.79em;
color: #dae1e4;
z-index: 4; }
.mt-element-step .step-background .mt-step-title {
font-size: 30px;
font-weight: 100;
text-align: right;
padding-right: 25%;
z-index: 5;
position: relative; }
.mt-element-step .step-background .mt-step-content {
text-align: right;
padding-right: 25%;
z-index: 5;
position: relative; }
.mt-element-step .step-background .active {
background-color: #32c5d2 !important; }
.mt-element-step .step-background .active .mt-step-number {
color: #2ab4c0 !important; }
.mt-element-step .step-background .active .mt-step-title,
.mt-element-step .step-background .active .mt-step-content {
color: #fff !important; }
.mt-element-step .step-background .done {
background-color: #26C281 !important; }
.mt-element-step .step-background .done .mt-step-number {
color: #22ad73 !important; }
.mt-element-step .step-background .done .mt-step-title,
.mt-element-step .step-background .done .mt-step-content {
color: #fff !important; }
.mt-element-step .step-background .error {
background-color: #E7505A !important; }
.mt-element-step .step-background .error .mt-step-number {
color: #e43a45 !important; }
.mt-element-step .step-background .error .mt-step-title,
.mt-element-step .step-background .error .mt-step-content {
color: #fff !important; }
.mt-element-step .step-background-thin .mt-step-col {
padding-top: 15px;
padding-bottom: 15px;
text-align: center; }
.mt-element-step .step-background-thin .mt-step-number {
font-size: 120px;
position: absolute;
bottom: 0;
right: 0;
line-height: 0.79em;
color: #dae1e4;
z-index: 4; }
.mt-element-step .step-background-thin .mt-step-title {
font-size: 30px;
font-weight: 100;
text-align: right;
padding-right: 25%;
z-index: 5;
position: relative; }
.mt-element-step .step-background-thin .mt-step-content {
text-align: right;
position: relative;
padding-right: 25%;
z-index: 5; }
.mt-element-step .step-background-thin .active {
background-color: #32c5d2 !important; }
.mt-element-step .step-background-thin .active .mt-step-number {
color: #2ab4c0 !important; }
.mt-element-step .step-background-thin .active .mt-step-title,
.mt-element-step .step-background-thin .active .mt-step-content {
color: #fff !important; }
.mt-element-step .step-background-thin .done {
background-color: #26C281 !important; }
.mt-element-step .step-background-thin .done .mt-step-number {
color: #22ad73 !important; }
.mt-element-step .step-background-thin .done .mt-step-title,
.mt-element-step .step-background-thin .done .mt-step-content {
color: #fff !important; }
.mt-element-step .step-background-thin .error {
background-color: #E7505A !important; }
.mt-element-step .step-background-thin .error .mt-step-number {
color: #e43a45 !important; }
.mt-element-step .step-background-thin .error .mt-step-title,
.mt-element-step .step-background-thin .error .mt-step-content {
color: #fff !important; }
.mt-element-step .step-no-background .mt-step-col {
padding-top: 30px;
padding-bottom: 30px;
text-align: center; }
.mt-element-step .step-no-background .mt-step-number {
font-size: 26px;
border-radius: 50% !important;
display: inline-block;
margin: auto;
padding: 3px 14px;
margin-bottom: 20px;
border: 1px solid;
border-color: #e5e5e5; }
.mt-element-step .step-no-background .mt-step-title {
font-size: 30px;
font-weight: 100; }
.mt-element-step .step-no-background .active .mt-step-number {
color: #32c5d2 !important;
border-color: #32c5d2 !important;
font-weight: 700; }
.mt-element-step .step-no-background .active .mt-step-title,
.mt-element-step .step-no-background .active .mt-step-content {
color: #32c5d2 !important;
font-weight: 700; }
.mt-element-step .step-no-background .done .mt-step-number {
color: #26C281 !important;
border-color: #26C281 !important;
font-weight: 700; }
.mt-element-step .step-no-background .done .mt-step-title,
.mt-element-step .step-no-background .done .mt-step-content {
color: #26C281 !important;
font-weight: 700; }
.mt-element-step .step-no-background .error .mt-step-number {
color: #E7505A !important;
border-color: #E7505A !important;
font-weight: 700; }
.mt-element-step .step-no-background .error .mt-step-title,
.mt-element-step .step-no-background .error .mt-step-content {
color: #E7505A !important;
font-weight: 700; }
.mt-element-step .step-no-background-thin .mt-step-col {
padding-top: 10px;
padding-bottom: 10px; }
.mt-element-step .step-no-background-thin .mt-step-number {
font-size: 26px;
border-radius: 50% !important;
float: left;
margin: auto;
padding: 3px 14px;
border: 1px solid;
border-color: #e5e5e5; }
.mt-element-step .step-no-background-thin .mt-step-title {
font-size: 24px;
font-weight: 100;
padding-left: 60px;
margin-top: -4px; }
.mt-element-step .step-no-background-thin .mt-step-content {
padding-left: 60px;
margin-top: -5px; }
.mt-element-step .step-no-background-thin .active .mt-step-number {
color: #32c5d2 !important;
border-color: #32c5d2 !important;
font-weight: 700; }
.mt-element-step .step-no-background-thin .active .mt-step-title,
.mt-element-step .step-no-background-thin .active .mt-step-content {
color: #32c5d2 !important;
font-weight: 700; }
.mt-element-step .step-no-background-thin .done .mt-step-number {
color: #26C281 !important;
border-color: #26C281 !important;
font-weight: 700; }
.mt-element-step .step-no-background-thin .done .mt-step-title,
.mt-element-step .step-no-background-thin .done .mt-step-content {
color: #26C281 !important;
font-weight: 700; }
.mt-element-step .step-no-background-thin .error .mt-step-number {
color: #E7505A !important;
border-color: #E7505A !important;
font-weight: 700; }
.mt-element-step .step-no-background-thin .error .mt-step-title,
.mt-element-step .step-no-background-thin .error .mt-step-content {
color: #E7505A !important;
font-weight: 700; }
.mt-element-step .step-line .mt-step-col {
padding: 30px 0;
text-align: center; }
.mt-element-step .step-line .mt-step-number {
font-size: 26px;
border-radius: 50% !important;
display: inline-block;
margin: auto;
padding: 9px;
margin-bottom: 5px;
border: 3px solid;
border-color: #e5e5e5;
position: relative;
z-index: 5;
height: 60px;
width: 60px;
text-align: center; }
.mt-element-step .step-line .mt-step-number > i {
position: relative;
top: 50%;
transform: translateY(-120%); }
.mt-element-step .step-line .mt-step-title {
font-size: 20px;
font-weight: 400;
position: relative; }
.mt-element-step .step-line .mt-step-title:after {
content: '';
height: 3px;
width: 50%;
position: absolute;
background-color: #e5e5e5;
top: -32px;
left: 50%;
z-index: 4;
transform: translateY(-100%); }
.mt-element-step .step-line .mt-step-title:before {
content: '';
height: 3px;
width: 50%;
position: absolute;
background-color: #e5e5e5;
top: -32px;
right: 50%;
z-index: 4;
transform: translateY(-100%); }
.mt-element-step .step-line .first .mt-step-title:before {
content: none; }
.mt-element-step .step-line .last .mt-step-title:after {
content: none; }
.mt-element-step .step-line .active .mt-step-number {
color: #32c5d2 !important;
border-color: #32c5d2 !important; }
.mt-element-step .step-line .active .mt-step-title,
.mt-element-step .step-line .active .mt-step-content {
color: #32c5d2 !important; }
.mt-element-step .step-line .active .mt-step-title:after, .mt-element-step .step-line .active .mt-step-title:before {
background-color: #32c5d2; }
.mt-element-step .step-line .done .mt-step-number {
color: #26C281 !important;
border-color: #26C281 !important; }
.mt-element-step .step-line .done .mt-step-title,
.mt-element-step .step-line .done .mt-step-content {
color: #26C281 !important; }
.mt-element-step .step-line .done .mt-step-title:after, .mt-element-step .step-line .done .mt-step-title:before {
background-color: #26C281; }
.mt-element-step .step-line .error .mt-step-number {
color: #E7505A !important;
border-color: #E7505A !important; }
.mt-element-step .step-line .error .mt-step-title,
.mt-element-step .step-line .error .mt-step-content {
color: #E7505A !important; }
.mt-element-step .step-line .error .mt-step-title:after, .mt-element-step .step-line .error .mt-step-title:before {
background-color: #E7505A; }
@media (max-width: 991px) {
/* 991px */
.mt-element-step .step-line .mt-step-title:after {
content: none; }
.mt-element-step .step-line .mt-step-title:before {
content: none; } }
.font-grey {
color: #E5E5E5!important;
}
.bg-grey {
background: #E5E5E5!important;
}
.bg-white {
background: #fff!important;
}
.font-grey-cascade {
color: #95A5A6!important;
}

151
web/js/config.js Normal file
View File

@ -0,0 +1,151 @@
$(function () {
});
function saveStep1(e) {
common.modalBlock(true);
$.ajax({
url: $(e).attr("data-href"),
type: 'POST',
data: {
servermqtt: $("input[name='servermqtt']").val(),
url: $("input[name='url']").val()
},
success: function (data) {
setTimeout(function () {
window.location = data;
}, 2000);
},
error: function (jqXHR, textStatus, errorThrown) {
common.modalBlock(false);
common.ajaxError();
}
});
}
function saveStep2(e) {
var config_json = {
"camera": {
"auto_check": parseInt($("#text-c11").html()),
"num_cam": parseInt($("#text-c12").html()),
"rgb": {
"url": $("#text-c131").html(),
"type": $("#text-c132").html(),
"rotate": parseInt($("#text-c133").html()),
"config": {
"enable": parseInt($("#text-c1341").html()),
"brightness": parseInt($("#text-c1342").html()),
"gain": parseInt($("#text-c1343").html()),
"saturation": parseInt($("#text-c1344").html()),
"sharpness": parseInt($("#text-c1345").html())
}
},
"ir": {
"url": $("#text-c141").html(),
"type": $("#text-c142").html(),
"rotate": parseInt($("#text-c143").html()),
"translate_x": parseInt($("#text-c144").html()),
"translate_y": parseInt($("#text-c145").html()),
"ir_scale": parseFloat($("#text-c146").html()),
"config": {
"enable": parseInt($("#text-c1471").html())
}
},
"max_queue_size": parseInt($("#text-c15").html()),
"count_frame_to_skip": parseInt($("#text-c16").html()),
"fps": parseInt($("#text-c17").html()),
"merge_queue_pause": parseInt($("#text-c18").html()),
"raw_resolution": {
"width": parseInt($("#text-c191").html()),
"height": parseInt($("#text-c192").html())
},
"cam_resize": {
"width": parseInt($("#text-c1101").html()),
"height": parseInt($("#text-c1102").html())
},
"crop_frame": {
"x": parseInt($("#text-c1111").html()),
"y": parseInt($("#text-c1112").html()),
"width": parseInt($("#text-c1113").html()),
"height": parseInt($("#text-c1114").html())
}
},
"face_verify": {
"show_fake_label": parseInt($("#text-c21").html()),
"debug": parseInt($("#text-c22").html()),
"max_fake_time": parseInt($("#text-c23").html()),
"min_real_time": parseInt($("#text-c24").html()),
"saturation": {
"enable": parseInt($("#text-c251").html()),
"min_std_thresh": parseInt($("#text-c252").html()),
"min_mean_thresh": parseInt($("#text-c253").html())
},
"mtcnn": {
"enable": parseInt($("#text-c261").html()),
"size": parseInt($("#text-c262").html()),
"num_thread": parseInt($("#text-c263").html())
},
"ir_face_verify": {
"enable": parseInt($("#text-c271").html()),
"ir_scale": parseFloat($("#text-c272").html()),
"ir_neighbor": parseInt($("#text-c273").html())
}
},
"haarcascade": {
"enable": parseInt($("#text-c31").html()),
"show_time_detect": parseInt($("#text-c32").html()),
"min_size": parseInt($("#text-c33").html()),
"max_size": parseInt($("#text-c34").html()),
"scale": parseFloat($("#text-c35").html()),
"neighbor": parseInt($("#text-c36").html())
},
"engine": {
"max_fps": parseInt($("#text-c41").html()),
"cam_id": parseInt($("#text-c42").html()),
"server_authen": $("#text-c43").html()
},
"recognition": {
"enable": parseInt($("#text-c51").html()),
"accuracy": parseFloat($("#text-c52").html()),
"server_recog": $("#text-c53").html(),
"request_timeout": parseInt($("#text-c54").html()),
"num_face_recog": parseInt($("#text-c55").html()),
"first_time_recog": parseInt($("#text-c56").html()),
"next_time_recog": parseInt($("#text-c57").html())
},
"screen": {
"show_video": parseInt($("#text-c61").html()),
"full_screen": parseInt($("#text-c62").html()),
"width": parseInt($("#text-c63").html()),
"height": parseInt($("#text-c64").html())
},
"id_city": parseInt($("#text-c7").html()),
"open_door": {
"enable": parseInt($("#text-c81").html()),
"port_name": $("#text-c82").html()
},
"log": {
"path": $("#text-c91").html(),
"limit": parseInt($("#text-c92").html()),
"clear_line": parseInt($("#text-c93").html())
}
};
common.modalBlock(true);
$.ajax({
url: $(e).attr("data-href"),
type: 'POST',
data: {
config: JSON.stringify(config_json)
},
success: function (data) {
if (data) {
notification.success("Đã lưu cấu hình!", 2000);
} else {
notification.success("Lưu cấu hình thất bại!", 2000);
}
common.modalBlock(false);
},
error: function (jqXHR, textStatus, errorThrown) {
common.modalBlock(false);
common.ajaxError();
}
});
}