summaryrefslogtreecommitdiffstats
path: root/portal
diff options
context:
space:
mode:
author覃亮10184303 <qin.liang13@zte.com.cn>2017-09-29 16:25:18 +0800
committer覃亮10184303 <qin.liang13@zte.com.cn>2017-09-29 16:25:18 +0800
commit4019baa23f87cf7ccc52e72d8485fd2d52ab4a1b (patch)
tree33f6b42871a97dff145746f04fe5b924808022b6 /portal
parent78f561032a62cf21ef43615aa4ba3ccbdd5fc596 (diff)
validate cloudOwner&cloudRegionId
Issue-ID: AAI-186 Change-Id: I8c0a8a4f87ce998206d2c2d5b4162043c78580d0 Signed-off-by: 覃亮10184303 <qin.liang13@zte.com.cn>
Diffstat (limited to 'portal')
-rw-r--r--portal/src/main/webapp/extsys/vim/js/vimController.js26
-rw-r--r--portal/src/main/webapp/extsys/vim/vimView.html3
2 files changed, 27 insertions, 2 deletions
diff --git a/portal/src/main/webapp/extsys/vim/js/vimController.js b/portal/src/main/webapp/extsys/vim/js/vimController.js
index e9fd644..6bd6961 100644
--- a/portal/src/main/webapp/extsys/vim/js/vimController.js
+++ b/portal/src/main/webapp/extsys/vim/js/vimController.js
@@ -106,6 +106,32 @@ var vm = avalon
if (form.valid() == false) {
vm.isSave = false;
return false;
+ } else {
+ vm.isSave = true;
+ }
+ var cloudOwner = vm.currentElement["cloudOwner"];
+ var $cloudOwner = $("#vim_form input[name='cloudOwner']");
+ var cloudRegionId = vm.currentElement["cloudRegionId"];
+ var $cloudRegionId = $("#vim_form input[name='cloudRegionId']");
+ if(cloudOwner.indexOf("_") != -1){
+ $cloudOwner.parent().parent().addClass("has-error");
+ $cloudOwner.next().html("It not allowed '_' contained here").show();
+ vm.isSave = false;
+ return false;
+ } else {
+ vm.isSave = true;
+ $cloudOwner.parent().parent().removeClass("has-error");
+ $cloudOwner.next().hide();
+ }
+ if(cloudRegionId.indexOf("_") != -1){
+ $cloudRegionId.parent().parent().addClass("has-error");
+ $cloudRegionId.next().html("It not allowed '_' contained here").show();
+ vm.isSave = false;
+ return false;
+ } else {
+ vm.isSave = true;
+ $cloudRegionId.parent().parent().removeClass("has-error");
+ $cloudRegionId.next().hide();
}
var res = false;
if (vm.saveType == "add") {
diff --git a/portal/src/main/webapp/extsys/vim/vimView.html b/portal/src/main/webapp/extsys/vim/vimView.html
index 923ddf7..33715ed 100644
--- a/portal/src/main/webapp/extsys/vim/vimView.html
+++ b/portal/src/main/webapp/extsys/vim/vimView.html
@@ -211,8 +211,7 @@
<div class="row-fluid col-sm-12" data-name="cond_zone">
<div class="col-sm-4">
<button class="btn white radius_l" id="app-new-btn" ms-click="$showVimTable(-1, 'add')">
- <i class="ict-new"></i> <span id_i18n="com_zte_ums_eco_roc_vim_register"
- name_i18n="com_zte_conductor_ui_i18n"></span>
+ <i class="ict-new"></i> <span id_i18n="com_zte_ums_eco_roc_vim_register" name_i18n="com_zte_conductor_ui_i18n"></span>
</button>
</div>
<!-- <div class="fa fa-refresh text-muted refresh-status-text"><small><span id_i18n="com_zte_ums_eco_roc_vim_status_update_time" name_i18n="com_zte_conductor_ui_i18n"></span></small><small ms-text="vimStatusTime"></small></div>-->