2447 lines
81 KiB
Plaintext
2447 lines
81 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%
|
|
String levCode = ""+session.getAttribute("level_code");
|
|
String dept = ""+session.getAttribute("department");
|
|
%>
|
|
<!DOCTYPE html>
|
|
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -->
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
|
</head>
|
|
<body class="jui ko"> </body>
|
|
</html>
|
|
<!-- <p>
|
|
<title></title>
|
|
</p>-->
|
|
<!-- CSS -->
|
|
<link rel="stylesheet" href="/alertify/alertify.min.css"/>
|
|
<!-- Default theme -->
|
|
<link rel="stylesheet" href="/alertify/default.min.css"/>
|
|
<!-- Semantic UI theme -->
|
|
<link rel="stylesheet" href="/alertify/semantic.min.css"/>
|
|
<!-- Bootstrap theme -->
|
|
<link rel="stylesheet" href="/alertify/bootstrap.min.css"/>
|
|
|
|
<link href="/jui/jui.min.css" rel="stylesheet" />
|
|
<link href="/js/jquery-ui.min.css" rel="stylesheet" />
|
|
<link href="/js/jquery-ui.structure.min.css" rel="stylesheet" />
|
|
<link href="/js/jquery-ui.theme.min.css" rel="stylesheet" />
|
|
<link href="/js/jquery-ui-timepicker-addon.min.css" rel="stylesheet" />
|
|
|
|
<!-- JavaScript -->
|
|
<script src="/alertify/alertify.min.js"></script>
|
|
<script type="text/javascript" src="/jui/lib/jquery-1.8.0.min.js"></script>
|
|
<script type="text/javascript" src="/jui/jui.min.js"></script>
|
|
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
|
|
<script type="text/javascript" src="/js/jquery.validate.min.js"></script>
|
|
<script type="text/javascript" src="/js/jquery.form.js"></script>
|
|
<script type="text/javascript" src="/js/jquery-ui-sliderAccess.js"></script>
|
|
<script type="text/javascript" src="/js/jquery-ui-timepicker-addon.min.js"></script>
|
|
<script type="text/javascript" src="/js/common.js"></script>
|
|
<script type="text/javascript" src="/js/locale/locale.js"></script>
|
|
|
|
<style type="text/css">#wrapper {margin: 0 auto;width: 1450px;height:100%;}
|
|
#content {margin-top:70px;margin-left:10px;float: left;width: 1280px;}
|
|
#leftcolumn {margin-top:80px;width: 160px;float: left;}
|
|
.jui table.table>thead th {text-align:center;}
|
|
.jui table.table>tbody td {-ms-word-break: break-all;
|
|
word-break: break-all;
|
|
word-break: break-word;
|
|
word-wrap:break-word;
|
|
-webkit-hyphens: auto;
|
|
-moz-hyphens: auto;
|
|
-ms-hyphens: auto;
|
|
hyphens: all;}
|
|
body, * { font-family: '맑은고딕', 'Malgun Gothic', Dotum, Verdana, sans-serif;}
|
|
form, #ui-datepicker-div {font-size:12px;}
|
|
.jui .paging > .first,
|
|
.jui .paging > .last {
|
|
width: 94px;
|
|
}
|
|
.jui .paging > .first {
|
|
text-align: right;
|
|
padding-right: 20px !important;
|
|
background-repeat: no-repeat;
|
|
background-image: url("/jui/img/paging-list.png");
|
|
}
|
|
.jui .paging > .last {
|
|
text-align: left;
|
|
padding-left: 20px !important;
|
|
right: 0;
|
|
background-repeat: no-repeat;
|
|
background-image: url("/jui/img/paging-list.png");
|
|
}
|
|
.jui .paging > .first {
|
|
background-position: 0 -28px;
|
|
}
|
|
.jui .paging > .last {
|
|
background-position: 0 0;
|
|
}
|
|
.jui .paging-large > .first {
|
|
background-position: 0 -23px;
|
|
}
|
|
.jui .paging-large > .last {
|
|
background-position: 0 5px;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
var userid = fnGetCookie('userid')
|
|
, username = fnGetCookie('name')
|
|
, userlevCode = <%=levCode%>;
|
|
|
|
if (!userid) {
|
|
//alert('No login Information.');
|
|
alertify.alert('Error','No login Information.');
|
|
document.location.replace('./');
|
|
}
|
|
</script>
|
|
<div id="wrapper">
|
|
<div class="top navbar navbar-fixed-top" style="background-color: rgb(135, 115, 191);">
|
|
<div style="margin: 0px auto; width: 1450px; text-align: center;">
|
|
<div style="width: 164px; height: 64px; float: left; position: relative;">
|
|
<table height="100%" width="100%">
|
|
<tbody>
|
|
<tr>
|
|
<td id="main_system_logo" style="vertical-align: middle;"> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div style="float: right;">
|
|
<div style="width: 700px; padding-left:150px; float: left;">
|
|
<h1 id="main_system_title"> </h1>
|
|
</div>
|
|
<div style="width: 400px; text-align: right; padding-top: 10px; float: right; position: relative;">
|
|
<div id="logout" style="padding-bottom: 10px;"> <a class="btn btn-mini btn-black" href="#" id="btn_logout"><script type="text/javascript">document.write(locale.logout);</script></a></div>
|
|
|
|
<div><script>document.write(locale.last_conn_time);</script><span id="login_info"></span></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="leftcolumn">
|
|
<div class="vmenu"> </div>
|
|
</div>
|
|
|
|
<div id="content">
|
|
<!-- <i class="icon-help" style="cursor:pointer;font-size: 21px; float: right;" id="icon_system_help"></i> -->
|
|
<ul class="tab tab-top" id="tab_1">
|
|
<li><a href="#" id='tab_home'>Home</a></li>
|
|
</ul>
|
|
<div id="tab_1_contents">
|
|
<div id="Home">
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<colgroup>
|
|
<!-- <col width="46%" /> -->
|
|
<!-- <col width="1%" /> -->
|
|
<!-- <col width="53%" /> -->
|
|
<col width="60%" />
|
|
<col width="1%" />
|
|
<col width="40%" />
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="3">
|
|
<div class="panel" style="padding-bottom: 10px;">
|
|
|
|
<div class="head" id="main_title_tag_status">
|
|
<div class="head" style="position:relative;float:left;width:250px;text-align:center;background:#4b4e5e;border-radius:20px;color:#fff;"><b><script>document.write(locale.main_chart_title_gateway);</script></b></div>
|
|
<div class="head" style="margin-left:90px; position:relative;float:left;width:250px;text-align:center;background:#4b4e5e;border-radius:20px;color:#fff;"><b><script>document.write(locale.main_chart_title_tag);</script></b></div>
|
|
<div class="head" style="margin-left:120px; position:relative;float:left;width:300px;text-align:center;background:#4b4e5e;border-radius:20px;color:#fcb416;"><b><script>document.write(locale.main_chart_title_image);</script></b></div>
|
|
<div style="float: right;">
|
|
<input id="reload" name="reload" onclick="fnSetReload();" type="checkbox" /> <script>document.write(locale.auto_refresh);</script> <select class="input-mini input-rect" id="reload_period" name="reload_period" onchange="fnSetReload();">
|
|
<option value="10000">10 <script>document.write(locale.second);</script></option>
|
|
<option value="30000">30 <script>document.write(locale.second);</script></option>
|
|
<option value="60000">1 <script>document.write(locale.minute);</script></option>
|
|
<option value="300000">5 <script>document.write(locale.minute);</script></option>
|
|
<option value="600000">10 <script>document.write(locale.minute);</script></option>
|
|
<option value="1800000">30 <script>document.write(locale.minute);</script></option></select>
|
|
<i class="icon-refresh" style="cursor:pointer;font-size:15px;vertical-align:middle;" id="icon_refresh"></i>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle; " id="icon_tooltip_auto_refresh"></i>
|
|
</div>
|
|
</div>
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" height="200" width="10%">
|
|
<colgroup>
|
|
<col width="23%" />
|
|
<col width="4%" />
|
|
<col width="23%" />
|
|
<col width="5%" />
|
|
<col width="15%" />
|
|
<col width="15%" />
|
|
<col width="15%" />
|
|
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<div>
|
|
<table border="0" cellpadding="0" cellspacing="10" height="100%" >
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="3">
|
|
<div id="gateway_chart_pie" style="text-align: center;position:relative;"></div>
|
|
<div style="position:relative;left:-60px;top:-20px;"><i class="icon-help" style="color:gray;font-size: 20px; float: right;margin-top:130;" id="icon_gateway_chart_pie"></i></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p style="text-align: center;font-weight: bold;">
|
|
<span style="color:#87BB66" id="chart_tag_connected">● <script>document.write(locale.connected);</script></span>
|
|
<span style="color:#7977C2" id="chart_tag_disconnected"> ● <script>document.write(locale.disconnected);</script></span>
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
<td> </td>
|
|
<td>
|
|
<div>
|
|
<table border="0" cellpadding="0" cellspacing="10" height="100%" >
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="3">
|
|
<div id="chart_pie" style="text-align: center;position:relative;"></div>
|
|
<div style="position:relative;left:-60px;top:-20px;"><i class="icon-help" style="color:gray;font-size: 20px; float: right;margin-top:130;" id="icon_chart_pie"></i></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p style="text-align: center;font-weight: bold;">
|
|
<!-- <span style="color:#87BB66">•—• Normal</span>
|
|
<span style="color:#7977C2">•—• Invalid</span>
|
|
<span style="color:#7BBAE7">•—• Ready</span> -->
|
|
<span style="color:#87BB66" id="chart_tag_connected">● <script>document.write(locale.connected);</script></span>
|
|
<span style="color:#7977C2" id="chart_tag_disconnected"> ● <script>document.write(locale.disconnected);</script></span>
|
|
<span style="color:#7BBAE7" id="chart_tag_removed"> ● <script>document.write(locale.removed);</script></span>
|
|
|
|
<span style="color:#747474" id="chart_tag_storage"> ● <script>document.write(locale.storage);</script></span>
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
<td> </td>
|
|
<td>
|
|
<div id="chart_in_progress" style="position:relative;text-align:center"> </div>
|
|
<div style="position:relative;left:-50px;top:-70px;"><i class="icon-help" style="color:gray;font-size: 20px; float: right;margin-top:130;" id="icon_chart_in_progress"></i></div>
|
|
</td>
|
|
<td>
|
|
<div id="chart_at_gateway" style="margin: 50;position:relative;text-align:center;"> </div>
|
|
<div style="position:relative;left:-50px;top:-70px;"><i class="icon-help" style="color:gray;font-size: 20px; float: right;margin-top:130;" id="icon_chart_at_gateway"></i></div>
|
|
</td>
|
|
<td>
|
|
<div id="chart_busy" style="margin: 50;position:relative;text-align:center;"> </div>
|
|
<div style="position:relative;left:-50px;top:-70px;"><i class="icon-help" style="color:gray;font-size: 20px; float: right;margin-top:130;" id="icon_chart_busy"></i></div>
|
|
</td>
|
|
<!--<td><div id="chart_low_battery"></div></td>-->
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div style="height: 200px; background-color: rgb(242, 242, 242);">
|
|
<table class="table table-classic" id="home_tag_status_list">
|
|
<thead>
|
|
<tr>
|
|
<th><script>document.write(locale.type);</script></th>
|
|
<th><script>document.write(locale.total);</script></th>
|
|
<th><script>document.write(locale.connected);</script></th>
|
|
<th><script>document.write(locale.disconnected);</script></th>
|
|
<th><script>document.write(locale.removed);</script></th>
|
|
<th><script>document.write(locale.storage);</script></th>
|
|
<th><script>document.write(locale.low_battery);</script></th>
|
|
<th width="10" style="background: #fff;"></th>
|
|
<th width="105" style="color: #fcb416;"><script>document.write(locale.in_progress);</script></th>
|
|
<th width="105" style="color: #fcb416;"><script>document.write(locale.at_gateway);</script></th>
|
|
<th width="105" style="color: #fcb416;"><script>document.write(locale.busy);</script></th>
|
|
<th width="105" style="color: #fcb416;"><script>document.write(locale.success);</script></th>
|
|
<th width="105" style="color: #fcb416;"><script>document.write(locale.waiting);</script></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script data-jui="#home_tag_status_list" data-tpl="none" type="text/template">
|
|
<tr>
|
|
<td colspan="13" class="none" style="text-align:center;height:180px;">?</td>
|
|
</tr>
|
|
</script><script data-jui="#home_tag_status_list" data-tpl="row" type="text/template">
|
|
<tr style="text-align:center;cursor:pointer;">
|
|
<td><!=Type !></td>
|
|
<td><!=Total !></td>
|
|
<td><!=Connected !></td>
|
|
<td style="color:#0000FF;font-weight:bold;"><!=Disconnected !></td>
|
|
<td><!=Removed !></td>
|
|
<td><!=Storage !></td>
|
|
<td><!=Low_Battery !></td>
|
|
<td style="background: #fff; border-bottom-color: #fff;"></td>
|
|
<td><!=In_Progress !></td>
|
|
<td><!=At_Gateway !></td>
|
|
<td><!=Busy !></td>
|
|
<td><!=Success !></td>
|
|
<td style="color:#FF0000;font-weight:bold;"><!=Waiting !></td>
|
|
</tr>
|
|
</script></div>
|
|
<div class="" style="text-align:right;padding-top:5px;float:left">
|
|
<a class="btn btn-gray" id="btn_home_tag_category"><script>document.write(locale.btn_home_tag_category);</script></a>
|
|
</div>
|
|
<div class="" style="text-align:right;padding-top:5px;float:right">
|
|
<a class="btn btn-gray" id="btn_schedule_update"><script>document.write(locale.schedule_updates_btn);</script></a>
|
|
<a class="btn btn-gray" id="btn_home_tag_factory_reset" style="display: none;"><script>document.write(locale.all_factory_reset);</script></a>
|
|
<a class="btn btn-gray" id="btn_home_tag_reboot" style="display: none;"><script>document.write(locale.all_reboot);</script></a>
|
|
<a class="btn btn-gray" id="btn_home_tag_image_update_new"><script>document.write(locale.image_update);</script></a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="main_bottom_chart">
|
|
<td style="padding-top: 10px; vertical-align: top;">
|
|
<div class="panel">
|
|
<div class="head" id="main_title_gw_status"><b><script>document.write(locale.gateway_list);</script>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle; " id="icon_tooltip_main_title_gw_status"></i></b></div>
|
|
|
|
<div style="height: 180px; background-color: rgb(242, 242, 242);">
|
|
<table class="table table-classic" id="home_gateway_list">
|
|
<thead>
|
|
<tr>
|
|
<th width="30%"><script>document.write(locale.name);</script></th>
|
|
<th width="13%"><script>document.write(locale.status);</script></th>
|
|
<th width="17%"><script>document.write(locale.ip_address);</script></th>
|
|
<th width="15%"><script>document.write(locale.version);</script></th>
|
|
<th width="25%"><script>document.write(locale.device_id);</script></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!--<script data-jui="#home_gateway_list" data-tpl="none" type="text/template">
|
|
<tr>
|
|
<td colspan="9" class="none" style="text-align:center;height:150px;">?</td>
|
|
</tr>
|
|
</script> -->
|
|
<script data-jui="#home_gateway_list" data-tpl="row" type="text/template">
|
|
<tr style="text-align:center;">
|
|
<td><!=name !></td>
|
|
<td><!=state!></td>
|
|
<td><!=ip!></td>
|
|
<td><!=version !></td>
|
|
<td><!=device_id !></td>
|
|
</tr>
|
|
</script>
|
|
</div>
|
|
</td>
|
|
<td> </td>
|
|
<td style="padding-top: 10px; vertical-align: top;">
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<colgroup>
|
|
<!-- <col width="60%" /> -->
|
|
<!-- <col width="2%" /> -->
|
|
<!-- <col width="38%" /> -->
|
|
<col width="100%" />
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<td style="vertical-align: top;">
|
|
|
|
<div class="panel">
|
|
<div class="head" id="main_title_system_status"><b><script>document.write(locale.server_usage);</script>
|
|
<i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle; " id="icon_tooltip_main_title_system_status"></i></b></div></div>
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<colgroup>
|
|
<col width="51%" />
|
|
<col width="1%" />
|
|
<col width="48%" />
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<td style="vertical-align: top;">
|
|
<table class="table table-classic" id="system_info_list">
|
|
<thead>
|
|
<tr>
|
|
<th width="50%"> </th>
|
|
<th width="50%"><script>document.write(locale.info);</script></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
<script data-jui="#system_info_list" data-tpl="row" type="text/template">
|
|
<tr style="text-align:center;">
|
|
<td><!=info !></td>
|
|
<td><!=usage !></td>
|
|
</tr>
|
|
</script>
|
|
</td>
|
|
<td> </td>
|
|
<td style="vertical-align: top;">
|
|
<table class="table table-classic" id="system_disk_list">
|
|
<colgroup>
|
|
<col width="25%" />
|
|
<col width="75%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>HDD</th>
|
|
<th><script>document.write(locale.total);</script>/<script>document.write(locale.usage);</script></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
<script data-jui="#system_disk_list" data-tpl="row" type="text/template">
|
|
<tr>
|
|
<td style="text-align:center;"><!=File_System_Root !></td>
|
|
<td style="text-align:right;"><!=Total_Space !>/<!=Used_Space !></td>
|
|
</tr>
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
|
|
<!-- <td> </td> -->
|
|
|
|
<!-- <td style="vertical-align: top;"> -->
|
|
<!-- <div class="panel"> -->
|
|
<!-- <div class="head"><b><script>document.write(locale.pos_converter);</script> -->
|
|
<!-- <i class="icon-help" style="color:gray;font-size: 20px; vertical-align:middle; " id="icon_tooltip_main_title_pos_converter"></i></b></div></div> -->
|
|
|
|
<!-- <table class="table table-classic" id="system_disk_list"> -->
|
|
<!-- <tr> -->
|
|
<!-- <td style="text-align:center;"><img id="pos_converter_status_img" style="height: 64px; width: 64px; padding: 5px;"></td> -->
|
|
<!-- </tr> -->
|
|
<!-- <tr> -->
|
|
<!-- <td style="text-align:center;"><span id="pos_converter_last_time"></span></td> -->
|
|
<!-- </tr> -->
|
|
<!-- <tr> -->
|
|
<!-- <td style="text-align:left;"><img id="day_product_price_img" src="js/images/bullet_black.png" style="height: 20px; width: 20px;" align="absmiddle"/> <span id="day_product_price"></span></td> -->
|
|
<!-- </tr> -->
|
|
<!-- <tr> -->
|
|
<!-- <td style="text-align:left;"><img id="lable_event_img" src="js/images/bullet_black.png" style="height: 20px; width: 20px;" align="absmiddle"/> <span id="lable_event"></span></td> -->
|
|
<!-- </tr> -->
|
|
<!-- <tr> -->
|
|
<!-- <td style="text-align:left;"><img id="day_match_product_price_img" src="js/images/bullet_black.png" style="height: 20px; width: 20px;" align="absmiddle"/> <span id="day_match_product_price"></span></td> -->
|
|
<!-- </tr> -->
|
|
<!-- <tr> -->
|
|
<!-- <td style="text-align:left;"><img id="esl_file_img" src="js/images/bullet_black.png" style="height: 20px; width: 20px;" align="absmiddle"/> <span id="esl_file"></span></td> -->
|
|
<!-- </tr> -->
|
|
<!-- <tr> -->
|
|
<!-- <td style="text-align:left;"><img id="day_event_reset_img" src="js/images/bullet_black.png" style="height: 20px; width: 20px;" align="absmiddle"/> <span id="day_event_reset"></span></td> -->
|
|
<!-- </tr> -->
|
|
<!-- </table> -->
|
|
|
|
<!-- </td> -->
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
<div class="window" id="home_tag_image_update">
|
|
<div class="head">
|
|
<div class="left" id="home_tag_image_update_title">Image Update</div>
|
|
<div class="right">
|
|
<a href="#" class="close"><i class='icon-close icon-white'></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<div class="row" style="padding:3px 0 0 0;">
|
|
<div style="padding-bottom:5px;">
|
|
<label class="label label-small" style="width:100px;" id="home_tag_image_update_model">Tag Model</label>
|
|
<input type="text" name="home_tag_model_input" id="home_tag_model_input" value="" maxlength="20" class="input input-small input-rect" style="width:100px;" readonly="readonly" /><br />
|
|
</div>
|
|
<div style="padding-bottom:5px;">
|
|
<input type="checkbox" id="chk_home_tag_image_update_page1" name="chk_home_tag_image_update_page1" > <label id="home_tag_image_update_page1_label">Page 1</label>
|
|
<input type="checkbox" id="chk_home_tag_image_update_page2" name="chk_home_tag_image_update_page2" > <label id="home_tag_image_update_page2_label">Page 2</label>
|
|
<input type="checkbox" id="chk_home_tag_image_update_page3" name="chk_home_tag_image_update_page3" > <label id="home_tag_image_update_page3_label">Page 3</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="foot" align="center">
|
|
<a href="#" class="btn btn-gray" id="btn_home_tag_image_update_control">Control</a>
|
|
<a href="#" class="btn btn-gray" id="btn_home_tag_image_update_close">Close</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="window" id="schedule_update">
|
|
<div class="head">
|
|
<div class="left" id="schedule_update_title"></div>
|
|
<div class="right">
|
|
<a href="#" class="close"><i class='icon-close icon-white'></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<!-- <div class="row" style="padding:3px 0 0 0;"> -->
|
|
<div style="height: 180px; background-color: rgb(242, 242, 242);">
|
|
<table class="table table-classic" id="home_schedule_update_list">
|
|
<thead>
|
|
<tr>
|
|
<th width="50px" id="home_schedule_update_type"></th>
|
|
<th width="50px" id="home_schedule_update_page1"></th>
|
|
<th width="50px" id="home_schedule_update_page2"></th>
|
|
<th width="50px" id="home_schedule_update_page3"></th>
|
|
<th width="180px" id="home_schedule_update_time"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script data-jui="#home_schedule_update_list" data-tpl="row" type="text/template">
|
|
<tr style="text-align:center;">
|
|
<td><!=type !></td>
|
|
<td><!=page1 !></td>
|
|
<td><!=page2 !></td>
|
|
<td><!=page3 !></td>
|
|
<td><!=update_time !></td>
|
|
</tr>
|
|
</script>
|
|
<!-- </div> -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="window window-white" id="notify_popup_window">
|
|
<div class="head">
|
|
<div class="left" id="notify_popup_window_title"></div>
|
|
|
|
<div class="right">
|
|
<a href="#" class='close'><i class='icon-close'></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<div style="height: 290px; background-color: rgb(242, 242, 242);">
|
|
<table class="table table-classic" id="notify_popup_list">
|
|
<thead>
|
|
<tr>
|
|
<th width="150" id="notify_col_time"></th>
|
|
<th id="notify_col_type"></th>
|
|
<th width="120" id="notify_col_device_id"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script data-jui="#notify_popup_list" data-tpl="none" type="text/template">
|
|
<tr>
|
|
<td colspan="3" class="none" style="text-align:center;height:260px;">?</td>
|
|
</tr>
|
|
</script>
|
|
<script data-jui="#notify_popup_list" data-tpl="row" type="text/template">
|
|
<tr style="text-align:center;">
|
|
<td><!=time !></td>
|
|
<td><!=type !></td>
|
|
<td><!=device_id !></td>
|
|
</tr>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="window" id="category_tag_list_win">
|
|
<div class="head">
|
|
<div class="left" id="category_tag_list_win_title">Title</div>
|
|
<div class="right">
|
|
<a href="#" class="close"><i class='icon-close icon-white'></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<div class="panel">
|
|
<div class="head" style="width: 1248px;">
|
|
<b><span id="category_tag_list_win_sub_title">-</span></b>
|
|
<div style="float:right;">
|
|
<label id="win_category_lable_page">Paging</label> :
|
|
<select name="limit" id="win_category_limit" class="input-mini input-rect" style="width:70px;">
|
|
<option value="30">30</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
<option value="500">500</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div id="category_tag_list_win_div" style="height:420px;background-color:#f2f2f2;width:1280px;overflow-x:scroll;overflow-y:scroll;">
|
|
<table id="category_tag_list" class="table table-classic" >
|
|
<thead>
|
|
<tr>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
<div id="category_tag_list_row"></div>
|
|
</div>
|
|
|
|
<!--<script data-jui="#category_tag_list" data-tpl="none" type="text/template" id="category_tag_list_row">
|
|
<tr>
|
|
<td colspan="0" class="none" style="text-align:center;height:420px;width:1280px;"> </td>
|
|
</tr>
|
|
</script> -->
|
|
<div id="category_tag_list_paging" class="paging paging-large" style="width: 100%; margin-top: 3px;">
|
|
<a href="#" class="first" id="win_cate_first">First</a>
|
|
<div class="list"></div>
|
|
<a href="#" class="last" id="win_cate_last">Last</a>
|
|
</div>
|
|
|
|
<script data-jui="#category_tag_list_paging" data-tpl="pages" type="text/template">
|
|
<! for(var i = 0; i < pages.length; i++) { !>
|
|
<a href="#" class="page"><!= pages[i] !></a>
|
|
<! } !>
|
|
</script>
|
|
<div style="text-align:left;padding-top:5px;float:left;font-size: 12px;" id="category_tag_list_paging_total"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="window" id="home_category_tag_list">
|
|
<div class="head">
|
|
<div class="left" id="home_category_tag_list_title">Title</div>
|
|
<div class="right">
|
|
<a href="#" class="close"><i class='icon-close icon-white'></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<div id="tag_status_class_list_div" style="height:460px;background-color:#f2f2f2;width: 1280px;overflow-x: scroll;overflow-y:hidden;">
|
|
<table id="tag_status_class_list" class="table table-classic" >
|
|
<thead>
|
|
<tr>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
<div id="tag_status_class_list_row"></div>
|
|
</div>
|
|
<!--<script data-jui="#tag_status_class_list" data-tpl="none" type="text/template" id="tag_status_class_list_row">
|
|
<tr>
|
|
<td colspan="0" class="none" style="text-align:center;height:420px;width:1280px;"> </td>
|
|
</tr>
|
|
</script>-->
|
|
</div>
|
|
</div>
|
|
|
|
<div id="loading" style="display: none;"><img src="/jui/img/xtable-loading.gif" /></div>
|
|
<script type="text/javascript">
|
|
var loading_win
|
|
, system_disk_list
|
|
, system_info_list
|
|
, home_tag_status_list
|
|
, home_user_tag_status_list
|
|
, home_gateway_list
|
|
, chart_in_progress
|
|
, chart_at_gateway
|
|
, chart_busy
|
|
, chart_low_battery
|
|
, chart_pie
|
|
, gateway_chart_pie
|
|
, reload_interval
|
|
, notify_popup_window
|
|
, notify_popup_list
|
|
, notify_popup = 'no'
|
|
, notify_sound = 'no'
|
|
, system_sound = ''
|
|
, common_loading
|
|
, win_home_tag_image_update
|
|
, win_schedule_update
|
|
, win_home_category_tag_list
|
|
, home_schedule_update_list
|
|
, tag_status_class_list
|
|
, category_tag_list
|
|
, category_tag_list_win
|
|
, category_tag_list_paging
|
|
, category_tag_list_page = 1
|
|
, select_category_code;
|
|
|
|
jui.ready([ "uix.tab" ], function(tab) {
|
|
tab_1 = tab('#tab_1', {
|
|
event: {
|
|
click: function(data, e) {
|
|
//alert("click"+data.index);
|
|
//alert(e.type);
|
|
},
|
|
change: function(data, e) {
|
|
//alert(data.index);
|
|
//alert(tab_1.activeIndex( ));
|
|
console.dir(data);
|
|
console.dir(document.body);
|
|
//document.getElementById("main_system_title").click();
|
|
document.body.click();//product windows의 column select popup close
|
|
|
|
var tab_cnt = tab_1.root.childElementCount
|
|
for(var i = 0; i < tab_cnt; i ++) {
|
|
if(tab_1.root.children[i].textContent == locale.menu_tag && data.text != tab_1.root.children[i].textContent)
|
|
{
|
|
HidePopupTagWindow();
|
|
}
|
|
else if(tab_1.root.children[i].textContent == locale.menu_gateway && data.text != tab_1.root.children[i].textContent)
|
|
{
|
|
HidePopupGatewayWindow();
|
|
}
|
|
else if(tab_1.root.children[i].textContent == locale.menu_user && data.text != tab_1.root.children[i].textContent)
|
|
{
|
|
HidePopupUserWindow();
|
|
}
|
|
else if(tab_1.root.children[i].textContent == locale.menu_products && data.text != tab_1.root.children[i].textContent)
|
|
{
|
|
HidePopupProductWindow();
|
|
}
|
|
//if(tab_1.root.children[i].textContent == t) {
|
|
//tab_1.show(i);
|
|
//alert("aaaa");
|
|
}
|
|
|
|
|
|
/*if(data.text == 'Tag'){
|
|
//alert("bbbb");
|
|
//alert(data.text + '1');
|
|
|
|
//HidePopupGatewayWindow();
|
|
}
|
|
if(data.text != 'Gateway'){
|
|
//alert(data.text);
|
|
//HidePopupGatewayWindow();
|
|
}
|
|
if(data.text != 'User'){
|
|
//alert(data.text);
|
|
//HidePopupUserWindow();
|
|
}
|
|
if(data.text == 'Home'){
|
|
//fnRefreshMain();
|
|
//document.location.reload();
|
|
//HidePopupTagWindow();
|
|
//HidePopupGatewayWindow();
|
|
}*/
|
|
|
|
|
|
$('#tab_1_contents > div').hide();
|
|
if(data.index == 0) {
|
|
$('#Home').show();
|
|
} else {
|
|
$('#'+ data.text.split(' ').join('').replace('/', '')).show();
|
|
}
|
|
}
|
|
}, tpl: {
|
|
//node: '<li><a href="#<!=text !>"><!= text !> <i class="icon-close" style="font-size:8px;cursor:pointer;" onclick="tabRemove(\'<!=text !>\');"></a></li>'
|
|
node: '<li><a href="#"><!= text !></a></li>'
|
|
}
|
|
});
|
|
});
|
|
jui.ready([ "ui.tooltip" ], function(tooltip) {
|
|
|
|
tooltip_title_tag_status = tooltip("#icon_tooltip_main_title_tag_status", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_tag_status
|
|
});
|
|
tooltip_title_gw_status = tooltip("#icon_tooltip_main_title_gw_status", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_gw_status
|
|
});
|
|
tooltip_title_gw_status = tooltip("#icon_tooltip_main_title_pos_converter", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_pos_converter
|
|
});
|
|
tooltip_title_system_status = tooltip("#icon_tooltip_main_title_system_status", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_system_status
|
|
});
|
|
tooltip_title_main_image_update = tooltip("#btn_home_tag_image_update", {
|
|
position: "bottom",
|
|
width: 250,
|
|
align: "left",
|
|
title: locale.tooltip_system_main_image_update
|
|
});
|
|
tooltip_in_progress = tooltip("#icon_chart_in_progress", {
|
|
position: "left",
|
|
width: 150,
|
|
align: "left",
|
|
title: locale.tooltip_in_progress
|
|
});
|
|
tooltip_at_gateway = tooltip("#icon_chart_at_gateway", {
|
|
position: "left",
|
|
width: 150,
|
|
align: "left",
|
|
title: locale.tooltip_at_gateway
|
|
});
|
|
tooltip_busy = tooltip("#icon_chart_busy", {
|
|
position: "left",
|
|
width: 150,
|
|
align: "left",
|
|
title: locale.tooltip_busy
|
|
});
|
|
/*tooltip_chart_tag_connected = tooltip("#chart_tag_connected", {
|
|
position: "top",
|
|
width: 160,
|
|
align: "left",
|
|
title: locale.tooltip_chart_tag_connected
|
|
});
|
|
tooltip_chart_tag_disconnected = tooltip("#chart_tag_disconnected", {
|
|
position: "top",
|
|
width: 160,
|
|
align: "left",
|
|
title: locale.tooltip_chart_tag_disconnected
|
|
});
|
|
tooltip_chart_tag_removed = tooltip("#chart_tag_removed", {
|
|
position: "top",
|
|
width: 160,
|
|
align: "left",
|
|
title: locale.tooltip_chart_tag_removed
|
|
});*/
|
|
tooltip_tooltip_auto_refresh = tooltip("#icon_tooltip_auto_refresh", {
|
|
position: "top",
|
|
width: 160,
|
|
align: "left",
|
|
title: locale.tooltip_auto_refresh
|
|
});
|
|
tooltip_tooltip_chart_pie = tooltip("#icon_chart_pie", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_chart_tag
|
|
});
|
|
tooltip_tooltip_gateway_chart_pie = tooltip("#icon_gateway_chart_pie", {
|
|
position: "top",
|
|
width: 200,
|
|
align: "left",
|
|
title: locale.tooltip_gateway_chart_tag
|
|
});
|
|
|
|
});
|
|
jui.ready(['chart.builder'], function(chart) {
|
|
chart_in_progress = chart('#chart_in_progress', {
|
|
height: 190
|
|
, width: 190
|
|
, axis: {
|
|
data: [{
|
|
title: locale.in_progress//'In Progress'
|
|
, max: 100
|
|
, min: 0
|
|
, unit: '%'
|
|
}]
|
|
}, brush : {
|
|
type : 'fullgauge',
|
|
size : 10,
|
|
startAngle : 0,
|
|
titleY : 60,
|
|
colors: ['#FFC000'],
|
|
animate : true,
|
|
showText : true,
|
|
format : function(v) {
|
|
return v + "%";
|
|
}
|
|
}
|
|
});
|
|
|
|
chart_at_gateway = chart('#chart_at_gateway', {
|
|
height: 190
|
|
, width: 190
|
|
, axis: {
|
|
data: [{
|
|
title: locale.at_gateway//'At Gateway'
|
|
, max: 100
|
|
, min: 0
|
|
, unit: '%'
|
|
}]
|
|
}, brush : {
|
|
type : 'fullgauge',
|
|
size : 10,
|
|
startAngle : 0,
|
|
titleY : 60,
|
|
colors: ['#7BBAE7'],
|
|
animate : true,
|
|
showText : true,
|
|
format : function(v) {
|
|
return v + "%";
|
|
}
|
|
}
|
|
});
|
|
|
|
chart_busy = chart('#chart_busy', {
|
|
height: 190
|
|
, width: 190
|
|
, axis: {
|
|
data: [{
|
|
title: locale.busy//'Busy'
|
|
, max: 100
|
|
, min: 0
|
|
, unit: '%'
|
|
}]
|
|
}, brush : {
|
|
type : 'fullgauge',
|
|
size : 10,
|
|
startAngle : 0,
|
|
titleY : 60,
|
|
colors: ['#7977C2'],
|
|
animate : true,
|
|
showText : true,
|
|
format : function(v) {
|
|
return v + "%";
|
|
}
|
|
}
|
|
});
|
|
|
|
chart_low_battery = chart('#chart_low_battery', {
|
|
height: 190
|
|
, width: 190
|
|
, axis: {
|
|
data: [{
|
|
title: 'Low Battery'
|
|
, max: 100
|
|
, min: 0
|
|
, unit: '%'
|
|
}]
|
|
}, brush : {
|
|
type : 'fullgauge',
|
|
size : 10,
|
|
startAngle : 0,
|
|
titleY : 60,
|
|
colors: ['#FF7800'],
|
|
animate : true,
|
|
showText : true,
|
|
format : function(v) {
|
|
return v + "%";
|
|
}
|
|
}
|
|
});
|
|
|
|
chart_pie = chart("#chart_pie", {
|
|
padding: 5,
|
|
width : 250,
|
|
height : 140,
|
|
axis : {
|
|
data : [
|
|
{ 'Disconnected' : 0, 'Removed': 0, 'Connected': 0, 'Storage': 0}
|
|
]
|
|
}, brush : [{
|
|
type : "pie",
|
|
colors: ['#7977C2', '#7BBAE7', '#87BB66', '#747474'],
|
|
showText : false,
|
|
format : function(k, v) {
|
|
//return k + " : " + parseInt(v, 10);
|
|
//return parseInt(v, 10);
|
|
return locale[k.toLowerCase()] + " : " + parseInt(v, 10);
|
|
}
|
|
}], widget : [{
|
|
type : "tooltip"
|
|
, format: function(d, v) {
|
|
//return d +" : "+ parseInt(v, 10);
|
|
//return parseInt(v, 10);
|
|
return locale[d.toLowerCase()] + " : " + parseInt(v, 10);
|
|
}
|
|
}]
|
|
});
|
|
|
|
gateway_chart_pie = chart("#gateway_chart_pie", {
|
|
padding: 5,
|
|
width : 250,
|
|
height : 140,
|
|
axis : {
|
|
data : [
|
|
{ 'Disconnected' : 0, 'Connected': 0 }
|
|
]
|
|
}, brush : [{
|
|
type : "pie",
|
|
colors: ['#7977C2', '#87BB66'],
|
|
showText : false,
|
|
format : function(k, v) {
|
|
//return k + " : " + parseInt(v, 10);
|
|
//return parseInt(v, 10);
|
|
return locale[k.toLowerCase()] + " : " + parseInt(v, 10);
|
|
}
|
|
}], widget : [{
|
|
type : "tooltip"
|
|
, format: function(d, v) {
|
|
//return d +" : "+ parseInt(v, 10);
|
|
//return parseInt(v, 10);
|
|
return locale[d.toLowerCase()] + " : " + parseInt(v, 10);
|
|
}
|
|
}]
|
|
});
|
|
});
|
|
|
|
jui.ready(["uix.window"], function(win) {
|
|
category_tag_list_win = win('#category_tag_list_win', {
|
|
width: 1315
|
|
, height: 575
|
|
, modal: true
|
|
, resize : false
|
|
, move: true
|
|
, top: '15%'
|
|
, left: '10%'
|
|
});
|
|
notify_popup_window = win('#notify_popup_window', {
|
|
width: 450
|
|
, height: 360
|
|
, modal: true
|
|
});
|
|
|
|
common_loading = win('#loading', {
|
|
width: 32
|
|
, height: 25
|
|
, modal: true
|
|
, modalIndex: 99999
|
|
});
|
|
win_home_tag_image_update = win('#home_tag_image_update', {
|
|
width: 250
|
|
, height: 180
|
|
, modal: true
|
|
});
|
|
win_home_category_tag_list = win('#home_category_tag_list', {
|
|
width: 1310
|
|
, height: 520
|
|
, modal: false
|
|
, top: '15%'
|
|
, left: '15%'
|
|
});
|
|
win_schedule_update = win('#schedule_update', {
|
|
width: 500
|
|
, height: 250
|
|
, modal: true
|
|
});
|
|
});
|
|
|
|
|
|
function fnGetHomeTagStatusList() {
|
|
$.ajax({
|
|
url : '/restapi/system/tagStatus'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
var bTotal = false;
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
json = json.data;
|
|
$.each(json, function (i, v) {
|
|
var connected_box = parseFloat(json[i]['Connected_box'])
|
|
, disconnected_box = parseFloat(json[i]['Disconnected_box'])
|
|
, removed_box = parseFloat(json[i]['Removed_box']);
|
|
|
|
if (json[i]['Type'] == 'Total') {
|
|
var total = parseInt(json[i]['Total'], 10)
|
|
, in_progress = parseInt(json[i]['In_Progress'], 10)
|
|
, at_gateway = parseInt(json[i]['At_Gateway'], 10)
|
|
, busy = parseInt(json[i]['Busy'], 10);
|
|
//, low_battery = parseInt(json[i]['LowBattery'], 10);
|
|
bTotal = true;
|
|
|
|
chart_in_progress.axis()[0].data[0].value = (total == 0) ? 0 : Math.ceil(in_progress / total * 100);
|
|
chart_in_progress.render();
|
|
|
|
chart_at_gateway.axis()[0].data[0].value = (total == 0) ? 0 : Math.ceil(at_gateway / total * 100);
|
|
chart_at_gateway.render();
|
|
|
|
chart_busy.axis()[0].data[0].value = (total == 0) ? 0 : Math.ceil(busy / total * 100);
|
|
chart_busy.render();
|
|
|
|
//chart_low_battery.axis()[0].data[0].value = (total == 0) ? 0 : (low_battery / total * 100).toFixed(0);
|
|
//chart_low_battery.render();
|
|
/*var chart_data = [{locale.disconnected:((total == 0) ? 0.1 : json[i]['Disconnected']),
|
|
locale.connected:((total == 0) ? 0.1 : json[i]['Connected']),
|
|
locale.removed:((total == 0) ? 0.1 : json[i]['Removed'])];*/
|
|
/*var a = new Array();
|
|
a['aaa'] = 5;
|
|
a['aaad'] = 50;
|
|
a['aaadd'] = 50;*/
|
|
|
|
/*var persontes;
|
|
var key3 = 'a_key';
|
|
var value3 = 3;
|
|
persontes[ key3 ] = value3;*/
|
|
|
|
|
|
/*var person = [,];
|
|
person[0,0] = locale.total;
|
|
person[0,1] = 33;
|
|
person[1,0] = "Doe";
|
|
person[1,1] = 33;
|
|
person[2,0] = 'gg';
|
|
person[2,1] = 33;*/
|
|
//String stringtest = locale.total;
|
|
//var chart_data = [{person[0]:60,'B':51,'G':44}];
|
|
//chart_pie.axis()[0].data = (persontes);
|
|
chart_pie.axis()[0].data[0].Disconnected = (total == 0) ? 0.1 : json[i]['Disconnected'];
|
|
chart_pie.axis()[0].data[0].Connected = (total == 0) ? 0.1 : json[i]['Connected'];
|
|
chart_pie.axis()[0].data[0].Removed = (total == 0) ? 0.1 : json[i]['Removed'];
|
|
chart_pie.axis()[0].data[0].Storage = (total == 0) ? 0.1 : json[i]['Storage'];
|
|
chart_pie.render();
|
|
json[i]['Type'] = locale.total;
|
|
}
|
|
|
|
});
|
|
|
|
|
|
json.sort(function(a, b) {
|
|
return (a.Sort_ID < b.Sort_ID ? -1 : ((a.Sort_ID > b.Sort_ID) ? 1 : 0));
|
|
})
|
|
|
|
home_tag_status_list.uncheckAll();
|
|
home_tag_status_list.update(json);
|
|
}
|
|
}, 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 fnUserHomeTagStatusList() {
|
|
$.ajax({
|
|
url : '/restapi/system/tagStatus'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
var bTotal = false;
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
json = json.data;
|
|
$.each(json, function (i, v) {
|
|
if (json[i]['Type'] == 'Total') {
|
|
json[i]['Type'] = locale.total;
|
|
}
|
|
|
|
});
|
|
|
|
json.sort(function(a, b) {
|
|
return (a.Sort_ID < b.Sort_ID ? -1 : ((a.Sort_ID > b.Sort_ID) ? 1 : 0));
|
|
})
|
|
|
|
home_user_tag_status_list.uncheckAll();
|
|
home_user_tag_status_list.update(json);
|
|
}
|
|
}, 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 fnGetHomeGatewayList() {
|
|
$.ajax({
|
|
url : '/restapi/gateway/query_list'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
json = json.data;
|
|
|
|
var total = json.length;
|
|
var conCnt = 0;
|
|
var disConCnt = 0;
|
|
$.each(json, function(i, v) {
|
|
state = json[i].state;
|
|
|
|
switch(state.toLowerCase()) {
|
|
case 'disconnected':
|
|
disConCnt++;
|
|
json[i].state = '<span style="color:#7977C2;">'+ locale[state] +'</span>';
|
|
break;
|
|
case 'connected':
|
|
conCnt++;
|
|
json[i].state = '<span style="color:#87BE66;">'+ locale[state] +'</span>';
|
|
break;
|
|
}
|
|
});
|
|
|
|
|
|
home_gateway_list.reset();
|
|
home_gateway_list.update(json);
|
|
|
|
gateway_chart_pie.axis()[0].data[0].Disconnected = (total == 0) ? 0.1 : disConCnt;
|
|
gateway_chart_pie.axis()[0].data[0].Connected = (total == 0) ? 0.1 : conCnt;
|
|
gateway_chart_pie.render();
|
|
|
|
}
|
|
}, 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 fnGetScheduleUpdateList() {
|
|
$.ajax({
|
|
url : '/restapi/te/get_update'
|
|
, type : 'POST'
|
|
, data : {
|
|
'type': 'all'
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
json = json.data;
|
|
$.each(json, function (i, v) {
|
|
if(json[i].page1==false) {
|
|
json[i].page1 = "-";
|
|
}else if(json[i].page1==true) {
|
|
json[i].page1 = "<img src='js/images/check.png' />";
|
|
}
|
|
if(json[i].page2==false) {
|
|
json[i].page2 = "-";
|
|
}else if(json[i].page2==true) {
|
|
json[i].page2 = "<img src='js/images/check.png' />";
|
|
}
|
|
if(json[i].page3==false) {
|
|
json[i].page3 = "-";
|
|
}else if(json[i].page3==true) {
|
|
json[i].page3 = "<img src='js/images/check.png' />";
|
|
}
|
|
});
|
|
home_schedule_update_list.reset();
|
|
home_schedule_update_list.update(json);
|
|
}
|
|
}, 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 fnGetSystemDiskList() {
|
|
$.ajax({
|
|
url : '/restapi/system/disk'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
json = json.data;
|
|
|
|
system_disk_list.update(json);
|
|
}
|
|
}, 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 fnGetSystemInfo() {
|
|
$.ajax({
|
|
url : '/restapi/system/info'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
json = json.data;
|
|
|
|
var os_name = json[0]['OS_Name']
|
|
, os_version = json[0]['OS_Version']
|
|
, server_version = json[0]['Server_Version']
|
|
, processors = json[0]['Processors(Cores)']
|
|
, cpu_usage = json[0]['CPU_Usage']
|
|
, list = new Array();
|
|
|
|
var t = new Object();
|
|
t['info'] = 'Processors';
|
|
t['usage'] = processors;
|
|
list.push(t);
|
|
|
|
var t = new Object();
|
|
t['info'] = 'OS';
|
|
t['usage'] = os_name;
|
|
list.push(t);
|
|
|
|
var t = new Object();
|
|
t['info'] = 'Server Version';
|
|
t['usage'] = server_version;
|
|
list.push(t);
|
|
|
|
var t = new Object();
|
|
t['info'] = 'CPU';
|
|
t['usage'] = cpu_usage;
|
|
list.push(t);
|
|
|
|
if(json[0].pos_state=="unknown") {
|
|
$('#pos_converter_status_img').attr('src', 'js/images/unknown.png');
|
|
}else if(json[0].pos_state=="normal") {
|
|
$('#pos_converter_status_img').attr('src', 'js/images/normal.png');
|
|
}else if(json[0].pos_state=="abnormal") {
|
|
$('#pos_converter_status_img').attr('src', 'js/images/abnormal.png');
|
|
}
|
|
var lastTime = null;
|
|
var min_gap = 0;
|
|
if(json[0].pos_last_time!="" && json[0].pos_last_time!=null && json[0].pos_last_time.length==19) {
|
|
var lTime = json[0].pos_last_time.replace('_','T');
|
|
lastTime = new Date(lTime);
|
|
var curDt = new Date();
|
|
var gap = curDt.getTime() - lastTime.getTime();
|
|
var min_gap = gap/1000/60;
|
|
}
|
|
if(min_gap > 10 && json[0].pos_state=="normal") {
|
|
$('#pos_converter_status_img').attr('src', 'js/images/timeout.png');
|
|
}
|
|
|
|
$('#pos_converter_last_time').html(locale.pos_last_time + " : " + json[0].pos_last_time);
|
|
|
|
//custom 추가
|
|
var customJson = $.parseJSON(json[0].custom);
|
|
var day_product_price = "-";
|
|
var day_event = "-";
|
|
var day_match_product_price = "-";
|
|
var esl_file = "-";
|
|
var day_event_reset = "-";
|
|
if(customJson != null && customJson != '') {
|
|
$.each(customJson, function (i, v) {
|
|
if(customJson[i].KEY == 'ImpPCHG') {
|
|
if(customJson[i].RESULT == "success") $('#day_product_price_img').attr('src', 'js/images/bullet_green.png');
|
|
else $('#day_product_price_img').attr('src', 'js/images/bullet_red.png');
|
|
day_product_price = customJson[i]. FINISH_TIME + "("+customJson[i].COUNT+")";
|
|
}else if(customJson[i].KEY == 'ImpEVENT') {
|
|
if(customJson[i].RESULT == "success") $('#lable_event_img').attr('src', 'js/images/bullet_green.png');
|
|
else $('#lable_event_img').attr('src', 'js/images/bullet_red.png');
|
|
day_event = customJson[i].FINISH_TIME + "("+customJson[i].COUNT+")";
|
|
}else if(customJson[i].KEY == 'ImpMPCHG') {
|
|
if(customJson[i].RESULT == "success") $('#day_match_product_price_img').attr('src', 'js/images/bullet_green.png');
|
|
else $('#day_match_product_price_img').attr('src', 'js/images/bullet_red.png');
|
|
day_match_product_price = customJson[i].FINISH_TIME + "("+customJson[i].COUNT+")";
|
|
}else if(customJson[i].KEY == 'Export') {
|
|
if(customJson[i].RESULT == "success") $('#esl_file_img').attr('src', 'js/images/bullet_green.png');
|
|
else $('#esl_file_img').attr('src', 'js/images/bullet_red.png');
|
|
esl_file = customJson[i].FINISH_TIME + "("+customJson[i].COUNT+")";
|
|
}else if(customJson[i].KEY == 'ResetPrev') {
|
|
if(customJson[i].RESULT == "success") $('#day_event_reset_img').attr('src', 'js/images/bullet_green.png');
|
|
else $('#day_event_reset_img').attr('src', 'js/images/bullet_red.png');
|
|
day_event_reset = customJson[i].FINISH_TIME + "("+customJson[i].COUNT+")";
|
|
}
|
|
});
|
|
}
|
|
$('#day_product_price').html(locale.day_product_price + " : " + day_product_price);
|
|
$('#lable_event').html(locale.lable_event + " : " + day_event);
|
|
$('#day_match_product_price').html(locale.day_match_product_price + " : " + day_match_product_price);
|
|
$('#esl_file').html(locale.esl_file + " : " + esl_file);
|
|
$('#day_event_reset').html(locale.day_event_reset + " : " + day_event_reset);
|
|
|
|
var v = $.parseJSON(JSON.stringify(list));
|
|
|
|
system_info_list.update(v);
|
|
|
|
/*if (parseInt(cpu_usage.replace('%', ''), 10) >= 80) {
|
|
$('#system_info_list tr:nth-child(1) td:nth-child(2)').css({'color':'#ff0000', 'font-weight':'bold'});
|
|
}*/
|
|
|
|
fnGetSystemMemory();
|
|
}
|
|
}, 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 fnGetSystemMemory() {
|
|
|
|
$.ajax({
|
|
url : '/restapi/system/mem'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
json = json.data;
|
|
|
|
var used_memory = parseFloat(json[0]['Used_Memory'].replace(' MB', ''))
|
|
, free_memory = parseFloat(json[0]['Free_Memory'].replace(' MB', ''))
|
|
, max_memory = json[0]['Max_Memory']
|
|
, usage_memory = (used_memory / (used_memory + free_memory) * 100).toFixed(2)
|
|
, list = new Array();
|
|
|
|
var t = new Object();
|
|
t['info'] = 'Memory';
|
|
t['usage'] = usage_memory +'%';
|
|
list.push(t);
|
|
|
|
var v = $.parseJSON(JSON.stringify(list));
|
|
system_info_list.append(v);
|
|
|
|
/*if (parseInt(usage_memory, 10) >= 80) {
|
|
$('#system_info_list tr:nth-child(2) td:nth-child(2)').css({'color':'#ff0000', 'font-weight':'bold'});
|
|
}*/
|
|
}
|
|
}, 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 fnSetTagFactoryReset() {
|
|
$.ajax({
|
|
url: '/restapi/met/factory_reset'
|
|
, type: 'POST'
|
|
, data: {
|
|
'device_id': '0'
|
|
,'all':'true'
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "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 fnSetTagReboot() {
|
|
$.ajax({
|
|
url: '/restapi/met/reboot'
|
|
, type: 'POST'
|
|
, data: {
|
|
'device_id': '0'
|
|
,'all':'true'
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
//alertify.success(json[0].result);
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
fnGetTagStatusList();
|
|
}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 fnSetTagImageUpdateNew(){
|
|
if(home_tag_status_list.listChecked().length <= 0) {
|
|
//alert('No Selected Item!');
|
|
alertify.alert(locale.error,locale.no_selected);
|
|
return;
|
|
}
|
|
|
|
var obj = home_tag_status_list.listChecked()[0].data;
|
|
|
|
if (parseInt(obj.Total, 10) <= 0) {
|
|
//alert('No registered tag!');
|
|
//alertify.alert('Error','No registered tag!');
|
|
alertify.alert(locale.error,locale.no_registered);
|
|
return;
|
|
}
|
|
$.ajax({
|
|
url : '/restapi/system/update'
|
|
, type : 'POST'
|
|
, data : {
|
|
'type': (obj.Type == locale.total)?'Total':obj.Type,
|
|
'page1': $('#chk_home_tag_image_update_page1').is(':checked'),
|
|
'page2': $('#chk_home_tag_image_update_page2').is(':checked'),
|
|
'page3': $('#chk_home_tag_image_update_page3').is(':checked'),
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
fnGetHomeTagStatusList();
|
|
}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 fnSetTagImageUpdate() {
|
|
if(home_tag_status_list.listChecked().length <= 0) {
|
|
//alert('No Selected Item!');
|
|
alertify.alert(locale.error,locale.no_selected);
|
|
return;
|
|
}
|
|
|
|
var obj = home_tag_status_list.listChecked()[0].data;
|
|
|
|
if (parseInt(obj.Total, 10) <= 0) {
|
|
//alert('No registered tag!');
|
|
//alertify.alert('Error','No registered tag!');
|
|
alertify.alert(locale.error,locale.no_registered);
|
|
return;
|
|
}
|
|
|
|
$.ajax({
|
|
url : '/restapi/system/update'
|
|
, type : 'POST'
|
|
, data : {
|
|
'type': (obj.Type == locale.total)?'Total':obj.Type
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
alertify.success(locale[json.result.toLowerCase()]);
|
|
fnGetHomeTagStatusList();
|
|
}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 fnGetNotifyPopup() {
|
|
if (notify_popup != 'yes')
|
|
return;
|
|
|
|
$.ajax({
|
|
url : '/restapi/history/latest_alarm'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result == "success") {
|
|
json = json.data;
|
|
|
|
if(json.length > 0) {
|
|
|
|
if(fnGetCookie('latest_alarm_time') != json[0].time) {
|
|
fnSetCookie('latest_alarm_time', json[0].time);
|
|
$.each(json, function (i, v) {
|
|
if (json[i]['type'] == 'Gateway') {
|
|
json[i]['type'] = locale.gateway;
|
|
}
|
|
});
|
|
notify_popup_list.update(json);
|
|
notify_popup_window.show();
|
|
}
|
|
}
|
|
}
|
|
}, 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 fnRefreshMain() {
|
|
fnGetHomeTagStatusList();
|
|
fnGetSystemDiskList();
|
|
fnGetSystemInfo();
|
|
fnGetNotifyPopup();
|
|
fnGetHomeGatewayList();
|
|
}
|
|
|
|
function fnChangeLanguage() {
|
|
fnSetCookie('language', $('#language').val());
|
|
//alert(fnGetCookie('language'));
|
|
document.location.reload();
|
|
}
|
|
|
|
jui.ready([ "ui.paging" ], function(paging) {
|
|
category_tag_list_paging = paging("#category_tag_list_paging", {
|
|
screenCount: 25,
|
|
event: {
|
|
page: function(pNo) {
|
|
category_tag_list_page = pNo;
|
|
fnGetWinTagCategoryStatusList();
|
|
}
|
|
}
|
|
});
|
|
category_tag_list_paging.addEvent('#category_tag_list_paging a.first', 'click', function() {
|
|
category_tag_list_paging.first();
|
|
});
|
|
category_tag_list_paging.addEvent('#category_tag_list_paging a.last', 'click', function() {
|
|
category_tag_list_paging.last();
|
|
});
|
|
});
|
|
|
|
jui.ready(['uix.table'], function(table) {
|
|
home_tag_status_list = table('#home_tag_status_list', {
|
|
scroll: true
|
|
,fields: []
|
|
, scrollHeight: 180
|
|
, event: {
|
|
click: function(row, e) {
|
|
this.uncheckAll();
|
|
this.check(row.index);
|
|
}
|
|
}
|
|
});
|
|
home_user_tag_status_list = table('#home_user_tag_status_list', {
|
|
scroll: true
|
|
,fields: []
|
|
, scrollHeight: 155
|
|
});
|
|
|
|
home_gateway_list = table('#home_gateway_list', {
|
|
scroll: true
|
|
, scrollHeight: 150
|
|
, resize: true
|
|
});
|
|
|
|
home_schedule_update_list = table('#home_schedule_update_list', {
|
|
scroll: true
|
|
, scrollHeight: 150
|
|
, resize: true
|
|
});
|
|
|
|
system_disk_list = table('#system_disk_list', {
|
|
resize: true
|
|
});
|
|
|
|
system_info_list = table('#system_info_list', {
|
|
resize: true
|
|
});
|
|
|
|
notify_popup_list = table('#notify_popup_list', {
|
|
scroll: true
|
|
, scrollHeight: 260
|
|
, resize: true
|
|
});
|
|
});
|
|
|
|
|
|
$(function() {
|
|
var depth
|
|
, info
|
|
, url
|
|
, depth_temp
|
|
, userid = fnGetCookie('userid')
|
|
, username = fnGetCookie('name');
|
|
|
|
if (!userid) {
|
|
alertify.alert('Error','Invalid login information.');
|
|
document.location.replace('./');
|
|
return;
|
|
}
|
|
|
|
var deptCookie = '<%=dept%>';
|
|
if(deptCookie != null && deptCookie != 'null' && deptCookie != '') {
|
|
fnSetCookie('department', deptCookie);
|
|
}
|
|
var department = fnGetCookie('department');
|
|
|
|
$('#logout').prepend('<select name="language" id="language" class="input-mini input-rect" onchange="fnChangeLanguage();">'
|
|
+ '<option value="ko">'+ locale.korean + '</option><option value="en">'+ locale.english + '</option><option value="ja">'+ locale.japanese + '</option></select>'
|
|
+ '<span style="color:SteelBlue;font-size:16px;font-weight:bold;padding-left:15px">'+department+'</span> ' + userid );
|
|
|
|
// $('#logout').prepend('<span style="color:#fcb416;font-size:16px;font-weight:bold;">'+department+'</span> ' + userid );
|
|
if(fnGetCookie('t_last') != null && fnGetCookie('t_last') != "" && fnGetCookie('t_last') != "null") {
|
|
$('#login_info').prepend('<span style="color:SteelBlue;font-size:12px;font-weight:bold;">'+fnGetCookie('t_last')+'</span>');
|
|
}else {
|
|
$('#login_info').prepend('<span style="color:SteelBlue;font-size:12px;font-weight:bold;">' + locale.first_conn + ' </span>');
|
|
}
|
|
|
|
$('#btn_logout').click(function() {
|
|
$.ajax({
|
|
url: '/restapi/user/v2_logout'
|
|
, type: 'POST'
|
|
, data: {
|
|
}, success : function(json) {
|
|
if(json.result.toLowerCase() == 'success') {
|
|
fnSetCookie('userid', '');
|
|
fnSetCookie('name', '');
|
|
fnSetCookie('level_code', '');
|
|
//fnSetCookie('language', '');
|
|
document.location.replace('/');
|
|
}
|
|
}, 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 + ")");
|
|
}
|
|
}
|
|
});
|
|
})
|
|
|
|
$('#language').val(fnGetCookie('language'));
|
|
|
|
|
|
$('#btn_home_tag_factory_reset').click(function() {
|
|
|
|
alertify.confirm(locale.confirm,locale.confirm_factory_reset_all, function (e) {
|
|
if (e) {
|
|
fnSetTagFactoryReset();
|
|
} else {
|
|
return;
|
|
}
|
|
}, null).set('labels', {ok:locale.ok, cancel:locale.cancel});
|
|
});
|
|
|
|
$('#btn_home_tag_reboot').click(function() {
|
|
alertify.confirm(locale.confirm,locale.confirm_reboot_all, function (e) {
|
|
if (e) {
|
|
fnSetTagReboot();
|
|
} else {
|
|
return;
|
|
}
|
|
}, null).set('labels', {ok:locale.ok, cancel:locale.cancel});
|
|
});
|
|
$('#btn_home_tag_image_update').click(function() {
|
|
fnSetTagImageUpdate();
|
|
});
|
|
|
|
$('#btn_home_tag_image_update_new').click(function() {
|
|
|
|
if(home_tag_status_list.listChecked().length <= 0) {
|
|
//alert('No Selected Item!');
|
|
alertify.alert(locale.error,locale.no_selected);
|
|
return;
|
|
}
|
|
|
|
var obj = home_tag_status_list.listChecked()[0].data;
|
|
|
|
if (parseInt(obj.Total, 10) <= 0) {
|
|
//alert('No registered tag!');
|
|
//alertify.alert('Error','No registered tag!');
|
|
alertify.alert(locale.error,locale.no_registered);
|
|
return;
|
|
}
|
|
$('#home_tag_model_input').val(obj.Type);
|
|
$('#chk_home_tag_image_update_page1').prop('checked',false);
|
|
$('#chk_home_tag_image_update_page2').prop('checked',false);
|
|
$('#chk_home_tag_image_update_page3').prop('checked',false);
|
|
|
|
win_home_tag_image_update.show();
|
|
});
|
|
|
|
$('#btn_schedule_update').click(function() {
|
|
fnGetScheduleUpdateList();
|
|
win_schedule_update.show();
|
|
});
|
|
|
|
$('#btn_home_tag_image_update_control').click(function() {
|
|
|
|
fnSetTagImageUpdateNew();
|
|
win_home_tag_image_update.hide();
|
|
});
|
|
|
|
$('#btn_home_tag_image_update_close').click(function() {
|
|
win_home_tag_image_update.hide();
|
|
});
|
|
|
|
$('#btn_home_tag_category').click(function() {
|
|
fnGetHomeTagClassStatusList();
|
|
win_home_category_tag_list.show();
|
|
});
|
|
|
|
$.ajax({
|
|
url: '/restapi/system/config_list'
|
|
, type: 'POST'
|
|
, data: {
|
|
}, success : function(json) {
|
|
|
|
$.each(json, function(i, v) {
|
|
if (json[i].id == 'system_title') {
|
|
$('#main_system_title').text(json[i].info);
|
|
document.title = json[i].info;
|
|
} else if (json[i].id == 'system_logo') {
|
|
$('#main_system_logo').html('<img src="upload/system_logo/'+ json[i].info +'" height="60" />');
|
|
} else if (json[i].id == 'notify_sound') {
|
|
notify_sound = json[i].info;
|
|
} else if (json[i].id == 'notify_popup') {
|
|
notify_popup = json[i].info;
|
|
} else if (json[i].id == 'system_sound') {
|
|
system_sound = json[i].info;
|
|
}
|
|
});
|
|
|
|
fnRefreshMain();
|
|
}, 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 + ")");
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
$.ajax({
|
|
url: '/restapi/menu/menu_list'
|
|
, type: 'POST'
|
|
, success : function(json) {
|
|
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else{
|
|
|
|
var html = '';
|
|
for(var i = 0; i < json.length; i ++) {
|
|
depth = json[i].depth;
|
|
info = json[i].info;
|
|
url = json[i].url;
|
|
if(depth == 1 || url == '#') {
|
|
if(depth != depth_temp && i > 0) html += '</ul>\r\n';
|
|
html += '<a>'+ locale[info] +'</a>\r\n'
|
|
+'<ul class="submenu">\r\n';
|
|
} else if(url == 'legal_notice/Open Source Software Notice.pdf') {
|
|
html += ' <li onclick="openPage(\''+ url +'\');" style="cursor:pointer;">'+ locale[info] +'</li>\r\n';
|
|
} else {
|
|
html += ' <li onclick="tabAdd(\''+ url +'\', \''+ locale[info] +'\');" style="cursor:pointer;">'+ locale[info] +'</li>\r\n';
|
|
}
|
|
depth_temp = depth;
|
|
}
|
|
html += '</ul>\r\n';
|
|
|
|
$('div.vmenu').html(html);
|
|
}
|
|
}, 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 + ")");
|
|
}
|
|
}
|
|
});
|
|
|
|
$('#tab_1_contents > div').hide();
|
|
$('#Home').show();
|
|
|
|
$('#icon_refresh').click(function() {
|
|
fnRefreshMain();
|
|
});
|
|
$('#icon_system_help').click(function() {
|
|
if(lang == 'ko'){
|
|
window.open("Application_Manual.ko.pdf");
|
|
}
|
|
else{
|
|
window.open("Application_Manual.pdf");
|
|
}
|
|
});
|
|
$('#tab_home').text(locale.tab_home);
|
|
//alert(lang);
|
|
//alert(fnGetCookie('language'));
|
|
//lang = fnGetCookie('language')
|
|
$('#language').val(fnGetCookie('language'));
|
|
//alert($('#language').val());
|
|
|
|
if(fnGetCookie('language') != 'en')
|
|
{
|
|
|
|
|
|
$.datepicker.regional[lang] = {
|
|
monthNames: ['1월','2월','3월','4월','5월','6월',
|
|
'7월','8월','9월','10월','11월','12월'],
|
|
monthNamesShort: ['1월','2월','3월','4월','5월','6월',
|
|
'7월','8월','9월','10월','11월','12월'],
|
|
dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
|
|
dayNamesShort: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
|
|
dayNamesMin: ['일','월','화','수','목','금','토'],
|
|
weekHeader: '주',
|
|
dateFormat: 'yymmdd',
|
|
firstDay: 1,
|
|
isRTL: false,
|
|
showMonthAfterYear: true,
|
|
yearSuffix: '년'};
|
|
$.datepicker.setDefaults($.datepicker.regional[lang]);
|
|
//document.getElementById("icon_system_help").style.display = "none";
|
|
}
|
|
else{
|
|
//document.getElementById("icon_system_help").style.display = "none";
|
|
}
|
|
});
|
|
|
|
var select_gateway = '';
|
|
function tabAdd(url, t) {
|
|
//HidePopupWindow();
|
|
var tab_cnt = tab_1.root.childElementCount
|
|
, bln = false
|
|
, ta = t.split(' ')
|
|
, tj = ta.join('').replace('/', '');
|
|
for(var i = 0; i < tab_cnt; i ++) {
|
|
if(tab_1.root.children[i].textContent == t) {
|
|
tab_1.show(i);
|
|
if (url == 'management/gateway.html') {
|
|
fnGetQueryList();
|
|
} else if(url == 'management/products.html') {
|
|
if(select_gateway == '') {
|
|
// fnGetMerchandiseList();
|
|
}else {
|
|
$('#search_gateway').val(select_gateway);
|
|
$('#search_category1').val(null);
|
|
$('#merchandise_limit').val('30');
|
|
$('#merchandise_sort').val('item_cd');
|
|
select_gateway = '';
|
|
fnGetMerchandiseList();
|
|
}
|
|
} else if(url == 'management/tag_status.html') {
|
|
// fnGetTagStatusList();
|
|
} else if(url == 'management/user.html') {
|
|
fnGetUserList();
|
|
} else if(url == 'management/permission.html') {
|
|
} else if(url == 'management/system.html') {
|
|
fnGetVersion();
|
|
fnGetSystemConfigList();
|
|
fnGetSystemManage();
|
|
} else if(url == 'report/alarm.html') {
|
|
fnGetReportAlaramList();
|
|
} else if(url == 'report/tag_update.html') {
|
|
fnGetReportTagList();
|
|
} else if(url == 'report/products_update.html') {
|
|
fnGetReportMerchandiseList();
|
|
} else if(url == 'report/pos_import.html') {
|
|
fnGetReportPosList();
|
|
} else if(url == 'maintenance/fwupdate.html') {
|
|
fnGetFWUpdateList();
|
|
fnGetFWUpdateStatusList();
|
|
}
|
|
|
|
bln = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(bln) return;
|
|
|
|
tab_1.append({
|
|
text: t
|
|
});
|
|
var index = $('#tab_1 > li').length - 1;
|
|
tab_1.show(index);
|
|
$('#tab_1_contents > div').hide();
|
|
|
|
$.get(
|
|
url +'?'+ fnGetDateTime()
|
|
, function(data) {
|
|
|
|
if(!$('#'+ tj).html()) {
|
|
$('#tab_1_contents').append('<div id="'+ tj +'">'+ data +'</div>');
|
|
} else {
|
|
$('#'+ tj).html(data);
|
|
}
|
|
$('#'+ tj).show();
|
|
|
|
}
|
|
);
|
|
}
|
|
|
|
function openPage(url) {
|
|
location.href=url;
|
|
}
|
|
|
|
function tabRemove(t) {
|
|
var ta = t.split(' ')
|
|
, tj = ta.join('');
|
|
$.each($('#tab_1 > li > a'), function(i) {
|
|
if (this.outerText.trim() == t) {
|
|
tab_1.remove(i);
|
|
$('#'+ tj).html('').remove();
|
|
tab_1.show(i - 1);
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnSetReload() {
|
|
var reload_period = $('#reload_period').val()
|
|
, reload = $('#reload').is(':checked');
|
|
|
|
clearInterval(reload_interval);
|
|
if(reload) {
|
|
reload_interval = setInterval('fnRefreshMain()', reload_period);
|
|
}
|
|
}
|
|
|
|
function fnGetHomeTagClassStatusList() {
|
|
common_loading.show();
|
|
if(tag_status_class_list!=null) {
|
|
tag_status_class_list.reset();
|
|
$('#tag_status_class_list thead tr').html('');
|
|
}
|
|
$.ajax({
|
|
url : '/restapi/system/tagStatus_Classi2_List'
|
|
, type : 'POST'
|
|
, data : {
|
|
}, success : function(json) {
|
|
var bTotal = false;
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result.toLowerCase() == "no_info_category") {
|
|
alertify.success(locale.no_info_category);
|
|
}else if(json.result == "success") {
|
|
|
|
var th = $('#tag_status_class_list thead tr')
|
|
, td = $('script[data-jui=#tag_status_class_list]')
|
|
, html;
|
|
|
|
json.title.sort(function(a, b) {
|
|
return (a.seq < b.seq) ? -1 : (a.seq > b.seq) ? 1 : 0;
|
|
});
|
|
|
|
$.each(json.title, function(index){
|
|
if(json.title[index].title == 'name') {
|
|
th.append(' <th width="120">'+ locale.lable_cate +'</th>');
|
|
}else if(json.title[index].title == 'code') {
|
|
th.append(' <th width="120">'+ locale.win_label_category_code +'</th>');
|
|
}else {
|
|
th.append(' <th width="120">'+ json.title[index].title +'</th>');
|
|
}
|
|
});
|
|
|
|
html = '<script data-jui="#tag_status_class_list" data-tpl="row" type="text/template">'
|
|
+'<tr style="cursor:pointer;text-align:center;">';
|
|
|
|
$.each(json.title, function (index) {
|
|
|
|
html += ' <td><!='+ json.title[index].name +' !></td>';
|
|
});
|
|
html += '</tr>'
|
|
+'</'+ 'script>';
|
|
|
|
$('#tag_status_class_list_row').html(html);
|
|
jui.ready(['uix.table'], function(table) {
|
|
tag_status_class_list = table('#tag_status_class_list', {
|
|
scroll: true
|
|
, fields: []
|
|
, scrollHeight: 420
|
|
, resize: true
|
|
, event: {
|
|
click: function(row, e) {
|
|
if($(row.element).hasClass("checked")) {
|
|
}else {
|
|
this.uncheckAll();
|
|
this.check(row.index);
|
|
}
|
|
var obj = tag_status_class_list.listChecked();
|
|
var strTotCnt = locale.total_count;
|
|
var strNotMatching = locale.not_matching;
|
|
if(obj[0].data['Mname'] != strTotCnt && obj[0].data['Mname'] != strNotMatching) {
|
|
common_loading.show();
|
|
select_category_code = obj[0].data['Mcode'];
|
|
$('#category_tag_list_win_sub_title').text(obj[0].data['Mname']);
|
|
fnGetWinCategoryListPageInit();
|
|
fnGetWinTagCategoryStatusList();
|
|
}
|
|
},
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
//전체 합계
|
|
var grand_tot_count = 0;
|
|
//Title 별 합계
|
|
var tot_row = new Object();
|
|
$.each(json.title, function(title_index){
|
|
var name = json.title[title_index].name;
|
|
var title = json.title[title_index].title;
|
|
var tot_count = 0;
|
|
$.each(json.data, function(data_index){
|
|
if(title!='name' && title!='code') {
|
|
tot_count += json.data[data_index][name];
|
|
}
|
|
});
|
|
if(title!='name' && title!='code') {
|
|
tot_row[name] = tot_count;
|
|
grand_tot_count += tot_count
|
|
}
|
|
});
|
|
tot_row.Mname = locale.total_count;
|
|
tot_row.Mcode = "-";
|
|
|
|
$.each(json.data, function(data_index){
|
|
var tCnt = json.data[data_index]['M29'];
|
|
var mCode = json.data[data_index]['Mcode'];
|
|
if(mCode != '21' && tCnt > 0) {
|
|
json.data[data_index]['M29'] = "<span style='color:#FF0000'>" + tCnt + "</span>";
|
|
}
|
|
if(json.data[data_index]['Mname'] == null) {
|
|
json.data[data_index]['Mname'] = locale.not_matching;
|
|
json.data[data_index]['Mcode'] = '';
|
|
}
|
|
});
|
|
|
|
json = json.data;
|
|
json.unshift(tot_row);
|
|
tag_status_class_list.uncheckAll();
|
|
if(json.length <= 0) {
|
|
$('#tag_status_class_list>tbody').css({'display':''});
|
|
} else {
|
|
$('#tag_status_class_list>tbody').css({'display':'block'});
|
|
}
|
|
|
|
tag_status_class_list.update(json);
|
|
$('#grand_tot_count').html(grand_tot_count);
|
|
}
|
|
common_loading.hide();
|
|
}, error:function(request,status,err){
|
|
common_loading.hide();
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnGetWinTagCategoryStatusList() {
|
|
if(category_tag_list!=null) {
|
|
category_tag_list.reset();
|
|
$('#category_tag_list thead tr').html('');
|
|
}
|
|
$.ajax({
|
|
url : '/restapi/system/tagStatus_Classi3_List'
|
|
, type : 'POST'
|
|
, data : {
|
|
'code': select_category_code
|
|
,'limit': $('#win_category_limit').val()
|
|
,'offset': parseInt($('#win_category_limit').val(), 10) * (parseInt(category_tag_list_page, 10) - 1)
|
|
}, success : function(json) {
|
|
common_loading.hide();
|
|
var bTotal = false;
|
|
if(json.result == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result.toLowerCase() == "no_info_category") {
|
|
alertify.success(locale.no_info_category);
|
|
}else if(json.result == "success") {
|
|
|
|
var th = $('#category_tag_list thead tr')
|
|
, td = $('script[data-jui=#category_tag_list]')
|
|
, html;
|
|
|
|
json.title.sort(function(a, b) {
|
|
return (a.seq < b.seq) ? -1 : (a.seq > b.seq) ? 1 : 0;
|
|
});
|
|
|
|
$.each(json.title, function(index){
|
|
if(json.title[index].title == 'name') {
|
|
th.append(' <th width="120">'+ locale.lable_category1 +'</th>');
|
|
}else if(json.title[index].title == 'code') {
|
|
th.append(' <th width="120">'+ locale.win_label_category_code +'</th>');
|
|
}else {
|
|
th.append(' <th width="120">'+ json.title[index].title +'</th>');
|
|
}
|
|
});
|
|
|
|
html = '<script data-jui="#category_tag_list" data-tpl="row" type="text/template">'
|
|
+'<tr style="cursor:pointer;text-align:center;">';
|
|
|
|
$.each(json.title, function (index) {
|
|
|
|
html += ' <td><!='+ json.title[index].name +' !></td>';
|
|
});
|
|
html += '</tr>'
|
|
+'</'+ 'script>';
|
|
|
|
$('#category_tag_list_row').html(html);
|
|
jui.ready(['uix.table'], function(table) {
|
|
category_tag_list = table('#category_tag_list', {
|
|
scroll: true
|
|
, fields: []
|
|
, scrollHeight: 420
|
|
, resize: true
|
|
, event: {
|
|
click: function(row, e) {
|
|
if($(row.element).hasClass("checked")) {
|
|
}else {
|
|
this.uncheckAll();
|
|
this.check(row.index);
|
|
}
|
|
},
|
|
}
|
|
});
|
|
});
|
|
json = json.data;
|
|
category_tag_list.uncheckAll();
|
|
|
|
if(json.length <= 0) {
|
|
$('#category_tag_list>tbody').css({'display':''});
|
|
} else {
|
|
$('#category_tag_list>tbody').css({'display':'block'});
|
|
}
|
|
|
|
category_tag_list.update(json);
|
|
category_tag_list_win.show();
|
|
|
|
if (category_tag_list_page == 1) fnGetWinCategoryListCount();
|
|
}
|
|
}, error:function(request,status,err){
|
|
common_loading.hide();
|
|
if (request.status == 0) {
|
|
alertify.error(locale.server_not_run);
|
|
} else {
|
|
alert(locale.service_error + "(" + request.status + ")");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnGetWinCategoryListCount() {
|
|
category_tag_list_paging.options.pageCount = $('#win_category_limit').val();
|
|
$.ajax({
|
|
url: '/restapi/system/tagStatus_Classi3_Count'
|
|
, type: 'POST'
|
|
, data: {
|
|
'code': select_category_code
|
|
}, success : function(json) {
|
|
// json = '{"result":"success","data":[{"total":"100"}]}';
|
|
// json = eval('(' + json + ')');
|
|
if(json.result.toLowerCase() == "invalid_token") {
|
|
document.location.replace('./index.html');
|
|
}else if(json.result.toLowerCase() == "success") {
|
|
json = json.data;
|
|
category_tag_list_paging.reload(json[0].total);
|
|
$('#category_tag_list_paging_total').text(locale.total + ' : '+ json[0].total);
|
|
}
|
|
}, 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);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnGetWinCategoryListPageInit() {
|
|
category_tag_list_page = 1;
|
|
}
|
|
|
|
$('#win_category_limit').change(function() {
|
|
category_tag_list.reset();
|
|
category_tag_list_paging.reload(0);
|
|
category_tag_list_page = 1;
|
|
fnGetWinTagCategoryStatusList();
|
|
});
|
|
|
|
$('#notify_popup_window_title').text(locale.disconnected_popup_title);
|
|
$('#notify_col_time').text(locale.time);
|
|
$('#notify_col_type').text(locale.type);
|
|
$('#notify_col_device_id').text(locale.device_id);
|
|
|
|
$('#schedule_update_title').text(locale.schedule_updates_btn);
|
|
$('#home_schedule_update_type').text(locale.type);
|
|
$('#home_schedule_update_page1').text(locale.page + "1");
|
|
$('#home_schedule_update_page2').text(locale.page + "2");
|
|
$('#home_schedule_update_page3').text(locale.page + "3");
|
|
$('#home_schedule_update_time').text(locale.schedule_updates_th_time);
|
|
|
|
$('#category_tag_list_win_title').text(locale.category_tag_list_win_title);
|
|
$('#win_category_lable_page').text(locale.page);
|
|
$('#win_cate_first').text(locale.first);
|
|
$('#win_cate_last').text(locale.last);
|
|
$('#home_category_tag_list_title').text(locale.home_category_tag_list_title);
|
|
|
|
|
|
$( document ).ajaxError(function( event, jqxhr, settings, thrownError ) {
|
|
//alert(thrownError.name +'\r\n'+ thrownError.message);
|
|
});
|
|
|
|
|
|
if(<%=levCode%> == 0) {
|
|
document.getElementById("btn_home_tag_factory_reset").style.display = "";
|
|
document.getElementById("btn_home_tag_reboot").style.display = "";
|
|
}
|
|
if(<%=levCode%> > 2) {
|
|
// document.getElementById("main_bottom_chart").style.display = "none";
|
|
// document.getElementById("btn_schedule_update").style.display = "none";
|
|
// document.getElementById("btn_home_tag_image_update_new").style.display = "none";
|
|
}
|
|
|
|
// ESL 사용자 권한 처리
|
|
var authObj = {
|
|
lev_code : <%=levCode%>
|
|
,authMenuSet : function(url)
|
|
{
|
|
if(<%=levCode%> != '0' && <%=levCode%> != '1' && <%=levCode%> != '2' && <%=levCode%> != '3') {
|
|
document.location.replace('./index.html');
|
|
}
|
|
switch(url){
|
|
case 'management/gateway.html' :
|
|
if(<%=levCode%> != 0) {
|
|
document.getElementById('scanDurationLabel').style.display = "none";
|
|
document.getElementById('scanDuration').style.display = "none";
|
|
document.getElementById('scanDurationText').style.display = "none";
|
|
document.getElementById('downloadSpeedLabel').style.display = "none";
|
|
document.getElementById('downloadSpeed').style.display = "none";
|
|
document.getElementById('downloadSpeedText').style.display = "none";
|
|
document.getElementById('rfSecurityLabel').style.display = "none";
|
|
document.getElementById('rfSecurity').style.display = "none";
|
|
document.getElementById('gatewayHidden1').style.display = "none";
|
|
document.getElementById('gatewayConfigurationChannelRow').style.display = "none";
|
|
document.getElementById('commonChannelSPI').style.display = "none";
|
|
document.getElementById('commonChannelSPILabel').style.display = "none";
|
|
document.getElementById('commonChannelSPIText').style.display = "none";
|
|
document.getElementById('dataChannelSPI').style.display = "none";
|
|
document.getElementById('dataChannelSPILabel').style.display = "none";
|
|
document.getElementById('dataChannelSPIText').style.display = "none";
|
|
document.getElementById('gw_ap').style.display = "none";
|
|
document.getElementById('gw_channel_scan').style.display = "none";
|
|
document.getElementById('gw_log').style.display = "none";
|
|
document.getElementById('btn_configuration_default').style.display = "none";
|
|
}
|
|
if(<%=levCode%> > 2) {
|
|
document.getElementById('gateway_contents').style.display = "none";
|
|
document.getElementById('btn_products_search').style.display = "none";
|
|
document.getElementById('btn_gateway_edit').style.display = "none";
|
|
document.getElementById('btn_gateway_delete').style.display = "none";
|
|
}
|
|
case 'management/products.html' :
|
|
if(<%=levCode%> > 1) {
|
|
document.getElementById("btn_product_delete").style.display = "none";
|
|
}
|
|
if(<%=levCode%> != 0) {
|
|
document.getElementById("btn_mtag_unmatch").style.display = "none";
|
|
}
|
|
case 'management/tag_status.html' :
|
|
if(<%=levCode%> != 0) {
|
|
document.getElementById("btn_tag_get_gateway_list").style.display = "none";
|
|
document.getElementById("btn_factory_reset").style.display = "none";
|
|
document.getElementById("btn_tag_reboot").style.display = "none";
|
|
document.getElementById("btn_tag_rejoin").style.display = "none";
|
|
document.getElementById("btn_tag_set_nfc").style.display = "none";
|
|
document.getElementById("btn_tag_stock_display").style.display = "none";
|
|
document.getElementById("btn_tag_set_attribute").style.display = "none";
|
|
document.getElementById("btn_tag_display_page").style.display = "none";
|
|
document.getElementById("btn_tag_reserved_image").style.display = "none";
|
|
document.getElementById("btn_tag_matching").style.display = "none";
|
|
document.getElementById("btn_tag_multi_matching").style.display = "none";
|
|
document.getElementById("btn_tag_delete").style.display = "none";
|
|
|
|
document.getElementById("btn_tag_template_change").style.display = "none";
|
|
|
|
document.getElementById("attr_hidden1").style.display = "none";
|
|
document.getElementById("attr_hidden2").style.display = "none";
|
|
document.getElementById("attr_hidden3").style.display = "none";
|
|
document.getElementById("attr_hidden4").style.display = "none";
|
|
}
|
|
case 'management/user.html' :
|
|
if(<%=levCode%> != 1){
|
|
document.getElementById("btn_user_add").style.display = "none";
|
|
document.getElementById("btn_user_delete").style.display = "none";
|
|
document.getElementById("btn_user_passwd_reset").style.display = "none";
|
|
}
|
|
case 'management/permission.html' :
|
|
case 'management/system.html' :
|
|
if(<%=levCode%> > 1) {
|
|
document.getElementById("system_configure_div").style.display = "none";
|
|
document.getElementById("sys_attr_hidden1").style.display = "none";
|
|
document.getElementById("sys_attr_hidden2").style.display = "none";
|
|
document.getElementById("sys_attr_hidden3").style.display = "none";
|
|
document.getElementById("sys_attr_hidden4").style.display = "none";
|
|
document.getElementById("sys_attr_hidden5").style.display = "none";
|
|
document.getElementById("sys_attr_hidden6").style.display = "none";
|
|
document.getElementById("sys_attr_hidden7").style.display = "none";
|
|
document.getElementById("sys_attr_hidden8").style.display = "none";
|
|
document.getElementById("sys_attr_hidden9").style.display = "none";
|
|
document.getElementById("sys_attr_hidden10").style.display = "none";
|
|
document.getElementById("btn_system_manage_default").style.display = "none";
|
|
document.getElementById("system_core_configure_div").style.display = "none";
|
|
document.getElementById("system_email_alarm").style.display = "none";
|
|
}
|
|
case 'report/alarm.html' :
|
|
case 'report/tag_update.html' :
|
|
case 'report/products_update.html' :
|
|
case 'report/pos_import.html' :
|
|
case 'maintenance/fwupdate.html' :
|
|
default :
|
|
}
|
|
},
|
|
isUserEditAuth : function(selUserId)
|
|
{
|
|
var userid = fnGetCookie('userid');
|
|
if(userid != selUserId && (<%=levCode%> != 1 && <%=levCode%> != 0)) {
|
|
alertify.alert(locale.error,locale.cant_edit_user);
|
|
return false;
|
|
}else {
|
|
return true;
|
|
}
|
|
},
|
|
gatewayAuthRowClick : function(device_id, gw_type) {
|
|
|
|
if(<%=levCode%> <= 2) {
|
|
fnGetConfiguration(device_id, gw_type);
|
|
$('#gateway_contents').show();
|
|
gateway_tab.show(0);
|
|
return true;
|
|
}else {
|
|
return false;
|
|
}
|
|
|
|
}
|
|
};
|
|
</script>
|