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