diff --git a/.github/workflows/jms-generic-action-handler.yml b/.github/workflows/jms-generic-action-handler.yml index 3f499cfb9..450891696 100644 --- a/.github/workflows/jms-generic-action-handler.yml +++ b/.github/workflows/jms-generic-action-handler.yml @@ -10,3 +10,4 @@ jobs: - uses: jumpserver/action-generic-handler@master env: GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }} + I18N_TOKEN: ${{ secrets.I18N_TOKEN }} diff --git a/src/components/Apps/AccountListTable/AccountList.vue b/src/components/Apps/AccountListTable/AccountList.vue index 5f03dd284..9e4826ea6 100644 --- a/src/components/Apps/AccountListTable/AccountList.vue +++ b/src/components/Apps/AccountListTable/AccountList.vue @@ -354,7 +354,7 @@ export default { name: 'TestSelected', title: this.$t('TestSelected'), type: 'primary', - icon: 'fa-handshake-o', + icon: 'fa-link', can: ({ selectedRows }) => { return selectedRows.length > 0 && ['clickhouse', 'redis', 'website', 'chatgpt'].indexOf(selectedRows[0].asset.type.value) === -1 && diff --git a/src/components/Apps/UserConfirmDialog/index.vue b/src/components/Apps/UserConfirmDialog/index.vue index e7d338549..872a47cb3 100644 --- a/src/components/Apps/UserConfirmDialog/index.vue +++ b/src/components/Apps/UserConfirmDialog/index.vue @@ -82,6 +82,7 @@ diff --git a/src/components/Table/TableFormatters/HostInfoFormatter.vue b/src/components/Table/TableFormatters/HostInfoFormatter.vue index ba50c7dc2..a37fcfe46 100644 --- a/src/components/Table/TableFormatters/HostInfoFormatter.vue +++ b/src/components/Table/TableFormatters/HostInfoFormatter.vue @@ -65,7 +65,7 @@ export default { } return text } - return '-' + return this.items?.distribution || '-' } } } diff --git a/src/components/Table/TableFormatters/LabelsFormatter.vue b/src/components/Table/TableFormatters/LabelsFormatter.vue index daae7bec5..81590352e 100644 --- a/src/components/Table/TableFormatters/LabelsFormatter.vue +++ b/src/components/Table/TableFormatters/LabelsFormatter.vue @@ -20,7 +20,7 @@ @@ -275,4 +275,11 @@ export default { .tag-tip { margin-top: 10px; } + +.disabled-link { + pointer-events: none; + color: grey; + cursor: default; + text-decoration: none; +} diff --git a/src/styles/icons/dameng.png b/src/styles/icons/dameng.png new file mode 100644 index 000000000..2ca0995a8 Binary files /dev/null and b/src/styles/icons/dameng.png differ diff --git a/src/styles/ztree_icon.scss b/src/styles/ztree_icon.scss index 37135986a..5f14a18ab 100644 --- a/src/styles/ztree_icon.scss +++ b/src/styles/ztree_icon.scss @@ -92,6 +92,10 @@ background: url('./icons/db2.png') no-repeat center left transparent; } + &.dameng_ico_docu { + background: url('./icons/dameng.png') no-repeat center left transparent; + } + &.private_ico_docu { background: url('./icons/private.png') no-repeat center left transparent; } diff --git a/src/views/assets/Asset/AssetList/components/BaseList.vue b/src/views/assets/Asset/AssetList/components/BaseList.vue index a0d117d42..9e2e86776 100644 --- a/src/views/assets/Asset/AssetList/components/BaseList.vue +++ b/src/views/assets/Asset/AssetList/components/BaseList.vue @@ -225,6 +225,30 @@ export default { getUrlQuery: false }, extraMoreActions: [ + { + name: 'BulkVerify', + title: this.$t('common.BulkVerify'), + type: 'primary', + icon: 'fa fa-link', + can: ({ selectedRows }) => + this.$hasPerm('assets.test_assetconnectivity') && + !this.$store.getters.currentOrgIsRoot && + selectedRows.length > 0 && + selectedRows[0].auto_config?.ansible_enabled && + selectedRows[0].auto_config?.ping_enabled, + callback: function({ selectedRows }) { + const ids = selectedRows.map(v => { + return v.id + }) + this.$axios.post( + '/api/v1/assets/assets/tasks/', + { action: 'test', assets: ids }).then(res => { + openTaskPage(res['task']) + }).catch(err => { + this.$message.error(this.$tc('common.bulkVerifyErrorMsg' + ' ' + err)) + }) + }.bind(this) + }, { name: 'DeactiveSelected', title: this.$t('DisableSelected'), diff --git a/src/views/dashboard/Audit/RightSummary.vue b/src/views/dashboard/Audit/RightSummary.vue index 29d54f7d3..834adbdc2 100644 --- a/src/views/dashboard/Audit/RightSummary.vue +++ b/src/views/dashboard/Audit/RightSummary.vue @@ -100,7 +100,7 @@ export default { this.data.total_count_job_logs = data?.total_count_job_logs this.data.total_count_job_logs_running = data?.total_count_job_logs_running this.data.total_count_job_logs_failed = data?.total_count_job_logs_failed - if (totalCountSession.length > 1) { + if (totalCountSession.length > 0) { this.chartConfig.secondaryData = totalCountSession } } diff --git a/src/views/dashboard/Console/UserAssetActivity.vue b/src/views/dashboard/Console/UserAssetActivity.vue index ac5c38f65..f94890796 100644 --- a/src/views/dashboard/Console/UserAssetActivity.vue +++ b/src/views/dashboard/Console/UserAssetActivity.vue @@ -16,8 +16,7 @@ export default { Title, LineChart }, - props: { - }, + props: {}, data() { return { loading: false, @@ -48,10 +47,10 @@ export default { const activeUsers = data?.dates_metrics_total_count_active_users const activeAssets = data?.dates_metrics_total_count_active_assets this.lineChartConfig.datesMetrics = data.dates_metrics_date - if (activeUsers.length > 1) { + if (activeUsers.length > 0) { this.lineChartConfig.primaryData = activeUsers } - if (activeAssets.length > 1) { + if (activeAssets.length > 0) { this.lineChartConfig.secondaryData = activeAssets } } @@ -64,6 +63,7 @@ export default { margin-top: 16px; padding: 20px; background: #fff; + .head { display: flex; justify-content: space-between; diff --git a/src/views/dashboard/components/RealTimeSummary.vue b/src/views/dashboard/components/RealTimeSummary.vue index 2b4259727..68267ac81 100644 --- a/src/views/dashboard/components/RealTimeSummary.vue +++ b/src/views/dashboard/components/RealTimeSummary.vue @@ -66,7 +66,16 @@ export default { }, methods: { async getResourcesCount() { - return this.$axios.get('/api/v1/index/?total_count=1') + return this.$axios.get( + '/api/v1/index/', + { + params: { + total_count_online_sessions: 1, + total_count_online_users: 1, + total_count_today_failed_sessions: 1 + } + } + ) } } } diff --git a/src/views/settings/Org/OrganizationCreateUpdate.vue b/src/views/settings/Org/OrganizationCreateUpdate.vue index baff5fdb8..5c0db0ae8 100644 --- a/src/views/settings/Org/OrganizationCreateUpdate.vue +++ b/src/views/settings/Org/OrganizationCreateUpdate.vue @@ -12,25 +12,24 @@ export default { data() { return { config: { - initial: { - }, + initial: {}, url: '/api/v1/orgs/orgs/', fields: [ ['', ['name', 'comment']] ], hasSaveContinue: false, - fieldsMeta: { - }, + fieldsMeta: {}, onPerformSuccess(res, method) { + const orderParams = { params: { order: '-date_created' }} switch (method) { case 'post': this.$store.dispatch('users/addAdminOrg', { id: res.id, name: res.name }) this.$message.success(this.$tc('CreateSuccessMsg')) - return this.$router.push({ name: 'OrganizationList' }) + return this.$router.push({ name: 'OrganizationList', ...orderParams }) case 'put': this.$store.dispatch('users/modifyOrg', { id: res.id, name: res.name }) this.$message.success(this.$tc('UpdateSuccessMsg')) - return this.$router.push({ name: 'OrganizationList' }) + return this.$router.push({ name: 'OrganizationList', ...orderParams }) } } } diff --git a/src/views/tickets/BaseTicketList.vue b/src/views/tickets/BaseTicketList.vue index 4320e4594..afa5e8404 100644 --- a/src/views/tickets/BaseTicketList.vue +++ b/src/views/tickets/BaseTicketList.vue @@ -134,6 +134,14 @@ export default { canCreate: this.$hasPerm('tickets.view_ticket'), hasBulkDelete: false, searchConfig: { + default: { + state: { + key: 'state', + label: this.$t('tickets.action'), + value: 'pending', + valueLabel: this.$t('common.Open') + } + }, exclude: ['id', 'title', 'type', 'applicant'], options: [ { @@ -181,7 +189,7 @@ export default { }, { value: 'relevant_command', - label: this.$t('RelevantSystemUser') + label: this.$t('ApplyRunCommand') } ] },