diff options
author | Huabing Zhao <zhao.huabing@zte.com.cn> | 2019-08-30 16:30:53 +0800 |
---|---|---|
committer | Huabing Zhao <zhao.huabing@zte.com.cn> | 2019-08-30 16:30:57 +0800 |
commit | 1794401f46baf48082acb300aa12cb8e0c1a9a49 (patch) | |
tree | cb185f712144d15a4da5c00efc8fb0ac6cde6c94 /discovery-ui | |
parent | a900b81fc5a962c5037f485960dbeea70311154f (diff) |
Allow using MSB GUI to register https service
Issue-ID: MSB-198
Signed-off-by: Huabing Zhao <zhao.huabing@zte.com.cn>
Change-Id: I662a5bd2343790ffdf0d9838f3c661c482d95077
Diffstat (limited to 'discovery-ui')
-rw-r--r-- | discovery-ui/src/main/resources/iui/microservices/js/serviceController.js | 18 | ||||
-rw-r--r-- | discovery-ui/src/main/resources/iui/microservices/serviceMng.html | 22 |
2 files changed, 27 insertions, 13 deletions
diff --git a/discovery-ui/src/main/resources/iui/microservices/js/serviceController.js b/discovery-ui/src/main/resources/iui/microservices/js/serviceController.js index b8afc0e..bf112bf 100644 --- a/discovery-ui/src/main/resources/iui/microservices/js/serviceController.js +++ b/discovery-ui/src/main/resources/iui/microservices/js/serviceController.js @@ -91,7 +91,8 @@ var vm = avalon namespace:"",
network_plane_type:"",
host:"",
- path:""
+ path:"",
+ enable_ssl:[]
},
nodeInfo:{
ip:"",
@@ -193,6 +194,7 @@ var vm = avalon vm.msbRouteInfo.network_plane_type="";
vm.msbRouteInfo.host="";
vm.msbRouteInfo.path="";
+ vm.msbRouteInfo.enable_ssl=[];
vm.server_rtn.warning_block=false;
@@ -250,7 +252,12 @@ var vm = avalon vm.msbRouteInfo.network_plane_type=msbRouteInfo.network_plane_type;
vm.msbRouteInfo.host=msbRouteInfo.host;
vm.msbRouteInfo.path=msbRouteInfo.path;
-
+ if (msbRouteInfo.enable_ssl == true){
+ vm.msbRouteInfo.enable_ssl=["true"];
+ }else{
+ vm.msbRouteInfo.enable_ssl=[];
+ }
+
$("#labels").val(msbRouteInfo.labels);
$('#labels').on('tokenfield:createdtoken', function (e) {
var re = /\S+:\S+/
@@ -879,7 +886,11 @@ var vm = avalon //var newServiceName=(vm.msbRouteInfo.protocol=="UI"?("IUI_"+vm.msbRouteInfo.serviceName):vm.msbRouteInfo.serviceName);
var newServiceName=vm.msbRouteInfo.serviceName;
-
+ var enable_ssl = false;
+ if (vm.msbRouteInfo.enable_ssl.length > 0){
+ enable_ssl = true;
+ }
+
var data= JSON.stringify({
"serviceName": newServiceName,
@@ -894,6 +905,7 @@ var vm = avalon "network_plane_type":vm.msbRouteInfo.network_plane_type,
"host":vm.msbRouteInfo.host,
"path":vm.msbRouteInfo.path,
+ "enable_ssl":enable_ssl,
"labels": labelArray,
"metadata":metadata
});
diff --git a/discovery-ui/src/main/resources/iui/microservices/serviceMng.html b/discovery-ui/src/main/resources/iui/microservices/serviceMng.html index 520d263..1cbcd07 100644 --- a/discovery-ui/src/main/resources/iui/microservices/serviceMng.html +++ b/discovery-ui/src/main/resources/iui/microservices/serviceMng.html @@ -538,18 +538,15 @@ <div class="row">
-
<div class="form-group col-xs-6">
<label class="control-label col-xs-3">
Host
</label>
<div class="col-xs-7">
-
<input type="text" name="host" ms-duplex="msbRouteInfo.host" ms-attr-disabled="vm.pageInfo.pageType=='view'" class="form-control" />
<span class="help-block"></span>
</div>
-
</div>
<div class="form-group col-xs-6">
@@ -558,19 +555,24 @@ </label>
<div class="col-xs-7">
-
<input type="text" name="path" ms-duplex="msbRouteInfo.path" ms-attr-disabled="vm.pageInfo.pageType=='view'" class="form-control " />
<span class="help-block"></span>
</div>
-
</div>
-
-
</div>
-
-
-
+ <div class="row">
+ <div class="form-group col-xs-6">
+ <label class="control-label col-xs-3">
+ Enable SSL
+ </label>
+ <div class="col-xs-7">
+ <input type="checkbox" name="enable_ssl" id="enable_ssl" value="true" ms-duplex="msbRouteInfo.enable_ssl" ms-attr-disabled="vm.pageInfo.pageType=='view'" class="form-control" />
+
+ <span class="help-block"></span>
+ </div>
+ </div>
+ </div>
<div class="form-title">
|