mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 07:01:26 +00:00
pref: 修改 remote applet
This commit is contained in:
parent
6d756eab5d
commit
2ac9b885c9
@ -5,7 +5,8 @@
|
|||||||
:type="col.type || 'info'"
|
:type="col.type || 'info'"
|
||||||
@click="goDetail"
|
@click="goDetail"
|
||||||
>
|
>
|
||||||
{{ iTitle }}
|
<img v-if="icon" :src="icon" alt="icon" class="icon">
|
||||||
|
<span class="title">{{ iTitle }}</span>
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -26,6 +27,9 @@ export default {
|
|||||||
can: true,
|
can: true,
|
||||||
getTitle({ col, row, cellValue }) {
|
getTitle({ col, row, cellValue }) {
|
||||||
return cellValue
|
return cellValue
|
||||||
|
},
|
||||||
|
getIcon({ col, row, cellValue }) {
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,6 +55,13 @@ export default {
|
|||||||
can = can(this.col)
|
can = can(this.col)
|
||||||
}
|
}
|
||||||
return !can
|
return !can
|
||||||
|
},
|
||||||
|
icon() {
|
||||||
|
return this.formatterArgs.getIcon({
|
||||||
|
col: this.col,
|
||||||
|
row: this.row,
|
||||||
|
cellValue: this.cellValue
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -98,4 +109,13 @@ export default {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail {
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -289,6 +289,8 @@
|
|||||||
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
|
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"Icon": "图标",
|
||||||
|
"DisplayName": "名称",
|
||||||
"Automations": "自动化",
|
"Automations": "自动化",
|
||||||
"Sync": "同步",
|
"Sync": "同步",
|
||||||
"Deploy": "部署",
|
"Deploy": "部署",
|
||||||
@ -997,6 +999,9 @@
|
|||||||
"esDocType": "es 默认文档类型:command"
|
"esDocType": "es 默认文档类型:command"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"applets": {
|
||||||
|
"NoPublished": "未发布"
|
||||||
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
"Applets": "远程应用",
|
"Applets": "远程应用",
|
||||||
"EndpointListHelpMessage": "服务端点是用户访问服务的地址(端口),当用户在连接资产时,会根据端点规则和资产标签选择服务端点,作为访问入口建立连接,实现分布式连接资产",
|
"EndpointListHelpMessage": "服务端点是用户访问服务的地址(端口),当用户在连接资产时,会根据端点规则和资产标签选择服务端点,作为访问入口建立连接,实现分布式连接资产",
|
||||||
|
@ -222,7 +222,7 @@ export default {
|
|||||||
{
|
{
|
||||||
path: 'hosts/create',
|
path: 'hosts/create',
|
||||||
name: 'AppletHostCreate',
|
name: 'AppletHostCreate',
|
||||||
component: () => import('@/views/settings/Applet/AppletHosts/AppletHostCreateUpdate'),
|
component: () => import('@/views/settings/Applet/AppletHost/AppletHostCreateUpdate'),
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: i18n.t('route.AppletHostCreate'),
|
title: i18n.t('route.AppletHostCreate'),
|
||||||
@ -232,7 +232,7 @@ export default {
|
|||||||
{
|
{
|
||||||
path: 'hosts/:id',
|
path: 'hosts/:id',
|
||||||
name: 'AppletHostDetail',
|
name: 'AppletHostDetail',
|
||||||
component: () => import('@/views/settings/Applet/AppletHosts/AppletHostDetail/index'),
|
component: () => import('@/views/settings/Applet/AppletHost/AppletHostDetail/index'),
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: i18n.t('route.AppletHostDetail'),
|
title: i18n.t('route.AppletHostDetail'),
|
||||||
@ -242,7 +242,7 @@ export default {
|
|||||||
{
|
{
|
||||||
path: 'hosts/:id/update',
|
path: 'hosts/:id/update',
|
||||||
name: 'AppletHostUpdate',
|
name: 'AppletHostUpdate',
|
||||||
component: () => import('@/views/settings/Applet/AppletHosts/AppletHostCreateUpdate'),
|
component: () => import('@/views/settings/Applet/AppletHost/AppletHostCreateUpdate'),
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: i18n.t('route.AppletHostUpdate'),
|
title: i18n.t('route.AppletHostUpdate'),
|
||||||
|
@ -20,7 +20,7 @@ export default {
|
|||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: '/api/v1/terminal/applets/',
|
url: '/api/v1/terminal/applets/',
|
||||||
columns: [
|
columns: [
|
||||||
'icon', 'name', 'version', 'author', 'protocols',
|
'name', 'version', 'author', 'protocols',
|
||||||
'type', 'comment', 'date_created', 'date_updated', 'actions'
|
'type', 'comment', 'date_created', 'date_updated', 'actions'
|
||||||
],
|
],
|
||||||
columnsShow: {
|
columnsShow: {
|
||||||
@ -40,7 +40,8 @@ export default {
|
|||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
formatterArgs: {
|
formatterArgs: {
|
||||||
getTitle: ({ row }) => row['display_name']
|
getTitle: ({ row }) => row['display_name'],
|
||||||
|
getIcon: ({ row }) => row['icon']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
version: {
|
version: {
|
@ -29,14 +29,33 @@ export default {
|
|||||||
config: {
|
config: {
|
||||||
url: `/api/v1/terminal/applet-publications/?host=${this.object.id}`,
|
url: `/api/v1/terminal/applet-publications/?host=${this.object.id}`,
|
||||||
columns: [
|
columns: [
|
||||||
'name', 'applet', 'comment', 'date_created', 'date_updated', 'actions'
|
'applet.icon', 'applet.display_name', 'date_updated', 'status',
|
||||||
|
'actions'
|
||||||
],
|
],
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
applet: {
|
'applet.icon': {
|
||||||
|
label: this.$t('common.Icon'),
|
||||||
|
align: 'center',
|
||||||
|
width: '60px',
|
||||||
formatter: (row) => {
|
formatter: (row) => {
|
||||||
return row.applet.name
|
return <img src={row.applet.icon} width='30' height='30' alt='icon'></img>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'applet.display_name': {
|
||||||
|
label: this.$t('common.DisplayName')
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
label: this.$t('common.Status'),
|
||||||
|
formatter: (row) => {
|
||||||
|
if (!row.status) {
|
||||||
|
return <el-tag size='mini' type='danger'>{ this.$t('applets.NoPublished') }</el-tag>
|
||||||
|
}
|
||||||
|
return row.status.label
|
||||||
|
}
|
||||||
|
},
|
||||||
|
date_updated: {
|
||||||
|
label: '发布日期'
|
||||||
|
},
|
||||||
actions: {
|
actions: {
|
||||||
formatterArgs: {
|
formatterArgs: {
|
||||||
updateRoute: 'AppletPublicationUpdate'
|
updateRoute: 'AppletPublicationUpdate'
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TabPage } from '@/layout/components'
|
import { TabPage } from '@/layout/components'
|
||||||
import Applets from './Applets/AppletList'
|
import Applets from './Applet/AppletList'
|
||||||
import AppletHosts from './AppletHosts/AppletHostList'
|
import AppletHosts from './AppletHost/AppletHostList'
|
||||||
export default {
|
export default {
|
||||||
name: 'Applet',
|
name: 'Applet',
|
||||||
components: {
|
components: {
|
||||||
|
Loading…
Reference in New Issue
Block a user