Skip to content

Commit

Permalink
ネットワークのライン編集の問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
twsnmp committed Dec 2, 2024
1 parent f344d10 commit 31ba4d9
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions spa/pages/map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,10 @@
{{ getNodeName(item.NodeID2) }}
</template>
<template #[`item.PollingID1`]="{ item }">
{{ getPollingName(item.PollingID1) }}
{{ getPollingName(item.NodeID1, item.PollingID1) }}
</template>
<template #[`item.PollingID2`]="{ item }">
{{ getPollingName(item.PollingID2) }}
{{ getPollingName(item.NodeID2, item.PollingID2) }}
</template>
<template #[`item.actions`]="{ item }">
<v-icon small @click="addLineFromList(item)">
Expand Down Expand Up @@ -693,10 +693,10 @@
{{ getNodeName(item.NodeID2) }}
</template>
<template #[`item.PollingID1`]="{ item }">
{{ getPollingName(item.PollingID1) }}
{{ getPollingName(item.NodeID1, item.PollingID1) }}
</template>
<template #[`item.PollingID2`]="{ item }">
{{ getPollingName(item.PollingID2) }}
{{ getPollingName(item.NodeID2, item.PollingID2) }}
</template>
<template #[`item.actions`]="{ item }">
<v-icon small @click="editNetworkLine(item)"> mdi-pencil </v-icon>
Expand Down Expand Up @@ -2284,8 +2284,21 @@ export default {
}
return this.map.Nodes[id] ? this.map.Nodes[id].Name : id
},
getPollingName(id) {
return this.pollingNameMap[id] || id
getPollingName(nid, pid) {
if (nid.startsWith('NET:')) {
const a = nid.split(':')
if (a.length > 1) {
const n = this.map.Networks[a[1]]
if (n) {
for (const p of n.Ports) {
if (p.ID === pid) {
return p.Name
}
}
}
}
}
return this.pollingNameMap[pid] || pid
},
addNetworkFromList(n) {
const i = this.foundNeighborNetworksAndLines.Networks.indexOf(n)
Expand Down

0 comments on commit 31ba4d9

Please sign in to comment.