mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-08 10:33:57 +00:00
Compare commits
24 Commits
revert-519
...
v2.26
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02d1ab25a0 | ||
|
|
5408057c05 | ||
|
|
bb640f63a3 | ||
|
|
7f0df48bb0 | ||
|
|
0225ea95fb | ||
|
|
c599a6aa21 | ||
|
|
7f34195ae4 | ||
|
|
b23950aefd | ||
|
|
49880f6739 | ||
|
|
e6f98d58c4 | ||
|
|
fd1f16d43c | ||
|
|
968b2415b1 | ||
|
|
776090d6ba | ||
|
|
3a37952288 | ||
|
|
62b8fc0e3b | ||
|
|
b2028869cb | ||
|
|
5277a725f8 | ||
|
|
f137788c1a | ||
|
|
f7d17c8de7 | ||
|
|
feea70b0be | ||
|
|
04696ef3d6 | ||
|
|
1731f4f788 | ||
|
|
6f25d93909 | ||
|
|
46461ec324 |
@@ -32,7 +32,7 @@
|
||||
"element-ui": "2.13.2",
|
||||
"eslint-plugin-html": "^6.0.0",
|
||||
"install": "^0.13.0",
|
||||
"jquery": "^3.5.0",
|
||||
"jquery": "^3.6.1",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsencrypt": "^3.2.1",
|
||||
"krry-transfer": "^1.7.3",
|
||||
|
||||
@@ -15,6 +15,16 @@ export default [
|
||||
permissions: []
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/ops/ansible/task/:id/log/',
|
||||
component: () => import('@/views/ops/CeleryTaskLog'),
|
||||
name: 'AnsibleTaskLog',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('route.CeleryTaskLog'),
|
||||
permissions: []
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/ops/task/task/:id/log/',
|
||||
component: () => import('@/views/ops/CeleryTaskLog'),
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import empty from '@/layout/empty'
|
||||
import i18n from '@/i18n/i18n'
|
||||
|
||||
const activateMenu = '/console/assets/assets'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: 'cloud',
|
||||
@@ -20,7 +22,7 @@ export default [
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('xpack.Cloud.CloudSync'),
|
||||
activeMenu: '/console/assets/assets'
|
||||
activeMenu: activateMenu
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -71,6 +73,7 @@ export default [
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('xpack.Cloud.AccountDetail'),
|
||||
activeMenu: activateMenu,
|
||||
permissions: ['xpack.view_account']
|
||||
}
|
||||
}
|
||||
@@ -121,7 +124,8 @@ export default [
|
||||
name: 'SyncInstanceTaskDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('xpack.Cloud.SyncInstanceTaskDetail')
|
||||
title: i18n.t('xpack.Cloud.SyncInstanceTaskDetail'),
|
||||
activeMenu: activateMenu
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -302,3 +302,8 @@ export function groupedDropdownToCascader(group) {
|
||||
|
||||
export { BASE_URL }
|
||||
|
||||
export function openWindow(url, name = '', iWidth = 900, iHeight = 600) {
|
||||
var iTop = (window.screen.height - 30 - iHeight) / 2
|
||||
var iLeft = (window.screen.width - 10 - iWidth) / 2
|
||||
window.open(url, name, 'height=' + iHeight + ',width=' + iWidth + ',top=' + iTop + ',left=' + iLeft)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import store from '@/store'
|
||||
import { constantRoutes } from '@/router'
|
||||
import { openWindow } from './common'
|
||||
|
||||
export function openTaskPage(taskId) {
|
||||
window.open(`/#/ops/celery/task/${taskId}/log/`, '', 'width=900,height=600')
|
||||
export function openTaskPage(taskId, taskType) {
|
||||
taskType = taskType || 'celery'
|
||||
openWindow(`/#/ops/${taskType}/task/${taskId}/log/?type=${taskType}`)
|
||||
}
|
||||
|
||||
export function checkPermission(permsRequired, permsAll) {
|
||||
|
||||
2
src/utils/jquery-vendor.js
vendored
2
src/utils/jquery-vendor.js
vendored
@@ -1,4 +1,4 @@
|
||||
import $ from 'jquery'
|
||||
import $ from 'jquery/dist/jquery.min.js'
|
||||
window.$ = $
|
||||
window.jQuery = $
|
||||
export default $
|
||||
|
||||
@@ -38,6 +38,7 @@ export default {
|
||||
},
|
||||
tableConfig: {
|
||||
url: `/api/v1/xpack/cloud/sync-instance-tasks/${this.object.id}/instances/`,
|
||||
hasSelection: false,
|
||||
columns: [
|
||||
'instance_id',
|
||||
{
|
||||
|
||||
@@ -58,10 +58,7 @@ export default {
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
permissions: 'xpack.view_syncinstancedetail',
|
||||
route: 'SyncInstanceTaskDetail',
|
||||
routeQuery: {
|
||||
activeTab: 'detail'
|
||||
}
|
||||
route: 'SyncInstanceTaskDetail'
|
||||
}
|
||||
},
|
||||
history_count: {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import ListTable from '@/components/ListTable'
|
||||
import { ActionsFormatter } from '@/components/TableFormatters'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
name: 'AdhocExecutionHistory',
|
||||
@@ -86,6 +87,14 @@ export default {
|
||||
callback: function({ row, tableData }) {
|
||||
return this.$router.push({ name: 'HistoryExecutionDetail', params: { id: row.id }})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'log',
|
||||
title: this.$t('ops.output'),
|
||||
type: 'info',
|
||||
callback: function({ row }) {
|
||||
openTaskPage(row.id, 'ansible')
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import DetailCard from '@/components/DetailCard'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import RunInfoCard from '../../RunInfoCard'
|
||||
import { toLastFailureDisplay, toLastSucessDisplay } from '../business'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
name: 'HistoryExecutionDetail',
|
||||
@@ -72,17 +71,6 @@ export default {
|
||||
{
|
||||
key: this.$t('ops.isSuccess'),
|
||||
value: this.object.is_success
|
||||
},
|
||||
{
|
||||
key: this.$t('ops.output'),
|
||||
value: this.object.id,
|
||||
formatter: function(row, value) {
|
||||
const onClick = function() {
|
||||
openTaskPage(value, 'ansible')
|
||||
}
|
||||
const title = this.$t('common.View')
|
||||
return <a onClick={onClick} >{ title }</a>
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
openTaskPage(value, 'ansible')
|
||||
}
|
||||
const title = this.$t('common.View')
|
||||
return <a onClick={onClick} >{ title }</a>
|
||||
return <a class='text-link' onClick={onClick} >{ title }</a>
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import ListTable from '@/components/ListTable'
|
||||
import { DetailFormatter } from '@/components/TableFormatters'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
name: 'TaskHistory',
|
||||
@@ -95,6 +96,14 @@ export default {
|
||||
callback: function({ row, tableData }) {
|
||||
return this.$router.push({ name: 'HistoryExecutionDetail', params: { id: row.id }})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'log',
|
||||
title: this.$t('ops.output'),
|
||||
type: 'info',
|
||||
callback: function({ row }) {
|
||||
openTaskPage(row.id, 'ansible')
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@ import DetailCard from '@/components/DetailCard'
|
||||
import QuickActions from '@/components/QuickActions'
|
||||
import UserConfirmDialog from '@/components/UserConfirmDialog'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import store from '@/store'
|
||||
import { getProfile } from '@/api/users'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ProfileInfo',
|
||||
@@ -47,14 +48,9 @@ export default {
|
||||
QuickActions,
|
||||
UserConfirmDialog
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
default: () => store.state.users.profile
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
object: this.userProfile || {},
|
||||
url: `/api/v1/users/profile/`,
|
||||
showPasswordDialog: false,
|
||||
currentEdit: '',
|
||||
@@ -160,7 +156,7 @@ export default {
|
||||
attrs: {
|
||||
disabled: true,
|
||||
name: 'site_msg',
|
||||
model: this.object.receive_backends.indexOf('site_msg') !== -1
|
||||
model: this.object?.receive_backends.indexOf('site_msg') !== -1
|
||||
},
|
||||
callbacks: {
|
||||
change: this.updateUserReceiveBackends
|
||||
@@ -171,7 +167,7 @@ export default {
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
name: 'email',
|
||||
model: this.object.receive_backends.indexOf('email') !== -1
|
||||
model: this.object?.receive_backends.indexOf('email') !== -1
|
||||
},
|
||||
callbacks: {
|
||||
change: this.updateUserReceiveBackends
|
||||
@@ -182,7 +178,7 @@ export default {
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
name: 'wecom',
|
||||
model: this.object.receive_backends.indexOf('wecom') !== -1
|
||||
model: this.object?.receive_backends.indexOf('wecom') !== -1
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_WECOM,
|
||||
callbacks: {
|
||||
@@ -194,7 +190,7 @@ export default {
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
name: 'dingtalk',
|
||||
model: this.object.receive_backends.indexOf('dingtalk') !== -1
|
||||
model: this.object?.receive_backends.indexOf('dingtalk') !== -1
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_DINGTALK,
|
||||
callbacks: {
|
||||
@@ -206,7 +202,7 @@ export default {
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
name: 'feishu',
|
||||
model: this.object.receive_backends.indexOf('feishu') !== -1
|
||||
model: this.object?.receive_backends.indexOf('feishu') !== -1
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_FEISHU,
|
||||
callbacks: {
|
||||
@@ -217,6 +213,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userProfile: state => state.users.profile
|
||||
}),
|
||||
detailCardItems() {
|
||||
return [
|
||||
{
|
||||
@@ -299,6 +298,12 @@ export default {
|
||||
return url
|
||||
}
|
||||
},
|
||||
created() {
|
||||
getProfile().then(res => {
|
||||
this.object = res
|
||||
this.$store.commit('users/SET_PROFILE', res)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
updateUserReceiveBackends(val) {
|
||||
this.$axios.patch(
|
||||
|
||||
@@ -60,6 +60,7 @@ export default {
|
||||
actions: {
|
||||
prop: 'id',
|
||||
formatterArgs: {
|
||||
canUpdate: this.$hasPerm('orgs.change_organization'),
|
||||
canDelete: function({ row }) {
|
||||
return !row.is_default && vm.$hasPerm('orgs.delete_organization')
|
||||
},
|
||||
|
||||
@@ -39,9 +39,10 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
canUpdate: this.$hasPerm('terminal.change_endpoint'),
|
||||
updateRoute: 'EndpointUpdate',
|
||||
cloneRoute: 'EndpointCreate',
|
||||
canDelete: ({ row }) => row.id !== '00000000-0000-0000-0000-000000000001'
|
||||
canDelete: ({ row }) => row.id !== '00000000-0000-0000-0000-000000000001' && this.$hasPerm('terminal.delete_endpoint')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
canUpdate: this.$hasPerm('terminal.change_endpointrule'),
|
||||
updateRoute: 'EndpointRuleUpdate',
|
||||
cloneRoute: 'EndpointRuleCreate'
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ export default {
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
hasDelete: hasDelete,
|
||||
canUpdate: this.$hasPerm('users.change_user'),
|
||||
extraActions: [
|
||||
{
|
||||
title: this.$t('users.Remove'),
|
||||
|
||||
@@ -6290,11 +6290,16 @@ jest@^23.6.0:
|
||||
import-local "^1.0.0"
|
||||
jest-cli "^23.6.0"
|
||||
|
||||
jquery@>=1.4.4, jquery@^3.5.0:
|
||||
jquery@>=1.4.4:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.0.tgz#9980b97d9e4194611c36530e7dc46a58d7340fc9"
|
||||
integrity sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==
|
||||
|
||||
jquery@^3.6.1:
|
||||
version "3.6.1"
|
||||
resolved "https://registry.npmmirror.com/jquery/-/jquery-3.6.1.tgz#fab0408f8b45fc19f956205773b62b292c147a16"
|
||||
integrity sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==
|
||||
|
||||
js-base64@^2.1.9:
|
||||
version "2.5.2"
|
||||
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209"
|
||||
|
||||
Reference in New Issue
Block a user