Skip to content

Commit

Permalink
feature: 内置插件数据加载支持识别公共流程
Browse files Browse the repository at this point in the history
  • Loading branch information
normal-wls committed Dec 11, 2023
1 parent d1e5190 commit 08ab285
Show file tree
Hide file tree
Showing 37 changed files with 106 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
multiple: true,
remote: true,
remote_url: function () {
return $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/get_staff_groups/' + $.context.getProjectId() + '/'
return $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/get_staff_groups/' + $.context.getProjectId() + '/'
},
remote_data_init: function (resp) {
return resp.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -128,7 +128,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
source: "cc_host_property_custom",
type: "init",
action: function (value) {
this.remote_url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_input_host_property/' + $.context.getBkBizId() + '/';
this.remote_url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_input_host_property/' + $.context.getBkBizId() + '/';
this.remoteMethod();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}
],
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_get_set_attribute/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_get_set_attribute/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/';
return url;
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -82,7 +82,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/'
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/'
return url;
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -82,7 +82,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
default_expand_all: false,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/module/normal/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/module/normal/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -83,7 +83,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_object_attribute/host/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_object_attribute/host/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -97,7 +97,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/module/normal/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/module/normal/' + $.context.getBkBizId() + '/';
return url;
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -82,7 +82,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand All @@ -104,7 +104,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_object_attribute/module/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_object_attribute/module/' + $.context.getBkBizId() + '/';
return url;
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -136,7 +136,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/';
return url;
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -82,7 +82,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand All @@ -104,7 +104,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_object_attribute/set/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_object_attribute/set/' + $.context.getBkBizId() + '/';
return url;
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -136,7 +136,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/';
return url;
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -81,7 +81,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
hookable: true,
remote: true,
remote_url: function () {
return $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/'
return $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/normal/' + $.context.getBkBizId() + '/'
},
remote_data_init: function (resp) {
if (resp.result === false) {
Expand Down Expand Up @@ -128,7 +128,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down Expand Up @@ -239,7 +239,7 @@
add_btn: true,
// 远程加载模块可填写属性
remote_url: function () {
return $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/set/' + $.context.getBkBizId() + '/'
return $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/set/' + $.context.getBkBizId() + '/'
},
remote_data_init: function (resp) {
if (resp.result === false) {
Expand Down Expand Up @@ -340,7 +340,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.columns = [];
Expand All @@ -359,7 +359,7 @@
pagination: true,
name: gettext("模块信息"),
remote_url: function () {
return $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/module/' + $.context.getBkBizId() + '/';
return $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/module/' + $.context.getBkBizId() + '/';
},
remote_data_init: function (resp) {
if (resp.result === false) {
Expand Down Expand Up @@ -460,7 +460,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.columns = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/prev/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/prev/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -81,7 +81,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand All @@ -101,7 +101,7 @@
pagination: true,
name: gettext("集群信息"),
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/set/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/set/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -135,7 +135,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.columns = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/prev/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/prev/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -81,7 +81,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand All @@ -101,7 +101,7 @@
pagination: true,
name: gettext("集群信息"),
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/set/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/set/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -135,7 +135,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.columns = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
hookable: true,
remote: true,
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/prev/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_topo/set/prev/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -131,7 +131,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.items = [];
Expand Down Expand Up @@ -211,7 +211,7 @@
pagination: true,
name: gettext("集群信息"),
remote_url: function () {
const url = $.context.canSelectBiz() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/set/' + $.context.getBkBizId() + '/';
const url = $.context.inCommonTemplate() ? '' : $.context.get('site_url') + 'pipeline/cc_search_create_object_attribute/set/' + $.context.getBkBizId() + '/';
return url
},
remote_data_init: function (resp) {
Expand Down Expand Up @@ -245,7 +245,7 @@
source: "biz_cc_id",
type: "change",
action: function (value) {
if ($.context.canSelectBiz()) {
if ($.context.inCommonTemplate()) {
this._set_value('');
}
this.columns = [];
Expand Down
Loading

0 comments on commit 08ab285

Please sign in to comment.