Skip to content

Commit

Permalink
Merge branch 'pam' of github.com:jumpserver/lina into pam
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Feb 11, 2025
2 parents 5abb8a8 + c4bba7e commit 768cae7
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 59 deletions.
22 changes: 13 additions & 9 deletions src/components/Apps/AccountListTable/AccountList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<script>
import { accountOtherActions, accountQuickFilters, connectivityMeta } from './const'
import { openTaskPage } from '@/utils/jms'
import { ActionsFormatter, PlatformFormatter, SecretViewerFormatter } from '@/components/Table/TableFormatters'
import { ActionsFormatter, PlatformFormatter, SecretViewerFormatter, AccountConnectFormatter } from '@/components/Table/TableFormatters'
import ViewSecret from './ViewSecret.vue'
import UpdateSecretInfo from './UpdateSecretInfo.vue'
import ResultDialog from './BulkCreateResultDialog.vue'
Expand Down Expand Up @@ -191,14 +191,18 @@ export default {
connect: {
label: this.$t('Connect'),
width: '80px',
formatter: () => {
return (
<span className='connect'>
<el-button type='primary' size='mini' plain>
<i className='fa fa-desktop'/>
</el-button>
</span>
)
formatter: AccountConnectFormatter,
formatterArgs: {
buttonIcon: 'fa fa-desktop',
titleText: '可选协议',
url: '/api/v1/assets/assets/{id}',
connectUrlTemplate: (row) => `/luna/pam_connect/${row.id}/${row.username}/${row.asset.id}/${row.asset.name}/`,
setMapItem: (id, protocol) => {
this.$store.commit('table/SET_PROTOCOL_MAP_ITEM', {
key: id,
value: protocol
})
}
}
},
platform: {
Expand Down
13 changes: 1 addition & 12 deletions src/views/accounts/Account/AccountList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script>
import AssetTreeTable from '@/components/Apps/AssetTreeTable/index.vue'
import AccountListTable from '@/components/Apps/AccountListTable/AccountList.vue'
import { AccountConnectFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
import { DetailFormatter } from '@/components/Table/TableFormatters'
export default {
name: 'AssetAccountList',
Expand Down Expand Up @@ -39,17 +39,6 @@ export default {
query: { tab: 'Basic' }
})
}
},
connect: {
label: this.$t('Connect'),
width: '80px',
formatter: AccountConnectFormatter,
formatterArgs: {
buttonIcon: 'fa fa-desktop',
titleText: '可选协议',
url: '/api/v1/assets/assets/{id}',
connectUrlTemplate: '/luna/pam_connect/{id}/{username}/{assetId}/{assetName}/{protocol}'
}
}
}
},
Expand Down
1 change: 1 addition & 0 deletions src/views/assets/Platform/PlatformDetail/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
TaskDetail: {},
actions: {},
config: {
url: '/api/v1/assets/platforms',
title: this.$t('PlatformDetail'),
activeMenu: 'Detail',
submenu: [
Expand Down
10 changes: 9 additions & 1 deletion src/views/assets/Platform/PlatformList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
@tab-click="changeMoreCreates"
>
<keep-alive>
<GenericListTable ref="genericListTable" :header-actions="headerActions" :table-config="tableConfig" />
<GenericListTable
ref="genericListTable"
:create-drawer="createDrawer"
:detail-drawer="detailDrawer"
:header-actions="headerActions"
:table-config="tableConfig"
/>
</keep-alive>
</TabPage>
</template>
Expand All @@ -26,6 +32,8 @@ export default {
data() {
const vm = this
return {
createDrawer: () => import('@/views/assets/Platform/PlatformCreateUpdate.vue'),
detailDrawer: () => import('@/views/assets/Platform/PlatformDetail/index.vue'),
loading: true,
platformPageHelpMsg: this.$t('PlatformPageHelpMsg'),
tab: {
Expand Down
19 changes: 1 addition & 18 deletions src/views/pam/Account/AccountList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<script>
import AccountListTable from '@/components/Apps/AccountListTable/AccountList.vue'
import { DetailFormatter, AccountConnectFormatter } from '@/components/Table/TableFormatters'
import { DetailFormatter } from '@/components/Table/TableFormatters'
export default {
name: 'AssetAccountList',
Expand All @@ -30,23 +30,6 @@ export default {
query: { tab: 'Basic' }
})
}
},
connect: {
label: this.$t('Connect'),
width: '80px',
formatter: AccountConnectFormatter,
formatterArgs: {
buttonIcon: 'fa fa-desktop',
titleText: '可选协议',
url: '/api/v1/assets/assets/{id}',
connectUrlTemplate: (row) => `/luna/pam_connect/${row.id}/${row.username}/${row.asset.id}/${row.asset.name}/`,
setMapItem: (id, protocol) => {
this.$store.commit('table/SET_PROTOCOL_MAP_ITEM', {
key: id,
value: protocol
})
}
}
}
}
}
Expand Down
19 changes: 1 addition & 18 deletions src/views/pam/Integration/components/AccountList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<script>
import AccountListTable from '@/components/Apps/AccountListTable/AccountList.vue'
import { DetailFormatter, AccountConnectFormatter } from '@/components/Table/TableFormatters'
import { DetailFormatter } from '@/components/Table/TableFormatters'
export default {
name: 'AssetAccountList',
Expand Down Expand Up @@ -37,23 +37,6 @@ export default {
query: { tab: 'Basic' }
})
}
},
connect: {
label: this.$t('Connect'),
width: '80px',
formatter: AccountConnectFormatter,
formatterArgs: {
buttonIcon: 'fa fa-desktop',
titleText: '可选协议',
url: '/api/v1/assets/assets/{id}',
connectUrlTemplate: (row) => `/luna/pam_connect/${row.id}/${row.username}/${row.asset.id}/${row.asset.name}/`,
setMapItem: (id, protocol) => {
this.$store.commit('table/SET_PROTOCOL_MAP_ITEM', {
key: id,
value: protocol
})
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default {
disabled: false,
username: ''
},
columns: ['name', 'username', 'secret', 'asset']
columns: ['name', 'username', 'secret', 'asset', 'connect']
}
},
computed: {
Expand Down

0 comments on commit 768cae7

Please sign in to comment.