mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-30 04:03:49 +00:00
commit
0a3dc30c85
@ -10,3 +10,4 @@ jobs:
|
||||
- uses: jumpserver/action-generic-handler@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
|
||||
I18N_TOKEN: ${{ secrets.I18N_TOKEN }}
|
||||
|
@ -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 &&
|
||||
|
@ -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'))
|
||||
})
|
||||
},
|
||||
|
@ -7,18 +7,11 @@
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio v-model="radioValue" :label="2">
|
||||
{{ this.$t('common.CronTab.from') }}
|
||||
<el-input-number v-model="cycle01" :max="60" :min="0" size="mini" /> -
|
||||
<el-input-number v-model="cycle02" :max="60" :min="0" size="mini" /> {{ this.$t('common.CronTab.min') }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio v-model="radioValue" :label="3">
|
||||
{{ this.$t('common.CronTab.from') }}
|
||||
<el-input-number v-model="average02" :max="60" :min="1" size="mini" /> {{ this.$t('common.CronTab.min') }}{{ this.$t('common.CronTab.executeOnce') }}
|
||||
<el-input-number v-model="average02" :max="60" :min="1" size="mini" />
|
||||
{{ this.$t('common.CronTab.min') }}{{ this.$t('common.CronTab.executeOnce') }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
@ -33,7 +26,7 @@
|
||||
size="small"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-option v-for="item in 60" :key="item" :value="item-1">{{ item-1 }}</el-option>
|
||||
<el-option v-for="item in 60" :key="item" :value="item-1">{{ item - 1 }}</el-option>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
@ -158,7 +151,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-form-item--small.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.el-form-item--small.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -225,9 +225,6 @@ export default {
|
||||
handler(newValue, oldValue) {
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
iOptions(val) {
|
||||
this.remote = val.length !== 0
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
@ -64,7 +64,7 @@ export default {
|
||||
}
|
||||
return text
|
||||
}
|
||||
return '-'
|
||||
return this.items?.distribution || '-'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
</a>
|
||||
<a
|
||||
v-if="formatterArgs.showEditBtn"
|
||||
class="edit-btn"
|
||||
:class="[{ 'disabled-link': this.$store.getters.currentOrgIsRoot },'edit-btn']"
|
||||
style="padding-left: 5px"
|
||||
@click="showDialog = true"
|
||||
>
|
||||
@ -269,4 +269,11 @@ export default {
|
||||
.tag-tip {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.disabled-link {
|
||||
pointer-events: none;
|
||||
color: grey;
|
||||
cursor: default;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
@ -126,6 +126,7 @@ export default {
|
||||
filterTags: {
|
||||
handler() {
|
||||
this.$emit('tag-search', this.filterMaps)
|
||||
this.$eventBus.$emit('TagSearch', this.filterMaps)
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
|
@ -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: ",
|
||||
|
@ -717,6 +717,7 @@
|
||||
"SyncSuccessMsg": "同期に成功しました",
|
||||
"SyncSelected": "選択した同期",
|
||||
"bulkDeploy": "一括デプロイ",
|
||||
"BulkVerify": "一括テスト",
|
||||
"bulkSyncErrorMsg": "一括同期に失敗しました:",
|
||||
"bulkDeleteErrorMsg": "一括削除に失敗しました:",
|
||||
"bulkDeleteSuccessMsg": "一括削除に成功しました",
|
||||
|
@ -771,6 +771,7 @@
|
||||
"BatchActivate": "批量激活",
|
||||
"SyncSelected": "同步所选",
|
||||
"bulkDeploy": "批量部署",
|
||||
"BulkVerify": "批量测试",
|
||||
"bulkDeleteErrorMsg": "批量删除失败: ",
|
||||
"bulkDeleteSuccessMsg": "批量删除成功",
|
||||
"bulkRemoveErrorMsg": "批量移除失败: ",
|
||||
|
@ -771,6 +771,7 @@
|
||||
"BatchActivate": "批次啟用",
|
||||
"SyncSelected": "同步所選",
|
||||
"bulkDeploy": "批次部署",
|
||||
"BulkVerify": "批次測試",
|
||||
"bulkDeleteErrorMsg": "批次刪除失敗: ",
|
||||
"bulkDeleteSuccessMsg": "批次刪除成功",
|
||||
"bulkRemoveErrorMsg": "批次移除失敗: ",
|
||||
|
BIN
src/styles/icons/dameng.png
Normal file
BIN
src/styles/icons/dameng.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -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;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
:account="account"
|
||||
:show-password-record="false"
|
||||
:url="secretUrl"
|
||||
type="template"
|
||||
:visible.sync="showViewSecretDialog"
|
||||
/>
|
||||
</div>
|
||||
|
@ -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'),
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user