mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-02 07:27:01 +00:00
perf: Account discover use drawer component
This commit is contained in:
parent
acfac6d45f
commit
4f0f1b372e
@ -12,6 +12,7 @@ import Info from './info.vue'
|
||||
import More from './more.vue'
|
||||
|
||||
export default {
|
||||
name: 'AccountDiscoverDetail',
|
||||
components: {
|
||||
GenericDetailPage,
|
||||
Info,
|
||||
|
@ -6,10 +6,13 @@
|
||||
|
||||
<script>
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
|
||||
export default {
|
||||
name: 'AccountDiscoverInfo',
|
||||
components: {
|
||||
AutoDetailCard
|
||||
AutoDetailCard,
|
||||
TwoCol
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
|
@ -9,6 +9,7 @@ import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
|
||||
export default {
|
||||
name: 'AccountDiscoverMore',
|
||||
components: {
|
||||
TwoCol,
|
||||
AutoDetailCard
|
||||
|
@ -23,7 +23,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AssetTreeTable from '@/components/Apps/AssetTreeTable/index.vue'
|
||||
import AssetTreeTable from '@/components/Apps/AssetTreeTable'
|
||||
import DeleteDialog from '@/views/accounts/AccountDiscover/DeleteDialog.vue'
|
||||
import { gatherAccountHeaderActions, gatherAccountTableConfig } from '@/views/accounts/const'
|
||||
import AccountDiscoverDialog from '@/views/assets/Asset/AssetList/components/AccountDiscoverDialog.vue'
|
||||
|
@ -11,6 +11,7 @@ import { GenericDetailPage } from '@/layout/components'
|
||||
import Info from './info.vue'
|
||||
|
||||
export default {
|
||||
name: 'ExecutionDetail',
|
||||
components: {
|
||||
GenericDetailPage,
|
||||
Info
|
||||
|
@ -6,10 +6,13 @@
|
||||
|
||||
<script>
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
|
||||
export default {
|
||||
name: 'ExecutionDetailInfo',
|
||||
components: {
|
||||
AutoDetailCard
|
||||
AutoDetailCard,
|
||||
TwoCol
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
|
@ -6,12 +6,14 @@
|
||||
|
||||
<script>
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
import { toSafeLocalDateStr } from '@/utils/time'
|
||||
|
||||
export default {
|
||||
name: 'Detail',
|
||||
components: {
|
||||
AutoDetailCard
|
||||
AutoDetailCard,
|
||||
TwoCol
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
|
@ -49,7 +49,8 @@ export default {
|
||||
name: 'AccountDiscoverTaskDetail',
|
||||
params: { id: row.automation },
|
||||
query: { type: 'pam' }
|
||||
})
|
||||
}),
|
||||
drawer: true
|
||||
},
|
||||
id: ({ row }) => row.automation
|
||||
},
|
||||
|
@ -6,11 +6,12 @@
|
||||
|
||||
<script>
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
||||
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
export default {
|
||||
name: 'AccountPushExecutionInfo',
|
||||
components: {
|
||||
AutoDetailCard
|
||||
AutoDetailCard,
|
||||
TwoCol
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { toSafeLocalDateStr } from '@/utils/time'
|
||||
import { ActionsFormatter, DiscoverConfirmFormatter } from '@/components/Table/TableFormatters'
|
||||
import { ActionsFormatter, DetailFormatter, DiscoverConfirmFormatter } from '@/components/Table/TableFormatters'
|
||||
|
||||
export const gatherAccountTableConfig = (vm, url) => {
|
||||
if (!url) {
|
||||
url = '/api/v1/accounts/gathered-accounts/'
|
||||
}
|
||||
const h = vm.$createElement
|
||||
return {
|
||||
url: url,
|
||||
hasTree: true,
|
||||
@ -23,25 +22,30 @@ export const gatherAccountTableConfig = (vm, url) => {
|
||||
},
|
||||
columnsMeta: {
|
||||
asset: {
|
||||
formatter: function(row) {
|
||||
const to = {
|
||||
name: 'AssetDetail',
|
||||
params: { id: row.asset.id }
|
||||
}
|
||||
if (vm.$hasPerm('assets.view_asset')) {
|
||||
return h('router-link', { props: { to }}, row.asset.name)
|
||||
} else {
|
||||
return h('span', row.asset.name)
|
||||
}
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
can: vm.$hasPerm('assets.view_asset'),
|
||||
getTitle: ({ row }) => row.asset.name,
|
||||
getRoute({ row }) {
|
||||
return {
|
||||
name: 'AssetDetail',
|
||||
params: { id: row.asset.id }
|
||||
}
|
||||
},
|
||||
drawer: true
|
||||
}
|
||||
},
|
||||
username: {
|
||||
formatter: function(row) {
|
||||
const to = {
|
||||
name: 'AccountDiscoverAccountDetail',
|
||||
params: { id: row.id }
|
||||
}
|
||||
return h('router-link', { props: { to }}, row.username)
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
can: true,
|
||||
getRoute({ row }) {
|
||||
return {
|
||||
name: 'AccountDiscoverAccountDetail',
|
||||
params: { id: row.id }
|
||||
}
|
||||
},
|
||||
drawer: true
|
||||
}
|
||||
},
|
||||
present: {
|
||||
|
@ -6,11 +6,13 @@
|
||||
|
||||
<script>
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
|
||||
export default {
|
||||
name: 'CommandFilterAclDetail',
|
||||
components: {
|
||||
AutoDetailCard
|
||||
AutoDetailCard,
|
||||
TwoCol
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
|
Loading…
Reference in New Issue
Block a user