2798 lines
120 KiB
HTML
2798 lines
120 KiB
HTML
<div id="fileUploadLoading">
|
|
<div class="col col-6" style="padding-right: 5px; margin-bottom: 5px;">
|
|
<div class="panel">
|
|
<div class="head" id="system_version">Web Server Version</div>
|
|
<div class="body">E.1.36</div>
|
|
</div>
|
|
</div>
|
|
<div class="col col-6" style="padding-left: 5px; margin-bottom: 5px;">
|
|
<div class="panel">
|
|
<div class="head" id="shell_version_title">Shell Version</div>
|
|
<div class="body" id="shell_version">-</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<div class="head" ><label id="system_logo_title">Logo</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_logo"></i></div>
|
|
<div class="body">
|
|
<form name="frmLogo" method="post" enctype="multipart/form-data" action="/restapi/system/config_upload">
|
|
<label class="label label-small" style="width:100px;" id="system_image">Image</label>
|
|
<input type="file" name="system_logo" id="system_logo" class="input-mini input-rect" />
|
|
<a class="btn btn-gray btn-small" id="btn_system_logo_apply">Apply</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<div class="head" ><label id="system_title_text">Title</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_title"></i></div>
|
|
<div class="body">
|
|
<input type="text" name="system_title" id="system_title" class="input input-mini input-rect" maxlength="40" style="width:50%;" />
|
|
<a class="btn btn-gray btn-small" id="btn_system_title_apply">Apply</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<div class="head" ><label id="system_alarm_notify">Alarm Notify</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_alarm_notify"></i></div>
|
|
<div class="body">
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:100px;" id="system_popup">Popup</label>
|
|
<input type="checkbox" name="notify_popup" id="notify_popup" value="yes" /> <label id="notify_popup_use">Use</label>
|
|
<span style="padding-left:20px;">
|
|
<a class="btn btn-gray btn-small" id="btn_system_notify_apply">Apply</a>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- //
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:80px;">Sound</label>
|
|
<input type="checkbox" name="notify_sound" id="notify_sound" value="yes" /> Use
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<form name="frmSound" method="post" enctype="multipart/form-data" action="/restapi/system/config_upload">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<input type="file" name="system_sound" id="system_sound" class="input-mini input-rect" style="width:80%;" />
|
|
</div>
|
|
</form>
|
|
</div>
|
|
// -->
|
|
<div class="panel">
|
|
<div class="head" ><label id="system_pos_file">Pos File</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_pos_file"></i></div>
|
|
<div class="body">
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<form name="frmPos" method="post" enctype="multipart/form-data" action="/restapi/system/pos_upload">
|
|
<label class="label label-small" style="width:100px;" id="system_pos_file_label">Pos File</label>
|
|
<input type="file" name="fw_pos_file" id="fw_pos_file" class="input-mini input-rect" />
|
|
<a class="btn btn-gray btn-small" id="btn_pos_upload">Upload</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<!-- //
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:80px;">Sound</label>
|
|
<input type="checkbox" name="notify_sound" id="notify_sound" value="yes" /> Use
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<form name="frmSound" method="post" enctype="multipart/form-data" action="/restapi/system/config_upload">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<input type="file" name="system_sound" id="system_sound" class="input-mini input-rect" style="width:80%;" />
|
|
</div>
|
|
</form>
|
|
</div>
|
|
// -->
|
|
</div>
|
|
</div>
|
|
<div style="text-align:right;padding-bottom:4px;">
|
|
</div>
|
|
|
|
<table width="100%" cellpadding="0" border="0" id="system_configure_div">
|
|
<colgroup>
|
|
<col width="60%" />
|
|
<col width="40%" />
|
|
</colgroup>
|
|
<tr>
|
|
<td style="vertical-align: top;">
|
|
<div class="panel">
|
|
<div class="head" ><label id="system_configure">Configure</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_configure"></i></div>
|
|
<div class="body" class="stack-horz">
|
|
<div class="group" style="float:left;" >
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<i class="icon-report" style="font-size: 21px; color: Gray;" id="system_config_email"></i>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_smtp">SMTP</label>
|
|
|
|
<input name="email_smtp" id="email_smtp" value="" class="input input-small input-rect" style="width:150px;" />
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_port">Port</label>
|
|
|
|
<input name="email_port" id="email_port" value="" class="input input-small input-rect" style="width:150px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_sender_email">Sender Email</label>
|
|
|
|
<input name="email_sender" id="email_sender" value="" class="input input-small input-rect" style="width:150px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_email_password">Email Password</label>
|
|
|
|
<input type="password" email_password" id="email_password" value="" class="input input-small input-rect" style="width:150px;" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="group">
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<i class="icon-gear" style="font-size: 21px; color: Gray;" id="system_config_gateway"></i>
|
|
</div>
|
|
<div id="sys_attr_hidden8">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:220px;" id="system_auto_firmware_update">Auto Firmware Update</label>
|
|
|
|
<input type="checkbox" name="fw_auto_update" id="fw_auto_update" style="width:25px" />
|
|
</div>
|
|
</div>
|
|
<div id="sys_attr_hidden1">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:220px;" id="system_tag_invalid">Tag Invalid</label>
|
|
|
|
<input type="number" name="tag_retry" id="tag_retry" value="1" min="1" max="10000" class="input input-small input-rect" style="width:100px;" />
|
|
</div>
|
|
</div>
|
|
<div style="display:none">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:220px;">Image Download</label>
|
|
|
|
<input type="number" name="image_retry" id="image_retry" value="1" min="1" class="input input-small input-rect" style="width:100px;" />
|
|
</div>
|
|
</div>
|
|
<div id="sys_attr_hidden2">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:220px;" id="system_tag_seq_init_interval">Tag Seq. Init Interval</label>
|
|
|
|
<input type="number" name="seqnum_init_interval" id="seqnum_init_interval" value="1" min="1" max="255" class="input input-small input-rect" style="width:100px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<div class="group" style="float:left;">
|
|
<label class="label label-small" style="width:220px;" id="system_tag_status_display">Tag Status Display</label>
|
|
</div>
|
|
<div class="group" style="width:120px;">
|
|
<div><input type="checkbox" name="sd_low_battery" id="sd_low_battery" style="width:25px" /> <label id="disp_low_battery">Low Battery</label>
|
|
<br><input type="checkbox" name="sd_disconnection" id="sd_disconnection" style="width:25px" /> <label id="disp_disconnection">Disconnection</label>
|
|
<br><input type="checkbox" name="sd_busy" id="sd_busy" style="width:25px" /> <label id="disp_busy">Busy</label> </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="sys_attr_hidden9" >
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:220px;" id="system_gw_disconnection_timeout">Gateway disconnection timeout</label>
|
|
|
|
<input type="number" name="gw_disconnection_timeout" id="gw_disconnection_timeout" value="1" min="1" max="255" class="input input-small input-rect" style="width:100px;" /> min
|
|
</div>
|
|
</div>
|
|
<div style="display:none">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:220px;" id="system_tag_removal_condition">Tag removal condition</label>
|
|
|
|
<input type="number" name="delete_tag_timeout" id="delete_tag_timeout" value="10" min="0" max="100" class="input input-small input-rect" style="width:100px;" /> days
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="group">
|
|
<div>
|
|
<div id="sys_attr_hidden3">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:210px;" id="system_reg_disp_interval">Reg. Display Interval</label>
|
|
|
|
<input type="number" name="sys_reg_display_interval" id="sys_reg_display_interval" value="1" min="1" max="255" class="input input-small input-rect" style="width:100px;" /> sec
|
|
</div>
|
|
</div>
|
|
<div id="sys_attr_hidden4">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:210px;" id="system_tag_security">Security</label>
|
|
|
|
<input type="checkbox" name="sys_security" id="sys_security" style="width:25px" />
|
|
</div>
|
|
</div>
|
|
<div id="sys_attr_hidden10">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:210px;" id="system_disp_refresh_interval">Display Refresh Period</label>
|
|
|
|
<input type="checkbox" name="sys_chk_display_refresh_period" id="sys_chk_display_refresh_period" style="width:25px" /> <label id="sys_chk_label_display_refresh_period">Use</label>
|
|
<input type="radio" name="sys_radio_display_refresh_type" id="sys_radio_display_refresh_type1" style="width:25px" value='0' checked='true'/> <label id="sys_radio_label_display_refresh_period">Period</label>
|
|
<input type="number" name="sys_display_refresh_period" id="sys_display_refresh_period" value="23" min="1" max="127" class="input input-small input-rect" style="width:60px;" /> hour
|
|
<input type="radio" name="sys_radio_display_refresh_type" id="sys_radio_display_refresh_type2" style="width:25px" value='1'/> <label id="sys_radio_label_display_refresh_time">Time</label>
|
|
<select name="sys_display_refresh_time" id="sys_display_refresh_time" style="width:60px;height:25px;">
|
|
<option value="0">00:00</option>
|
|
<option value="1">01:00</option>
|
|
<option value="2">02:00</option>
|
|
<option value="3">03:00</option>
|
|
<option value="4">04:00</option>
|
|
<option value="5">05:00</option>
|
|
<option value="6">06:00</option>
|
|
<option value="7">07:00</option>
|
|
<option value="8">08:00</option>
|
|
<option value="9">09:00</option>
|
|
<option value="10">10:00</option>
|
|
<option value="11">11:00</option>
|
|
<option value="12">12:00</option>
|
|
<option value="13">13:00</option>
|
|
<option value="14">14:00</option>
|
|
<option value="15">15:00</option>
|
|
<option value="16">16:00</option>
|
|
<option value="17">17:00</option>
|
|
<option value="18">18:00</option>
|
|
<option value="19">19:00</option>
|
|
<option value="20">20:00</option>
|
|
<option value="21">21:00</option>
|
|
<option value="22">22:00</option>
|
|
<option value="23">23:00</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div id="sys_attr_hidden5">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:210px;" id="system_retry_count">Retry Count</label>
|
|
|
|
<input type="number" name="sys_retry_count" id="sys_retry_count" value="1" min="1" max="20" class="input input-small input-rect" style="width:100px;" />
|
|
</div>
|
|
</div>
|
|
<div id="sys_attr_hidden6">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:210px;" id="system_response_timeout">Response Timeout</label>
|
|
|
|
<input type="number" name="sys_response_timeout" id="sys_response_timeout" value="50" min="50" max="255" class="input input-small input-rect" style="width:100px;" /> ms
|
|
</div>
|
|
</div>
|
|
<div >
|
|
<div class="group" style="padding: 3px 0 0 3px;" id="sys_attr_hidden7">
|
|
<label class="label label-small" style="width:210px;" id="system_remocon_response_timeout">Remocon Response Timeout</label>
|
|
|
|
<input type="number" name="sys_remocon_response_timeout" id="sys_remocon_response_timeout" value="1" min="1" max="255" class="input input-small input-rect" style="width:100px;" /> sec
|
|
</div>
|
|
<div class="group" style="padding: 3px 0 0 3px; float :right">
|
|
<a class="btn btn-gray btn-small" id="btn_system_manage_default">Default</a>
|
|
</div>
|
|
</div>
|
|
<div style="display:none">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:210px;">Gateway F/W Download</label>
|
|
<input type="number" name="fw_retry" id="fw_retry" value="1" min="1" class="input input-small input-rect" style="width:100px;" />
|
|
<span style="padding-left:20px;">
|
|
<a class="btn btn-gray btn-small" id="btn_system_manage_default">Default</a>
|
|
<!-- <a class="btn btn-gray btn-small" id="btn_system_manage_apply">Apply</a> -->
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
<br/>
|
|
<div id="system_email_alarm" class="panel" >
|
|
<div class="head">
|
|
<div style="float: left;">
|
|
<div class="text" >
|
|
<label id="system_send_email_condition_label">Send an email condition</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_send_email_condition"></i></div>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_alarm_email_lable">Report Time</label>
|
|
<select name="system_alarm_email_day" id="system_alarm_email_day" >
|
|
<option value="mon" id="dow_mon">Monday</option>
|
|
<option value="tue" id="dow_tue">Tuesday</option>
|
|
<option value="wed" id="dow_wed">Wednesday</option>
|
|
<option value="thu" id="dow_thu">Thursday</option>
|
|
<option value="fri" id="dow_fri">Friday</option>
|
|
<option value="sat" id="dow_sat">Saturday</option>
|
|
<option value="sun" id="dow_sun">Sunday</option>
|
|
</select>
|
|
<select name="system_alarm_email_report_time" id="system_alarm_email_report_time" style="width:60px;height:25px;">
|
|
<option value="0">00:00</option>
|
|
<option value="1">01:00</option>
|
|
<option value="2">02:00</option>
|
|
<option value="3">03:00</option>
|
|
<option value="4">04:00</option>
|
|
<option value="5">05:00</option>
|
|
<option value="6">06:00</option>
|
|
<option value="7">07:00</option>
|
|
<option value="8">08:00</option>
|
|
<option value="9">09:00</option>
|
|
<option value="10">10:00</option>
|
|
<option value="11">11:00</option>
|
|
<option value="12">12:00</option>
|
|
<option value="13">13:00</option>
|
|
<option value="14">14:00</option>
|
|
<option value="15">15:00</option>
|
|
<option value="16">16:00</option>
|
|
<option value="17">17:00</option>
|
|
<option value="18">18:00</option>
|
|
<option value="19">19:00</option>
|
|
<option value="20">20:00</option>
|
|
<option value="21">21:00</option>
|
|
<option value="22">22:00</option>
|
|
<option value="23">23:00</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_alarm_battery_25">Report Time</label>
|
|
<input type="checkbox" name="alarm_battery_25_daily" id="alarm_battery_25_daily" /> <label class="label label-small" id="alarm_battery_25_daily_use" style="width:80px;background-color:white;border: 0px">Daily</label>
|
|
<input type="checkbox" name="alarm_battery_25_weekly" id="alarm_battery_25_weekly" /> <label class="label label-small" id="alarm_battery_25_weekly_use" style="width:80px;background-color:white;border: 0px">Weekly</label>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_alarm_battery_50">Battery less 50%</label>
|
|
<input type="checkbox" name="alarm_battery_50_daily" id="alarm_battery_50_daily" /> <label class="label label-small" id="alarm_battery_50_daily_use" style="width:80px;background-color:white;border: 0px">Daily</label>
|
|
<input type="checkbox" name="alarm_battery_50_weekly" id="alarm_battery_50_weekly" /> <label class="label label-small" id="alarm_battery_50_weekly_use" style="width:80px;background-color:white;border: 0px">Weekly</label>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_alarm_disconnected_gw">Gateway Disconnected</label>
|
|
<input type="checkbox" name="alarm_disconnected_gw_daily" id="alarm_disconnected_gw_daily" /> <label class="label label-small" id="alarm_disconnected_gw_daily_use" style="width:80px;background-color:white;border: 0px">Daily</label>
|
|
<input type="checkbox" name="alarm_disconnected_gw_weekly" id="alarm_disconnected_gw_weekly" /> <label class="label label-small" id="alarm_disconnected_gw_weekly_use" style="width:80px;background-color:white;border: 0px">Weekly</label>
|
|
<input type="checkbox" name="alarm_disconnected_gw_ondemand" id="alarm_disconnected_gw_ondemand" /> <label class="label label-small" id="alarm_disconnected_gw_ondemand_use" style="width:100px;background-color:white;border: 0px">On demand</label>
|
|
<label class="label label-small" id="alarm_disconnected_gw_since" style="width:120px;background-color:white;border: 0px">Disconnect since</label>
|
|
<input type="number" name="alarm_disconnected_gw_since_time" id="alarm_disconnected_gw_since_time" value="" class="input input-small input-rect" style="width:80px;" min="1" max="999"/>
|
|
<label class="label label-small" id="alarm_disconnected_gw_minute" style="width:150px;background-color:white;border: 0px">Minutes</label>
|
|
</div>
|
|
</div>
|
|
<div style="display: none;">
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_alarm_disconnected_tag">Tag Disconnected</label>
|
|
<input type="checkbox" name="alarm_disconnected_tag_daily" id="alarm_disconnected_tag_daily" /> <label class="label label-small" id="alarm_disconnected_tag_daily_use" style="width:80px;background-color:white;border: 0px">Daily</label>
|
|
<input type="checkbox" name="alarm_disconnected_tag_weekly" id="alarm_disconnected_tag_weekly" /> <label class="label label-small" id="alarm_disconnected_tag_weekly_use" style="width:80px;background-color:white;border: 0px">Weekly</label>
|
|
<input type="checkbox" name="alarm_disconnected_tag_ondemand" id="alarm_disconnected_tag_ondemand" /> <label class="label label-small" id="alarm_disconnected_tag_ondemand_use" style="width:100px;background-color:white;border: 0px">On demand</label>
|
|
<label class="label label-small" id="alarm_disconnected_tag_since" style="width:120px;background-color:white;border: 0px">Disconnect since</label>
|
|
<input type="number" name="alarm_disconnected_tag_since_time" id="alarm_disconnected_tag_since_time" value="" class="input input-small input-rect" style="width:80px;" min="1" max="999"/>
|
|
<label class="label label-small" id="alarm_disconnected_tag_minute" style="width:150px;background-color:white;border: 0px">Minutes</label>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;" id="system_alarm_pos_import">POS Import Fail</label>
|
|
<input type="checkbox" name="alarm_pos_import_daily" id="alarm_pos_import_daily" /> <label class="label label-small" id="alarm_pos_import_daily_use" style="width:80px;background-color:white;border: 0px">Daily</label>
|
|
<input type="checkbox" name="alarm_pos_import_weekly" id="alarm_pos_import_weekly" /> <label class="label label-small" id="alarm_pos_import_weekly_use" style="width:80px;background-color:white;border: 0px">Weekly</label>
|
|
<input type="checkbox" name="alarm_pos_import_ondemand" id="alarm_pos_import_ondemand" /> <label class="label label-small" id="alarm_pos_import_ondemand_use" style="width:100px;background-color:white;border: 0px">On demand</label>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div style="float: left; margin-left: 20px; margin-top: 20px;">
|
|
<div>
|
|
<a class="btn btn-gray btn-small" id="btn_system_manage_query">Query</a>
|
|
<a class="btn btn-gray btn-small" id="btn_system_manage_apply">Apply</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<!-- <td style="display:none" style="vertical-align: top;" >
|
|
<div class="panel">
|
|
<div class="head">Alarm Report Email</div>
|
|
<div class="body">
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;">SMTP</label>
|
|
|
|
<input name="email_smtp" id="email_smtp" value="" class="input input-small input-rect" style="width:150px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;">Port</label>
|
|
|
|
<input name="email_port" id="email_port" value="" class="input input-small input-rect" style="width:150px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;">Sender Email</label>
|
|
|
|
<input name="email_sender" id="email_sender" value="" class="input input-small input-rect" style="width:150px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 0 0 3px;">
|
|
<label class="label label-small" style="width:150px;">Email Password</label>
|
|
|
|
<input name="email_password" id="email_password" value="" class="input input-small input-rect" style="width:150px;" />
|
|
<span style="padding-left:20px;">
|
|
<a class="btn btn-gray btn-small" id="btn_system_manage_apply">Apply</a>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td> -->
|
|
</tr>
|
|
</table>
|
|
<div style="text-align:right;padding-bottom:4px;">
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<div class="head" ><label id="system_ntp_configure">NTP Configure</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_ntp_configure"></i></div>
|
|
<div class="body">
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<label for="cb_svr_internal_port" class="label label-small" style="width:150px;" id="system_ntp_system_time">System Time</label>
|
|
|
|
<input type="text" name="ntp_system_time" id="ntp_system_time" value="" class="input input-small input-rect" style="width:240px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<label for="cb_svr_internal_port" class="label label-small" style="width:150px;" id="system_ntp_server1">NTP Server 1</label>
|
|
|
|
<input type="text" name="ntp_server1" id="ntp_server1" value="" class="input input-small input-rect" style="width:240px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<label for="cb_svr_internal_port" class="label label-small" style="width:150px;" id="system_ntp_server2">NTP Server 2</label>
|
|
|
|
<input type="text" name="ntp_server2" id="ntp_server2" value="" class="input input-small input-rect" style="width:240px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<label for="cb_svr_internal_port" class="label label-small" style="width:150px;" id="system_ntp_server3">NTP Server 3</label>
|
|
|
|
<input type="text" name="ntp_server3" id="ntp_server3" value="" class="input input-small input-rect" style="width:240px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<label for="cb_svr_internal_port" class="label label-small" style="width:150px;" id="system_ntp_time_zone">Time Zone</label>
|
|
|
|
<input type="text" name="ntp_time_zone" id="ntp_time_zone" value="" class="input input-small input-rect" style="width:240px;" />
|
|
</div>
|
|
</div>
|
|
<div style="float: left; margin-left: 20px; margin-top: 20px;">
|
|
<div>
|
|
<a class="btn btn-gray btn-small" id="btn_system_ntp_query">Query</a>
|
|
<a class="btn btn-gray btn-small" id="btn_system_ntp_apply">Apply</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<div class="head" ><label id="system_ems_upgrade">EMS Upgrade</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_ems_upgrade"></i></div>
|
|
<div class="body" id="ems_upgrade_div" >
|
|
<form name="frmEmsUpgrade" method="post" enctype="multipart/form-data" action="/restapi/system/ems_upgrade">
|
|
<label class="label label-small" style="width:120px;" id="system_ems_file">EMS File</label>
|
|
<input type="file" name="system_ems_upgrade_file" id="system_ems_upgrade_file" class="input-mini input-rect" />
|
|
<a class="btn btn-gray btn-small" id="btn_ems_upgrade_apply">Upgrade</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<div class="head" ><label id="system_core_upgrade">Core Upgrade</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_core_upgrade"></i></div>
|
|
<div class="body" id="core_upgrade_div">
|
|
<form name="frmCoreUpgrade" method="post" enctype="multipart/form-data" action="/restapi/system/core_upgrade">
|
|
<label class="label label-small" style="width:120px;" id="system_core_file">Core File</label>
|
|
<input type="file" name="system_core_upgrade_file" id="system_core_upgrade_file" class="input-mini input-rect" />
|
|
<a class="btn btn-gray btn-small" id="btn_core_upgrade_apply">Upgrade</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel" id="system_core_configure_div">
|
|
<div class="head" ><label id="system_core_configure">Core Configure</label>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle;" id="icon_system_core_configure"></i>
|
|
<input type="checkbox" name="cb_core_configure_all" id="cb_core_configure_all" style="margin-left:10px; width:15px;" />
|
|
<label for="cb_core_configure_all" id="cb_core_configure_all_label" style="cursor: pointer;" >Select All</label>
|
|
</div>
|
|
<div class="body" class="stack-horz">
|
|
<form name="frmCoreConfig" method="post" enctype="multipart/form-data" action="/restapi/system/set_config">
|
|
<div class="group" style="float:left; margin-right: 10px;" >
|
|
<fieldset>
|
|
<legend> SERVICE </legend>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_store_information" id="cb_svr_store_information" style="width:25px" />
|
|
<label for="cb_svr_store_information" class="label label-small" style="width:150px;" id="system_svr_store_information">Store Information</label>
|
|
|
|
<input name="svr_store_information" id="svr_store_information" value="" class="input input-small input-rect" style="width:180px; padding-right: 20px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_internal_port" id="cb_svr_internal_port" style="width:25px" />
|
|
<label for="cb_svr_internal_port" class="label label-small" style="width:150px;" id="system_svr_internal_port">Internal Port</label>
|
|
|
|
<input type="number" min="1024" max="65535" name="svr_internal_port" id="svr_internal_port" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_gen1_port" id="cb_svr_gen1_port" style="width:25px" />
|
|
<label for="cb_svr_gen1_port" class="label label-small" style="width:150px;" id="system_svr_gen1_port">GEN1 Gateway Port</label>
|
|
|
|
<input type="number" min="1024" max="65535" name="svr_gen1_port" id="svr_gen1_port" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_gen2_port" id="cb_svr_gen2_port" style="width:25px" />
|
|
<label for="cb_svr_gen2_port" class="label label-small" style="width:150px;" id="system_svr_gen2_port">GEN2 Gateway Port</label>
|
|
|
|
<input type="number" min="1024" max="65535" name="svr_gen2_port" id="svr_gen2_port" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_gen2_control_port" id="cb_svr_gen2_control_port" style="width:25px" />
|
|
<label for="cb_svr_gen2_control_port" class="label label-small" style="width:150px;" id="system_svr_gen2_control_port">GEN2 Control Port</label>
|
|
|
|
<input type="number" min="1024" max="65535" name="svr_gen2_control_port" id="svr_gen2_control_port" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_encryption_mode" id="cb_svr_encryption_mode" style="width:25px" />
|
|
<label for="cb_svr_encryption_mode" class="label label-small" style="width:150px;" id="system_svr_encryption_mode">Encryption Mode</label>
|
|
|
|
<div style="float: right;">
|
|
<select name="svr_encryption_mode" id="svr_encryption_mode" style="width:180px;height:25px;">
|
|
<option value="enable" id="svr_enc_mode_enable">enable</option>
|
|
<option value="disable" id="svr_enc_mode_disable">disable</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_encryption_code" id="cb_svr_encryption_code" style="width:25px" />
|
|
<label for="cb_svr_encryption_code" class="label label-small" style="width:150px;" id="system_svr_encryption_code">Encryption Code</label>
|
|
|
|
<input name="svr_encryption_code" id="svr_encryption_code" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_auto_backup_flag" id="cb_svr_auto_backup_flag" style="width:25px" />
|
|
<label for="cb_svr_auto_backup_flag" class="label label-small" style="width:150px; height: 55px" id="system_svr_auto_backup">Automatic Backup<br/>(everyday)</label>
|
|
|
|
<div style="float: right;">
|
|
<select name="svr_auto_backup_flag" id="svr_auto_backup_flag" style="width:180px;height:25px;margin-bottom: 3px;">
|
|
<option value="enable" id="svr_auto_backup_enable">enable</option>
|
|
<option value="disable" id="svr_auto_backup_disable">disable</option>
|
|
</select>
|
|
<br/>
|
|
<!-- <input name="svr_auto_backup_time" id="svr_auto_backup_time" type='time' value="00:00" class="input input-small input-rect" style="width:180px;" /> -->
|
|
<select name="svr_auto_backup_time" id="svr_auto_backup_time" style="width:180px;height:25px;margin-bottom: 3px;">
|
|
<option value="0000">00:00</option>
|
|
<option value="0100">01:00</option>
|
|
<option value="0200">02:00</option>
|
|
<option value="0300">03:00</option>
|
|
<option value="0400">04:00</option>
|
|
<option value="0500">05:00</option>
|
|
<option value="0600">06:00</option>
|
|
<option value="0700">07:00</option>
|
|
<option value="0800">08:00</option>
|
|
<option value="0900">09:00</option>
|
|
<option value="1000">10:00</option>
|
|
<option value="1100">11:00</option>
|
|
<option value="1200">12:00</option>
|
|
<option value="1300">13:00</option>
|
|
<option value="1400">14:00</option>
|
|
<option value="1500">15:00</option>
|
|
<option value="1600">16:00</option>
|
|
<option value="1700">17:00</option>
|
|
<option value="1800">18:00</option>
|
|
<option value="1900">19:00</option>
|
|
<option value="2000">20:00</option>
|
|
<option value="2100">21:00</option>
|
|
<option value="2200">22:00</option>
|
|
<option value="2300">23:00</option>
|
|
</select>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_svr_core_reset" id="cb_svr_core_reset" style="width:25px" />
|
|
<label for="cb_svr_core_reset" class="label label-small" style="width:150px;" id="system_svr_core_reset">Sync Reset</label>
|
|
|
|
<input type="radio" id="svr_core_reset_true" name="svr_core_reset" value="true" /> <label for="svr_core_reset_true" id="system_svr_core_reset_true">True</label>
|
|
<input type="radio" id="svr_core_reset_false" name="svr_core_reset" value="false" checked="checked" /> <label for="svr_core_reset_false" id="system_svr_core_reset_false">False</label>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<div style="float: left; margin-top: 15px; margin-left: 15px;">
|
|
<div>
|
|
<a class="btn btn-gray btn-small" id="btn_system_core_configure_query">Query</a>
|
|
<a class="btn btn-gray btn-small" id="btn_system_core_configure_apply">Apply</a>
|
|
<a class="btn btn-gray btn-small" id="btn_system_core_configure_default">Default</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="group" style="float:left; margin-right: 10px;">
|
|
<fieldset>
|
|
<legend> FTP </legend>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_ftp_manual_port_start" id="cb_ftp_manual_port_start" style="width:25px" />
|
|
<label for="cb_ftp_manual_port_start" class="label label-small" style="width:150px;" id="system_ftp_manual_port">Manual Port</label>
|
|
|
|
<input type="number" min="1024" max="65535" name="ftp_manual_port_start" id="ftp_manual_port_start" value="" class="input input-small input-rect" style="width:80px;" /> ~
|
|
<input type="number" min="1024" max="65535" name="ftp_manual_port_end" id="ftp_manual_port_end" value="" class="input input-small input-rect" style="width:80px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_ftp_control_port" id="cb_ftp_control_port" style="width:25px" />
|
|
<label for="cb_ftp_control_port" class="label label-small" style="width:150px;" id="system_ftp_control_port">Control Port</label>
|
|
|
|
<input type="number" min="1024" max="65535" name="ftp_control_port" id="ftp_control_port" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset style="margin-top: 10px; margin-left: 1px">
|
|
<legend> SSL <span id="ssl_status"></span> </legend>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_ssl_mode" id="cb_ssl_mode" style="width:25px" />
|
|
<label for="cb_ssl_mode" class="label label-small" style="width:150px;" id="system_ssl_mode">SSL Mode</label>
|
|
|
|
<div style="float: right;">
|
|
<select name="ssl_mode" id="ssl_mode" style="width:180px;height:25px;">
|
|
<option value="enable" id="ssl_mode_enable">enable</option>
|
|
<option value="disable" id="ssl_mode_disable">disable</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_ssl_key_store" id="cb_ssl_key_store" style="width:25px" />
|
|
<label for="cb_ssl_key_store" class="label label-small" style="width:150px;" id="system_ssl_key_store">Key Store</label>
|
|
|
|
<input type="file" name="ssl_key_store" id="ssl_key_store" class="input-mini input-rect" style="width:180px;"/>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 23px;">
|
|
<!-- <input type="checkbox" name="cb_ssl_key_store_password" id="cb_ssl_key_store_password" style="width:25px" /> -->
|
|
<label for="cb_ssl_key_store_password" class="label label-small" style="width:150px;" id="system_ssl_key_store_password">Key Store Password</label>
|
|
|
|
<input name="ssl_key_store_password" id="ssl_key_store_password" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 23px;">
|
|
<!-- <input type="checkbox" name="cb_ssl_key_password" id="cb_ssl_key_password" style="width:25px" /> -->
|
|
<label for="cb_ssl_key_password" class="label label-small" style="width:150px;" id="system_ssl_key_password">Key Password</label>
|
|
|
|
<input name="ssl_key_password" id="ssl_key_password" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="group" style="float:left;" >
|
|
<fieldset>
|
|
<legend> API </legend>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_api_port" id="cb_api_port" style="width:25px" />
|
|
<label for="cb_api_port" class="label label-small" style="width:150px;" id="system_api_port">Port</label>
|
|
|
|
<input type="number" min="1024" max="65535" name="api_port" id="api_port" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_api_user" id="cb_api_user" style="width:25px" />
|
|
<label for="cb_api_user" class="label label-small" style="width:150px;" id="system_api_user">User</label>
|
|
|
|
<input name="api_user" id="api_user" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_api_password" id="cb_api_password" style="width:25px" />
|
|
<label for="cb_api_password" class="label label-small" style="width:150px;" id="system_api_password">Password</label>
|
|
|
|
<input name="api_password" id="api_password" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_api_esn" id="cb_api_esn" style="width:25px" />
|
|
<label for="cb_api_esn" class="label label-small" style="width:150px;" id="system_api_esn">ESN</label>
|
|
|
|
<input name="api_esn" id="api_esn" value="" class="input input-small input-rect" style="width:180px;" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="group" style="padding: 3px 3px 3px 0;">
|
|
<input type="checkbox" name="cb_api_esn_report" id="cb_api_esn_report" style="width:25px" />
|
|
<label for="cb_api_esn_report" class="label label-small" style="width:150px; height: 50px" id="system_api_esn_report">Reporting Cycle</label>
|
|
|
|
<input type="number" min="10" max="300" name="api_esn_report" id="api_esn_report" value="" class="input input-small input-rect" style="width:180px; vertical-align: top;" />
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="text-align:right;">
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
var fwUploadLoading = 1;
|
|
jui.ready([ "ui.modal" ], function(modal) {
|
|
fwUploadLoading = modal('#loading', {
|
|
// target: '#wrapper',
|
|
target: '#fileUploadLoading',
|
|
opacity: 0.1,
|
|
autoHide: false
|
|
});
|
|
});
|
|
$(document).ready(function(){
|
|
$("#cb_core_configure_all").change(function(){
|
|
if($("#cb_core_configure_all").is(":checked")){
|
|
$("#cb_svr_store_information").attr('checked', true).trigger('change');
|
|
$("#cb_svr_core_reset").attr('checked', true).trigger('change');
|
|
$("#cb_svr_internal_port").attr('checked', true).trigger('change');
|
|
$("#cb_svr_gen1_port").attr('checked', true).trigger('change');
|
|
$("#cb_svr_gen2_port").attr('checked', true).trigger('change');
|
|
$("#cb_svr_gen2_control_port").attr('checked', true).trigger('change');
|
|
$("#cb_svr_encryption_mode").attr('checked', true).trigger('change');
|
|
$("#cb_svr_encryption_code").attr('checked', true).trigger('change');
|
|
$("#cb_svr_auto_backup_flag").attr('checked', true).trigger('change');
|
|
|
|
$("#cb_ftp_manual_port_start").attr('checked', true).trigger('change');
|
|
$("#cb_ftp_control_port").attr('checked', true).trigger('change');
|
|
|
|
$("#cb_ssl_mode").attr('checked', true).trigger('change');
|
|
$("#cb_ssl_key_store").attr('checked', true).trigger('change');
|
|
|
|
$("#cb_api_port").attr('checked', true).trigger('change');
|
|
$("#cb_api_user").attr('checked', true).trigger('change');
|
|
$("#cb_api_password").attr('checked', true).trigger('change');
|
|
$("#cb_api_esn").attr('checked', true).trigger('change');
|
|
$("#cb_api_esn_report").attr('checked', true).trigger('change');
|
|
}else{
|
|
$("#cb_svr_store_information").attr('checked', false).trigger('change');
|
|
$("#cb_svr_core_reset").attr('checked', false).trigger('change');
|
|
$("#cb_svr_internal_port").attr('checked', false).trigger('change');
|
|
$("#cb_svr_gen1_port").attr('checked', false).trigger('change');
|
|
$("#cb_svr_gen2_port").attr('checked', false).trigger('change');
|
|
$("#cb_svr_gen2_control_port").attr('checked', false).trigger('change');
|
|
$("#cb_svr_encryption_mode").attr('checked', false).trigger('change');
|
|
$("#cb_svr_encryption_code").attr('checked', false).trigger('change');
|
|
$("#cb_svr_auto_backup_flag").attr('checked', false).trigger('change');
|
|
|
|
$("#cb_ftp_manual_port_start").attr('checked', false).trigger('change');
|
|
$("#cb_ftp_control_port").attr('checked', false).trigger('change');
|
|
|
|
$("#cb_ssl_mode").attr('checked', false).trigger('change');
|
|
$("#cb_ssl_key_store").attr('checked', false).trigger('change');
|
|
|
|
$("#cb_api_port").attr('checked', false).trigger('change');
|
|
$("#cb_api_user").attr('checked', false).trigger('change');
|
|
$("#cb_api_password").attr('checked', false).trigger('change');
|
|
$("#cb_api_esn").attr('checked', false).trigger('change');
|
|
$("#cb_api_esn_report").attr('checked', false).trigger('change');
|
|
}
|
|
});
|
|
$("#cb_svr_store_information").change(function(){
|
|
if($("#cb_svr_store_information").is(":checked")){
|
|
$('#svr_store_information').attr('disabled', false);
|
|
}else{
|
|
$('#svr_store_information').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_svr_internal_port").change(function(){
|
|
if($("#cb_svr_internal_port").is(":checked")){
|
|
$('#svr_internal_port').attr('disabled', false);
|
|
}else{
|
|
$('#svr_internal_port').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_svr_gen1_port").change(function(){
|
|
if($("#cb_svr_gen1_port").is(":checked")){
|
|
$('#svr_gen1_port').attr('disabled', false);
|
|
}else{
|
|
$('#svr_gen1_port').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_svr_gen2_port").change(function(){
|
|
if($("#cb_svr_gen2_port").is(":checked")){
|
|
$('#svr_gen2_port').attr('disabled', false);
|
|
}else{
|
|
$('#svr_gen2_port').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_svr_gen2_control_port").change(function(){
|
|
if($("#cb_svr_gen2_control_port").is(":checked")){
|
|
$('#svr_gen2_control_port').attr('disabled', false);
|
|
}else{
|
|
$('#svr_gen2_control_port').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_svr_encryption_mode").change(function(){
|
|
if($("#cb_svr_encryption_mode").is(":checked")){
|
|
$('#svr_encryption_mode').attr('disabled', false);
|
|
}else{
|
|
$('#svr_encryption_mode').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_svr_encryption_code").change(function(){
|
|
if($("#cb_svr_encryption_code").is(":checked")){
|
|
$('#svr_encryption_code').attr('disabled', false);
|
|
}else{
|
|
$('#svr_encryption_code').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_svr_auto_backup_flag").change(function(){
|
|
if($("#cb_svr_auto_backup_flag").is(":checked")){
|
|
$('#svr_auto_backup_flag').attr('disabled', false);
|
|
$('#svr_auto_backup_time').attr('disabled', false);
|
|
}else{
|
|
$('#svr_auto_backup_flag').attr('disabled', true);
|
|
$('#svr_auto_backup_time').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_svr_core_reset").change(function(){
|
|
if($("#cb_svr_core_reset").is(":checked")){
|
|
$('#svr_core_reset_true').attr('disabled', false);
|
|
$('#svr_core_reset_false').attr('disabled', false);
|
|
}else{
|
|
$('#svr_core_reset_false').attr('checked', true);
|
|
$('#svr_core_reset_true').attr('disabled', true);
|
|
$('#svr_core_reset_false').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_ftp_manual_port_start").change(function(){
|
|
if($("#cb_ftp_manual_port_start").is(":checked")){
|
|
$('#ftp_manual_port_start').attr('disabled', false);
|
|
$('#ftp_manual_port_end').attr('disabled', false);
|
|
}else{
|
|
$('#ftp_manual_port_start').attr('disabled', true);
|
|
$('#ftp_manual_port_end').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_ftp_control_port").change(function(){
|
|
if($("#cb_ftp_control_port").is(":checked")){
|
|
$('#ftp_control_port').attr('disabled', false);
|
|
}else{
|
|
$('#ftp_control_port').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_api_esn_report").change(function(){
|
|
if($("#cb_api_esn_report").is(":checked")){
|
|
$('#api_esn_report').attr('disabled', false);
|
|
}else{
|
|
$('#api_esn_report').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_ssl_mode").change(function(){
|
|
if($("#cb_ssl_mode").is(":checked")){
|
|
$('#ssl_mode').attr('disabled', false);
|
|
}else{
|
|
$('#ssl_mode').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_ssl_key_store").change(function(){
|
|
if($("#cb_ssl_key_store").is(":checked")){
|
|
$('#ssl_key_store').attr('disabled', false);
|
|
$('#ssl_key_store_password').attr('disabled', false);
|
|
$('#ssl_key_password').attr('disabled', false);
|
|
}else{
|
|
$('#ssl_key_store').attr('disabled', true);
|
|
$('#ssl_key_store_password').attr('disabled', true);
|
|
$('#ssl_key_password').attr('disabled', true);
|
|
}
|
|
});
|
|
// $("#cb_ssl_key_store_password").change(function(){
|
|
// if($("#cb_ssl_key_store_password").is(":checked")){
|
|
// $('#ssl_key_store_password').attr('disabled', false);
|
|
// }else{
|
|
// $('#ssl_key_store_password').attr('disabled', true);
|
|
// }
|
|
// });
|
|
// $("#cb_ssl_key_password").change(function(){
|
|
// if($("#cb_ssl_key_password").is(":checked")){
|
|
// $('#ssl_key_password').attr('disabled', false);
|
|
// }else{
|
|
// $('#ssl_key_password').attr('disabled', true);
|
|
// }
|
|
// });
|
|
$("#cb_api_port").change(function(){
|
|
if($("#cb_api_port").is(":checked")){
|
|
$('#api_port').attr('disabled', false);
|
|
}else{
|
|
$('#api_port').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_api_user").change(function(){
|
|
if($("#cb_api_user").is(":checked")){
|
|
$('#api_user').attr('disabled', false);
|
|
}else{
|
|
$('#api_user').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_api_password").change(function(){
|
|
if($("#cb_api_password").is(":checked")){
|
|
$('#api_password').attr('disabled', false);
|
|
}else{
|
|
$('#api_password').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_api_esn").change(function(){
|
|
if($("#cb_api_esn").is(":checked")){
|
|
$('#api_esn').attr('disabled', false);
|
|
}else{
|
|
$('#api_esn').attr('disabled', true);
|
|
}
|
|
});
|
|
$("#cb_api_esn_report").change(function(){
|
|
if($("#cb_api_esn_report").is(":checked")){
|
|
$('#api_esn_report').attr('disabled', false);
|
|
}else{
|
|
$('#api_esn_report').attr('disabled', true);
|
|
}
|
|
});
|
|
|
|
$("input[name=svr_store_information]").keyup(function(event){
|
|
if (!(event.keyCode >=37 && event.keyCode<=40)) {
|
|
var inputVal = $(this).val();
|
|
$(this).val(inputVal.replace(/[^a-z0-9]/gi,''));
|
|
}
|
|
});
|
|
$("input[name=svr_store_information]").focusout(function(event){
|
|
var inputVal = $(this).val();
|
|
$(this).val(inputVal.replace(/[^a-z0-9]/gi,''));
|
|
});
|
|
|
|
// $('#svr_auto_backup_time').timepicker({
|
|
// timeFormat: 'HH:mm',
|
|
// interval: 60,
|
|
// minTime: '00:00',
|
|
// maxTime: '24:00',
|
|
// defaultTime: '00:00',
|
|
// startTime: '00:00',
|
|
// dynamic: false,
|
|
// dropdown: true,
|
|
// scrollbar: true
|
|
// });
|
|
});
|
|
|
|
|
|
var tab_alarm;
|
|
jui.ready([ "uix.tab" ], function(tab) {
|
|
tab_alarm = tab("#email_alarm_tab", {
|
|
event: {
|
|
change: function(data) {
|
|
//alert(data.text);
|
|
}
|
|
},
|
|
target: "#email_alarm_tab_contents",
|
|
index: 0
|
|
});
|
|
});
|
|
jui.ready([ "ui.tooltip" ], function(tooltip) {
|
|
tooltip_btn_system_logo_apply = tooltip("#btn_system_logo_apply", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_system_logo_apply
|
|
});
|
|
tooltip_btn_system_title_apply = tooltip("#btn_system_title_apply", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_system_title_apply
|
|
});
|
|
tooltip_btn_ems_upgrade_apply = tooltip("#btn_ems_upgrade_apply", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_ems_upgrade_apply
|
|
});
|
|
tooltip_btn_core_upgrade_apply = tooltip("#btn_core_upgrade_apply", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_core_upgrade_apply
|
|
});
|
|
tooltip_btn_system_notify_apply = tooltip("#btn_system_notify_apply", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_system_notify_apply
|
|
});
|
|
tooltip_btn_pos_upload = tooltip("#btn_pos_upload", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_pos_upload
|
|
});
|
|
tooltip_icon_system_logo = tooltip("#icon_system_logo", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_logo
|
|
});
|
|
tooltip_icon_system_title = tooltip("#icon_system_title", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_title
|
|
});
|
|
/*tooltip_icon_system_alarm_notify = tooltip("#icon_system_alarm_notify", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_alarm_notify
|
|
});*/
|
|
tooltip_btn_system_manage_default = tooltip("#btn_system_manage_default", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_system_manage_default
|
|
});
|
|
tooltip_system_tag_status_display = tooltip("#system_tag_status_display", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_tag_status_display
|
|
});
|
|
tooltip_system_auto_firmware_update = tooltip("#system_auto_firmware_update", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_auto_firmware_update
|
|
});
|
|
tooltip_system_disp_refresh_interval = tooltip("#system_disp_refresh_interval", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_disp_refresh_interval
|
|
});
|
|
tooltip_system_config_email = tooltip("#system_config_email", {
|
|
position: "right",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_config_email
|
|
});
|
|
tooltip_system_config_gateway = tooltip("#system_config_gateway", {
|
|
position: "right",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_config_gateway
|
|
});
|
|
/*tooltip_system_send_emal_condition = tooltip("#system_send_email_condition", {
|
|
position: "left",
|
|
width: 160,
|
|
align: "left",
|
|
title: locale.tooltip_system_send_emal_condition
|
|
});*/
|
|
tooltip_icon_system_alarm_notify = tooltip("#icon_system_alarm_notify", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_alarm_noti
|
|
});
|
|
tooltip_icon_system_pos_file = tooltip("#icon_system_pos_file", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_update_posfile
|
|
});
|
|
tooltip_icon_system_configure = tooltip("#icon_system_configure", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_configure
|
|
});
|
|
tooltip_icon_system_ems_upgrade = tooltip("#icon_system_ems_upgrade", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_ems_upgrade
|
|
});
|
|
tooltip_icon_system_core_upgrade = tooltip("#icon_system_core_upgrade", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_core_upgrade
|
|
});
|
|
tooltip_icon_system_ntp_configure = tooltip("#icon_system_ntp_configure", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_ntp_configure
|
|
});
|
|
tooltip_icon_system_core_configure = tooltip("#icon_system_core_configure", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_core_configure
|
|
});
|
|
tooltip_icon_system_send_email_condition = tooltip("#icon_system_send_email_condition", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_icon_system_send_email_condition
|
|
});
|
|
tooltip_btn_system_manage_query = tooltip("#btn_system_manage_query", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_system_manage_query
|
|
});
|
|
tooltip_btn_system_manage_apply = tooltip("#btn_system_manage_apply", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_apply
|
|
});
|
|
tooltip_btn_system_ntp_query = tooltip("#btn_system_ntp_query", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_system_manage_query
|
|
});
|
|
tooltip_btn_system_ntp_apply = tooltip("#btn_system_ntp_apply", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_apply
|
|
});
|
|
|
|
|
|
|
|
tooltip_system_alarm_email_report_time = tooltip("#system_alarm_email_lable", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_alarm_email_report_time
|
|
});
|
|
tooltip_system_alarm_battery_25 = tooltip("#system_alarm_battery_25", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_alarm_battery_25
|
|
});
|
|
tooltip_system_alarm_battery_25 = tooltip("#system_alarm_battery_50", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_alarm_battery_50
|
|
});
|
|
tooltip_system_alarm_disconnected_gw = tooltip("#system_alarm_disconnected_gw", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_alarm_disconnected_gw
|
|
});
|
|
tooltip_system_alarm_disconnected_tag = tooltip("#system_alarm_disconnected_tag", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_alarm_disconnected_tag
|
|
});
|
|
tooltip_system_alarm_pos_import = tooltip("#system_alarm_pos_import", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_alarm_pos_import
|
|
});
|
|
|
|
tooltip_btn_system_core_configure_default = tooltip("#btn_system_core_configure_default", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_system_manage_default
|
|
});
|
|
tooltip_btn_system_core_configure_query = tooltip("#btn_system_core_configure_query", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_system_manage_query
|
|
});
|
|
tooltip_btn_system_core_configure_apply = tooltip("#btn_system_core_configure_apply", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_btn_apply
|
|
});
|
|
});
|
|
function fnGetVersion() {
|
|
$.ajax({
|
|
url : '/restapi/system/version'
|
|
, type : 'POST'
|
|
, success : function(json) {
|
|
//$('#web_version').text('V '+ json.version);
|
|
$('#shell_version').text(json.shell_version);
|
|
}, error:function(request,status,err){
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
function fnSetSystemConfig(id, info) {
|
|
$.ajax({
|
|
url : '/restapi/system/config_update'
|
|
, type : 'POST'
|
|
, data : {
|
|
'id': id
|
|
, 'info': info
|
|
}, success : function(json) {
|
|
if(json.result.toLowerCase() == 'success') {
|
|
if (id == 'system_title') {
|
|
$('#main_system_title').text(info);
|
|
document.title = info;
|
|
}
|
|
|
|
if (id == 'notify_popup') {
|
|
notify_popup = info;
|
|
}
|
|
if (id == 'notify_sound') {
|
|
notify_sound = info;
|
|
}
|
|
//alert(json[0].result);
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
}
|
|
else
|
|
{
|
|
alertify.error(json.result);
|
|
}
|
|
}, error:function(request,status,err){
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnGetSystemConfigList() {
|
|
$.ajax({
|
|
url: '/restapi/system/config_list'
|
|
, type: 'POST'
|
|
, data: {
|
|
}, success : function(json) {
|
|
$.each(json, function(i, v) {
|
|
if (json[i].id == 'system_title') {
|
|
$('#system_title').val(json[i].info);
|
|
}
|
|
|
|
if (json[i].id == 'notify_popup') {
|
|
if(json[i].info == 'yes') {
|
|
$('#notify_popup').attr('checked', 'checked');
|
|
}
|
|
}
|
|
|
|
if (json[i].id == 'notify_sound') {
|
|
if(json[i].info == 'yes') {
|
|
$('#notify_sound').attr('checked', 'checked');
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
}, error:function(request,status,err){
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnSetFileUpload(id, oData) {
|
|
$.ajax({
|
|
url: '/restapi/system/config_upload',
|
|
type: "POST",
|
|
dataType: "text",
|
|
data: oData,
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data, textStatus, jqXHR) {
|
|
var json = JSON.parse(data);
|
|
if(json.result.toLowerCase() != 'success') {
|
|
alertify.error(json.result);
|
|
} else {
|
|
if (id == 'system_logo') {
|
|
$('#system_logo').val('');
|
|
$('#main_system_logo').html('<img src="/upload/system_logo/' + json.info + '" height="60" />');
|
|
}
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
}
|
|
}, error: function(request,status,err) {
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
function fnSetPosFileUpload(id, oData) {
|
|
$.ajax({
|
|
url: '/restapi/system/pos_upload',
|
|
type: "POST",
|
|
dataType: "text",
|
|
data: oData,
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data, textStatus, jqXHR) {
|
|
var json = JSON.parse(data);
|
|
if(json.result.toLowerCase() != 'success') {
|
|
alertify.error(json.result);
|
|
} else {
|
|
if (id == 'fw_pos_file') {
|
|
$('#fw_pos_file').val('');
|
|
}
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
}
|
|
}, error: function(request,status,err) {
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
function fnGetSystemManage() {
|
|
$.ajax({
|
|
url : '/restapi/system/get_manage'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
if(json.result.toLowerCase() == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result.toLowerCase() == "success") {
|
|
json = json.data;
|
|
|
|
$.each(json, function(i, v) {
|
|
var email_smtp = json[i].email_smtp
|
|
, email_sender = json[i].email_sender
|
|
, email_port = json[i].email_port
|
|
, image_retry = json[i].image_retry
|
|
, email_password = json[i].email_password
|
|
, fw_retry = json[i].fw_retry
|
|
, seqnum_init_interval = json[i].seqnum_init_interval
|
|
, sd_low_battery = json[i].sd_low_battery
|
|
, sd_disconnection = json[i].sd_disconnection
|
|
, sd_busy = json[i].sd_busy
|
|
, tag_retry = json[i].tag_retry
|
|
, fw_auto_update = json[i].fw_auto_update
|
|
, sys_reg_display_interval = json[i].reg_display_interval
|
|
, sys_security = json[i].security
|
|
, sys_display_refresh_period = json[i].display_refresh_period
|
|
, sys_retry_count = json[i].retry_count
|
|
, sys_response_timeout = json[i].response_timeout
|
|
, sys_remocon_response_timeout = json[i].remocon_response_timeout
|
|
, sys_noti_dayofweek = json[i].noti_dayofweek
|
|
, sys_noti_hour = json[i].noti_hour
|
|
, sys_noti_min = json[i].noti_min
|
|
, sys_noti_bat25_everyday = json[i].noti_bat25_everyday
|
|
, sys_noti_bat25_weekly = json[i].noti_bat25_weekly
|
|
, sys_noti_bat50_everyday = json[i].noti_bat50_everyday
|
|
, sys_noti_bat50_weekly = json[i].noti_bat50_weekly
|
|
, sys_noti_gw_everyday = json[i].noti_gw_everyday
|
|
, sys_noti_gw_weekly = json[i].noti_gw_weekly
|
|
, sys_noti_gw_immediately = json[i].noti_gw_immediately
|
|
, sys_noti_tag_everyday = json[i].noti_tag_everyday
|
|
, sys_noti_tag_weekly = json[i].noti_tag_weekly
|
|
, sys_noti_tag_immediately = json[i].noti_tag_immediately
|
|
, sys_noti_gw_interval = json[i].noti_gw_interval
|
|
, sys_noti_tag_interval = json[i].noti_tag_interval
|
|
, sys_noti_pos_everyday = json[i].noti_pos_everyday
|
|
, sys_noti_pos_weekly = json[i].noti_pos_weekly
|
|
, sys_noti_pos_immediately = json[i].noti_pos_immediately
|
|
, gw_disconnection_timeout = json[i].gw_disconnection_timeout
|
|
, delete_tag_timeout = 0
|
|
//, delete_tag_timeout = json[i].delete_tag_timeout
|
|
;
|
|
|
|
$('#email_smtp').val(email_smtp);
|
|
$('#email_sender').val(email_sender);
|
|
$('#email_port').val(email_port);
|
|
$('#email_password').val(email_password);
|
|
$('#image_retry').val(image_retry);
|
|
$('#fw_retry').val(fw_retry);
|
|
$('#tag_retry').val(tag_retry);
|
|
$('#seqnum_init_interval').val(seqnum_init_interval);
|
|
$('#sd_low_battery').prop('checked', sd_low_battery);
|
|
$('#sd_disconnection').prop('checked', sd_disconnection);
|
|
$('#sd_busy').prop('checked', sd_busy);
|
|
$('#fw_auto_update').prop('checked', fw_auto_update);
|
|
$('#sys_reg_display_interval').val(sys_reg_display_interval);
|
|
$('#sys_remocon_response_timeout').val(sys_response_timeout);
|
|
$('#sys_security').prop('checked', sys_security);
|
|
if(sys_display_refresh_period == 255)
|
|
{
|
|
$('#sys_chk_display_refresh_period').attr('checked', false);
|
|
$('#sys_display_refresh_period').attr('disabled', true);
|
|
$('#sys_display_refresh_time').attr('disabled', true);
|
|
$('#sys_radio_display_refresh_type1').attr('disabled', true);
|
|
$('#sys_radio_display_refresh_type2').attr('disabled', true);
|
|
}
|
|
else
|
|
{
|
|
$('#sys_radio_display_refresh_type1').attr('disabled', false);
|
|
$('#sys_radio_display_refresh_type2').attr('disabled', false);
|
|
|
|
$('#sys_chk_display_refresh_period').attr('checked', true);
|
|
if(sys_display_refresh_period > 127)
|
|
{
|
|
$('#sys_radio_display_refresh_type1').attr('checked', false);
|
|
$('#sys_radio_display_refresh_type2').attr('checked', true);
|
|
$("#sys_display_refresh_time").attr('disabled', false);
|
|
$("#sys_display_refresh_period").attr('disabled', true);
|
|
$("#sys_display_refresh_time").val(sys_display_refresh_period - 128);
|
|
}
|
|
else
|
|
{
|
|
$('#sys_radio_display_refresh_type1').attr('checked', true);
|
|
$('#sys_radio_display_refresh_type2').attr('checked', false);
|
|
$("#sys_display_refresh_time").attr('disabled', true);
|
|
$("#sys_display_refresh_period").attr('disabled', false);
|
|
$("#sys_display_refresh_period").val(sys_display_refresh_period);
|
|
}
|
|
}
|
|
$('#sys_retry_count').val(sys_retry_count);
|
|
$('#sys_response_timeout').val(sys_response_timeout);
|
|
$('#sys_remocon_response_timeout').val(sys_remocon_response_timeout);
|
|
$('#system_alarm_email_day').val(sys_noti_dayofweek);
|
|
$('#system_alarm_email_report_time').val(sys_noti_hour);
|
|
$('#alarm_battery_25_daily').prop('checked', sys_noti_bat25_everyday);
|
|
$('#alarm_battery_25_weekly').prop('checked', sys_noti_bat25_weekly);
|
|
$('#alarm_battery_50_daily').prop('checked', sys_noti_bat50_everyday);
|
|
$('#alarm_battery_50_weekly').prop('checked', sys_noti_bat50_weekly);
|
|
$('#alarm_disconnected_gw_daily').prop('checked', sys_noti_gw_everyday);
|
|
$('#alarm_disconnected_gw_weekly').prop('checked', sys_noti_gw_weekly);
|
|
$('#alarm_disconnected_gw_ondemand').prop('checked', sys_noti_gw_immediately);
|
|
$('#alarm_disconnected_tag_daily').prop('checked', sys_noti_tag_everyday);
|
|
$('#alarm_disconnected_tag_weekly').prop('checked', sys_noti_tag_weekly);
|
|
$('#alarm_disconnected_tag_ondemand').prop('checked', sys_noti_tag_immediately);
|
|
$('#alarm_disconnected_gw_since_time').val(sys_noti_gw_interval);
|
|
$('#alarm_disconnected_tag_since_time').val(sys_noti_tag_interval);
|
|
$('#alarm_pos_import_daily').prop('checked', sys_noti_pos_everyday);
|
|
$('#alarm_pos_import_weekly').prop('checked', sys_noti_pos_weekly);
|
|
$('#alarm_pos_import_ondemand').prop('checked', sys_noti_pos_immediately);
|
|
$('#gw_disconnection_timeout').val(gw_disconnection_timeout);
|
|
$('#delete_tag_timeout').val(0);
|
|
//$('#delete_tag_timeout').val(delete_tag_timeout);
|
|
});
|
|
}
|
|
}, error:function(request,status,err){
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
function fnSetSystemManage() {
|
|
//alert("a");
|
|
var invalidRetryCnt = $('#tag_retry').val()
|
|
if (invalidRetryCnt < 1 || invalidRetryCnt > 10000) {
|
|
//alert('Please enter a Tag Invalid Retry Count value between 1 and 10000.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.tag_invalid + ' : 1-10000)');
|
|
return;
|
|
}
|
|
var invalidSeqInterval = $('#seqnum_init_interval').val()
|
|
if (invalidSeqInterval < 1 || invalidSeqInterval > 255) {
|
|
//alert('Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
//alertify.alert(locale.error,'Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.tag_seq_init_interval + ' : 1-255)');
|
|
return;
|
|
}
|
|
var invalidDispInterval = $('#sys_reg_display_interval').val()
|
|
if (invalidDispInterval < 1 || invalidDispInterval > 255) {
|
|
//alert('Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
//alertify.alert(locale.error,'Please enter a Reg. Display Interval 1 and 255.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.reg_interval + ' : 1-255)');
|
|
return;
|
|
}
|
|
if($('#sys_chk_display_refresh_period').is(':checked')){
|
|
if($('#sys_radio_display_refresh_type1').is(':checked')){
|
|
var invalidDispRefreshPeriod = $('#sys_display_refresh_period').val()
|
|
if (invalidDispRefreshPeriod < 1 || invalidDispRefreshPeriod > 127) {
|
|
//alert('Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
//alertify.alert(locale.error,'Please enter a Display Refersh Period 1 and 255.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.refresh_period + ' : 1-127)');
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
var invalidRetryCount = $('#sys_retry_count').val()
|
|
if (invalidRetryCount < 1 || invalidRetryCount > 20) {
|
|
//alert('Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
//alertify.alert(locale.error,'Please enter a Retry Count 1 and 20.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.retry_cnt + ' : 1-20)');
|
|
return;
|
|
}
|
|
var invalidSysResponseTimeout = $('#sys_response_timeout').val()
|
|
if (invalidSysResponseTimeout < 50 || invalidSysResponseTimeout > 255) {
|
|
//alert('Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
//alertify.alert(locale.error,'Please enter a Response Timeout 50 and 255.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.resp_timeoout + ' : 50-255)');
|
|
return;
|
|
}
|
|
var invalidRemoconResponseTimeout = $('#sys_remocon_response_timeout').val()
|
|
if (invalidRemoconResponseTimeout < 1 || invalidRemoconResponseTimeout > 255) {
|
|
//alert('Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
//alertify.alert('Error','Please enter a Remocon Response Timeout 1 and 255.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.remocon_timeout + ' : 1-255)');
|
|
return;
|
|
}
|
|
var disconnected_gw_since = $('#alarm_disconnected_gw_since_time').val()
|
|
if (disconnected_gw_since < 1 || disconnected_gw_since > 999) {
|
|
//alert('Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
//alertify.alert('Error','Please enter a Remocon Response Timeout 1 and 255.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.disconnect_since + ' : 1-999)');
|
|
return;
|
|
}
|
|
|
|
var disconnected_tag_since = $('#alarm_disconnected_tag_since_time').val()
|
|
if (disconnected_tag_since < 1 || disconnected_tag_since > 999) {
|
|
//alert('Please enter a Tag Invalid Tag Seq. Init Interval 1 and 255.');
|
|
//alertify.alert('Error','Please enter a Remocon Response Timeout 1 and 255.');
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.disconnect_since + ' : 1-999)');
|
|
return;
|
|
}
|
|
var sys_display_refresh_period_val = 255;
|
|
if($('#sys_chk_display_refresh_period').is(':checked')){
|
|
if($('#sys_radio_display_refresh_type1').is(':checked')){
|
|
sys_display_refresh_period_val = Number($('#sys_display_refresh_period').val());
|
|
}
|
|
else{
|
|
sys_display_refresh_period_val = Number($('#sys_display_refresh_time').val());
|
|
sys_display_refresh_period_val += 128;
|
|
}
|
|
}
|
|
var invalidGwDisconnectionTimeout = $('#gw_disconnection_timeout').val()
|
|
if (invalidGwDisconnectionTimeout < 1 || invalidGwDisconnectionTimeout > 255) {
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.gw_disconnection_timeout + ' : 1-255)');
|
|
return;
|
|
}
|
|
/*var delete_tag_timeout = $('#delete_tag_timeout').val()
|
|
if ((delete_tag_timeout > 0 && delete_tag_timeout < 5) || delete_tag_timeout > 100) {
|
|
alertify.alert(locale.error, locale.invalid_range_header + '(' + locale.tag_removal_condition + ' : 0[' + locale.not_used + '], 5-100)');
|
|
return;
|
|
}*/
|
|
//alert($('#alarm_battery_50_weekly').is(':checked'));
|
|
$.ajax({
|
|
url : '/restapi/system/set_manage'
|
|
, type : 'POST'
|
|
, data : {
|
|
'email_smtp': $('#email_smtp').val()==''?' ':$('#email_smtp').val()
|
|
, 'email_sender': $('#email_sender').val()==''?' ':$('#email_sender').val()
|
|
, 'email_password': $('#email_password').val()==''?' ':$('#email_password').val()
|
|
, 'email_port': $('#email_port').val()==''?' ':$('#email_port').val()
|
|
, 'image_retry': $('#image_retry').val()
|
|
, 'fw_retry': $('#fw_retry').val()
|
|
, 'tag_retry': $('#tag_retry').val()
|
|
, 'seqnum_init_interval': $('#seqnum_init_interval').val()
|
|
, 'sd_low_battery': $('#sd_low_battery').is(':checked')
|
|
, 'sd_disconnection': $('#sd_disconnection').is(':checked')
|
|
, 'sd_busy': $('#sd_busy').is(':checked')
|
|
, 'fw_auto_update': $('#fw_auto_update').is(':checked')
|
|
, 'reg_display_interval': $('#sys_reg_display_interval').val()
|
|
, 'security': $('#sys_security').is(':checked')
|
|
, 'display_refresh_period': sys_display_refresh_period_val//$('#sys_display_refresh_period').val()
|
|
, 'retry_count': $('#sys_retry_count').val()
|
|
, 'response_timeout': $('#sys_response_timeout').val()
|
|
, 'remocon_response_timeout': $('#sys_remocon_response_timeout').val()
|
|
, 'noti_dayofweek': $('#system_alarm_email_day').val()
|
|
, 'noti_hour': $('#system_alarm_email_report_time').val()
|
|
, 'noti_min': 0
|
|
, 'noti_bat25_everyday': $('#alarm_battery_25_daily').is(':checked')
|
|
, 'noti_bat25_weekly': $('#alarm_battery_25_weekly').is(':checked')
|
|
, 'noti_bat50_everyday': $('#alarm_battery_50_daily').is(':checked')
|
|
, 'noti_bat50_weekly': $('#alarm_battery_50_weekly').is(':checked')
|
|
, 'noti_gw_everyday': $('#alarm_disconnected_gw_daily').is(':checked')
|
|
, 'noti_gw_weekly': $('#alarm_disconnected_gw_weekly').is(':checked')
|
|
, 'noti_gw_immediately': $('#alarm_disconnected_gw_ondemand').is(':checked')
|
|
, 'noti_tag_everyday': $('#alarm_disconnected_tag_daily').is(':checked')
|
|
, 'noti_tag_weekly': $('#alarm_disconnected_tag_weekly').is(':checked')
|
|
, 'noti_tag_immediately': $('#alarm_disconnected_tag_ondemand').is(':checked')
|
|
, 'noti_gw_interval': $('#alarm_disconnected_gw_since_time').val()
|
|
, 'noti_tag_interval': $('#alarm_disconnected_tag_since_time').val()
|
|
, 'noti_pos_everyday': $('#alarm_pos_import_daily').is(':checked')
|
|
, 'noti_pos_weekly': $('#alarm_pos_import_weekly').is(':checked')
|
|
, 'noti_pos_immediately': $('#alarm_pos_import_ondemand').is(':checked')
|
|
, 'gw_disconnection_timeout': $('#gw_disconnection_timeout').val()
|
|
, 'delete_tag_timeout': 0
|
|
//, 'delete_tag_timeout': $('#delete_tag_timeout').val()
|
|
}, success : function(json) {
|
|
if(json.result.toLowerCase() == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result.toLowerCase() == "success") {
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
}else {
|
|
alertify.error(locale[json.result.toLowerCase()]);
|
|
}
|
|
|
|
}, error:function(request,status,err){
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnResetCore() {
|
|
$.ajax({
|
|
url: '/restapi/system/reset'
|
|
, type: 'POST'
|
|
, data: {
|
|
}, success : function(json) {
|
|
if(json.result.toLowerCase() == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result.toLowerCase() == "success") {
|
|
alertify.success(locale.confirm_core_reset);
|
|
fnSetCookie('userid', '');
|
|
fnSetCookie('name', '');
|
|
fnSetCookie('level_code', '');
|
|
$.ajax({
|
|
url: '/restapi/user/v2_logout'
|
|
, type: 'POST'
|
|
, data: {
|
|
}, success : function(json) {
|
|
}, error:function(request,status,err){
|
|
}
|
|
});
|
|
document.location.replace('/');
|
|
}else {
|
|
alertify.error(locale[json.result.toLowerCase()]);
|
|
}
|
|
}, error:function(request,status,err){
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnGetNTPConfig() {
|
|
$.ajax({
|
|
url: '/restapi/system/get_ntp'
|
|
, type: 'POST'
|
|
, data: {
|
|
}, success : function(json) {
|
|
if(json.result.toLowerCase() == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result.toLowerCase() == "success") {
|
|
json = json.data;
|
|
$('#ntp_system_time').val(json[0].System_Time);
|
|
$('#ntp_server1').val(json[0].ntp_server_1);
|
|
$('#ntp_server2').val(json[0].ntp_server_2);
|
|
$('#ntp_server3').val(json[0].ntp_server_3);
|
|
$('#ntp_time_zone').val(json[0].time_zone);
|
|
|
|
// var UTCstring = (new Date()).toUTCString();
|
|
// alert("UTCstring : " + UTCstring);
|
|
|
|
// var d = new Date();
|
|
// var n = d.getTimezoneOffset();
|
|
// alert("N : " + n + " n : " + n/60 + " V : " + n%60);
|
|
// alert(d.toLocaleString());
|
|
}else {
|
|
alertify.error(locale[json.result.toLowerCase()]);
|
|
}
|
|
}, error:function(request,status,err){
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnSetNTPConfig() {
|
|
if ($('#ntp_server1').val() != '' && !checkIP($('#ntp_server1').val())) {
|
|
alertify.alert(locale.error, locale.invalid_ntp_ip + '(' + locale.system_ntp_server1 + ')');
|
|
return;
|
|
}
|
|
if ($('#ntp_server2').val() != '' && !checkIP($('#ntp_server2').val())) {
|
|
alertify.alert(locale.error, locale.invalid_ntp_ip + '(' + locale.system_ntp_server2 + ')');
|
|
return;
|
|
}
|
|
if ($('#ntp_server3').val() != '' && !checkIP($('#ntp_server3').val())) {
|
|
alertify.alert(locale.error, locale.invalid_ntp_ip + '(' + locale.system_ntp_server3 + ')');
|
|
return;
|
|
}
|
|
$.ajax({
|
|
url: '/restapi/system/set_ntp'
|
|
, type: 'POST'
|
|
, data: {
|
|
'ntp_server_1': $('#ntp_server1').val()
|
|
, 'ntp_server_2': $('#ntp_server2').val()
|
|
, 'ntp_server_3': $('#ntp_server3').val()
|
|
, 'time_zone': $('#ntp_time_zone').val()
|
|
}, success : function(json) {
|
|
if(json.result.toLowerCase() == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result.toLowerCase() == "success") {
|
|
fnGetNTPConfig();
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
}else {
|
|
alertify.error(locale[json.result.toLowerCase()]);
|
|
}
|
|
}, error:function(request,status,err){
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function checkIP(strIP) {
|
|
var expUrl = /^(1|2)?\d?\d([.](1|2)?\d?\d){3}$/;
|
|
return expUrl.test(strIP);
|
|
}
|
|
|
|
function fnEmsUpgrade() {
|
|
var filename = document.frmEmsUpgrade.system_ems_upgrade_file.value.replace(/^.*[\\\/]/, '');
|
|
var fileExt = filename.substring(filename.lastIndexOf(".") + 1);
|
|
var re = /zip/i;
|
|
var oData = new FormData();
|
|
if(!re.test(fileExt)) {
|
|
alertify.alert('Error', locale.invalid_file_format);
|
|
document.frmEmsUpgrade.system_ems_upgrade_file.value="";
|
|
document.frmEmsUpgrade.system_ems_upgrade_file.focus();
|
|
return;
|
|
}
|
|
|
|
fwUploadLoading.show();
|
|
|
|
var sizeinbytes = 0;
|
|
if(window.ActiveXObject){
|
|
var oas = new ActiveXObject("Scripting.FileSystemObject");
|
|
var filepath = document.getElementById('system_ems_upgrade_file').value;
|
|
var filesize = oas.getFile(filepath);
|
|
sizeinbytes = filesize.size;
|
|
|
|
} else {
|
|
sizeinbytes = document.getElementById('system_ems_upgrade_file').files[0].size;
|
|
|
|
}
|
|
oData.append('file', document.getElementById('system_ems_upgrade_file').files[0]);
|
|
oData.append('size', sizeinbytes);
|
|
$.ajax({
|
|
url: '/restapi/system/ems/upgrade',
|
|
type: "POST",
|
|
dataType: "text",
|
|
data: oData,
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data, textStatus, jqXHR) {
|
|
fwUploadLoading.hide();
|
|
var json = JSON.parse(data);
|
|
if(json.result.toLowerCase() == 'success') {
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
fnSetCookie('userid', '');
|
|
fnSetCookie('name', '');
|
|
fnSetCookie('level_code', '');
|
|
$.ajax({
|
|
url: '/restapi/user/v2_logout'
|
|
, type: 'POST'
|
|
, data: {
|
|
}, success : function(json) {
|
|
}, error:function(request,status,err){
|
|
}
|
|
});
|
|
document.location.replace('/');
|
|
} else {
|
|
alertify.error(json.result);
|
|
}
|
|
}, error: function(request,status,err) {
|
|
fwUploadLoading.hide();
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnCoreUpgrade() {
|
|
var filename = document.frmCoreUpgrade.system_core_upgrade_file.value.replace(/^.*[\\\/]/, '');
|
|
var fileExt = filename.substring(filename.lastIndexOf(".") + 1);
|
|
var re = /zip/i;
|
|
var oData = new FormData();
|
|
if(!re.test(fileExt)) {
|
|
alertify.alert('Error', locale.invalid_file_format);
|
|
document.frmCoreUpgrade.system_core_upgrade_file.value="";
|
|
document.frmCoreUpgrade.system_core_upgrade_file.focus();
|
|
return;
|
|
}
|
|
|
|
fwUploadLoading.show();
|
|
|
|
var sizeinbytes = 0;
|
|
if(window.ActiveXObject){
|
|
var oas = new ActiveXObject("Scripting.FileSystemObject");
|
|
var filepath = document.getElementById('system_core_upgrade_file').value;
|
|
var filesize = oas.getFile(filepath);
|
|
sizeinbytes = filesize.size;
|
|
|
|
} else {
|
|
sizeinbytes = document.getElementById('system_core_upgrade_file').files[0].size;
|
|
|
|
}
|
|
oData.append('file', document.getElementById('system_core_upgrade_file').files[0]);
|
|
oData.append('size', sizeinbytes);
|
|
$.ajax({
|
|
url: '/restapi/system/core/upgrade',
|
|
type: "POST",
|
|
dataType: "text",
|
|
data: oData,
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data, textStatus, jqXHR) {
|
|
fwUploadLoading.hide();
|
|
var json = JSON.parse(data);
|
|
if(json.result.toLowerCase() == 'success') {
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
fnResetCore();
|
|
} else {
|
|
alertify.error(json.result);
|
|
}
|
|
}, error: function(request,status,err) {
|
|
fwUploadLoading.hide();
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
$(function() {
|
|
fnGetVersion();
|
|
fnGetSystemConfigList();
|
|
fnGetSystemManage();
|
|
fnGetNTPConfig();
|
|
fnGetCoreConfig();
|
|
|
|
$('#btn_system_title_apply').click(function() {
|
|
var system_title = $('#system_title').val();
|
|
|
|
if (!system_title) {
|
|
//alert('Input Title');
|
|
alertify.alert('Error','Input Title');
|
|
return;
|
|
}
|
|
|
|
fnSetSystemConfig('system_title', system_title);
|
|
});
|
|
|
|
$('#btn_system_logo_apply').click(function() {
|
|
var filename = document.frmLogo.system_logo.value.replace(/^.*[\\\/]/, '');
|
|
var fileExt = filename.substring(filename.lastIndexOf(".") + 1);
|
|
var re = /gif|jpg|jpeg|png/i;
|
|
if(!re.test(fileExt)) {
|
|
alertify.alert('Error','Invalid File Format.');
|
|
document.frmLogo.system_logo.value="";
|
|
document.frmLogo.system_logo.focus();
|
|
return;
|
|
}
|
|
if (document.frmLogo.system_logo.value) {
|
|
var data = new FormData();
|
|
var sizeinbytes = 0;
|
|
if(window.ActiveXObject){
|
|
var oas = new ActiveXObject("Scripting.FileSystemObject");
|
|
var filepath = document.getElementById('system_logo').value;
|
|
var filesize = oas.getFile(filepath);
|
|
sizeinbytes = filesize.size;
|
|
|
|
} else {
|
|
sizeinbytes = document.getElementById('system_logo').files[0].size;
|
|
|
|
}
|
|
data.append('info', 'system_logo');
|
|
data.append('file', document.getElementById('system_logo').files[0]);
|
|
data.append('size', sizeinbytes);
|
|
|
|
fnSetFileUpload('system_logo', data);
|
|
}
|
|
});
|
|
|
|
$('#btn_system_notify_apply').click(function() {
|
|
var notify_popup = $('#notify_popup').is(':checked') ? 'yes' : 'no';
|
|
var notify_sound = $('#notify_sound').is(':checked') ? 'yes' : 'no';
|
|
|
|
fnSetSystemConfig('notify_popup', notify_popup);
|
|
//fnSetSystemConfig('notify_sound', notify_sound);
|
|
/*
|
|
if (document.frmSound.system_sound.value) {
|
|
var data = new FormData();
|
|
data.append('info', 'system_sound');
|
|
data.append('file', document.getElementById('system_sound').files[0]);
|
|
|
|
fnSetFileUpload('system_sound', data);
|
|
}
|
|
*/
|
|
});
|
|
$('#btn_pos_upload').click(function() {
|
|
if (document.frmPos.fw_pos_file.value) {
|
|
var filename = document.frmPos.fw_pos_file.value.replace(/^.*[\\\/]/, '');
|
|
var re = /^import_[0-9]{4}[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}.csv$/;
|
|
if(!re.test(filename)) {
|
|
alertify.alert('Error','Invalid File Format.');
|
|
document.frmPos.fw_pos_file.value="";
|
|
document.frmPos.fw_pos_file.focus();
|
|
return;
|
|
}
|
|
|
|
var data = new FormData();
|
|
var sizeinbytes = 0;
|
|
if(window.ActiveXObject){
|
|
var oas = new ActiveXObject("Scripting.FileSystemObject");
|
|
var filepath = document.getElementById('fw_pos_file').value;
|
|
var filesize = oas.getFile(filepath);
|
|
sizeinbytes = filesize.size;
|
|
|
|
} else {
|
|
sizeinbytes = document.getElementById('fw_pos_file').files[0].size;
|
|
|
|
}
|
|
data.append('info', 'fw_pos_file');
|
|
data.append('file', document.getElementById('fw_pos_file').files[0]);
|
|
data.append('size', sizeinbytes);
|
|
|
|
fnSetPosFileUpload('fw_pos_file', data);
|
|
}
|
|
});
|
|
|
|
$('#btn_ems_upgrade_apply').click(function() {
|
|
fnEmsUpgrade();
|
|
});
|
|
|
|
$('#svr_core_reset_true').click(function() {
|
|
alertify.confirm(locale.confirm,locale.confirm_core_sync_reset, function (e) {
|
|
$('#svr_core_reset_true').attr('checked', true);
|
|
}, function (f) {
|
|
$('#svr_core_reset_false').attr('checked', true);
|
|
}).set('labels', {ok:locale.ok, cancel:locale.cancel});
|
|
});
|
|
|
|
$('#btn_core_upgrade_apply').click(function() {
|
|
fnCoreUpgrade();
|
|
});
|
|
|
|
$('#btn_system_manage_default').click(function() {
|
|
$('#fw_auto_update').prop("checked", true);
|
|
$('#tag_retry').val('3');
|
|
$('#image_retry').val('5');
|
|
$('#fw_retry').val('5');
|
|
$('#seqnum_init_interval').val('3');
|
|
$('#sd_low_battery').prop("checked", false);
|
|
$('#sd_disconnection').prop("checked", false);
|
|
$('#sd_busy').prop("checked", false);
|
|
$('#sys_reg_display_interval').val('7');
|
|
$('#sys_security').prop("checked", false);
|
|
$('#sys_chk_display_refresh_period').prop("checked", true);
|
|
$('#sys_radio_display_refresh_type1').prop("checked", false);
|
|
$('#sys_radio_display_refresh_type2').prop("checked", true);
|
|
$('#sys_display_refresh_period').attr("disabled", true);
|
|
$('#sys_display_refresh_time').attr("disabled", false);
|
|
$("#sys_display_refresh_period").val('23');
|
|
$("#sys_display_refresh_time").val(2);
|
|
$('#sys_retry_count').val('5');
|
|
$('#sys_response_timeout').val('50');
|
|
$('#sys_remocon_response_timeout').val('1');
|
|
$('#gw_disconnection_timeout').val('3');
|
|
$('#delete_tag_timeout').val('0');
|
|
});
|
|
$('#btn_system_manage_apply').click(function() {
|
|
fnSetSystemManage();
|
|
});
|
|
$('#btn_system_manage_query').click(function() {
|
|
fnGetSystemManage();
|
|
});
|
|
$('#btn_system_ntp_query').click(function() {
|
|
fnGetNTPConfig();
|
|
});
|
|
$('#btn_system_ntp_apply').click(function() {
|
|
fnSetNTPConfig();
|
|
});
|
|
$('#sys_chk_display_refresh_period').click(function() {
|
|
var chk = $(this).is(":checked");
|
|
if(chk)
|
|
{
|
|
$('#sys_radio_display_refresh_type1').attr('disabled', false);
|
|
$('#sys_radio_display_refresh_type2').attr('disabled', false);
|
|
$("#sys_chk_display_refresh_time").attr('disabled', false);
|
|
var chk = $('#sys_radio_display_refresh_type1').is(":checked");
|
|
if(chk)
|
|
{
|
|
$("#sys_display_refresh_period").attr('disabled', false);
|
|
$("#sys_display_refresh_time").attr('disabled', true);
|
|
}
|
|
else
|
|
{
|
|
$("#sys_display_refresh_period").attr('disabled', true);
|
|
$("#sys_display_refresh_time").attr('disabled', false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$('#sys_radio_display_refresh_type1').attr('disabled', true);
|
|
$('#sys_radio_display_refresh_type2').attr('disabled', true);
|
|
$("#sys_chk_display_refresh_time").attr('disabled', true);
|
|
$("#sys_display_refresh_period").attr('disabled', true);
|
|
$("#sys_display_refresh_time").attr('disabled', true);
|
|
}
|
|
});
|
|
$('#sys_radio_display_refresh_type1').click(function() {
|
|
var chk = $('#sys_radio_display_refresh_type1').is(":checked");
|
|
if(chk)
|
|
{
|
|
$("#sys_display_refresh_period").attr('disabled', false);
|
|
$("#sys_display_refresh_time").attr('disabled', true);
|
|
}
|
|
else
|
|
{
|
|
$("#sys_display_refresh_period").attr('disabled', true);
|
|
$("#sys_display_refresh_time").attr('disabled', false);
|
|
}
|
|
});
|
|
$('#sys_radio_display_refresh_type2').click(function() {
|
|
|
|
var chk = $('#sys_radio_display_refresh_type2').is(":checked");
|
|
if(chk)
|
|
{
|
|
$("#sys_display_refresh_period").attr('disabled', true);
|
|
$("#sys_display_refresh_time").attr('disabled', false);
|
|
}
|
|
else
|
|
{
|
|
$("#sys_display_refresh_period").attr('disabled', false);
|
|
$("#sys_display_refresh_time").attr('disabled', true);
|
|
}
|
|
});
|
|
|
|
$('#svr_encryption_mode').change(function(){
|
|
var flag = $('#svr_encryption_mode').val();
|
|
if('enable' == flag) {
|
|
$('#svr_encryption_code').attr('disabled', false);
|
|
}else {
|
|
$('#svr_encryption_code').val('');
|
|
$('#svr_encryption_code').attr('disabled', true);
|
|
}
|
|
});
|
|
$('#svr_auto_backup_flag').change(function(){
|
|
var flag = $('#svr_auto_backup_flag').val();
|
|
if('enable' == flag) {
|
|
$('#svr_auto_backup_time').attr('disabled', false);
|
|
}else {
|
|
$('#svr_auto_backup_time').val('0000');
|
|
$('#svr_auto_backup_time').attr('disabled', true);
|
|
}
|
|
});
|
|
$('#ssl_mode').change(function(){
|
|
var flag = $('#ssl_mode').val();
|
|
if('enable' == flag) {
|
|
$('#ssl_key_store').attr('disabled', false);
|
|
$('#ssl_key_store_password').attr('disabled', false);
|
|
$('#ssl_key_password').attr('disabled', false);
|
|
|
|
$("#cb_ssl_key_store").attr('checked', true) ;
|
|
$('#cb_ssl_key_store').attr('disabled', false);
|
|
// $("#cb_ssl_key_store_password").attr('checked', true) ;
|
|
// $('#cb_ssl_key_store_password').attr('disabled', false);
|
|
// $("#cb_ssl_key_password").attr('checked', true) ;
|
|
// $('#cb_ssl_key_password').attr('disabled', false);
|
|
}else {
|
|
$('#ssl_key_store').attr('disabled', true);
|
|
$('#ssl_key_store').val('');
|
|
$('#ssl_key_store_password').attr('disabled', true);
|
|
$('#ssl_key_store_password').val('');
|
|
$('#ssl_key_password').attr('disabled', true);
|
|
$('#ssl_key_password').val('');
|
|
|
|
$("#cb_ssl_key_store").attr('checked', false) ;
|
|
$('#cb_ssl_key_store').attr('disabled', true);
|
|
// $("#cb_ssl_key_store_password").attr('checked', false) ;
|
|
// $('#cb_ssl_key_store_password').attr('disabled', true);
|
|
// $("#cb_ssl_key_password").attr('checked', false) ;
|
|
// $('#cb_ssl_key_password').attr('disabled', true);
|
|
}
|
|
});
|
|
|
|
$('#btn_system_core_configure_default').click(function() {
|
|
coreConfigCheckboxAllfalse();
|
|
|
|
$('#svr_internal_port').val(9790);
|
|
$('#cb_svr_internal_port').attr('checked', true).trigger('change');
|
|
$('#svr_gen1_port').val(8920);
|
|
$('#cb_svr_gen1_port').attr('checked', true).trigger('change');
|
|
$('#svr_gen2_port').val(9920);
|
|
$('#cb_svr_gen2_port').attr('checked', true).trigger('change');
|
|
$('#svr_gen2_control_port').val(10020);
|
|
$('#cb_svr_gen2_control_port').attr('checked', true).trigger('change');
|
|
$('#svr_encryption_mode').val('enable').trigger('change');
|
|
$('#cb_svr_encryption_mode').attr('checked', true).trigger('change');
|
|
$('#cb_svr_encryption_code').attr('checked', true).trigger('change');
|
|
$('#svr_auto_backup_flag').val('enable').trigger('change');
|
|
$('#cb_svr_auto_backup_flag').attr('checked', true).trigger('change');
|
|
$('#svr_auto_backup_time').val('0100');
|
|
$('#cb_svr_auto_backup_time').attr('checked', true).trigger('change');
|
|
$('#cb_svr_core_reset').attr('checked', false).trigger('change');
|
|
|
|
$('#ftp_manual_port_start').val(8090);
|
|
$('#cb_ftp_manual_port_start').attr('checked', true).trigger('change');
|
|
$('#ftp_manual_port_end').val(8119);
|
|
$('#cb_ftp_manual_port_end').attr('checked', true).trigger('change');
|
|
$('#ftp_control_port').val(2121);
|
|
$('#cb_ftp_control_port').attr('checked', true).trigger('change');
|
|
|
|
$('#ssl_mode').val('enable').trigger('change');
|
|
$('#cb_ssl_mode').attr('checked', true).trigger('change');
|
|
|
|
$('#api_port').val(8080);
|
|
$('#cb_api_port').attr('checked', true).trigger('change');
|
|
$('#api_user').val('esl');
|
|
$('#cb_api_user').attr('checked', true).trigger('change');
|
|
$('#api_esn').val('http://localhost');
|
|
$('#cb_api_esn').attr('checked', true).trigger('change');
|
|
$('#api_esn_report').val(30);
|
|
$('#cb_api_esn_report').attr('checked', true).trigger('change');
|
|
});
|
|
|
|
$('#btn_system_core_configure_query').click(function() {
|
|
fnGetCoreConfig();
|
|
});
|
|
|
|
$('#btn_system_core_configure_apply').click(function() {
|
|
var data = new FormData();
|
|
|
|
var svr_internal_port = $('#svr_internal_port').val();
|
|
var svr_gen1_port = $('#svr_gen1_port').val();
|
|
var svr_gen2_port = $('#svr_gen2_port').val();
|
|
var svr_gen2_control_port = $('#svr_gen2_control_port').val();
|
|
var ftp_manual_port_start = $('#ftp_manual_port_start').val();
|
|
var ftp_manual_port_end = $('#ftp_manual_port_end').val();
|
|
var ftp_control_port = $('#ftp_control_port').val();
|
|
var api_port = $('#api_port').val();
|
|
|
|
var svr_encryption_mode = $('#svr_encryption_mode').val();
|
|
var svr_auto_backup_flag = $('#svr_auto_backup_flag').val();
|
|
var ssl_mode = $('#ssl_mode').val();
|
|
|
|
var svr_encryption_code = $('#svr_encryption_code').val();
|
|
var ssl_key_store = $('#ssl_key_store').val();
|
|
var ssl_key_store_password = $('#ssl_key_store_password').val();
|
|
var ssl_key_password = $('#ssl_key_password').val();
|
|
|
|
var api_user = $('#api_user').val();
|
|
var api_password = $('#api_password').val();
|
|
var api_esn = $('#api_esn').val();
|
|
var api_esn_report = $('#api_esn_report').val();
|
|
|
|
var svr_store_information= $('#svr_store_information').val();
|
|
var svr_auto_backup_time = $('#svr_auto_backup_time').val();
|
|
var svr_core_reset= $("input[name='svr_core_reset']:checked").val();
|
|
|
|
if(svr_store_information == '' && $('#cb_svr_store_information').is(':checked')) {
|
|
$('#svr_store_information').focus();
|
|
alertify.alert(locale.error,locale.invalid_store_info);
|
|
return;
|
|
}
|
|
if(!validPort(svr_internal_port,'svr_internal_port')) {
|
|
alertify.alert(locale.error,locale.invalid_svr_internal_port);
|
|
return;
|
|
}
|
|
if(!validPort(svr_gen1_port,'svr_gen1_port')) {
|
|
alertify.alert(locale.error,locale.invalid_svr_gen1_port);
|
|
return;
|
|
}
|
|
if(!validPort(svr_gen2_port,'svr_gen2_port')) {
|
|
alertify.alert(locale.error,locale.invalid_svr_gen2_port);
|
|
return;
|
|
}
|
|
if(!validPort(svr_gen2_control_port,'svr_gen2_control_port')) {
|
|
alertify.alert(locale.error,locale.invalid_svr_gen2_control_port);
|
|
return;
|
|
}
|
|
if(!validPort(ftp_manual_port_start,'ftp_manual_port_start')) {
|
|
alertify.alert(locale.error,locale.invalid_ftp_manual_start_port);
|
|
return;
|
|
}
|
|
if(!validPort(ftp_manual_port_end,'ftp_manual_port_start')) {
|
|
alertify.alert(locale.error,locale.invalid_ftp_manual_end_port);
|
|
return;
|
|
}
|
|
if(!validPort(ftp_control_port,'ftp_control_port')) {
|
|
alertify.alert(locale.error,locale.invalid_ftp_control_port);
|
|
return;
|
|
}
|
|
if(!validPort(api_port,'api_port')) {
|
|
alertify.alert(locale.error,locale.invalid_api_port);
|
|
return;
|
|
}
|
|
|
|
if(svr_encryption_mode == 'enable' && svr_encryption_code.length != 16 && $('#cb_svr_encryption_code').is(':checked')) {
|
|
$('#svr_encryption_code').focus();
|
|
alertify.alert(locale.error,locale.invalid_encrypt_code);
|
|
return;
|
|
}
|
|
if(svr_encryption_mode != 'enable' && $('#cb_svr_encryption_code').is(':checked')) {
|
|
alertify.alert(locale.error,locale.invalid_encrypt_mode);
|
|
return;
|
|
}
|
|
|
|
if(ssl_mode == 'enable') {
|
|
if (ssl_key_store != '' && ssl_key_store_password != '' && ssl_key_password != '' && $('#cb_ssl_key_store').is(':checked')) {
|
|
var filename = $('#ssl_key_store').val().replace(/^.*[\\\/]/, '');
|
|
var file_format = "\.(jks|JKS)$";
|
|
if(!(new RegExp(file_format, "i")).test(filename)) {
|
|
alertify.alert(locale.error, locale.invalid_keystore);
|
|
$('#ssl_key_store').val('');
|
|
$('#ssl_key_store').focus();
|
|
}
|
|
|
|
var sizeinbytes = 0;
|
|
if(window.ActiveXObject){
|
|
var oas = new ActiveXObject("Scripting.FileSystemObject");
|
|
var filepath = document.getElementById('ssl_key_store').value;
|
|
var filesize = oas.getFile(filepath);
|
|
sizeinbytes = filesize.size;
|
|
|
|
} else {
|
|
sizeinbytes = document.getElementById('ssl_key_store').files[0].size;
|
|
|
|
}
|
|
data.append('file', document.getElementById('ssl_key_store').files[0]);
|
|
data.append('ssl_key_store', ssl_key_store);
|
|
data.append('ssl_key_store_password', ssl_key_store_password);
|
|
data.append('ssl_key_password', ssl_key_password);
|
|
data.append('size', sizeinbytes);
|
|
|
|
}else if($('#cb_ssl_key_store').is(':checked') && (ssl_key_store == '' || ssl_key_store_password == '' || ssl_key_password == '')) {
|
|
$('#ssl_key_store').focus();
|
|
alertify.alert(locale.error, locale.invalid_ssl_keystore);
|
|
return;
|
|
}
|
|
}
|
|
|
|
if(api_user == '' && $('#cb_api_user').is(':checked')){
|
|
alertify.alert(locale.error,locale.invalid_api_info_user);
|
|
return;
|
|
}
|
|
if($('#cb_api_password').is(':checked')){
|
|
if(api_password == '') {
|
|
alertify.alert(locale.error,locale.invalid_api_info_password);
|
|
return;
|
|
}else if(api_password.length < 12) {
|
|
alertify.alert(locale.error,locale.invalid_api_password_length);
|
|
return;
|
|
}else if(!fnCheckSystemApiPWD(api_password)) {
|
|
alertify.alert(locale.error,locale.invalid_api_password_val);
|
|
return;
|
|
}
|
|
}
|
|
if(api_esn == '' && $('#cb_api_esn').is(':checked')){
|
|
alertify.alert(locale.error,locale.invalid_api_info_esn);
|
|
return;
|
|
}
|
|
if((api_esn_report < 10 || api_esn_report > 300) && $('#cb_api_esn_report').is(':checked')){
|
|
alertify.alert(locale.error,locale.invalid_api_info);
|
|
return;
|
|
}
|
|
|
|
if(ftp_manual_port_start > ftp_manual_port_end && $('#cb_ftp_manual_port_start').is(':checked')) {
|
|
alertify.alert(locale.error,locale.manual_port_invalid);
|
|
return;
|
|
}
|
|
|
|
var manualPortArray = new Array();
|
|
var manualPort = ftp_manual_port_start;
|
|
for(var i=0; i<(ftp_manual_port_end-ftp_manual_port_start+1); i++) {
|
|
manualPortArray[i] = manualPort;
|
|
manualPort++;
|
|
}
|
|
|
|
var portArray = [svr_internal_port, svr_gen1_port, svr_gen2_port, svr_gen2_control_port, ftp_control_port, api_port];
|
|
portArray = portArray.concat(manualPortArray);
|
|
|
|
for(var i=1; i<portArray.length; i++) {
|
|
for(var j=0; j<i; j++) {
|
|
if(portArray[i] == portArray[j]) {
|
|
alertify.alert(locale.error,locale.port_invalid_overlap);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
var checkCnt = 0;
|
|
if($('#cb_svr_internal_port').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_internal_port', svr_internal_port);
|
|
}
|
|
if($('#cb_svr_gen1_port').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_gen1_port', svr_gen1_port);
|
|
}
|
|
if($('#cb_svr_gen2_port').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_gen2_port', svr_gen2_port);
|
|
}
|
|
if($('#cb_svr_gen2_control_port').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_gen2_control_port', svr_gen2_control_port);
|
|
}
|
|
if($('#cb_svr_core_reset').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_core_reset', svr_core_reset);
|
|
}
|
|
if($('#cb_ftp_manual_port_start').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('ftp_manual_port_start', ftp_manual_port_start);
|
|
data.append('ftp_manual_port_end', ftp_manual_port_end);
|
|
}
|
|
if($('#cb_ftp_control_port').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('ftp_control_port', ftp_control_port);
|
|
}
|
|
if($('#cb_api_port').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('api_port', api_port);
|
|
}
|
|
if($('#cb_svr_encryption_mode').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_encryption_mode', svr_encryption_mode);
|
|
}
|
|
if($('#cb_svr_auto_backup_flag').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_auto_backup_flag', svr_auto_backup_flag);
|
|
data.append('svr_auto_backup_time', svr_auto_backup_time)
|
|
}
|
|
if($('#cb_ssl_mode').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('ssl_mode', ssl_mode);
|
|
}
|
|
if($('#cb_svr_encryption_code').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_encryption_code', svr_encryption_code);
|
|
}
|
|
|
|
if($('#cb_svr_store_information').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('svr_store_information', svr_store_information);
|
|
}
|
|
if($('#cb_api_esn_report').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('api_esn_report', api_esn_report);
|
|
}
|
|
if($('#cb_api_esn').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('api_esn', api_esn);
|
|
}
|
|
if($('#cb_api_password').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('api_password', api_password);
|
|
}
|
|
if($('#cb_api_user').is(':checked')) {
|
|
checkCnt++;
|
|
data.append('api_user', api_user);
|
|
}
|
|
if($('#cb_ssl_key_store').is(':checked')) {
|
|
checkCnt++;
|
|
}
|
|
|
|
if(checkCnt>0) {
|
|
fnSetCoreConfig(data);
|
|
}
|
|
});
|
|
|
|
|
|
function validPort(port, tagName) {
|
|
var result = false;
|
|
if(port >= 1024 && port <= 65535 && $('#cb_'+tagName).is(':checked')) {
|
|
result = true;
|
|
}
|
|
if(!$('#cb_'+tagName).is(':checked')){
|
|
result = true;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
function fnGetCoreConfig() {
|
|
$.ajax({
|
|
url: '/restapi/system/get_config',
|
|
type: "POST",
|
|
dataType: "text",
|
|
data: {},
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data, textStatus, jqXHR) {
|
|
var json = JSON.parse(data);
|
|
if(json.result.toLowerCase() != 'success') {
|
|
alertify.error(json.result);
|
|
} else {
|
|
json = json.data;
|
|
$('#svr_internal_port').val(json[0].internal_port);
|
|
// if(json[0].internal_port != '') $('#cb_svr_internal_port').attr('checked',true).trigger("change");
|
|
$('#svr_gen1_port').val(json[0].gateway_g1_port);
|
|
// if(json[0].gateway_g1_port != '') $('#cb_svr_gen1_port').attr('checked',true).trigger("change");
|
|
$('#svr_gen2_port').val(json[0].gateway_g2_port);
|
|
// if(json[0].gateway_g2_port != '') $('#cb_svr_gen2_port').attr('checked',true).trigger("change");
|
|
$('#svr_gen2_control_port').val(json[0].gateway_g2control_port);
|
|
// if(json[0].gateway_g2control_port != '') $('#cb_svr_gen2_control_port').attr('checked',true).trigger("change");
|
|
$('#ftp_manual_port_start').val(json[0].ftp_passive_port_start);
|
|
// if(json[0].ftp_passive_port_start != '') $('#cb_ftp_manual_port_start').attr('checked',true).trigger("change");
|
|
$('#ftp_manual_port_end').val(json[0].ftp_passive_port_end);
|
|
// if(json[0].ftp_passive_port_end != '') $('#cb_ftp_manual_port_end').attr('checked',true).trigger("change");
|
|
$('#ftp_control_port').val(json[0].ftp_control_port);
|
|
// if(json[0].ftp_control_port != '') $('#cb_ftp_control_port').attr('checked',true).trigger("change");
|
|
$('#api_port').val(json[0].rest_port);
|
|
// if(json[0].rest_port != '') $('#cb_api_port').attr('checked',true).trigger("change");
|
|
$('#svr_encryption_mode').val(json[0].en_mode);
|
|
// if(json[0].en_mode != '') $('#cb_svr_encryption_mode').attr('checked',true).trigger("change");
|
|
$('#svr_auto_backup_flag').val(json[0].backup_mode);
|
|
// if(json[0].backup_mode != '') $('#cb_svr_auto_backup_flag').attr('checked',true).trigger("change");
|
|
$('#ssl_mode').val(json[0].ssl_mode);
|
|
// if(json[0].ssl_mode != '') $('#cb_ssl_mode').attr('checked',true).trigger("change");
|
|
$('#svr_encryption_code').val(json[0].en_code);
|
|
// if(json[0].en_code != '') $('#cb_svr_encryption_code').attr('checked',true).trigger("change");
|
|
$('#api_user').val(json[0].rest_user);
|
|
// if(json[0].rest_user != '') $('#cb_api_user').attr('checked',true).trigger("change");
|
|
$('#api_esn').val(json[0].esn_url);
|
|
// if(json[0].esn_url != '') $('#cb_api_esn').attr('checked',true).trigger("change");
|
|
$('#api_esn_report').val(json[0].esn_report);
|
|
// if(json[0].esn_report != '') $('#cb_api_esn_report').attr('checked',true).trigger("change");
|
|
$('#svr_store_information').val(json[0].esn_shop_info);
|
|
// if(json[0].esn_shop_info != '') $('#cb_svr_store_information').attr('checked',true).trigger("change");
|
|
$('#svr_auto_backup_time').val(json[0].backup_time);
|
|
// if(json[0].backup_time != '') $('#cb_svr_auto_backup_time').attr('checked',true).trigger("change");
|
|
|
|
coreConfigCheckboxAllfalse();
|
|
|
|
if(json[0].en_mode == 'disable') {
|
|
$('#sys_security').attr('disabled', true);
|
|
}else {
|
|
$('#sys_security').attr('disabled', false);
|
|
}
|
|
|
|
var iHtml = "";
|
|
if(json[0].ssl_val == 'true' && json[0].ssl_mode == 'enable') {
|
|
iHtml = "<span style='color:#2457BD; font-weight: bold;'>"+locale.system_ssl_true+"</span>";
|
|
}else if(json[0].ssl_val == 'false' && json[0].ssl_mode == 'enable'){
|
|
iHtml = "<span style='color:#CC3D3D; font-weight: bold;'>"+locale.system_ssl_false+"</span>";
|
|
}else {
|
|
iHtml = "<span style='color:#2F9D27; font-weight: bold;'>"+locale.system_ssl_default+"</span>";
|
|
}
|
|
document.getElementById('ssl_status').innerHTML = "["+locale.system_ssl_status+":"+iHtml+"]";
|
|
}
|
|
}, error: function(request,status,err) {
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnSetCoreConfig(oData) {
|
|
$.ajax({
|
|
url: '/restapi/system/set_config',
|
|
type: "POST",
|
|
dataType: "text",
|
|
data: oData,
|
|
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data, textStatus, jqXHR) {
|
|
var json = JSON.parse(data);
|
|
if(json.result.toLowerCase() != 'success') {
|
|
alertify.error(json.result);
|
|
} else {
|
|
$('#ssl_key_store').val('');
|
|
var resultText = '';
|
|
if(json.data[0].esn_shop_info!=null && json.data[0].esn_shop_info!='success') {
|
|
resultText += json.data[0].esn_shop_info + '<br/>';
|
|
}
|
|
if(json.data[0].esn_shop_info_reset!=null && json.data[0].esn_shop_info_reset!='success') {
|
|
resultText += json.data[0].esn_shop_info_reset + '<br/>';
|
|
}
|
|
if(json.data[0].internal_port!=null && json.data[0].internal_port!='success') {
|
|
resultText += json.data[0].internal_port + '<br/>';
|
|
}
|
|
if(json.data[0].gateway_g1_port!=null && json.data[0].gateway_g1_port!='success') {
|
|
resultText += json.data[0].gateway_g1_port + '<br/>';
|
|
}
|
|
if(json.data[0].gateway_g2_port != null && json.data[0].gateway_g2_port!='success') {
|
|
resultText += json.data[0].gateway_g2_port + '<br/>';
|
|
}
|
|
if(json.data[0].gateway_g2control_port != null && json.data[0].gateway_g2control_port!='success') {
|
|
resultText += json.data[0].gateway_g2control_port + '<br/>';
|
|
}
|
|
if(json.data[0].en_mode != null && json.data[0].en_mode!='success') {
|
|
resultText += json.data[0].en_mode + '<br/>';
|
|
}
|
|
if(json.data[0].en_code != null && json.data[0].en_code!='success') {
|
|
resultText += json.data[0].en_code + '<br/>';
|
|
}
|
|
if(json.data[0].backup_mode != null && json.data[0].backup_mode!='success') {
|
|
resultText += json.data[0].backup_mode + '<br/>';
|
|
}
|
|
if(json.data[0].backup_time != null && json.data[0].backup_time!='success') {
|
|
resultText += json.data[0].backup_time + '<br/>';
|
|
}
|
|
if(json.data[0].ftp_passive_port_start != null && json.data[0].ftp_passive_port_start!='success') {
|
|
resultText += json.data[0].ftp_passive_port_start + '<br/>';
|
|
}
|
|
if(json.data[0].ftp_passive_port_end != null && json.data[0].ftp_passive_port_end!='success') {
|
|
resultText += json.data[0].ftp_passive_port_end + '<br/>';
|
|
}
|
|
if(json.data[0].ftp_control_port != null && json.data[0].ftp_control_port!='success') {
|
|
resultText += json.data[0].ftp_control_port + '<br/>';
|
|
}
|
|
if(json.data[0].ssl_mode != null && json.data[0].ssl_mode!='success') {
|
|
resultText += json.data[0].ssl_mode + '<br/>';
|
|
}
|
|
if(json.data[0].ssl_path != null && json.data[0].ssl_path!='success') {
|
|
resultText += json.data[0].ssl_path + '<br/>';
|
|
}
|
|
if(json.data[0].ssl_ks != null && json.data[0].ssl_ks!='success') {
|
|
resultText += json.data[0].ssl_ks + '<br/>';
|
|
}
|
|
if(json.data[0].ssl_kp != null && json.data[0].ssl_kp!='success') {
|
|
resultText += json.data[0].ssl_kp + '<br/>';
|
|
}
|
|
if(json.data[0].rest_port != null && json.data[0].rest_port!='success') {
|
|
resultText += json.data[0].rest_port + '<br/>';
|
|
}
|
|
if(json.data[0].rest_user != null && json.data[0].rest_user!='success') {
|
|
resultText += json.data[0].rest_user + '<br/>';
|
|
}
|
|
if(json.data[0].rest_pw != null && json.data[0].rest_pw!='success') {
|
|
resultText += json.data[0].rest_pw + '<br/>';
|
|
}
|
|
if(json.data[0].esn_url != null && json.data[0].esn_url!='success') {
|
|
resultText += json.data[0].esn_url + '<br/>';
|
|
}
|
|
if(json.data[0].esn_report != null && json.data[0].esn_report!='success') {
|
|
resultText += json.data[0].esn_report + '<br/>';
|
|
}
|
|
|
|
if(resultText == '') {
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
fnResetCore();
|
|
}else {
|
|
alertify.alert(locale.error, locale.core_configure_fail + "</br>" + resultText);
|
|
}
|
|
}
|
|
}, error: function(request,status,err) {
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function coreConfigCheckboxAllfalse(){
|
|
$('#cb_svr_store_information').attr('checked',false).trigger('change');
|
|
$('#cb_svr_core_reset').attr('checked',false).trigger('change');
|
|
$('#cb_svr_internal_port').attr('checked',false).trigger('change');
|
|
$('#cb_svr_gen1_port').attr('checked',false).trigger('change');
|
|
$('#cb_svr_gen2_port').attr('checked',false).trigger('change');
|
|
$('#cb_svr_gen2_control_port').attr('checked',false).trigger('change');
|
|
$('#cb_svr_encryption_mode').attr('checked',false).trigger('change');
|
|
$('#cb_svr_encryption_code').attr('checked',false).trigger('change');
|
|
$('#cb_svr_auto_backup_flag').attr('checked',false).trigger('change');
|
|
$('#cb_ftp_manual_port_start').attr('checked',false).trigger('change');
|
|
$('#cb_ftp_control_port').attr('checked',false).trigger('change');
|
|
$('#cb_ssl_mode').attr('checked',false).trigger('change');
|
|
$('#cb_ssl_key_store').attr('checked',false).trigger('change');
|
|
// $('#cb_ssl_key_store_password').attr('checked',false).trigger('change');
|
|
// $('#cb_ssl_key_password').attr('checked',false).trigger('change');
|
|
$('#cb_api_port').attr('checked',false).trigger('change');
|
|
$('#cb_api_user').attr('checked',false).trigger('change');
|
|
$('#cb_api_password').attr('checked',false).trigger('change');
|
|
$('#cb_api_esn').attr('checked',false).trigger('change');
|
|
$('#cb_api_esn_report').attr('checked',false).trigger('change');
|
|
}
|
|
|
|
|
|
$('#system_version').text(locale.web_version);
|
|
$('#shell_version_title').text(locale.shell_version_title);
|
|
$('#system_logo_title').text(locale.logo);
|
|
$('#system_image').text(locale.image);
|
|
$('#btn_system_logo_apply').text(locale.apply);
|
|
$('#btn_core_upgrade_apply').text(locale.upgrade);
|
|
$('#btn_ems_upgrade_apply').text(locale.upgrade);
|
|
$('#btn_system_title_apply').text(locale.apply);
|
|
$('#btn_system_notify_apply').text(locale.apply);
|
|
$('#system_title_text').text(locale.title);
|
|
$('#system_alarm_notify').text(locale.alarm_notify);
|
|
$('#system_popup').text(locale.popup);
|
|
$('#notify_popup_use').text(locale.use);
|
|
$('#system_pos_file').text(locale.manual_pos_file);
|
|
$('#system_pos_file_label').text(locale.pos_file);
|
|
$('#btn_pos_upload').text(locale.import);
|
|
$('#system_configure').text(locale.configure);
|
|
$('#system_core_configure').text(locale.core_configure);
|
|
$('#system_smtp').text(locale.smtp);
|
|
$('#system_port').text(locale.port);
|
|
$('#system_sender_email').text(locale.sender_email);
|
|
$('#system_email_password').text(locale.email_password);
|
|
$('#system_auto_firmware_update').text(locale.auto_firmware_update);
|
|
$('#system_tag_invalid').text(locale.tag_invalid);
|
|
$('#system_tag_seq_init_interval').text(locale.tag_seq_init_interval);
|
|
$('#system_tag_status_display').text(locale.tag_status_display);
|
|
$('#disp_low_battery').text(locale.low_battery);
|
|
$('#disp_disconnection').text(locale.disconnection);
|
|
$('#disp_busy').text(locale.busy);
|
|
$('#btn_system_manage_default').text(locale.default_text);
|
|
$('#btn_system_manage_apply').text(locale.apply);
|
|
$('#btn_system_manage_query').text(locale.query);
|
|
$('#btn_system_ntp_apply').text(locale.apply);
|
|
$('#btn_system_ntp_query').text(locale.query);
|
|
$('#system_reg_disp_interval').text(locale.reg_interval);
|
|
$('#system_tag_security').text(locale.security);
|
|
$('#system_disp_refresh_interval').text(locale.refresh_period);
|
|
$('#system_retry_count').text(locale.retry_cnt);
|
|
$('#system_response_timeout').text(locale.resp_timeoout);
|
|
$('#system_remocon_response_timeout').text(locale.remocon_timeout);
|
|
$('#sys_chk_label_display_refresh_period').text(locale.use);
|
|
$('#sys_radio_label_display_refresh_time').text(locale.time);
|
|
$('#sys_radio_label_display_refresh_period').text(locale.period);
|
|
$('#system_alarm_battery_25').text(locale.battery_less_25);
|
|
$('#system_alarm_battery_50').text(locale.battery_less_50);
|
|
$('#system_alarm_disconnected_gw').text(locale.gateway + " " + locale.disconnected);
|
|
$('#system_alarm_disconnected_tag').text(locale.tag + " " + locale.disconnected);
|
|
$('#system_alarm_pos_import').text("POS " + locale.import + " " + locale.fail);
|
|
$('#alarm_battery_25_daily_use').text(locale.daily);
|
|
$('#alarm_battery_50_daily_use').text(locale.daily);
|
|
$('#alarm_disconnected_gw_daily_use').text(locale.daily);
|
|
$('#alarm_disconnected_tag_daily_use').text(locale.daily);
|
|
$('#alarm_pos_import_daily_use').text(locale.daily);
|
|
$('#alarm_battery_25_weekly_use').text(locale.weekly);
|
|
$('#alarm_battery_50_weekly_use').text(locale.weekly);
|
|
$('#alarm_disconnected_gw_weekly_use').text(locale.weekly);
|
|
$('#alarm_disconnected_tag_weekly_use').text(locale.weekly);
|
|
$('#alarm_pos_import_weekly_use').text(locale.weekly);
|
|
$('#alarm_disconnected_gw_ondemand_use').text(locale.ondemand);
|
|
$('#alarm_disconnected_tag_ondemand_use').text(locale.ondemand);
|
|
$('#alarm_pos_import_ondemand_use').text(locale.ondemand);
|
|
$('#alarm_disconnected_gw_since').text(locale.disconnect_since);
|
|
$('#alarm_disconnected_tag_since').text(locale.disconnect_since);
|
|
$('#alarm_disconnected_gw_minute').text(locale.minutes);
|
|
$('#alarm_disconnected_tag_minute').text(locale.minutes);
|
|
$('#send_condition_1').text(locale.send_condition);
|
|
$('#send_condition_2').text(locale.send_condition);
|
|
$('#send_condition_3').text(locale.send_condition);
|
|
$('#send_condition_4').text(locale.send_condition);
|
|
$('#send_condition_5').text(locale.send_condition);
|
|
$('#btn_system_alrm_email_apply').text(locale.apply);
|
|
$('#dow_mon').text(locale.monday);
|
|
$('#dow_tue').text(locale.tuesday);
|
|
$('#dow_wed').text(locale.wednesday);
|
|
$('#dow_thu').text(locale.thursday);
|
|
$('#dow_fri').text(locale.friday);
|
|
$('#dow_sat').text(locale.saturday);
|
|
$('#dow_sun').text(locale.sunday);
|
|
$('#system_alarm_email_lable').text(locale.report_time);
|
|
$('#system_send_email_condition_label').text(locale.send_emal_condition);
|
|
$('#system_gw_disconnection_timeout').text(locale.gw_disconnection_timeout);
|
|
$('#system_tag_removal_condition').text(locale.tag_removal_condition);
|
|
$('#btn_system_core_configure_default').text(locale.default_text);
|
|
$('#btn_system_core_configure_apply').text(locale.apply);
|
|
$('#btn_system_core_configure_query').text(locale.query);
|
|
$('#svr_enc_mode_enable').text(locale.use);
|
|
$('#svr_enc_mode_disable').text(locale.removed);
|
|
$('#svr_auto_backup_enable').text(locale.use);
|
|
$('#svr_auto_backup_disable').text(locale.removed);
|
|
$('#ssl_mode_enable').text(locale.use);
|
|
$('#ssl_mode_disable').text(locale.removed);
|
|
$('#system_svr_store_information').text(locale.system_svr_store_information);
|
|
$('#system_svr_internal_port').text(locale.system_svr_internal_port);
|
|
$('#system_svr_gen1_port').text(locale.system_svr_gen1_port);
|
|
$('#system_svr_gen2_port').text(locale.system_svr_gen2_port);
|
|
$('#system_svr_gen2_control_port').text(locale.system_svr_gen2_control_port);
|
|
$('#system_svr_encryption_mode').text(locale.system_svr_encryption_mode);
|
|
$('#system_svr_encryption_code').text(locale.system_svr_encryption_code);
|
|
$('#system_svr_auto_backup').text(locale.system_svr_auto_backup);
|
|
$('#system_ftp_manual_port').text(locale.system_ftp_manual_port);
|
|
$('#system_ftp_control_port').text(locale.system_ftp_control_port);
|
|
$('#system_ssl_mode').text(locale.system_ssl_mode);
|
|
$('#system_ssl_key_store').text(locale.system_ssl_key_store);
|
|
$('#system_ssl_key_store_password').text(locale.system_ssl_key_store_password);
|
|
$('#system_ssl_key_password').text(locale.system_ssl_key_password);
|
|
$('#system_api_port').text(locale.system_api_port);
|
|
$('#system_api_user').text(locale.system_api_user);
|
|
$('#system_api_password').text(locale.system_api_password);
|
|
$('#system_api_esn').text(locale.system_api_esn);
|
|
document.getElementById("system_api_esn_report").innerHTML = locale.system_api_esn_report;
|
|
// $('#system_api_esn_report').text(locale.system_api_esn_report);
|
|
$('#system_core_file').text(locale.system_core_file);
|
|
$('#system_ntp_system_time').text(locale.system_ntp_system_time);
|
|
$('#system_ntp_server1').text(locale.system_ntp_server1);
|
|
$('#system_ntp_server2').text(locale.system_ntp_server2);
|
|
$('#system_ntp_server3').text(locale.system_ntp_server3);
|
|
$('#system_ntp_time_zone').text(locale.system_ntp_time_zone);
|
|
$('#system_ntp_configure').text(locale.system_ntp_configure);
|
|
$('#system_core_upgrade').text(locale.system_core_upgrade);
|
|
$('#system_ems_upgrade').text(locale.system_ems_upgrade);
|
|
$('#system_ems_file').text(locale.system_ems_file);
|
|
$('#cb_core_configure_all_label').text(locale.select_all_label);
|
|
$('#system_svr_core_reset').text(locale.system_svr_core_reset);
|
|
$('#system_svr_core_reset_true').text(locale.reset);
|
|
$('#system_svr_core_reset_false').text(locale.maintain);
|
|
})
|
|
authObj.authMenuSet('management/system.html');
|
|
</script>
|