Fix peer data (never include root region).
- Display peer data on temp view. Change-Id: I1ba662ec36669e13ab03030685dbc2c07a8f8a17
Showing
4 changed files
with
15 additions
and
18 deletions
... | @@ -136,8 +136,9 @@ public class UiTopoLayoutManager implements UiTopoLayoutService { | ... | @@ -136,8 +136,9 @@ public class UiTopoLayoutManager implements UiTopoLayoutService { |
136 | 136 | ||
137 | UiTopoLayoutId parentId = layout.parent(); | 137 | UiTopoLayoutId parentId = layout.parent(); |
138 | return layoutMap.values().stream() | 138 | return layoutMap.values().stream() |
139 | - // all layouts who are NOT me and who share my parent... | 139 | + // all layouts who are NOT me (or root) and who share my parent... |
140 | .filter(l -> !Objects.equals(l.id(), layoutId) && | 140 | .filter(l -> !Objects.equals(l.id(), layoutId) && |
141 | + !Objects.equals(l.id(), UiTopoLayoutId.DEFAULT_ID) && | ||
141 | Objects.equals(l.parent(), parentId)) | 142 | Objects.equals(l.parent(), parentId)) |
142 | .collect(Collectors.toSet()); | 143 | .collect(Collectors.toSet()); |
143 | } | 144 | } | ... | ... |
1 | -<!-- | ||
2 | - ~ Copyright 2016-present Open Networking Laboratory | ||
3 | - ~ | ||
4 | - ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | - ~ you may not use this file except in compliance with the License. | ||
6 | - ~ You may obtain a copy of the License at | ||
7 | - ~ | ||
8 | - ~ http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | - ~ | ||
10 | - ~ Unless required by applicable law or agreed to in writing, software | ||
11 | - ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | - ~ See the License for the specific language governing permissions and | ||
14 | - ~ limitations under the License. | ||
15 | - --> | ||
16 | - | ||
17 | <!-- Topology View partial HTML --> | 1 | <!-- Topology View partial HTML --> |
18 | <div id="ov-topoX"> | 2 | <div id="ov-topoX"> |
19 | <div id="topoXtmp"> | 3 | <div id="topoXtmp"> | ... | ... |
... | @@ -143,7 +143,19 @@ | ... | @@ -143,7 +143,19 @@ |
143 | } | 143 | } |
144 | 144 | ||
145 | function doTmpPeerRegions(data) { | 145 | function doTmpPeerRegions(data) { |
146 | + var peerDiv = topdiv.select('.peers').select('div'); | ||
147 | + rmP(peerDiv); | ||
146 | 148 | ||
149 | + function logPeer(p) { | ||
150 | + var o = peerDiv.append('p'), | ||
151 | + id = p.id, | ||
152 | + nt = p.nodeType; | ||
153 | + o.text('[' + nt + '] id = ' + id); | ||
154 | + } | ||
155 | + | ||
156 | + data.peers.forEach(function (p) { | ||
157 | + logPeer(p); | ||
158 | + }); | ||
147 | } | 159 | } |
148 | 160 | ||
149 | // ========================== Event Handlers | 161 | // ========================== Event Handlers | ... | ... |
-
Please register or login to post a comment