mirror of
https://github.com/jumpserver/lina.git
synced 2025-10-21 23:59:22 +00:00
perf: i18n Tools
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
ref="SearchInput"
|
||||
v-model.trim="filterValue"
|
||||
:fetch-suggestions="autocomplete"
|
||||
:placeholder="this.$t('EnterToContinue')"
|
||||
:placeholder="this.iPlaceholder"
|
||||
:type="inputType"
|
||||
class="search-input"
|
||||
@blur="focus = false"
|
||||
@@ -85,6 +85,12 @@ export default {
|
||||
component: this.autocomplete ? 'el-autocomplete' : 'el-input'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
iPlaceholder() {
|
||||
return `${this.placeholder} ( ${this.$t('EnterToContinue')} )`
|
||||
}
|
||||
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.filterTags = val
|
||||
|
@@ -248,9 +248,25 @@ export default {
|
||||
permissions: ['ops.view_playbook'],
|
||||
activeMenu: '/workbench/ops/templates'
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/workbench/system-tools',
|
||||
component: empty,
|
||||
name: 'More',
|
||||
alwaysShow: true,
|
||||
meta: {
|
||||
title: i18n.t('MenuMore'),
|
||||
icon: 'more',
|
||||
permissions: [],
|
||||
hidden: () => {
|
||||
return !store.getters.publicSettings['TOOL_USER_ENABLED']
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/workbench/system-tools',
|
||||
path: '',
|
||||
name: 'SystemTools',
|
||||
component: () => import('@/views/settings/Tool'),
|
||||
meta: {
|
||||
|
@@ -38,7 +38,7 @@ export default {
|
||||
getSubmenu() {
|
||||
return [
|
||||
{
|
||||
title: this.$t('GenericSetting'),
|
||||
title: this.$t('General'),
|
||||
name: 'Lina'
|
||||
},
|
||||
{
|
||||
|
36
src/views/settings/Tool/Basic.vue
Normal file
36
src/views/settings/Tool/Basic.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<IBox>
|
||||
<GenericCreateUpdateForm
|
||||
:has-detail-in-msg="false"
|
||||
:submit-method="submitMethod"
|
||||
v-bind="$data"
|
||||
/>
|
||||
</IBox>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { IBox } from '@/components'
|
||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'Basic',
|
||||
components: {
|
||||
GenericCreateUpdateForm,
|
||||
IBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fields: ['TOOL_USER_ENABLED'],
|
||||
url: '/api/v1/settings/setting/?category=tool'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
@@ -18,8 +18,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
name: 'dest_ips',
|
||||
label: this.$t('DestinationIP'),
|
||||
tip: this.$t('IP'),
|
||||
label: this.$t('DA'),
|
||||
el: {
|
||||
placeholder: this.$t('DestinationIP')
|
||||
}
|
||||
@@ -27,9 +26,10 @@ export default {
|
||||
{
|
||||
name: 'dest_ports',
|
||||
component: TagInput,
|
||||
label: this.$t('DestinationPort'),
|
||||
label: this.$t('DP'),
|
||||
el: {
|
||||
inputType: 'number'
|
||||
inputType: 'number',
|
||||
placeholder: this.$t('DestinationPort')
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@@ -16,8 +16,7 @@ export default {
|
||||
taskType: 'ping',
|
||||
fields: [{
|
||||
name: 'dest_ips',
|
||||
label: this.$t('DestinationIP'),
|
||||
tip: this.$t('IP'),
|
||||
label: this.$t('DA'),
|
||||
el: {
|
||||
placeholder: this.$t('DestinationIP')
|
||||
}
|
||||
|
@@ -22,8 +22,7 @@ export default {
|
||||
},
|
||||
{
|
||||
name: 'src_ips',
|
||||
label: this.$t('SourceIP'),
|
||||
tip: this.$t('IP'),
|
||||
label: this.$t('SA'),
|
||||
el: {
|
||||
placeholder: this.$t('SourceIP')
|
||||
}
|
||||
@@ -31,15 +30,15 @@ export default {
|
||||
{
|
||||
name: 'src_ports',
|
||||
component: TagInput,
|
||||
label: this.$t('SourcePort'),
|
||||
label: this.$t('SP'),
|
||||
el: {
|
||||
inputType: 'number'
|
||||
inputType: 'number',
|
||||
placeholder: this.$t('SourcePort')
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'dest_ips',
|
||||
label: this.$t('DestinationIP'),
|
||||
tip: this.$t('IP'),
|
||||
label: this.$t('DA'),
|
||||
el: {
|
||||
placeholder: this.$t('DestinationIP')
|
||||
}
|
||||
@@ -47,9 +46,10 @@ export default {
|
||||
{
|
||||
name: 'dest_ports',
|
||||
component: TagInput,
|
||||
label: this.$t('DestinationPort'),
|
||||
label: this.$t('DP'),
|
||||
el: {
|
||||
inputType: 'number'
|
||||
inputType: 'number',
|
||||
placeholder: this.$t('DestinationPort')
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@@ -17,15 +17,14 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
name: 'dest_ips',
|
||||
label: this.$t('DestinationIP'),
|
||||
tip: this.$t('IP'),
|
||||
label: this.$t('DA'),
|
||||
el: {
|
||||
placeholder: this.$t('DestinationIP')
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'dest_port',
|
||||
label: this.$t('DestinationPort'),
|
||||
label: this.$t('DP'),
|
||||
el: {
|
||||
type: 'number',
|
||||
placeholder: this.$t('DestinationPort')
|
||||
|
@@ -16,8 +16,7 @@ export default {
|
||||
taskType: 'traceroute',
|
||||
fields: [{
|
||||
name: 'dest_ips',
|
||||
label: this.$t('DestinationIP'),
|
||||
tip: this.$t('IP'),
|
||||
label: this.$t('DA'),
|
||||
el: {
|
||||
placeholder: this.$t('DestinationIP')
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ import Telnet from './Telnet'
|
||||
import Nmap from './Nmap'
|
||||
import Tcpdump from './Tcpdump'
|
||||
import Traceroute from './Traceroute'
|
||||
import Basic from './Basic'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -26,15 +27,21 @@ export default {
|
||||
Telnet,
|
||||
Nmap,
|
||||
Tcpdump,
|
||||
Traceroute
|
||||
Traceroute,
|
||||
Basic
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timer: null,
|
||||
currentTime: '',
|
||||
loading: true,
|
||||
activeMenu: 'Ping',
|
||||
activeMenu: 'Basic',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('Basic'),
|
||||
name: 'Basic',
|
||||
hidden: () => !this.$route?.fullPath?.startsWith('/settings/tools')
|
||||
},
|
||||
{
|
||||
title: 'Ping',
|
||||
name: 'Ping'
|
||||
@@ -64,6 +71,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log('>>>', this.$route)
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
|
Reference in New Issue
Block a user