diff --git a/src/components/Dialog/Secret.vue b/src/components/Dialog/Secret.vue
new file mode 100644
index 000000000..d3b30a396
--- /dev/null
+++ b/src/components/Dialog/Secret.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
diff --git a/src/components/Form/FormFields/UploadField.vue b/src/components/Form/FormFields/UploadField.vue
index 2feb09afd..26aaab3b4 100644
--- a/src/components/Form/FormFields/UploadField.vue
+++ b/src/components/Form/FormFields/UploadField.vue
@@ -8,7 +8,7 @@
{{ tip }}
-
+
diff --git a/src/components/Table/CardTable/SmallCard.vue b/src/components/Table/CardTable/SmallCard.vue
new file mode 100644
index 000000000..ce4631589
--- /dev/null
+++ b/src/components/Table/CardTable/SmallCard.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
diff --git a/src/components/Table/CardTable/components/CardPanel.vue b/src/components/Table/CardTable/components/CardPanel.vue
new file mode 100644
index 000000000..661a9cd74
--- /dev/null
+++ b/src/components/Table/CardTable/components/CardPanel.vue
@@ -0,0 +1,176 @@
+
+
+
+
+
+ {{ object.name }}
+
+
+
+
+
+
+
+
+
+ {{ action.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/assets/Cloud/Account/components/InfoPanel.vue b/src/components/Table/CardTable/components/InfoPanel.vue
similarity index 75%
rename from src/views/assets/Cloud/Account/components/InfoPanel.vue
rename to src/components/Table/CardTable/components/InfoPanel.vue
index 2d806f0ef..a86526c59 100644
--- a/src/views/assets/Cloud/Account/components/InfoPanel.vue
+++ b/src/components/Table/CardTable/components/InfoPanel.vue
@@ -1,9 +1,7 @@
-
{{ title }}
-
- {{ content }}
-
+
{{ title }}
+
{{ content }}
@@ -38,14 +36,18 @@ export default {
.panel-item {
text-align: left;
- padding: 5px 0;
+ padding: 3px 0;
line-height: 20px;
- @include textOverflow;
.item-label {
text-align: left;
- display: inline-block;
- width: 100px;
+ }
+ .item-label::after {
+ content: ':';
+ margin-left: 1px;
+ }
+ .text-info {
+ @include textOverflow;
}
}
diff --git a/src/components/Table/CardTable/index.vue b/src/components/Table/CardTable/index.vue
index 9915141b7..5db80d112 100644
--- a/src/components/Table/CardTable/index.vue
+++ b/src/components/Table/CardTable/index.vue
@@ -10,7 +10,7 @@
-
+
-
+
{{ $t('Enterprise') }}
@@ -85,6 +92,10 @@ export default {
},
props: {
// 定义 table 的配置
+ columns: {
+ type: Number,
+ default: 3
+ },
tableConfig: {
type: Object,
default: () => ({})
@@ -100,6 +111,10 @@ export default {
subComponent: {
type: Object,
default: () => null
+ },
+ subComponentProps: {
+ type: Object,
+ default: () => ({})
}
},
data() {
diff --git a/src/router/pam/service.js b/src/router/pam/service.js
index bf9411d5e..75e94769c 100644
--- a/src/router/pam/service.js
+++ b/src/router/pam/service.js
@@ -3,82 +3,57 @@ import i18n from '@/i18n/i18n'
export default [
{
- path: 'service',
- name: 'AccountService',
+ path: 'services',
+ name: 'ServiceIntegration',
component: empty,
redirect: {
- name: 'AccountServiceList'
+ name: 'ServiceIntegrationList'
},
meta: {
app: 'accounts',
- name: 'AccountService',
+ name: 'ServiceIntegration',
icon: 'service',
- resource: 'pushaccountautomation'
+ resource: 'serviceintegration'
},
children: [
{
path: '',
- component: () => import('@/views/accounts/AccountPush/index.vue'),
- name: 'AccountServiceList',
+ component: () => import('@/views/pam/ServiceIntegration/index.vue'),
+ name: 'ServiceIntegrationList',
meta: {
- title: i18n.t('服务对接'),
- menuTitle: i18n.t('服务对接'),
- permissions: ['accounts.view_pushaccountautomation']
+ title: i18n.t('ServiceIntegration'),
+ menuTitle: i18n.t('ServiceIntegration'),
+ permissions: ['accounts.view_serviceintegration']
}
},
{
path: 'create',
- component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'),
- name: 'AccountPushCreate',
+ component: () => import('@/views/pam/ServiceIntegration/ServiceIntegrationCreateUpdate.vue'),
+ name: 'ServiceIntegrationCreate',
hidden: true,
meta: {
- title: i18n.t('AccountPushCreate'),
- // activeMenu: '/console/accounts/automations',
- permissions: ['accounts.add_pushaccountautomation']
+ title: i18n.t('ServiceIntegrationCreate'),
+ permissions: ['accounts.add_serviceintegration']
}
},
{
path: ':id/update',
- component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'),
- name: 'AccountPushUpdate',
+ component: () => import('@/views/pam/ServiceIntegration/ServiceIntegrationCreateUpdate.vue'),
+ name: 'ServiceIntegrationUpdate',
hidden: true,
meta: {
- title: i18n.t('AccountPushUpdate'),
- // activeMenu: '/console/accounts/automations',
- permissions: ['accounts.change_pushaccountautomation']
+ title: i18n.t('ServiceIntegrationUpdate'),
+ permissions: ['accounts.change_serviceintegration']
}
},
{
path: ':id',
- component: () => import('@/views/accounts/AccountPush/AccountPushDetail/index.vue'),
- name: 'AccountCheckDetail',
+ component: () => import('@/views/pam/ServiceIntegration/ServiceIntegrationDetail/index.vue'),
+ name: 'ServiceIntegrationDetail',
hidden: true,
meta: {
- title: i18n.t('AccountPushList'),
- // activeMenu: '/console/accounts/automations',
- permissions: ['accounts.view_pushaccountautomation']
- }
- },
- {
- path: 'executions',
- component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue'),
- name: 'AccountPushExecutionList',
- hidden: true,
- meta: {
- title: i18n.t('ExecutionList'),
- // activeMenu: '/console/accounts/automations',
- permissions: ['accounts.view_pushaccountexecution']
- }
- },
- {
- path: 'executions/:id',
- component: () => import('@/views/accounts/AccountPush/AccountPushExecutionDetail/index.vue'),
- name: 'AccountCheckExecutionDetail',
- hidden: true,
- meta: {
- title: i18n.t('ExecutionDetail'),
- // activeMenu: '/console/accounts/automations',
- permissions: ['accounts.view_pushaccountexecution']
+ title: i18n.t('ServiceIntegrationDetail'),
+ permissions: ['accounts.view_serviceintegration']
}
}
]
diff --git a/src/views/assets/Cloud/Account/AccountList.vue b/src/views/assets/Cloud/Account/AccountList.vue
index dcb03f09d..d403d63d7 100644
--- a/src/views/assets/Cloud/Account/AccountList.vue
+++ b/src/views/assets/Cloud/Account/AccountList.vue
@@ -1,11 +1,35 @@
@@ -15,23 +39,27 @@ import {
baiducloud, state_private, fc, gcp, huaweicloud, huaweicloud_private, jdcloud, kingsoftcloud, lan, nutanix, openstack,
qcloud, qcloud_lighthouse, qingcloud_private, scp, ucloud, vmware, volcengine, zstack
} from '../const'
-import rules from '@/components/Form/DataForm/rules'
import CreateDialog from './components/CreateDialog.vue'
-import CardTable from '@/components/Table/CardTable'
-import AccountPanel from './components/AccountPanel'
+import SmallCard from '@/components/Table/CardTable/SmallCard.vue'
import { ACCOUNT_PROVIDER_ATTRS_MAP } from '@/views/assets/Cloud/const'
+import Dialog from '@/components/Dialog/index.vue'
+import AssetPanel from './components/AssetPanel.vue'
+import AuthPanel from './components/AuthPanel.vue'
+import { toSafeLocalDateStr } from '@/utils/time'
export default {
name: 'CloudAccountList',
components: {
- CardTable,
+ AuthPanel,
+ AssetPanel,
+ Dialog,
+ SmallCard,
CreateDialog
},
data() {
const vm = this
return {
- colWidth: 6,
- subComponent: AccountPanel,
+ object: null,
tableConfig: {
url: '/api/v1/xpack/cloud/accounts/',
permissions: {
@@ -103,21 +131,64 @@ export default {
providerConfig: {
providers: []
},
- account: {},
visible: false,
- testLoading: false,
- select2: {
- allowCreate: true,
- multiple: false
- },
- regionRules: [rules.Required]
+ updateVisible: false,
+ onlineSyncVisible: false,
+ subComponentProps: {
+ handleUpdate: (obj) => {
+ this.object = obj
+ this.updateVisible = true
+ },
+ getImage: (obj) => {
+ return ACCOUNT_PROVIDER_ATTRS_MAP[obj.provider.value].image
+ },
+ getInfos: (obj) => {
+ return [
+ {
+ title: this.$tc('TotalSyncRegion'),
+ content: obj?.task.regions.length
+ },
+ {
+ title: this.$tc('TotalSyncAsset'),
+ content: obj?.task.instance_count
+ },
+ {
+ title: this.$tc('DateLastSync'),
+ content: toSafeLocalDateStr(obj?.task.date_last_sync)
+ }
+ ]
+ },
+ actions: [
+ {
+ id: 'online-sync',
+ name: this.$tc('SyncOnline'),
+ icon: 'el-icon-thumb',
+ callback: this.handleOnlineExecute,
+ disabled: !this.$hasPerm('xpack.change_syncinstancetask')
+ }
+ ]
+ }
}
},
watch: {
visible: {
handler(val) {
if (!val) {
- this.$refs.accountTable.reloadTable()
+ this.$refs.table.reloadTable()
+ }
+ }
+ },
+ onlineSyncVisible: {
+ handler(newValue) {
+ if (newValue === false) {
+ this.$refs.table.reloadTable()
+ }
+ }
+ },
+ updateVisible: {
+ handler(newValue) {
+ if (newValue === false) {
+ this.$refs.table.reloadTable()
}
}
}
@@ -129,6 +200,14 @@ export default {
return 200
}
return status
+ },
+ handleOnlineExecute(obj) {
+ this.object = obj
+ this.onlineSyncVisible = true
+ },
+ onSubmitSuccess() {
+ this.$refs.table.reloadTable()
+ this.updateVisible = false
}
}
}
diff --git a/src/views/assets/Cloud/Account/components/AccountPanel.vue b/src/views/assets/Cloud/Account/components/AccountPanel.vue
deleted file mode 100644
index 54f92ca6b..000000000
--- a/src/views/assets/Cloud/Account/components/AccountPanel.vue
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-
-
-
- {{ object.name }}
-
-
-
-
-
-
-
-
-
- {{ action.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/pam/ServiceIntegration/SDKList.vue b/src/views/pam/ServiceIntegration/SDKList.vue
new file mode 100644
index 000000000..3d8b13918
--- /dev/null
+++ b/src/views/pam/ServiceIntegration/SDKList.vue
@@ -0,0 +1,115 @@
+
+
+
+
+ Python
+ Go
+
+
+
+
+
+
+ {{ $tc('NoData') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pam/ServiceIntegration/ServiceIntegrationCreateUpdate.vue b/src/views/pam/ServiceIntegration/ServiceIntegrationCreateUpdate.vue
new file mode 100644
index 000000000..a8200f7ff
--- /dev/null
+++ b/src/views/pam/ServiceIntegration/ServiceIntegrationCreateUpdate.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
diff --git a/src/views/pam/ServiceIntegration/ServiceIntegrationDetail/ServiceIntegrationInfo.vue b/src/views/pam/ServiceIntegration/ServiceIntegrationDetail/ServiceIntegrationInfo.vue
new file mode 100644
index 000000000..61d99a72a
--- /dev/null
+++ b/src/views/pam/ServiceIntegration/ServiceIntegrationDetail/ServiceIntegrationInfo.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
diff --git a/src/views/pam/ServiceIntegration/ServiceIntegrationDetail/index.vue b/src/views/pam/ServiceIntegration/ServiceIntegrationDetail/index.vue
new file mode 100644
index 000000000..995b9a231
--- /dev/null
+++ b/src/views/pam/ServiceIntegration/ServiceIntegrationDetail/index.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pam/ServiceIntegration/ServiceIntegrationList.vue b/src/views/pam/ServiceIntegration/ServiceIntegrationList.vue
new file mode 100644
index 000000000..08661dc38
--- /dev/null
+++ b/src/views/pam/ServiceIntegration/ServiceIntegrationList.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
diff --git a/src/views/pam/ServiceIntegration/components/CallRecords.vue b/src/views/pam/ServiceIntegration/components/CallRecords.vue
new file mode 100644
index 000000000..1f7e785dc
--- /dev/null
+++ b/src/views/pam/ServiceIntegration/components/CallRecords.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
diff --git a/src/views/pam/ServiceIntegration/index.vue b/src/views/pam/ServiceIntegration/index.vue
new file mode 100644
index 000000000..fe49d3b8c
--- /dev/null
+++ b/src/views/pam/ServiceIntegration/index.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
diff --git a/src/views/profile/AccessKey/index.vue b/src/views/profile/AccessKey/index.vue
index 835a74da0..2ad8f83f5 100644
--- a/src/views/profile/AccessKey/index.vue
+++ b/src/views/profile/AccessKey/index.vue
@@ -6,39 +6,18 @@
:help-tip="helpMessage"
:table-config="tableConfig"
/>
-
+