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 6ba913d48..205779cdd 100644
--- a/src/components/Apps/AccountListTable/AccountList.vue
+++ b/src/components/Apps/AccountListTable/AccountList.vue
@@ -353,7 +353,7 @@ export default {
name: 'BulkVerify',
title: this.$t('accounts.BulkVerify'),
type: 'primary',
- fa: 'fa-handshake-o',
+ fa: '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/AccountListTable/ViewSecret.vue b/src/components/Apps/AccountListTable/ViewSecret.vue
index 517e42a34..031cbdb78 100644
--- a/src/components/Apps/AccountListTable/ViewSecret.vue
+++ b/src/components/Apps/AccountListTable/ViewSecret.vue
@@ -83,6 +83,10 @@ export default {
type: String,
default: ''
},
+ type: {
+ type: String,
+ default: 'account'
+ },
title: {
type: String,
default: function() {
@@ -136,7 +140,8 @@ export default {
name: this.secretInfo.name,
secret: encryptPassword(this.modifiedSecret)
}
- this.$axios.patch(`/api/v1/accounts/accounts/${this.account.id}/`, params).then(() => {
+ const url = this.type === 'account' ? `/api/v1/accounts/accounts` : `/api/v1/accounts/account-templates`
+ this.$axios.patch(`${url}/${this.account.id}/`, params).then(() => {
this.$message.success(this.$tc('common.updateSuccessMsg'))
})
},
diff --git a/src/components/Form/CronTab/components/Crontab-Min.vue b/src/components/Form/CronTab/components/Crontab-Min.vue
index 7d241b6a5..394b2dd0f 100644
--- a/src/components/Form/CronTab/components/Crontab-Min.vue
+++ b/src/components/Form/CronTab/components/Crontab-Min.vue
@@ -7,18 +7,11 @@
-
-
- {{ this.$t('common.CronTab.from') }}
- -
- {{ this.$t('common.CronTab.min') }}
-
-
-
{{ this.$t('common.CronTab.from') }}
- {{ this.$t('common.CronTab.min') }}{{ this.$t('common.CronTab.executeOnce') }}
+
+ {{ this.$t('common.CronTab.min') }}{{ this.$t('common.CronTab.executeOnce') }}
@@ -33,7 +26,7 @@
size="small"
style="width:100%"
>
- {{ item-1 }}
+ {{ item - 1 }}
@@ -158,7 +151,7 @@ export default {
diff --git a/src/components/Form/FormFields/Select2.vue b/src/components/Form/FormFields/Select2.vue
index 25f9c53bf..859387128 100644
--- a/src/components/Form/FormFields/Select2.vue
+++ b/src/components/Form/FormFields/Select2.vue
@@ -225,9 +225,6 @@ export default {
handler(newValue, oldValue) {
},
deep: true
- },
- iOptions(val) {
- this.remote = val.length !== 0
}
},
async mounted() {
diff --git a/src/components/Table/TableFormatters/HostInfoFormatter.vue b/src/components/Table/TableFormatters/HostInfoFormatter.vue
index c3e2b918b..749629206 100644
--- a/src/components/Table/TableFormatters/HostInfoFormatter.vue
+++ b/src/components/Table/TableFormatters/HostInfoFormatter.vue
@@ -64,7 +64,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 85f0353b6..c5a965a52 100644
--- a/src/components/Table/TableFormatters/LabelsFormatter.vue
+++ b/src/components/Table/TableFormatters/LabelsFormatter.vue
@@ -27,7 +27,7 @@
@@ -269,4 +269,11 @@ export default {
.tag-tip {
margin-top: 10px;
}
+
+.disabled-link {
+ pointer-events: none;
+ color: grey;
+ cursor: default;
+ text-decoration: none;
+}
diff --git a/src/components/Table/TagSearch/index.vue b/src/components/Table/TagSearch/index.vue
index 8153f0dc2..dc91a13c3 100644
--- a/src/components/Table/TagSearch/index.vue
+++ b/src/components/Table/TagSearch/index.vue
@@ -126,6 +126,7 @@ export default {
filterTags: {
handler() {
this.$emit('tag-search', this.filterMaps)
+ this.$eventBus.$emit('TagSearch', this.filterMaps)
},
deep: true
},
diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json
index a0cd067f7..8fbe7ab65 100644
--- a/src/i18n/langs/en.json
+++ b/src/i18n/langs/en.json
@@ -721,6 +721,7 @@
"BatchActivate": "Batch activate",
"SyncSelected": "Sync selected",
"bulkDeploy": "Bulk deploy",
+ "BulkVerify": "Bulk verify",
"bulkDeleteErrorMsg": "Bulk delete failed: ",
"bulkDeleteSuccessMsg": "Bulk delete success",
"bulkRemoveErrorMsg": "Bulk remove failed: ",
diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json
index 5881ce540..7780045cd 100644
--- a/src/i18n/langs/ja.json
+++ b/src/i18n/langs/ja.json
@@ -717,6 +717,7 @@
"SyncSuccessMsg": "同期に成功しました",
"SyncSelected": "選択した同期",
"bulkDeploy": "一括デプロイ",
+ "BulkVerify": "一括テスト",
"bulkSyncErrorMsg": "一括同期に失敗しました:",
"bulkDeleteErrorMsg": "一括削除に失敗しました:",
"bulkDeleteSuccessMsg": "一括削除に成功しました",
diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json
index 6c2162730..a694ca2e5 100644
--- a/src/i18n/langs/zh.json
+++ b/src/i18n/langs/zh.json
@@ -771,6 +771,7 @@
"BatchActivate": "批量激活",
"SyncSelected": "同步所选",
"bulkDeploy": "批量部署",
+ "BulkVerify": "批量测试",
"bulkDeleteErrorMsg": "批量删除失败: ",
"bulkDeleteSuccessMsg": "批量删除成功",
"bulkRemoveErrorMsg": "批量移除失败: ",
diff --git a/src/i18n/langs/zh_Hant.json b/src/i18n/langs/zh_Hant.json
index 359881b47..c28e13728 100644
--- a/src/i18n/langs/zh_Hant.json
+++ b/src/i18n/langs/zh_Hant.json
@@ -771,6 +771,7 @@
"BatchActivate": "批次啟用",
"SyncSelected": "同步所選",
"bulkDeploy": "批次部署",
+ "BulkVerify": "批次測試",
"bulkDeleteErrorMsg": "批次刪除失敗: ",
"bulkDeleteSuccessMsg": "批次刪除成功",
"bulkRemoveErrorMsg": "批次移除失敗: ",
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 c7e1b4304..3e1cbc475 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/accounts/AccountTemplate/AccountTemplateList.vue b/src/views/accounts/AccountTemplate/AccountTemplateList.vue
index 1487ae57f..2fbdbae61 100644
--- a/src/views/accounts/AccountTemplate/AccountTemplateList.vue
+++ b/src/views/accounts/AccountTemplate/AccountTemplateList.vue
@@ -6,6 +6,7 @@
:account="account"
:show-password-record="false"
:url="secretUrl"
+ type="template"
:visible.sync="showViewSecretDialog"
/>
diff --git a/src/views/assets/Asset/AssetList/components/BaseList.vue b/src/views/assets/Asset/AssetList/components/BaseList.vue
index 67fc28621..1fa963454 100644
--- a/src/views/assets/Asset/AssetList/components/BaseList.vue
+++ b/src/views/assets/Asset/AssetList/components/BaseList.vue
@@ -222,6 +222,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('common.BatchDisable'),
diff --git a/src/views/dashboard/Audit/RightSummary.vue b/src/views/dashboard/Audit/RightSummary.vue
index 8b1f48edb..e16ef5e99 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 c1662ca32..1f98e10f2 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 ae2ca5c02..4c76174b7 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 8bb144668..3ca8eafbe 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 order_params = { params: { order: '-date_created' }}
switch (method) {
case 'post':
this.$store.dispatch('users/addAdminOrg', { id: res.id, name: res.name })
this.$message.success(this.$tc('common.createSuccessMsg'))
- return this.$router.push({ name: 'OrganizationList' })
+ return this.$router.push({ name: 'OrganizationList', ...order_params })
case 'put':
this.$store.dispatch('users/modifyOrg', { id: res.id, name: res.name })
this.$message.success(this.$tc('common.updateSuccessMsg'))
- return this.$router.push({ name: 'OrganizationList' })
+ return this.$router.push({ name: 'OrganizationList', ...order_params })
}
}
}
diff --git a/src/views/tickets/BaseTicketList.vue b/src/views/tickets/BaseTicketList.vue
index 7e0711821..f9cca50b5 100644
--- a/src/views/tickets/BaseTicketList.vue
+++ b/src/views/tickets/BaseTicketList.vue
@@ -137,6 +137,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: [
{
@@ -180,7 +188,7 @@ export default {
},
{
value: 'relevant_command',
- label: this.$t('tickets.RelevantSystemUser')
+ label: this.$t('tickets.ApplyRunCommand')
}
]
},
@@ -193,6 +201,9 @@ export default {
return Object.assign({}, this.defaultTicketActions, this.extraTicketAction)
}
},
+ created() {
+ this.$eventBus.$on('TagSearch', this.handleTagSearchEvent)
+ },
mounted() {
setTimeout(() => {
this.loading = false
@@ -201,6 +212,14 @@ export default {
methods: {
reloadTable() {
this.$refs.ListPage.$refs.ListTable.$refs.ListTable.reloadTable()
+ },
+ handleTagSearchEvent(tags) {
+ if (tags.hasOwnProperty('state')) {
+ const delimiter = this.url.indexOf('?') === -1 ? '?' : '&'
+ this.ticketTableConfig.url = `${this.url}${delimiter}state=${tags.state}`
+ } else {
+ this.ticketTableConfig.url = this.url
+ }
}
}
}