+
+
+
+
+
+
+
+
diff --git a/packages/business/src/locale/lang/en.js b/packages/business/src/locale/lang/en.js
index e2859aea9..f18932d0c 100644
--- a/packages/business/src/locale/lang/en.js
+++ b/packages/business/src/locale/lang/en.js
@@ -1016,6 +1016,9 @@ export default {
packages_business_data_server_drawer_tiaoshi: 'Debug',
packages_business_data_server_drawer_peizhi: 'Configuration',
packages_business_data_server_drawer_chuangjianfuwu: 'Create API',
+ packages_business_copy_server: 'Copy API',
+ packages_business_import_server: 'Import API',
+ packages_business_export_server: 'Export API',
packages_business_data_server_drawer_fuwuxiangqing: 'Service Details',
packages_business_data_server_list_quedingchexiaogai:
'Are you sure you want to revoke this service?',
diff --git a/packages/business/src/locale/lang/zh-CN.js b/packages/business/src/locale/lang/zh-CN.js
index 1aad343ab..cb21b1efb 100644
--- a/packages/business/src/locale/lang/zh-CN.js
+++ b/packages/business/src/locale/lang/zh-CN.js
@@ -1197,6 +1197,9 @@ export default {
packages_business_tiaoshi: '调试',
packages_business_peizhi: '配置',
packages_business_chuangjianfuwu: '创建服务',
+ packages_business_copy_server: '复制服务',
+ packages_business_import_server: '导入服务',
+ packages_business_export_server: '导出服务',
packages_business_fuwuxiangqing: '服务详情',
packages_business_geshicuowu: '格式错误',
packages_business_validate:
diff --git a/packages/business/src/locale/lang/zh-TW.js b/packages/business/src/locale/lang/zh-TW.js
index 8c7892fdd..cdec590a4 100644
--- a/packages/business/src/locale/lang/zh-TW.js
+++ b/packages/business/src/locale/lang/zh-TW.js
@@ -917,6 +917,9 @@ export default {
packages_business_data_server_drawer_tiaoshi: '調試',
packages_business_data_server_drawer_peizhi: '配置',
packages_business_data_server_drawer_chuangjianfuwu: '創建服務',
+ packages_business_copy_server: '復製服務',
+ packages_business_import_server: '導入服務',
+ packages_business_export_server: '導出服務',
packages_business_data_server_drawer_fuwuxiangqing: '服務詳情',
packages_business_data_server_list_quedingchexiaogai: '確定撤銷該服務?',
packages_business_data_server_list_quedingfabugai: '確定發布該服務?',
diff --git a/packages/business/src/views/connections/List.vue b/packages/business/src/views/connections/List.vue
index 693f74ab3..e9fc58759 100644
--- a/packages/business/src/views/connections/List.vue
+++ b/packages/business/src/views/connections/List.vue
@@ -874,8 +874,8 @@ onUnmounted(() => {
:label="$t('public_connection_information')"
min-width="160"
>
-
- {{ scope.row.connectionUrl }}
+
+ {{ row.connectionUrl }}
{
min-width="135"
:label="$t('public_connection_type')"
>
-
- {{ getType(scope.row.connection_type) }}
+
+ {{ getType(row.connection_type) }}
@@ -914,9 +914,9 @@ onUnmounted(() => {
-
- -
-
+
+ -
+
{
-
+
{{ $t('public_connection_button_test') }}
{
text
type="primary"
data-testid="load-schema"
- :disabled="
- isFileSource(scope.row) || scope.row.disabledLoadSchema
- "
- @click="handleLoadSchema(scope.row)"
+ :disabled="isFileSource(row) || row.disabledLoadSchema"
+ @click="handleLoadSchema(row)"
>{{ $t('public_connection_button_load_schema') }}
{{ $t('public_button_edit') }}
{{ $t('public_button_copy') }}
{{ $t('public_button_delete') }}
diff --git a/packages/business/src/views/data-server/List.vue b/packages/business/src/views/data-server/List.vue
index 1b5f56461..a52a53da7 100644
--- a/packages/business/src/views/data-server/List.vue
+++ b/packages/business/src/views/data-server/List.vue
@@ -26,6 +26,7 @@ import { uid } from '@tap/shared'
import { cloneDeep, escapeRegExp } from 'lodash-es'
import {
computed,
+ h,
nextTick,
onBeforeMount,
onBeforeUnmount,
@@ -39,6 +40,7 @@ import { DatabaseIcon } from '../../components/DatabaseIcon'
import PageContainer from '../../components/PageContainer.vue'
import TablePage from '../../components/TablePage.vue'
import Upload from '../../components/UploadDialog.vue'
+import { useHas } from '../../composables'
import Delete from '../api-application/Delete.vue'
import Editor from '../api-application/Editor.vue'
import Drawer from './Drawer.vue'
@@ -77,6 +79,8 @@ const emit = defineEmits<{
const route = useRoute()
const { t } = useI18n()
+const spacer = h(ElDivider, { direction: 'vertical', class: 'mx-1' })
+
// Refs
const table = ref>()
const drawer = ref>()
@@ -102,6 +106,17 @@ const searchParams = ref({
appId: '',
})
+const $has = useHas()
+
+const btnPermissions = computed(() => {
+ return {
+ creation: $has('v2_data-server-list_creation'),
+ copy: $has('v2_data-server-list_copy'),
+ import: $has('v2_data-server-list_import'),
+ export: $has('v2_data-server-list_export'),
+ }
+})
+
const statusOptions: StatusOption[] = [
{
label: t('public_select_option_all'),
@@ -466,7 +481,10 @@ const handleDragLeave = (event: DragEvent) => {
event.preventDefault()
const currentTarget = event.currentTarget as HTMLElement | null
- if (currentTarget && !currentTarget.contains(event.relatedTarget as Node | null)) {
+ if (
+ currentTarget &&
+ !currentTarget.contains(event.relatedTarget as Node | null)
+ ) {
const dropNode = findParentNodeByClassName(
event.currentTarget as HTMLElement,
'list-item-hover',
@@ -525,17 +543,14 @@ defineExpose({
-
+
{{ $t('packages_business_button_bulk_import') }}
-
+
@@ -708,14 +727,14 @@ defineExpose({
{{ $t('public_batch_publish') }}
-
+
{{ $t('public_button_export') }}
@@ -746,6 +765,7 @@ defineExpose({
class="ellipsis"
type="primary"
style="display: block; line-height: 20px"
+ :disabled="!row.permissionActions?.includes('Edit')"
@click.stop="showDrawer(row)"
>
{{ row.name }}
@@ -825,33 +845,50 @@ defineExpose({
fixed="right"
>
- {{ $t('public_button_public') }}
- {{ $t('public_button_unpublish') }}
-
- {{
- $t('public_button_export')
- }}
-
- {{
- $t('public_button_copy')
- }}
-
- {{
- $t('public_button_delete')
- }}
+
+ {{ $t('public_button_public') }}
+ {{ $t('public_button_unpublish') }}
+ {{ $t('public_button_export') }}
+ {{ $t('public_button_copy') }}
+ {{ $t('public_button_delete') }}
+
diff --git a/packages/i18n/src/locale/lang/en.js b/packages/i18n/src/locale/lang/en.js
index b6b95135d..15a5185f6 100644
--- a/packages/i18n/src/locale/lang/en.js
+++ b/packages/i18n/src/locale/lang/en.js
@@ -368,7 +368,18 @@ export default {
public_please_wait: 'Please wait a moment...',
public_view_all: 'View All',
-
+ public_edit_all: 'Edit All',
+ public_delete_all: 'Delete All',
+ public_reset_all: 'Reset All',
+ public_start_all: 'Start All',
+ public_stop_all: 'Stop All',
+ public_export_all: 'Export All',
+ public_publish_all: 'Publish All',
+ public_revoke_all: 'Revoke All',
+ public_button_expand_all: 'Expand All',
+ public_button_collapse_all: 'Collapse All',
+ public_select_all: 'Select All',
+ public_permissions_enabled: 'permissions enabled',
public_today: 'Today',
public_yesterday: 'Yesterday',
public_this_hour: 'This Hour',
diff --git a/packages/i18n/src/locale/lang/zh-CN.js b/packages/i18n/src/locale/lang/zh-CN.js
index 3e053c0ae..5875fb081 100644
--- a/packages/i18n/src/locale/lang/zh-CN.js
+++ b/packages/i18n/src/locale/lang/zh-CN.js
@@ -369,6 +369,18 @@ export default {
public_please_wait: '请稍等...',
public_view_all: '查看全部',
+ public_edit_all: '编辑全部',
+ public_delete_all: '删除全部',
+ public_reset_all: '重置全部',
+ public_start_all: '启动全部',
+ public_stop_all: '停止全部',
+ public_export_all: '导出全部',
+ public_publish_all: '发布全部',
+ public_revoke_all: '撤销全部',
+ public_button_expand_all: '展开全部',
+ public_button_collapse_all: '收起全部',
+ public_select_all: '全选',
+ public_permissions_enabled: '权限已启用',
public_today: '今天',
public_yesterday: '昨天',
diff --git a/packages/i18n/src/locale/lang/zh-TW.js b/packages/i18n/src/locale/lang/zh-TW.js
index d301af3ff..12c116f65 100644
--- a/packages/i18n/src/locale/lang/zh-TW.js
+++ b/packages/i18n/src/locale/lang/zh-TW.js
@@ -366,6 +366,18 @@ export default {
public_please_wait: '請稍等...',
public_view_all: '查看全部',
+ public_edit_all: '编辑全部',
+ public_delete_all: '删除全部',
+ public_reset_all: '重置全部',
+ public_start_all: '啟動全部',
+ public_stop_all: '停止全部',
+ public_export_all: '導出全部',
+ public_publish_all: '發佈全部',
+ public_revoke_all: '撤銷全部',
+ public_button_expand_all: '展開全部',
+ public_button_collapse_all: '收起全部',
+ public_select_all: '全選',
+ public_permissions_enabled: '權限已啟用',
public_today: '今天',
public_yesterday: '昨天',
diff --git a/packages/types/src/daas-components.d.ts b/packages/types/src/daas-components.d.ts
index 9d31fd0f4..5e1c43d66 100644
--- a/packages/types/src/daas-components.d.ts
+++ b/packages/types/src/daas-components.d.ts
@@ -124,6 +124,7 @@ declare module 'vue' {
ILucideFolder: typeof import('~icons/lucide/folder')['default']
ILucideFolderClosed: typeof import('~icons/lucide/folder-closed')['default']
ILucideFolderOpen: typeof import('~icons/lucide/folder-open')['default']
+ ILucideFoldVertical: typeof import('~icons/lucide/fold-vertical')['default']
ILucideGitBranch: typeof import('~icons/lucide/git-branch')['default']
ILucideGitCompareArrows: typeof import('~icons/lucide/git-compare-arrows')['default']
ILucideGithub: typeof import('~icons/lucide/github')['default']
@@ -168,6 +169,7 @@ declare module 'vue' {
ILucideTriangleAlert: typeof import('~icons/lucide/triangle-alert')['default']
ILucideUndo: typeof import('~icons/lucide/undo')['default']
ILucideUndo2: typeof import('~icons/lucide/undo2')['default']
+ ILucideUnfoldVertical: typeof import('~icons/lucide/unfold-vertical')['default']
ILucideUpload: typeof import('~icons/lucide/upload')['default']
ILucideUserRound: typeof import('~icons/lucide/user-round')['default']
ILucideWandSparkles: typeof import('~icons/lucide/wand-sparkles')['default']
@@ -177,6 +179,7 @@ declare module 'vue' {
ILucideZoomOut: typeof import('~icons/lucide/zoom-out')['default']
IMingcuteAddFill: typeof import('~icons/mingcute/add-fill')['default']
IMingcuteAddLine: typeof import('~icons/mingcute/add-line')['default']
+ IMingcuteAlertLine: typeof import('~icons/mingcute/alert-line')['default']
IMingcuteArrowRightLine: typeof import('~icons/mingcute/arrow-right-line')['default']
IMingcuteBrushLine: typeof import('~icons/mingcute/brush-line')['default']
IMingcuteCheckLine: typeof import('~icons/mingcute/check-line')['default']
@@ -322,6 +325,7 @@ declare global {
const ILucideFolder: typeof import('~icons/lucide/folder')['default']
const ILucideFolderClosed: typeof import('~icons/lucide/folder-closed')['default']
const ILucideFolderOpen: typeof import('~icons/lucide/folder-open')['default']
+ const ILucideFoldVertical: typeof import('~icons/lucide/fold-vertical')['default']
const ILucideGitBranch: typeof import('~icons/lucide/git-branch')['default']
const ILucideGitCompareArrows: typeof import('~icons/lucide/git-compare-arrows')['default']
const ILucideGithub: typeof import('~icons/lucide/github')['default']
@@ -366,6 +370,7 @@ declare global {
const ILucideTriangleAlert: typeof import('~icons/lucide/triangle-alert')['default']
const ILucideUndo: typeof import('~icons/lucide/undo')['default']
const ILucideUndo2: typeof import('~icons/lucide/undo2')['default']
+ const ILucideUnfoldVertical: typeof import('~icons/lucide/unfold-vertical')['default']
const ILucideUpload: typeof import('~icons/lucide/upload')['default']
const ILucideUserRound: typeof import('~icons/lucide/user-round')['default']
const ILucideWandSparkles: typeof import('~icons/lucide/wand-sparkles')['default']
@@ -375,6 +380,7 @@ declare global {
const ILucideZoomOut: typeof import('~icons/lucide/zoom-out')['default']
const IMingcuteAddFill: typeof import('~icons/mingcute/add-fill')['default']
const IMingcuteAddLine: typeof import('~icons/mingcute/add-line')['default']
+ const IMingcuteAlertLine: typeof import('~icons/mingcute/alert-line')['default']
const IMingcuteArrowRightLine: typeof import('~icons/mingcute/arrow-right-line')['default']
const IMingcuteBrushLine: typeof import('~icons/mingcute/brush-line')['default']
const IMingcuteCheckLine: typeof import('~icons/mingcute/check-line')['default']