Skip to content

Commit 5133bbb

Browse files
committed
Add topology view component, example and css
1 parent d3f873c commit 5133bbb

File tree

3 files changed

+1052
-0
lines changed

3 files changed

+1052
-0
lines changed

src/charts/charts.less

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,171 @@ pf-c3-chart {
186186
.camelcase {
187187
text-transform: capitalize;
188188
}
189+
190+
pf-topology {
191+
display: block;
192+
user-select: none;
193+
}
194+
195+
196+
.container-topology pf-topology {
197+
height: 500px;
198+
position: relative;
199+
}
200+
.container-topology .canvas {
201+
position: absolute;
202+
}
203+
204+
.container-topology .popup {
205+
position: absolute;
206+
left: 0;
207+
top: 0;
208+
background-color: #fff;
209+
width: 180px;
210+
border: 1px #ccc solid;
211+
border-radius: 6px;
212+
box-shadow: #333 2px 2px 4px;
213+
padding: 6px;
214+
font-size: 14px;
215+
}
216+
217+
.container-topology .popup h5 {
218+
font-weight: bold;
219+
}
220+
221+
.container-topology .popup p {
222+
margin: 0 0 4px;
223+
}
224+
225+
.container-topology .popup p:hover {
226+
color : #0099cc;
227+
cursor: pointer;
228+
}
229+
230+
.container-topology label.checkbox-inline {
231+
font-size:14px;
232+
}
233+
234+
.pf-topology-svg g {
235+
font-family: PatternFlyIcons-webfont;
236+
font-size: 18px;
237+
text-anchor: middle;
238+
cursor: pointer;
239+
}
240+
241+
.pf-topology-svg g text {
242+
stroke: none;
243+
stroke-width: 0px;
244+
}
245+
246+
.pf-topology-svg g.weak use {
247+
opacity: .6;
248+
}
249+
250+
.pf-topology-svg g.Pod text {
251+
font-family: FontAwesome;
252+
font-size: 16px;
253+
fill: #1186C1;
254+
}
255+
256+
.pf-topology-svg g.Node text {
257+
fill: #636363;
258+
}
259+
260+
.pf-topology-svg g.Service text {
261+
fill: #ff7f0e;
262+
}
263+
264+
.pf-topology-svg g.ReplicationController text {
265+
fill: #9467bd;
266+
font-size: 20px;
267+
}
268+
269+
.pf-topology-svg g circle {
270+
stroke: #aaa;
271+
fill: #fff;
272+
}
273+
274+
.pf-topology-svg g.fixed use {
275+
stroke-width: 2px;
276+
}
277+
278+
.pf-topology-svg g.selected use,
279+
.pf-topology-svg g.selected circle {
280+
stroke-width: 4px;
281+
}
282+
283+
.pf-topology-svg line {
284+
stroke: #aaa;
285+
stroke-width: 1;
286+
}
287+
288+
.pf-topology-svg line.ReplicationControllerPod {
289+
stroke-linecap: round;
290+
stroke-dasharray: 5, 2;
291+
}
292+
293+
.pf-topology-svg g text.attached-label {
294+
display: none;
295+
}
296+
297+
.pf-topology-svg g text.attached-label.visible {
298+
font-size: 12px;
299+
fill: black;
300+
display: block;
301+
}
302+
303+
.pf-topology-svg g.selected {
304+
stroke-width: 4px;
305+
}
306+
307+
.pf-topology-svg g circle {
308+
stroke-width: 2px;
309+
}
310+
311+
.pf-topology-svg g circle.success {
312+
stroke: #3F9C35;
313+
}
314+
315+
.pf-topology-svg g circle.error {
316+
stroke: #CC0000;
317+
}
318+
319+
.pf-topology-svg g circle.warning {
320+
stroke: #EC7A08;
321+
}
322+
323+
.pf-topology-svg g circle.unknown {
324+
stroke: #bbb;
325+
}
326+
327+
.pf-topology-svg line.ContainerServiceContainerGroup, .pf-topology-svg line.ContainerReplicatorContainerGroup, .pf-topology-svg line.ContainerServiceContainerRoute,
328+
.pf-topology-svg line.ContainerGroupContainerService, .pf-topology-svg line.ContainerGroupContainerReplicator {
329+
stroke-linecap: round;
330+
stroke-dasharray: 5.5;
331+
}
332+
333+
.pf-topology-svg g text.glyph {
334+
font-size: 20px;
335+
fill: #1186C1;
336+
}
337+
338+
.pf-topology-svg g.Container text.glyph {
339+
font-size: 18px;
340+
}
341+
342+
.pf-topology-svg g.ContainerGroup text.glyph {
343+
font-size: 18px;
344+
}
345+
346+
.pf-topology-svg g.Vm text.glyph, .pf-topology-svg g.Host text.glyph {
347+
fill: #636363;
348+
}
349+
350+
.pf-topology-svg g.ContainerNode text.glyph {
351+
font-size: 18px;
352+
}
353+
354+
.pf-topology-svg g.ContainerManager text.glyph {
355+
font-size: 18px;
356+
}

0 commit comments

Comments
 (0)