2 Copyright 2016-2017, CMCC Technologies Co., Ltd.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
19 <meta charset="UTF-8">
20 <link rel="stylesheet" type="text/css" href="/openoui/common/thirdparty/font-awesome/css/font-awesome.min.css"/>
21 <link rel="stylesheet" type="text/css" href="/openoui/common/thirdparty/bootstrap/css/bootstrap.min.css"/>
22 <link rel="stylesheet" type="text/css" href="/openoui/common/css/ngict-component.css"/>
23 <link rel="stylesheet" type="text/css" href="/openoui/common/css/ZteIctIcons/style.css"/>
24 <link rel="stylesheet" type="text/css" href="/openoui/common/thirdparty/animate/animate.min.css"/>
25 <link rel="stylesheet" type="text/css" href="css/monitorSetting.css"/>
34 <div class="container-fluid" class="ms-controller" ms-controller="monitorController">
36 <div id="monitorSettingDlg" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
37 <div class="modal-dialog">
38 <div class="modal-content">
40 <div class="modal-header">
41 <button type="button" class="close" ms-click="cancelMonitorSet()">×</button>
42 <h4 id="myModalLabel" ms-text="monitorSettingDlgInfo.titleName"></h4>
44 <div class="modal-body">
45 <div class="alert alert-info" ms-visible="server_rtn.info_block" ms-text="server_rtn.rtn_info"></div>
46 <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>
47 <form class="form-horizontal" id="monitorSetting_form" role="form">
48 <div class="form-group">
49 <label class="control-label col-sm-3">
50 <span id="com_zte_openo_umc_monitor_dac_label" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>
51 <span class="required" aria-required="true">*</span>
53 <div class="col-sm-7">
54 <input type="text" name="name" ms-duplex="monitorInfo.label" class="form-control"/>
55 <span class="help-block"></span>
59 <div class="form-group">
60 <label class="control-label col-sm-3">
61 <span id="com_zte_openo_umc_monitor_monitorsetting_ipaddress" name_i18n="com_zte_openo_umc_monitor_ui_i18n">IP Address</span>
62 <span class="required" aria-required="true">*</span>
64 <div class="col-sm-7">
65 <input type="text" name="ipAddress" ms-duplex="monitorInfo.ipAddress" class="form-control"/>
66 <span class="help-block"></span>
70 <div class="form-group">
71 <label class="control-label col-sm-3">
72 <span id="com_zte_openo_umc_monitor_monitorsetting_dac" name_i18n="com_zte_openo_umc_monitor_ui_i18n">DAC</span>
73 <span class="required" aria-required="true">*</span>
75 <div class="col-sm-7">
76 <select ms-each="dac.selectItems" name="PROXYIP" ms-duplex="monitorInfo.customPara.PROXYIP" class="form-control" style="width:150px">
77 <option ms-attr-value='el.ipAddress'>{{el.ipAddress}}</option>
79 <span class="help-block"></span>
82 <div class="form-group" ms-if="monitorInfo.customPara.VERSION!=null">
83 <label class="control-label col-sm-3">
84 <span id="com_zte_openo_umc_monitor_monitorsetting_version" name_i18n="com_zte_openo_umc_monitor_ui_i18n">version</span>
85 <span class="required" aria-required="true">*</span>
87 <div class="col-sm-7">
88 <input type="text" name="VERSION" ms-duplex="monitorInfo.customPara.VERSION" class="form-control"/>
89 <span class="help-block"></span>
92 <div class="form-group" ms-if="monitorInfo.customPara.USERNAME!=null">
93 <label class="control-label col-sm-3">
94 <span id="com_zte_openo_umc_monitor_monitorsetting_user" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Login User</span>
95 <span class="required" aria-required="true">*</span>
97 <div class="col-sm-7">
98 <input type="text" name="USERNAME" ms-duplex="monitorInfo.customPara.USERNAME" class="form-control"/>
99 <span class="help-block"></span>
103 <div class="form-group" ms-if="monitorInfo.customPara.PASSWORD!=null">
104 <label class="control-label col-sm-3">
105 <span id="com_zte_openo_umc_monitor_monitorsetting_password" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Login Password</span>
106 <span class="required" aria-required="true">*</span>
108 <div class="col-sm-7">
109 <input type="password" name="PASSWORD" ms-duplex="monitorInfo.customPara.PASSWORD" class="form-control"/>
110 <span class="help-block"></span>
114 <div class="form-group" ms-if="monitorInfo.customPara.PROTOCOL!=null">
115 <label class="control-label col-sm-3">
116 <span id="com_zte_openo_umc_monitor_monitorsetting_protocol" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Login Protocol</span>
117 <span class="required" aria-required="true">*</span>
119 <div class="col-sm-7">
120 <select ms-each="$loginProtocol.selectItems" ms-duplex="monitorInfo.customPara.PROTOCOL" class="form-control" style="width:150px" name="ROTOCOL" id="select_protocol">
121 <option ms-attr-value='el.cond_value'>{{el.name}}</option>
123 <span class="help-block"></span>
127 <div class="form-group" ms-if="monitorInfo.customPara.PORT!=null">
128 <label class="control-label col-sm-3">
129 <span id="com_zte_openo_umc_monitor_monitorsetting_port" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Login Port</span>
130 <span class="required" aria-required="true">*</span>
132 <div class="col-sm-7">
133 <input type="text" name="PORT" ms-duplex="monitorInfo.customPara.PORT" class="form-control"/>
134 <span class="help-block"></span>
138 <div class="form-group" ms-if="monitorInfo.customPara.DBPORT!=null">
139 <label class="control-label col-sm-3">
140 <span id="com_zte_openo_umc_monitor_monitorsetting_port" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Login Port</span>
141 <span class="required" aria-required="true">*</span>
143 <div class="col-sm-7">
144 <input type="text" name="DBPORT" ms-duplex="monitorInfo.customPara.DBPORT" class="form-control"/>
145 <span class="help-block"></span>
149 <div class="form-group" ms-if="monitorInfo.customPara.SNMPPORT!=null">
150 <label class="control-label col-sm-3">
151 <span id="com_zte_openo_umc_monitor_monitorsetting_snmpport" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Snmp Port</span>
152 <span class="required" aria-required="true">*</span>
154 <div class="col-sm-7">
155 <input type="text" name="SNMPPORT" ms-duplex="monitorInfo.customPara.SNMPPORT" class="form-control"/>
156 <span class="help-block"></span>
159 <div class="form-group" ms-if="monitorInfo.customPara.SNMPVERSION!=null">
160 <label class="control-label col-sm-3">
161 <span id="com_zte_openo_umc_monitor_monitorsetting_snmpversion" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Snmp Version</span>
162 <span class="required" aria-required="true">*</span>
164 <div class="col-sm-7">
165 <input type="text" name="SNMPVERSION" ms-duplex="monitorInfo.customPara.SNMPVERSION" class="form-control"/>
166 <span class="help-block"></span>
169 <div class="form-group" ms-if="monitorInfo.customPara.SNMPCOMMUNITY!=null">
170 <label class="control-label col-sm-3">
171 <span id="com_zte_openo_umc_monitor_monitorsetting_snmpcommunity" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Snmp Community</span>
172 <span class="required" aria-required="true">*</span>
174 <div class="col-sm-7">
175 <input type="text" name="SNMPCOMMUNITY" ms-duplex="monitorInfo.customPara.SNMPCOMMUNITY" class="form-control"/>
176 <span class="help-block"></span>
179 <div class="form-group" ms-if="monitorInfo.customPara.IPADDRESS2!=null">
180 <label class="control-label col-sm-3">
181 <span id="com_zte_openo_umc_monitor_monitorsetting_agentIP" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Agent IP</span>
182 <span class="required" aria-required="true">*</span>
184 <div class="col-sm-7">
185 <input type="text" name="IPADDRESS2" ms-duplex="monitorInfo.customPara.IPADDRESS2" class="form-control"/>
186 <span class="help-block"></span>
189 <div class="form-group" ms-if="monitorInfo.customPara.USERNAME2!=null">
190 <label class="control-label col-sm-3">
191 <span id="com_zte_openo_umc_monitor_monitorsetting_agentUsername" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Agent Username</span>
192 <span class="required" aria-required="true">*</span>
194 <div class="col-sm-7">
195 <input type="text" name="USERNAME2" ms-duplex="monitorInfo.customPara.USERNAME2" class="form-control"/>
196 <span class="help-block"></span>
199 <div class="form-group" ms-if="monitorInfo.customPara.PASSWORD2!=null">
200 <label class="control-label col-sm-3">
201 <span id="com_zte_openo_umc_monitor_monitorsetting_agentPassword" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Agent Password</span>
202 <span class="required" aria-required="true">*</span>
204 <div class="col-sm-7">
205 <input type="text" name="PASSWORD2" ms-duplex="monitorInfo.customPara.PASSWORD2" class="form-control"/>
206 <span class="help-block"></span>
209 <div class="form-group" ms-if="monitorInfo.customPara.PROTOCOL2!=null">
210 <label class="control-label col-sm-3">
211 <span id="com_zte_openo_umc_monitor_monitorsetting_agentProtocol" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Agent Protocol</span>
212 <span class="required" aria-required="true">*</span>
214 <div class="col-sm-7">
215 <input type="text" name="PROTOCOL2" ms-duplex="monitorInfo.customPara.PROTOCOL2" class="form-control"/>
216 <span class="help-block"></span>
219 <div class="form-group" ms-if="monitorInfo.customPara.PORT2!=null">
220 <label class="control-label col-sm-3">
221 <span id="com_zte_openo_umc_monitor_monitorsetting_agentPort" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Agent port</span>
222 <span class="required" aria-required="true">*</span>
224 <div class="col-sm-7">
225 <input type="text" name="PORT2" ms-duplex="monitorInfo.customPara.PORT2" class="form-control"/>
226 <span class="help-block"></span>
229 <div class="form-group" ms-if="monitorInfo.customPara.PPMAXCOUNT!=null">
230 <label class="control-label col-sm-3">
231 <span id="com_zte_openo_umc_monitor_monitorsetting_ppMaxCount" name_i18n="com_zte_openo_umc_monitor_ui_i18n">PP Max Count</span>
232 <span class="required" aria-required="true">*</span>
234 <div class="col-sm-7">
235 <input type="text" name="PPMAXCOUNT" ms-duplex="monitorInfo.customPara.PPMAXCOUNT" class="form-control"/>
236 <span class="help-block"></span>
241 <div class="modal-footer">
242 <button class="btn btn-primary" type="submit" ms-click="saveMonitorSet()" id="com_zte_openo_umc_monitor_btn_save" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Save</button>
243 <button class="btn" ms-click="cancelMonitorSet()" id="com_zte_openo_umc_monitor_btn_cancel" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Cancel</button>
250 <div class="row" style=" margin-top: 15px;">
251 <div class="col-xs-6 col-sm-12 col-md-6 col-lg-6">
252 <span class=" titlefont" id="com_zte_openo_umc_monitor_monitorsetting_titlename" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Monitor Para Setting </span>
255 <div class="pull-right">
256 <a href="#" ms-click="gotoMonitorListPage()" ><i class="fa fa-reply "></i> <span id="com_zte_openo_umc_monitor_return" name_i18n="com_zte_openo_umc_monitor_ui_i18n">return</span></a>
261 <div class="separator-line"></div>
263 <div class="row row-fluid">
265 <button class="btn white radius_l" id="app-new-btn" style=" margin-bottom: 10px;"
266 ms-click="updateMonitorSet()">
267 <i class="ict-gear"></i> <span id="com_zte_openo_umc_monitor_btn_monitorset" name_i18n="com_zte_openo_umc_monitor_ui_i18n">Monitor Set</span>
271 <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 row" >
273 <div class="form-body">
275 <div style="width:100%;" id="MonitorContent" class="collapse in main collapseContent">
276 <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6 border-right" >
277 <div class="monitor-icon">
278 <div class="timeline-badge info">
279 <i class="ict-VDU"></i>
282 <div style="float:left">
284 <li><b><span id="com_zte_openo_umc_monitor_dac_label" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.label"></span></li>
285 <li><b><span id="com_zte_openo_umc_monitor_monitorsetting_ipaddress" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.ipAddress"></span></li>
286 <li><b><span id="com_zte_openo_umc_monitor_monitorsetting_dac" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.PROXYIP"></span></li>
292 <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6" >
294 <div class="proxy_div">
296 <li ms-if="monitorInfo.customPara.VERSION!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_version" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.VERSION"></span></li>
297 <li ms-if="monitorInfo.customPara.USERNAME!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_user" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.USERNAME"></span></li>
298 <li ms-if="monitorInfo.customPara.PROTOCOL!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_protocol" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.PROTOCOL"></span></li>
299 <li ms-if="monitorInfo.customPara.PORT!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_port" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.PORT"></span></li>
300 <li ms-if="monitorInfo.customPara.DBPORT!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_port" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.DBPORT"></span></li>
301 <li ms-if="monitorInfo.customPara.SNMPPORT!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_snmpport" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.SNMPPORT"></span></li>
302 <li ms-if="monitorInfo.customPara.SNMPVERSION!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_snmpversion" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.SNMPVERSION"></span></li>
303 <li ms-if="monitorInfo.customPara.SNMPCOMMUNITY!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_snmpcommunity" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.SNMPCOMMUNITY"></span></li>
304 <li ms-if="monitorInfo.customPara.IPADDRESS2!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_agentIP" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.IPADDRESS2"></span></li>
305 <li ms-if="monitorInfo.customPara.USERNAME2!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_agentUsername" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.USERNAME2"></span></li>
306 <li ms-if="monitorInfo.customPara.PASSWORD2!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_agentPassword" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.PASSWORD2"></span></li>
307 <li ms-if="monitorInfo.customPara.PROTOCOL2!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_agentProtocol" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.PROTOCOL2"></span></li>
308 <li ms-if="monitorInfo.customPara.PORT2!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_agentPort" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.PORT2"></span></li>
309 <li ms-if="monitorInfo.customPara.PPMAXCOUNT!=null"><b><span id="com_zte_openo_umc_monitor_monitorsetting_ppMaxCount" name_i18n="com_zte_openo_umc_monitor_ui_i18n"></span>: </b> <span ms-text="monitorInfo.customPara.PPMAXCOUNT"></span></li>
325 <script type="text/javascript" src="/openoui/common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
326 <script type="text/javascript" src="/openoui/common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
327 <script type="text/javascript" src="/openoui/common/thirdparty/jquery-validation/js/jquery.validate.js"></script>
328 <script type="text/javascript" src="/openoui/common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
329 <script type="text/javascript" src="/openoui/common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
330 <script type="text/javascript" src="/openoui/common/thirdparty/avalon/avalon.js"></script>
331 <script type="text/javascript" src="/openoui/common/js/tools.js"></script>
332 <script type="text/javascript" src="/openoui/common/js/core/hk.min.js" ></script>
333 <script type="text/javascript" src="js/monitorSettingUtil.js"></script>
334 <script type="text/javascript" src="js/monitorSettingController.js"></script>
335 <script type="text/javascript" src="js/loadi18nApp_ngict-umc-monitor.js"></script>
341 var lang= getLanguage();
342 loadPropertiesSideMenu(lang, 'umc-monitor-iui-i18n', 'i18n/');
345 var monitorUrlParm = window.location.search.split(":");
346 if (monitorUrlParm && monitorUrlParm.length > 0) {
347 var oid = decodeURIComponent(monitorUrlParm[0]).replace("?","");
351 vm.queryMonitorInstance(oid);
357 jQuery.validator.addMethod("ip", function(value, element) {
358 return this.optional(element) || /^(([-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))$/.test(value);
359 }, $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_ipaddress_format_errInfo'));
361 var form = $('#monitorSetting_form');
362 var error = $('.alert-danger', form);
363 var success = $('.alert-success', form);
366 doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.
367 errorElement: 'span', //default input error message container
368 errorClass: 'help-block', // default input error message class
369 focusInvalid: false, // do not focus the last invalid input
408 required: $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_user_empty_errInfo')
412 required: $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_password_empty_errInfo')
415 required: $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_port_empty_errInfo')
418 required: $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_port_empty_errInfo')
421 required: $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_dac_empty_errInfo')
424 required: $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_protocol_empty_errInfo')
427 required: $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_ipaddress_empty_errInfo')
430 required: $.i18n.prop('com_zte_openo_umc_monitor_monitorsetting_name_empty_errInfo')
434 errorPlacement: function (error, element) { // render error placement for each input type
435 error.insertAfter(element); // for other inputs, just perform default behavior
438 invalidHandler: function (event, validator) { //display error alert on form submit
441 //ZteFrameWork.scrollTo(error, -200);
444 highlight: function (element) { // hightlight error inputs
446 .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
449 unhighlight: function (element) { // revert the change done by hightlight
451 .closest('.form-group').removeClass('has-error'); // set error class to the control group
454 success: function (label) {
456 .addClass('valid') // mark the current input as valid and display OK icon
457 .closest('.form-group').removeClass('has-error'); // set success class to the control group
459 submitHandler: function (form) {
462 //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
467 $("#select_protocol").change(function(){
468 var checkValue=$("#select_protocol").val();
469 if(checkValue=="SSH"){
470 vm.monitorInfo.customPara.LOGINPORT="22";
472 else if(checkValue=="TELNET"){
473 vm.monitorInfo.customPara.LOGINPORT="23";