feat:插件id及逻辑变动(有一些同名,但type(ip、domain)不同的,合并成一条;合并后的记录,type列既有ip标签又有domain标签)
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
color: #046ECA;
|
||||
box-shadow: 0 2px 4px 0 rgba(51,51,51,0.02);
|
||||
border-radius: 12px;
|
||||
margin-right:10px;
|
||||
}
|
||||
.plugin-name {
|
||||
display: flex;
|
||||
|
||||
@@ -37,19 +37,19 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'type'">
|
||||
<span class="type-tag">{{typeText(scope.row['id'])}}</span>
|
||||
<span class="type-tag" v-for="type in scope.row.type">{{type}}</span>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'name'">
|
||||
<div class="plugin-name">
|
||||
<div class="icon-background"><img class="plugin-name-icon" :src="getIconUrl(scope.row['id'])"/></div>
|
||||
{{getName(scope.row['id'])}}
|
||||
<div class="icon-background"><img class="plugin-name-icon" :src="scope.row['iconUrl']"/></div>
|
||||
{{scope.row['name']}}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'description'">
|
||||
<div class="two-line" :title="getDescription(scope.row['id'])">{{getDescription(scope.row['id'])}}</div>
|
||||
<div class="two-line" :title="$t(scope.row['desc'])">{{$t(scope.row['desc'])}}</div>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'schedule'">
|
||||
<div class="two-line" >{{scheduleText(scope.row['id'])}}</div>
|
||||
<div class="two-line" >{{$t(scope.row['schedule'])}}</div>
|
||||
</template>
|
||||
<span v-else>{{scope.row[item.prop] || '-'}}</span>
|
||||
</template>
|
||||
@@ -110,36 +110,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
typeText () {
|
||||
return function (id) {
|
||||
const t = pluginBasicInfo.find(t => t.id === id)
|
||||
return t ? t.type : 'Unknown Tag'
|
||||
}
|
||||
},
|
||||
scheduleText () {
|
||||
return function (id) {
|
||||
const basicInfo = pluginBasicInfo.find(bi => bi.id === id)
|
||||
return basicInfo ? this.$t(basicInfo.schedule) : ''
|
||||
}
|
||||
},
|
||||
getIconUrl () {
|
||||
return function (id) {
|
||||
const basicInfo = pluginBasicInfo.find(bi => bi.id === id)
|
||||
return basicInfo ? basicInfo.iconUrl : ''
|
||||
}
|
||||
},
|
||||
getDescription () {
|
||||
return function (id) {
|
||||
const basicInfo = pluginBasicInfo.find(bi => bi.id === id)
|
||||
return basicInfo ? this.$t(basicInfo.desc) : '-'
|
||||
}
|
||||
},
|
||||
getName () {
|
||||
return function (id) {
|
||||
const basicInfo = pluginBasicInfo.find(bi => bi.id === id)
|
||||
return basicInfo ? this.$t(basicInfo.name) : '-'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
statusChange (plugin) {
|
||||
|
||||
@@ -1883,117 +1883,85 @@ export const performanceMetricMapping = {
|
||||
|
||||
export const pluginBasicInfo = [
|
||||
{
|
||||
id: 110,
|
||||
id: 109,
|
||||
name: 'Psiphon3 VPN',
|
||||
type: ['IP'],
|
||||
schedule: 'plugin.always',
|
||||
desc: 'knowledgeBase.desc.psiphon3',
|
||||
iconUrl: 'images/knowledge-base-logo/psiphon3-vpn.png'
|
||||
},
|
||||
{
|
||||
id: 111,
|
||||
name: 'HotSpot VPN',
|
||||
type: 'IP',
|
||||
type: ['IP'],
|
||||
schedule: 'plugin.daily',
|
||||
desc: 'knowledgeBase.desc.hotSpot',
|
||||
iconUrl: 'images/knowledge-base-logo/hotspot-vpn.png'
|
||||
},
|
||||
{
|
||||
id: 111,
|
||||
id: 112,
|
||||
name: 'IpVanish VPN',
|
||||
type: 'Domain',
|
||||
type: ['IP','Domain'],
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.ipVanishDomain',
|
||||
iconUrl: 'images/knowledge-base-logo/ip-vanish.png'
|
||||
},
|
||||
{
|
||||
id: 112,
|
||||
name: 'IpVanish VPN',
|
||||
type: 'IP',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.ipVanishIp',
|
||||
iconUrl: 'images/knowledge-base-logo/ip-vanish.png'
|
||||
},
|
||||
{
|
||||
id: 113,
|
||||
name: 'CyberGhost VPN',
|
||||
type: 'Domain',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.cyberGhostDomain',
|
||||
iconUrl: 'images/knowledge-base-logo/cyber-ghost.png'
|
||||
},
|
||||
{
|
||||
id: 114,
|
||||
name: 'CyberGhost VPN',
|
||||
type: 'IP',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.cyberGhostIp',
|
||||
iconUrl: 'images/knowledge-base-logo/cyber-ghost.png'
|
||||
},
|
||||
{
|
||||
id: 115,
|
||||
name: 'Gecko VPN',
|
||||
type: 'IP',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.geckoIp',
|
||||
iconUrl: 'images/knowledge-base-logo/gecko.png'
|
||||
},
|
||||
{
|
||||
id: 116,
|
||||
name: 'Ivacy VPN',
|
||||
type: 'Domain',
|
||||
type: ['IP','Domain'],
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.ivacyDomain',
|
||||
iconUrl: 'images/knowledge-base-logo/ivacy.png'
|
||||
},
|
||||
{
|
||||
id: 117,
|
||||
name: 'Ivacy VPN',
|
||||
type: 'IP',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.ivacyIp',
|
||||
iconUrl: 'images/knowledge-base-logo/ivacy.png'
|
||||
},
|
||||
{
|
||||
id: 118,
|
||||
name: 'Turbo VPN',
|
||||
type: 'IP',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.turboIp',
|
||||
iconUrl: 'images/knowledge-base-logo/turbo.png'
|
||||
},
|
||||
{
|
||||
id: 119,
|
||||
name: 'Vpnunlimited',
|
||||
type: 'IP',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.vpnunlimited',
|
||||
iconUrl: 'images/knowledge-base-logo/vpnunlimited.png'
|
||||
},
|
||||
{
|
||||
id: 120,
|
||||
name: 'Windscribe VPN',
|
||||
type: 'Domain',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.windscribeDomain',
|
||||
iconUrl: 'images/knowledge-base-logo/windscribe.png'
|
||||
},
|
||||
{
|
||||
id: 121,
|
||||
name: 'Windscribe VPN',
|
||||
type: 'IP',
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.windscribeIp',
|
||||
iconUrl: 'images/knowledge-base-logo/windscribe.png'
|
||||
},
|
||||
{
|
||||
id: 122,
|
||||
id: 114,
|
||||
name: 'Proton VPN',
|
||||
type: 'IP',
|
||||
type: ['IP'],
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.protonvpn',
|
||||
iconUrl: 'images/knowledge-base-logo/protonvpn.png'
|
||||
},
|
||||
{
|
||||
id: 109,
|
||||
name: 'Psiphon3 VPN',
|
||||
type: 'IP',
|
||||
schedule: 'plugin.always',
|
||||
desc: 'knowledgeBase.desc.psiphon3',
|
||||
iconUrl: 'images/knowledge-base-logo/psiphon3-vpn.png'
|
||||
}
|
||||
id: 115,
|
||||
name: 'CyberGhost VPN',
|
||||
type: ['IP','Domain'],
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.cyberGhostDomain',
|
||||
iconUrl: 'images/knowledge-base-logo/cyber-ghost.png'
|
||||
},
|
||||
{
|
||||
id: 116,
|
||||
name: 'Windscribe VPN',
|
||||
type: ['IP','Domain'],
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.windscribeDomain',
|
||||
iconUrl: 'images/knowledge-base-logo/windscribe.png'
|
||||
},
|
||||
{
|
||||
id: 117,
|
||||
name: 'Turbo VPN',
|
||||
type: ['IP'],
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.turboIp',
|
||||
iconUrl: 'images/knowledge-base-logo/turbo.png'
|
||||
},
|
||||
{
|
||||
id: 118,
|
||||
name: 'Gecko VPN',
|
||||
type: ['IP'],
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.geckoIp',
|
||||
iconUrl: 'images/knowledge-base-logo/gecko.png'
|
||||
},
|
||||
{
|
||||
id: 119,
|
||||
name: 'Vpnunlimited',
|
||||
type: ['IP'],
|
||||
schedule: 'plugin.hourly',
|
||||
desc: 'knowledgeBase.desc.vpnunlimited',
|
||||
iconUrl: 'images/knowledge-base-logo/vpnunlimited.png'
|
||||
},
|
||||
]
|
||||
|
||||
export const builtInKnowledgeBaseBasicInfo = [
|
||||
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
response.data.data.list[i].triggerStatus = response.data.data.list[i].triggerStatus + ''
|
||||
const basicInfo = pluginBasicInfo.find(plugin => plugin.id === response.data.data.list[i].id)
|
||||
if (basicInfo) {
|
||||
filterDataList.push(response.data.data.list[i])
|
||||
filterDataList.push(Object.assign({},basicInfo,response.data.data.list[i]))
|
||||
}
|
||||
}
|
||||
this.tableData = filterDataList
|
||||
|
||||
Reference in New Issue
Block a user