mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 02:31:43 +00:00
@@ -2,7 +2,6 @@
|
|||||||
<div class="c-weektime">
|
<div class="c-weektime">
|
||||||
<div class="c-schedue" />
|
<div class="c-schedue" />
|
||||||
<div :class="{'c-schedue': true, 'c-schedue-notransi': mode}" :style="styleValue" />
|
<div :class="{'c-schedue': true, 'c-schedue-notransi': mode}" :style="styleValue" />
|
||||||
|
|
||||||
<table class="c-weektime-table" :class="{'c-min-table': colspan < 2}">
|
<table class="c-weektime-table" :class="{'c-min-table': colspan < 2}">
|
||||||
<thead class="c-weektime-head">
|
<thead class="c-weektime-head">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -34,6 +33,7 @@
|
|||||||
<div class="g-clearfix c-weektime-con">
|
<div class="g-clearfix c-weektime-con">
|
||||||
<span class="g-pull-left">{{ this.$t('common.WeekCronSelect.CanDragSelect') }}</span>
|
<span class="g-pull-left">{{ this.$t('common.WeekCronSelect.CanDragSelect') }}</span>
|
||||||
<a class="g-pull-right" @click.prevent="clearWeektime">{{ this.$t('common.WeekCronSelect.ClearSelection') }}</a>
|
<a class="g-pull-right" @click.prevent="clearWeektime">{{ this.$t('common.WeekCronSelect.ClearSelection') }}</a>
|
||||||
|
<a class="g-pull-right g-pull-margin" @click.prevent="selectAll">{{ this.$t('common.WeekCronSelect.SelectAll') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -221,6 +221,15 @@ export default {
|
|||||||
this.timeRange = []
|
this.timeRange = []
|
||||||
this.$emit('change', this.timeRange)
|
this.$emit('change', this.timeRange)
|
||||||
},
|
},
|
||||||
|
// 全选
|
||||||
|
selectAll() {
|
||||||
|
this.weektimeData.forEach(item => {
|
||||||
|
item.child.forEach(t => {
|
||||||
|
this.$set(t, 'check', true)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.setTimeRange()
|
||||||
|
},
|
||||||
setTimeRange() {
|
setTimeRange() {
|
||||||
this.timeRange = this.weektimeData.map(item => {
|
this.timeRange = this.weektimeData.map(item => {
|
||||||
return {
|
return {
|
||||||
@@ -301,7 +310,6 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
.c-weektime {
|
.c-weektime {
|
||||||
min-width: 640px;
|
min-width: 640px;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -392,6 +400,9 @@ export default {
|
|||||||
float: right;
|
float: right;
|
||||||
color: #409eff!important;
|
color: #409eff!important;
|
||||||
}
|
}
|
||||||
|
.g-pull-margin {
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
.g-tip-text {
|
.g-tip-text {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<IBox v-bind="$attrs">
|
<IBox v-bind="$attrs">
|
||||||
<div class="ibox-heading">
|
<div v-if="contentHeading" class="ibox-heading">
|
||||||
<slot name="content-heading">
|
<slot name="content-heading">
|
||||||
<h3 v-if="contentHeading.title"><i v-if="contentHeading.fa" :class="'fa ' + contentHeading.fa" /> {{ contentHeading.title }}</h3>
|
<h3 v-if="contentHeading.title"><i v-if="contentHeading.fa" :class="'fa ' + contentHeading.fa" /> {{ contentHeading.title }}</h3>
|
||||||
<small v-if="contentHeading.content"><i class="fa fa-tim" /> {{ contentHeading.content }}</small>
|
<small v-if="contentHeading.content"><i class="fa fa-tim" /> {{ contentHeading.content }}</small>
|
||||||
@@ -18,7 +18,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
contentHeading: {
|
contentHeading: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -441,6 +441,7 @@
|
|||||||
"Saturday": "星期六",
|
"Saturday": "星期六",
|
||||||
"Sunday": "星期天",
|
"Sunday": "星期天",
|
||||||
"ClearSelection": "清空选择",
|
"ClearSelection": "清空选择",
|
||||||
|
"SelectAll": "全选",
|
||||||
"CanDragSelect": "可拖动鼠标选择时间段",
|
"CanDragSelect": "可拖动鼠标选择时间段",
|
||||||
"WeekOrTime": "星期/时间"
|
"WeekOrTime": "星期/时间"
|
||||||
},
|
},
|
||||||
|
@@ -464,6 +464,7 @@
|
|||||||
"Saturday": "Saturday",
|
"Saturday": "Saturday",
|
||||||
"Sunday": "Sunday",
|
"Sunday": "Sunday",
|
||||||
"ClearSelection": "Clear selection",
|
"ClearSelection": "Clear selection",
|
||||||
|
"SelectAll": "Select all",
|
||||||
"CanDragSelect": "Can drag the mouse to select a time period",
|
"CanDragSelect": "Can drag the mouse to select a time period",
|
||||||
"WeekOrTime": "Week/Time"
|
"WeekOrTime": "Week/Time"
|
||||||
}
|
}
|
||||||
|
@@ -186,6 +186,7 @@ export default {
|
|||||||
const url = this.validActions.detailApiUrl
|
const url = this.validActions.detailApiUrl
|
||||||
return this.$axios.get(url, { disableFlashErrorMsg: true }).then(data => {
|
return this.$axios.get(url, { disableFlashErrorMsg: true }).then(data => {
|
||||||
this.$emit('update:object', data)
|
this.$emit('update:object', data)
|
||||||
|
this.$emit('getObjectDone', data)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.response && error.response.status === 404) {
|
if (error.response && error.response.status === 404) {
|
||||||
const msg = this.$t('common.ObjectNotFoundOrDeletedMsg')
|
const msg = this.$t('common.ObjectNotFoundOrDeletedMsg')
|
||||||
|
@@ -61,8 +61,7 @@ export default {
|
|||||||
},
|
},
|
||||||
showTickets() {
|
showTickets() {
|
||||||
return this.publicSettings.TICKETS_ENABLED &&
|
return this.publicSettings.TICKETS_ENABLED &&
|
||||||
this.publicSettings.XPACK_LICENSE_IS_VALID &&
|
this.publicSettings['XPACK_LICENSE_IS_VALID']
|
||||||
!this.isOrgAuditor
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@@ -167,7 +167,8 @@ export const allRoleRoutes = [
|
|||||||
children: TicketsRoutes,
|
children: TicketsRoutes,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
licenseRequired: true
|
licenseRequired: true,
|
||||||
|
permissions: [rolec.PERM_AUDIT]
|
||||||
// hidden: ({ settings }) => {
|
// hidden: ({ settings }) => {
|
||||||
// return !settings.TICKETS_ENABLED
|
// return !settings.TICKETS_ENABLED
|
||||||
// }
|
// }
|
||||||
|
@@ -1,61 +1,71 @@
|
|||||||
import i18n from '@/i18n/i18n'
|
import i18n from '@/i18n/i18n'
|
||||||
import empty from '@/layout/empty'
|
import empty from '@/layout/empty'
|
||||||
|
import rolec from '@/utils/role'
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: 'tickets',
|
path: 'tickets',
|
||||||
name: 'TicketList',
|
component: empty,
|
||||||
component: () => import('@/views/tickets/TicketList'),
|
meta: { permissions: [rolec.PERM_AUDIT] },
|
||||||
meta: { title: i18n.t('route.Tickets'), icon: 'check-square-o', activeMenu: '/tickets/tickets' },
|
hidden: true,
|
||||||
hidden: true
|
redirect: '',
|
||||||
},
|
children: [
|
||||||
{
|
{
|
||||||
path: 'tickets/:id',
|
path: '',
|
||||||
name: 'TicketDetail',
|
name: 'TicketList',
|
||||||
component: () => import('@/views/tickets/TicketDetail/index'),
|
component: () => import('@/views/tickets/TicketList'),
|
||||||
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets/tickets' },
|
meta: { title: i18n.t('route.Tickets'), icon: 'check-square-o', activeMenu: '/tickets/tickets', permissions: [rolec.PERM_AUDIT] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tickets/request-asset-perm/create',
|
path: 'request-asset-perm/create',
|
||||||
name: 'RequestAssetPermTicketCreateUpdate',
|
name: 'RequestAssetPermTicketCreateUpdate',
|
||||||
component: () => import('@/views/tickets/RequestAssetPerm/RequestAssetPermTicketCreateUpdate'),
|
component: () => import('@/views/tickets/RequestAssetPerm/CreateUpdate'),
|
||||||
meta: { title: i18n.t('route.TicketCreate'), activeMenu: '/tickets/tickets' },
|
meta: { title: i18n.t('route.TicketCreate'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_AUDIT] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tickets/request-asset-perm/:id',
|
path: 'request-asset-perm/:id',
|
||||||
name: 'AssetsTicketDetail',
|
name: 'AssetsTicketDetail',
|
||||||
component: () => import('@/views/tickets/RequestAssetPerm/Detail/index'),
|
component: () => import('@/views/tickets/RequestAssetPerm/Detail/index'),
|
||||||
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets/tickets' },
|
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_AUDIT] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tickets/login-asset-confirm/:id',
|
path: 'login-asset-confirm/:id',
|
||||||
name: 'loginAssetTicketDetail',
|
name: 'LoginAssetTicketDetail',
|
||||||
component: () => import('@/views/tickets/LoginAssetConfirm/Detail/index'),
|
component: () => import('@/views/tickets/LoginAssetConfirm/Detail/index'),
|
||||||
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets/tickets' },
|
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_AUDIT] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tickets/request-application-perm/create',
|
path: 'request-application-perm/create',
|
||||||
name: 'RequestApplicationPermTicketCreateUpdate',
|
name: 'RequestApplicationPermTicketCreateUpdate',
|
||||||
component: () => import('@/views/tickets/RequestApplicationPerm/RequestApplicationPermTicketCreateUpdate'),
|
component: () => import('@/views/tickets/RequestApplicationPerm/CreateUpdate'),
|
||||||
meta: { title: i18n.t('route.TicketCreate'), activeMenu: '/tickets/tickets' },
|
meta: { title: i18n.t('route.TicketCreate'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_AUDIT] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tickets/request-application-perm/:id',
|
path: 'request-application-perm/:id',
|
||||||
name: 'AppsTicketDetail',
|
name: 'AppsTicketDetail',
|
||||||
component: () => import('@/views/tickets/RequestApplicationPerm/Detail/index'),
|
component: () => import('@/views/tickets/RequestApplicationPerm/Detail/index'),
|
||||||
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets/tickets' },
|
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_AUDIT] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tickets/command-confirm/:id',
|
path: 'command-confirm/:id',
|
||||||
name: 'CommandConfirmDetail',
|
name: 'CommandConfirmDetail',
|
||||||
component: () => import('@/views/tickets/CommandConfirm/Detail/index'),
|
component: () => import('@/views/tickets/CommandConfirm/Detail/index'),
|
||||||
meta: { title: i18n.t('route.CommandConfirm'), activeMenu: '/tickets/tickets' },
|
meta: { title: i18n.t('route.CommandConfirm'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_AUDIT] },
|
||||||
hidden: true
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':id',
|
||||||
|
name: 'TicketDetail',
|
||||||
|
component: () => import('@/views/tickets/TicketDetail/index'),
|
||||||
|
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_AUDIT] },
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'flows',
|
path: 'flows',
|
||||||
|
@@ -92,7 +92,7 @@ export default [
|
|||||||
{
|
{
|
||||||
path: 'tickets/request-asset-perm/create',
|
path: 'tickets/request-asset-perm/create',
|
||||||
name: 'RequestAssetPermTicketCreateUpdate',
|
name: 'RequestAssetPermTicketCreateUpdate',
|
||||||
component: () => import('@/views/tickets/RequestAssetPerm/RequestAssetPermTicketCreateUpdate'),
|
component: () => import('@/views/tickets/RequestAssetPerm/CreateUpdate'),
|
||||||
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets', permissions: [rolec.PERM_USE] },
|
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets', permissions: [rolec.PERM_USE] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
@@ -105,7 +105,7 @@ export default [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tickets/login-asset-confirm/:id',
|
path: 'tickets/login-asset-confirm/:id',
|
||||||
name: 'loginAssetTicketDetail',
|
name: 'LoginAssetTicketDetail',
|
||||||
component: () => import('@/views/tickets/LoginAssetConfirm/Detail/index'),
|
component: () => import('@/views/tickets/LoginAssetConfirm/Detail/index'),
|
||||||
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets', permissions: [rolec.PERM_USE] },
|
meta: { title: i18n.t('route.TicketDetail'), activeMenu: '/tickets', permissions: [rolec.PERM_USE] },
|
||||||
hidden: true
|
hidden: true
|
||||||
@@ -113,7 +113,7 @@ export default [
|
|||||||
{
|
{
|
||||||
path: 'tickets/request-application-perm/create',
|
path: 'tickets/request-application-perm/create',
|
||||||
name: 'RequestApplicationPermTicketCreateUpdate',
|
name: 'RequestApplicationPermTicketCreateUpdate',
|
||||||
component: () => import('@/views/tickets/RequestApplicationPerm/RequestApplicationPermTicketCreateUpdate'),
|
component: () => import('@/views/tickets/RequestApplicationPerm/CreateUpdate'),
|
||||||
meta: { title: i18n.t('route.TicketCreate'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_USE] },
|
meta: { title: i18n.t('route.TicketCreate'), activeMenu: '/tickets/tickets', permissions: [rolec.PERM_USE] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
@@ -75,7 +75,7 @@ function cleanDateStr(d) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function toSafeLocalDateStr(d) {
|
export function toSafeLocalDateStr(d) {
|
||||||
if (d === '') {
|
if (d === '' || d === null) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
const date = safeDate(d)
|
const date = safeDate(d)
|
||||||
|
@@ -183,21 +183,13 @@ function getFields() {
|
|||||||
type: 'switch'
|
type: 'switch'
|
||||||
}
|
}
|
||||||
|
|
||||||
// const crontab = {
|
|
||||||
// label: i18n.t('xpack.RegularlyPerform'),
|
|
||||||
// hidden: (formValue) => {
|
|
||||||
// return formValue.is_periodic === false
|
|
||||||
// },
|
|
||||||
// helpText: i18n.t('xpack.HelpText.CrontabOfCreateUpdatePage')
|
|
||||||
// }
|
|
||||||
|
|
||||||
const crontab = {
|
const crontab = {
|
||||||
type: 'cronTab',
|
type: 'cronTab',
|
||||||
component: CronTab,
|
component: CronTab,
|
||||||
rules: [
|
|
||||||
{ required: false }
|
|
||||||
],
|
|
||||||
label: i18n.t('xpack.RegularlyPerform'),
|
label: i18n.t('xpack.RegularlyPerform'),
|
||||||
|
hidden: (formValue) => {
|
||||||
|
return formValue.is_periodic === false
|
||||||
|
},
|
||||||
helpText: i18n.t('xpack.HelpText.CrontabOfCreateUpdatePage')
|
helpText: i18n.t('xpack.HelpText.CrontabOfCreateUpdatePage')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,18 +4,20 @@
|
|||||||
<DetailCard :items="detailCardItems" />
|
<DetailCard :items="detailCardItems" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<!-- <RelationCard ref="RelationCard" type="info" v-bind="nodeRelationConfig" />-->
|
<QuickActions type="primary" :actions="quickActions" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DetailCard from '@/components/DetailCard'
|
import DetailCard from '@/components/DetailCard'
|
||||||
|
import QuickActions from '@/components/QuickActions'
|
||||||
import { toSafeLocalDateStr } from '@/utils/common'
|
import { toSafeLocalDateStr } from '@/utils/common'
|
||||||
export default {
|
export default {
|
||||||
name: 'Detail',
|
name: 'Detail',
|
||||||
components: {
|
components: {
|
||||||
DetailCard
|
DetailCard,
|
||||||
|
QuickActions
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
object: {
|
object: {
|
||||||
@@ -50,6 +52,27 @@ export default {
|
|||||||
this.$refs.RelationCard.$refs.select2.clearSelected()
|
this.$refs.RelationCard.$refs.select2.clearSelected()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
quickActions: [
|
||||||
|
{
|
||||||
|
title: this.$t('common.Active'),
|
||||||
|
type: 'switcher',
|
||||||
|
attrs: {
|
||||||
|
model: this.object.is_active
|
||||||
|
},
|
||||||
|
callbacks: {
|
||||||
|
change: function(val) {
|
||||||
|
this.$axios.patch(
|
||||||
|
`/api/v1/acls/login-acls/${this.object.id}/`,
|
||||||
|
{ is_active: val }
|
||||||
|
).then(res => {
|
||||||
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
|
}).catch(err => {
|
||||||
|
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
||||||
|
})
|
||||||
|
}.bind(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
dataVal: []
|
dataVal: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -99,49 +122,56 @@ export default {
|
|||||||
const arrs = this.object.rules.time_period
|
const arrs = this.object.rules.time_period
|
||||||
for (let i = 0; i < arrs.length; i++) {
|
for (let i = 0; i < arrs.length; i++) {
|
||||||
const cur = arrs[i]
|
const cur = arrs[i]
|
||||||
if (cur.value.length > 0) {
|
let timeStr = cur.value
|
||||||
|
if (timeStr.length > 0) {
|
||||||
|
const startTime = timeStr.substr(0, cur.value.length - 5)
|
||||||
|
let lastTime = timeStr.substr(-5, 5)
|
||||||
let obj = {}
|
let obj = {}
|
||||||
|
if (lastTime.indexOf('00:00') !== -1) {
|
||||||
|
lastTime = '24:00'
|
||||||
|
}
|
||||||
|
timeStr = startTime + lastTime
|
||||||
switch (cur.id) {
|
switch (cur.id) {
|
||||||
case 0:
|
case 0:
|
||||||
obj = {
|
obj = {
|
||||||
key: this.$t('common.WeekCronSelect.Sunday'),
|
key: this.$t('common.WeekCronSelect.Sunday'),
|
||||||
value: cur.value
|
value: timeStr
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
obj = {
|
obj = {
|
||||||
key: this.$t('common.WeekCronSelect.Monday'),
|
key: this.$t('common.WeekCronSelect.Monday'),
|
||||||
value: cur.value
|
value: timeStr
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
obj = {
|
obj = {
|
||||||
key: this.$t('common.WeekCronSelect.Tuesday'),
|
key: this.$t('common.WeekCronSelect.Tuesday'),
|
||||||
value: cur.value
|
value: timeStr
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
obj = {
|
obj = {
|
||||||
key: this.$t('common.WeekCronSelect.Wednesday'),
|
key: this.$t('common.WeekCronSelect.Wednesday'),
|
||||||
value: cur.value
|
value: timeStr
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 4:
|
case 4:
|
||||||
obj = {
|
obj = {
|
||||||
key: this.$t('common.WeekCronSelect.Thursday'),
|
key: this.$t('common.WeekCronSelect.Thursday'),
|
||||||
value: cur.value
|
value: timeStr
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 5:
|
case 5:
|
||||||
obj = {
|
obj = {
|
||||||
key: this.$t('common.WeekCronSelect.Friday'),
|
key: this.$t('common.WeekCronSelect.Friday'),
|
||||||
value: cur.value
|
value: timeStr
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 6:
|
case 6:
|
||||||
obj = {
|
obj = {
|
||||||
key: this.$t('common.WeekCronSelect.Saturday'),
|
key: this.$t('common.WeekCronSelect.Saturday'),
|
||||||
value: cur.value
|
value: timeStr
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@@ -30,7 +30,12 @@ export default {
|
|||||||
],
|
],
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
type: {
|
type: {
|
||||||
readonly: true
|
type: 'select',
|
||||||
|
options: [{
|
||||||
|
label: appType,
|
||||||
|
value: appType
|
||||||
|
}],
|
||||||
|
disabled: true
|
||||||
},
|
},
|
||||||
attrs: {
|
attrs: {
|
||||||
fields: fieldsMap,
|
fields: fieldsMap,
|
||||||
|
@@ -67,6 +67,9 @@ export default {
|
|||||||
headerActions: {
|
headerActions: {
|
||||||
hasCreate: false,
|
hasCreate: false,
|
||||||
createRoute: 'SystemUserCreate',
|
createRoute: 'SystemUserCreate',
|
||||||
|
searchConfig: {
|
||||||
|
exclude: ['type']
|
||||||
|
},
|
||||||
moreCreates: {
|
moreCreates: {
|
||||||
callback: (option) => {
|
callback: (option) => {
|
||||||
vm.$router.push({ name: 'SystemUserCreate', query: { protocol: option.title.toLowerCase() }})
|
vm.$router.push({ name: 'SystemUserCreate', query: { protocol: option.title.toLowerCase() }})
|
||||||
|
@@ -88,8 +88,19 @@ export default {
|
|||||||
},
|
},
|
||||||
headerActions: {
|
headerActions: {
|
||||||
hasLeftActions: false,
|
hasLeftActions: false,
|
||||||
|
hasColumnSetting: false,
|
||||||
hasImport: false,
|
hasImport: false,
|
||||||
hasExport: false
|
hasExport: false,
|
||||||
|
searchConfig: {
|
||||||
|
exclude: ['id', 'asset', 'commandexecution'],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: this.$t('audits.Hosts'),
|
||||||
|
value: 'asset_display'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
hasSearch: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
headerActions: {
|
headerActions: {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<HeadingIBox :title="title" :content-heading="contentHeading">
|
<HeadingIBox :title="title">
|
||||||
<div v-if="dates_login_record_top10_sessions.length > 0" class="feed-activity-list">
|
<div v-if="dates_login_record_top10_sessions.length > 0" class="feed-activity-list">
|
||||||
<div v-for="(item, index ) of dates_login_record_top10_sessions" :key="item.user + index" class="feed-element">
|
<div v-for="(item, index ) of dates_login_record_top10_sessions" :key="item.user + index" class="feed-element">
|
||||||
<a href="#" class="pull-left">
|
<a href="#" class="pull-left">
|
||||||
@@ -26,10 +26,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
title: this.$t('dashboard.LatestSessions10'),
|
title: this.$t('dashboard.LatestSessions10'),
|
||||||
avatarUrl: require('@/assets/img/admin.png'),
|
avatarUrl: require('@/assets/img/admin.png'),
|
||||||
contentHeading: {
|
|
||||||
title: this.$t('dashboard.LatestTop10'),
|
|
||||||
content: this.$t('dashboard.LatestSessions')
|
|
||||||
},
|
|
||||||
dates_login_record_top10_sessions: []
|
dates_login_record_top10_sessions: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -35,6 +35,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
title: this.$t('common.Announcement'),
|
title: this.$t('common.Announcement'),
|
||||||
visible: false,
|
visible: false,
|
||||||
|
enableField: 'ANNOUNCEMENT_ENABLED',
|
||||||
config: {
|
config: {
|
||||||
fields: [
|
fields: [
|
||||||
['', ['ANNOUNCEMENT_ENABLED', 'ANNOUNCEMENT']]
|
['', ['ANNOUNCEMENT_ENABLED', 'ANNOUNCEMENT']]
|
||||||
|
@@ -31,7 +31,7 @@ export default {
|
|||||||
visible: false,
|
visible: false,
|
||||||
fields: [
|
fields: [
|
||||||
'EMAIL_CUSTOM_USER_CREATED_SUBJECT', 'EMAIL_CUSTOM_USER_CREATED_HONORIFIC',
|
'EMAIL_CUSTOM_USER_CREATED_SUBJECT', 'EMAIL_CUSTOM_USER_CREATED_HONORIFIC',
|
||||||
'EMAIL_CUSTOM_USER_CREATED_BODY', 'EMAIL_CUSTOM_USER_CREATED_SIGNATURE'
|
'EMAIL_CUSTOM_USER_CREATED_BODY'
|
||||||
],
|
],
|
||||||
successUrl: { name: 'Settings', params: { activeMenu: 'EmailContent' }},
|
successUrl: { name: 'Settings', params: { activeMenu: 'EmailContent' }},
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
|
@@ -58,7 +58,19 @@ export default {
|
|||||||
submitMethod() {
|
submitMethod() {
|
||||||
return 'patch'
|
return 'patch'
|
||||||
},
|
},
|
||||||
onConfirm() {}
|
onConfirm() {},
|
||||||
|
cleanFormValue(data) {
|
||||||
|
if (!data['EMAIL_HOST_PASSWORD']) {
|
||||||
|
delete data['EMAIL_HOST_PASSWORD']
|
||||||
|
}
|
||||||
|
if (data['EMAIL_USE_SSL'] === null) {
|
||||||
|
delete data['EMAIL_USE_SSL']
|
||||||
|
}
|
||||||
|
if (data['EMAIL_USE_TLS'] === null) {
|
||||||
|
delete data['EMAIL_USE_TLS']
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@@ -66,7 +66,7 @@ export default {
|
|||||||
apply_applications: {
|
apply_applications: {
|
||||||
type: 'assetSelect',
|
type: 'assetSelect',
|
||||||
component: Select2,
|
component: Select2,
|
||||||
label: this.$t('perms.Asset'),
|
label: this.$t('applications.App'),
|
||||||
el: {
|
el: {
|
||||||
value: [],
|
value: [],
|
||||||
ajax: {
|
ajax: {
|
||||||
@@ -80,7 +80,7 @@ export default {
|
|||||||
apply_system_users: {
|
apply_system_users: {
|
||||||
type: 'systemUserSelect',
|
type: 'systemUserSelect',
|
||||||
component: Select2,
|
component: Select2,
|
||||||
label: '系统用户',
|
label: this.$t('assets.SystemUser'),
|
||||||
el: {
|
el: {
|
||||||
value: [],
|
value: [],
|
||||||
ajax: {
|
ajax: {
|
@@ -70,7 +70,7 @@ export default {
|
|||||||
apply_system_users: {
|
apply_system_users: {
|
||||||
type: 'systemUserSelect',
|
type: 'systemUserSelect',
|
||||||
component: Select2,
|
component: Select2,
|
||||||
label: '系统用户',
|
label: this.$t('assets.SystemUser'),
|
||||||
el: {
|
el: {
|
||||||
value: [],
|
value: [],
|
||||||
ajax: {
|
ajax: {
|
@@ -34,8 +34,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getObjectName() {
|
getObjectName() {
|
||||||
return this.ticket.title
|
return this.ticket.title
|
||||||
|
@@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericDetailPage :object.sync="ticket" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners">
|
<GenericDetailPage
|
||||||
|
:object.sync="ticket"
|
||||||
|
:active-menu.sync="config.activeMenu"
|
||||||
|
v-bind="config"
|
||||||
|
@getObjectDone="afterGetTicket"
|
||||||
|
v-on="$listeners"
|
||||||
|
>
|
||||||
<component :is="config.activeMenu" :object="ticket" />
|
<component :is="config.activeMenu" :object="ticket" />
|
||||||
</GenericDetailPage>
|
</GenericDetailPage>
|
||||||
</template>
|
</template>
|
||||||
@@ -40,6 +46,21 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getObjectName() {
|
getObjectName() {
|
||||||
return this.ticket.title
|
return this.ticket.title
|
||||||
|
},
|
||||||
|
afterGetTicket(ticket) {
|
||||||
|
const ticketRouteMapper = {
|
||||||
|
'apply_asset': 'AssetsTicketDetail',
|
||||||
|
'apply_application': 'AppsTicketDetail',
|
||||||
|
'login_confirm': 'LoginAssetTicketDetail',
|
||||||
|
'login_asset_confirm': 'CommandConfirmDetail'
|
||||||
|
}
|
||||||
|
const routeName = ticketRouteMapper[ticket.type]
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$router.push({
|
||||||
|
name: routeName,
|
||||||
|
params: { id: this.$route.params['id'] }
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,7 @@ export default {
|
|||||||
} else if (row.type === 'apply_application') {
|
} else if (row.type === 'apply_application') {
|
||||||
return 'AppsTicketDetail'
|
return 'AppsTicketDetail'
|
||||||
} else if (row.type === 'login_asset_confirm') {
|
} else if (row.type === 'login_asset_confirm') {
|
||||||
return 'loginAssetTicketDetail'
|
return 'LoginAssetTicketDetail'
|
||||||
} else if (row.type === 'command_confirm') {
|
} else if (row.type === 'command_confirm') {
|
||||||
return 'CommandConfirmDetail'
|
return 'CommandConfirmDetail'
|
||||||
} else {
|
} else {
|
||||||
@@ -71,7 +71,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'action',
|
prop: 'state',
|
||||||
label: this.$t('tickets.action'),
|
label: this.$t('tickets.action'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '90px',
|
width: '90px',
|
||||||
|
@@ -31,7 +31,7 @@ export default {
|
|||||||
width: '140px'
|
width: '140px'
|
||||||
},
|
},
|
||||||
asset: {
|
asset: {
|
||||||
label: '资产',
|
label: this.$t('assets.Asset'),
|
||||||
formatter(row) {
|
formatter(row) {
|
||||||
return row.attrs.host || row.attrs.hostname
|
return row.attrs.host || row.attrs.hostname
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user