Skip to content

Commit 629c2ed

Browse files
committed
fix: 屏蔽开源环境不存在的功能
1 parent debaddb commit 629c2ed

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

web/config.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
}
6969
},
7070
"components": {
71-
"WeEditorLsp": "editorLsp/index.js",
7271
"WeEditor": "editor/index.js"
7372
},
7473
"conf": {
@@ -82,10 +81,7 @@
8281
"template": "${username} ${time}",
8382
"timeupdate": 60000
8483
},
85-
"lsp_service": {
86-
"sql": "${protocol}//${host}/server",
87-
"py": "${protocol}//${host}/python"
88-
}
84+
"env": "opensource"
8985
},
9086
"version": "1.1.12"
9187
}

web/packages/editor/editor.vue

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -458,19 +458,21 @@ export default {
458458
vm.editor.updateOptions({wordWrap: 'on'});
459459
},
460460
});
461-
462-
this.editor.addAction({
463-
id: 'newdbsuggest',
464-
label: this.$t('message.common.monacoMenu.newdbcomplition'),
465-
keybindings: [],
466-
keybindingContext: null,
467-
contextMenuGroupId: 'control',
468-
contextMenuOrder: 2.5,
469-
run() {
470-
localStorage.setItem('scriptis-edditor-type', 'lsp');
471-
location.reload();
472-
},
473-
});
461+
462+
if (this.$APP_CONF && this.$APP_CONF.lsp_service) {
463+
this.editor.addAction({
464+
id: 'newdbsuggest',
465+
label: this.$t('message.common.monacoMenu.newdbcomplition'),
466+
keybindings: [],
467+
keybindingContext: null,
468+
contextMenuGroupId: 'control',
469+
contextMenuOrder: 2.5,
470+
run() {
471+
localStorage.setItem('scriptis-edditor-type', 'lsp');
472+
location.reload();
473+
},
474+
});
475+
}
474476
475477
if (this.language === 'hql') {
476478
// 控制语法检查

web/packages/scriptis/module/hiveSidebar/hiveList/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export default {
264264
toggleShow(e) {
265265
const item = e.target.innerText
266266
const overDb = e.target.className.indexOf('fi-hivedb') > -1
267-
if ( overDb && !this.dbnameDesc[item] ) {
267+
if ( overDb && !this.dbnameDesc[item] && this.$APP_CONF && this.$APP_CONF.env === 'webank') {
268268
// mouseover 在数据库项上且未获取描述信息
269269
clearTimeout(this.fetchDbInfo)
270270
this.fetchDbInfo = setTimeout(() => {

web/packages/workflows/module/process/module.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@
294294
</Form>
295295
<div slot="footer">
296296
<Button
297+
v-if="$APP_CONF && $APP_CONF.env === 'webank'"
297298
@click="showDiff">{{$t('message.workflow.showVersionDiff')}}</Button>
298299
<Button
299300
type="primary"

web/packages/workspace/module/management/index.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ export default {
6262
// path: 'dataSourceAdministration',
6363
// children: [],
6464
// },
65-
{
65+
];
66+
if (this.$APP_CONF && this.$APP_CONF.env === 'webank') {
67+
manageMenus.push({
6668
icon: 'engineinfo',
6769
name: i18n.t('message.workspaceManagement.engineInfo'),
6870
path: 'engineinfo',
@@ -86,8 +88,8 @@ export default {
8688
children: [],
8789
}
8890
],
89-
}
90-
];
91+
})
92+
}
9193
return {
9294
mode: '',
9395
activeName: '',

0 commit comments

Comments
 (0)