From 511e1302de06d2d8dbd512296bd3e0b3ff97c380 Mon Sep 17 00:00:00 2001 From: chenlw <874313221@qq.com> Date: Mon, 9 Jan 2017 11:26:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B1=87=E6=80=BB=E5=BA=93?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=97=B6=E5=8F=96=E6=B6=88=E5=86=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=EF=BC=8C=E4=B8=8A=E6=AC=A1=E7=BC=96=E8=BE=91=E7=9A=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9C=AA=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/configs/html/kubeClusterSetting.html | 18 ++++++------ plugins/configs/ts/kubeClusterSetting.ts | 30 ++++++++++++++++++-- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/plugins/configs/html/kubeClusterSetting.html b/plugins/configs/html/kubeClusterSetting.html index 4e8d0bc..0a51a04 100644 --- a/plugins/configs/html/kubeClusterSetting.html +++ b/plugins/configs/html/kubeClusterSetting.html @@ -29,17 +29,17 @@
- +
名称不能为空 - 请输入输入2-20个字符的数据名称 + 请输入2-20个字符的数据名称
- +
IP不能为空 请输入正确的IP地址 @@ -49,7 +49,7 @@
- +
端口号不能为空 端口号必须为1~65535的数字 @@ -59,7 +59,7 @@
- +
用户名不能为空 用户名必须为2-15个字母、数字或下划线 @@ -69,7 +69,7 @@
- +
密码不能为空 密码必须为2-15个字母、数字或下划线 @@ -79,7 +79,7 @@
- +
服务名不能为空 服务名必须为1-10个字母 @@ -89,7 +89,7 @@
- +
表空间名不能为空 表空间名必须为1-15个字母、数字或下划线 @@ -99,7 +99,7 @@
- +
表后缀名不能为空 表后缀名必须为1-10个字母、数字或下划线 diff --git a/plugins/configs/ts/kubeClusterSetting.ts b/plugins/configs/ts/kubeClusterSetting.ts index ed485a0..b61ed80 100644 --- a/plugins/configs/ts/kubeClusterSetting.ts +++ b/plugins/configs/ts/kubeClusterSetting.ts @@ -73,7 +73,15 @@ module Configs{ $scope.edit = false; $scope.tableForm = {}; $scope.tableForm["id"]=0; - $scope.tableForm["type"]=0; + $scope.tableForm["type"]=0; + $scope.tableForm["name"]='请输入2-20个字符的数据名称'; + $scope.tableForm["ip"]='例如:0.0.0.0'; + $scope.tableForm["port"]='1~65535'; + $scope.tableForm["user"]='2-15个字母、数字或下划线'; + $scope.tableForm["password"]='2-15个字母、数字或下划线'; + $scope.tableForm["databaseName"]='1-10个字母'; + $scope.tableForm["tableName"]='1-15个字母、数字或下划线'; + $scope.tableForm["suffix"]='1-10个字母、数字或下划线'; } $scope.cancel = () => { @@ -83,7 +91,25 @@ module Configs{ $scope.submitted = false; } - $scope.onSubmit = (oracle) => { + $scope.onSubmit = (oracle) => { + if($scope.tableForm["name"]=='请输入2-20个字符的数据名称') + $scope.tableForm["name"]=''; + if($scope.tableForm["ip"]=='例如:0.0.0.0') + $scope.tableForm["ip"]=''; + if($scope.tableForm["port"]=='1~65535') + $scope.tableForm["port"]=''; + if($scope.tableForm["user"]=='2-15个字母、数字或下划线') + $scope.tableForm["user"]=''; + if($scope.tableForm["password"]=='2-15个字母、数字或下划线') + $scope.tableForm["password"]=''; + if($scope.tableForm["databaseName"]=='1-10个字母') + $scope.tableForm["databaseName"]=''; + if($scope.tableForm["tableName"]=='1-15个字母、数字或下划线') + $scope.tableForm["tableName"]=''; + if($scope.tableForm["suffix"]=='1-10个字母、数字或下划线') + $scope.tableForm["suffix"]=''; + + if($scope.validForm.$valid && $scope.validForm.$dirty){ $scope.edit = false; $scope.add = false;