blob: a48c253f540fff3a67b2a08102a9abfb877c80bb [file] [log] [blame]
Simon Hunt629b99e2015-07-27 17:38:33 -07001/*
2 * Copyright 2015 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
18package org.onosproject.ui.topo;
19
20/**
21 * Defines string constants used in the Topology View of the ONOS GUI.
22 * <p>
23 * See also:
24 * <ul>
25 * <li> https://wiki.onosproject.org/display/ONOS/UI+Service+-+GlyphService </li>
26 * </ul>
27 */
28public final class TopoConstants {
29
30 /**
31 * Defines constants for standard glyph identifiers.
32 */
33 public static final class Glyphs {
34 public static final String UNKNOWN = "unknown";
35 public static final String BIRD = "bird";
36 public static final String NODE = "node";
37 public static final String SWITCH = "switch";
38 public static final String ROADM = "roadm";
39 public static final String ENDSTATION = "endstation";
40 public static final String ROUTER = "router";
41 public static final String BGP_SPEAKER = "bgpSpeaker";
42 public static final String CHAIN = "chain";
43 public static final String CROWN = "crown";
44 public static final String TOPO = "topo";
45 public static final String REFRESH = "refresh";
46 public static final String GARBAGE = "garbage";
47 public static final String FLOW_TABLE = "flowTable";
48 public static final String PORT_TABLE = "portTable";
49 public static final String GROUP_TABLE = "groupTable";
50 public static final String SUMMARY = "summary";
51 public static final String DETAILS = "details";
52 public static final String PORTS = "ports";
53 public static final String MAP = "map";
54 public static final String CYCLE_LABELS = "cycleLabels";
55 public static final String OBLIQUE = "oblique";
56 public static final String FILTERS = "filters";
57 public static final String RESET_ZOOM = "resetZoom";
58 public static final String RELATED_INTENTS = "relatedIntents";
59 public static final String NEXT_INTENT = "nextIntent";
60 public static final String PREV_INTENT = "prevIntent";
61 public static final String INTENT_TRAFFIC = "intentTraffic";
62 public static final String ALL_TRAFFIC = "allTraffic";
63 public static final String FLOWS = "flows";
64 public static final String EQ_MASTER = "eqMaster";
65 public static final String UI_ATTACHED = "uiAttached";
66 public static final String CHECK_MARK = "checkMark";
67 public static final String X_MARK = "xMark";
68 public static final String TRIANGLE_UP = "triangleUp";
69 public static final String TRIANGLE_DOWN = "triangleDown";
70 public static final String PLUS = "plus";
71 public static final String MINUS = "minus";
72 public static final String PLAY = "play";
73 public static final String STOP = "stop";
74 public static final String CLOUD = "cloud";
75 }
Simon Huntfb940112015-07-29 18:36:35 -070076
77 /**
78 * Defines constants for property names on the default summary and
79 * details panels.
80 */
81 public static final class Properties {
Simon Hunt3a0598f2015-08-04 19:59:04 -070082 public static final String SEPARATOR = "-";
83
Simon Huntfb940112015-07-29 18:36:35 -070084 // summary panel
85 public static final String DEVICES = "Devices";
86 public static final String LINKS = "Links";
87 public static final String HOSTS = "Hosts";
88 public static final String TOPOLOGY_SSCS = "Topology SCCs";
89 public static final String INTENTS = "Intents";
90 public static final String TUNNELS = "Tunnels";
91 public static final String FLOWS = "Flows";
92 public static final String VERSION = "Version";
93
94 // device details
95 public static final String URI = "URI";
96 public static final String VENDOR = "Vendor";
97 public static final String HW_VERSION = "H/W Version";
98 public static final String SW_VERSION = "S/W Version";
99 public static final String SERIAL_NUMBER = "Serial Number";
100 public static final String PROTOCOL = "Protocol";
101 public static final String LATITUDE = "Latitude";
102 public static final String LONGITUDE = "Longitude";
103 public static final String PORTS = "Ports";
104
105 // host details
106 public static final String MAC = "MAC";
107 public static final String IP = "IP";
108 public static final String VLAN = "VLAN";
109 }
110
Simon Hunt3a0598f2015-08-04 19:59:04 -0700111 private static final class CoreButton extends ButtonDescriptor {
112 private CoreButton(String tag, String glyphId, boolean extra) {
113 super("show" + tag + "View",
114 glyphId,
115 "Show " + tag + " View" + (extra ? " for this Device" : ""));
116 }
117 }
118
119 /**
120 * Defines constants for core buttons that appear on the topology
121 * details panel.
122 */
123 public static final class CoreButtons {
124 public static final ButtonDescriptor SHOW_DEVICE_VIEW =
125 new CoreButton("Device", Glyphs.SWITCH, false);
126
127 public static final ButtonDescriptor SHOW_FLOW_VIEW =
128 new CoreButton("Flow", Glyphs.FLOW_TABLE, true);
129
130 public static final ButtonDescriptor SHOW_PORT_VIEW =
131 new CoreButton("Port", Glyphs.PORT_TABLE, true);
132
133 public static final ButtonDescriptor SHOW_GROUP_VIEW =
134 new CoreButton("Group", Glyphs.GROUP_TABLE, true);
135 }
136
Simon Hunt629b99e2015-07-27 17:38:33 -0700137}