Unverified Commit 382bb89e authored by BaiJiangJie's avatar BaiJiangJie Committed by GitHub

Merge pull request #2945 from jumpserver/dev_bai

[Update] 优化创建RemoteApp前端逻辑
parents 9219786f 92aeecbc
...@@ -107,17 +107,20 @@ function hiddenFields(){ ...@@ -107,17 +107,20 @@ function hiddenFields(){
}); });
$('.' + app_type + '-fields').removeClass('hidden'); $('.' + app_type + '-fields').removeClass('hidden');
} }
function constructParams(obj) { function constructParams(data) {
var type = ['chrome', 'mysql_workbench', 'vmware_client', 'custom']; var typeList = ['chrome', 'mysql_workbench', 'vmware_client', 'custom'];
var params = {}; var params = {};
type.forEach(function (attr) { for (var type in typeList){
if (obj.type === attr){ if (data.type === type){
for (var k in obj){ for (var k in data){
if (k.startsWith(obj.type)){params[k] = obj[k]} if (k.startsWith(data.type)){
params[k] = data[k]
} }
} }
}); break
return params }
}
return params;
} }
$(document).ready(function () { $(document).ready(function () {
$('.select2').select2({ $('.select2').select2({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment