Simon Hunt | 629b99e | 2015-07-27 17:38:33 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Simon Hunt | 629b99e | 2015-07-27 17:38:33 -0700 | [diff] [blame] | 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. |
Simon Hunt | 629b99e | 2015-07-27 17:38:33 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | package org.onosproject.ui.topo; |
| 18 | |
| 19 | /** |
| 20 | * Defines string constants used in the Topology View of the ONOS GUI. |
Simon Hunt | 629b99e | 2015-07-27 17:38:33 -0700 | [diff] [blame] | 21 | */ |
| 22 | public final class TopoConstants { |
| 23 | |
| 24 | /** |
Simon Hunt | a58d894 | 2017-08-11 12:51:14 -0700 | [diff] [blame] | 25 | * Defines constants for property/localization keys on the default summary |
| 26 | * and details panels. Note that display labels should be looked up using |
Simon Hunt | 879ce45 | 2017-08-10 23:32:00 -0700 | [diff] [blame] | 27 | * the "core.view.Topo" localization bundle (LionBundle). |
Simon Hunt | fb94011 | 2015-07-29 18:36:35 -0700 | [diff] [blame] | 28 | */ |
| 29 | public static final class Properties { |
Simon Hunt | 3a0598f | 2015-08-04 19:59:04 -0700 | [diff] [blame] | 30 | public static final String SEPARATOR = "-"; |
| 31 | |
Simon Hunt | fb94011 | 2015-07-29 18:36:35 -0700 | [diff] [blame] | 32 | // summary panel |
Simon Hunt | 879ce45 | 2017-08-10 23:32:00 -0700 | [diff] [blame] | 33 | public static final String DEVICES = "devices"; |
| 34 | public static final String LINKS = "links"; |
| 35 | public static final String HOSTS = "hosts"; |
| 36 | public static final String TOPOLOGY_SSCS = "topology_sccs"; |
| 37 | public static final String INTENTS = "intents"; |
| 38 | public static final String TUNNELS = "tunnels"; |
| 39 | public static final String FLOWS = "flows"; |
| 40 | public static final String VERSION = "version"; |
Simon Hunt | fb94011 | 2015-07-29 18:36:35 -0700 | [diff] [blame] | 41 | |
| 42 | // device details |
Simon Hunt | 879ce45 | 2017-08-10 23:32:00 -0700 | [diff] [blame] | 43 | public static final String URI = "uri"; |
| 44 | public static final String VENDOR = "vendor"; |
| 45 | public static final String HW_VERSION = "hw_version"; |
| 46 | public static final String SW_VERSION = "sw_version"; |
| 47 | public static final String SERIAL_NUMBER = "serial_number"; |
| 48 | public static final String PROTOCOL = "protocol"; |
| 49 | public static final String LATITUDE = "latitude"; |
| 50 | public static final String LONGITUDE = "longitude"; |
| 51 | public static final String GRID_Y = "grid_y"; |
| 52 | public static final String GRID_X = "grid_x"; |
| 53 | public static final String PORTS = "ports"; |
Simon Hunt | fb94011 | 2015-07-29 18:36:35 -0700 | [diff] [blame] | 54 | |
| 55 | // host details |
Simon Hunt | 879ce45 | 2017-08-10 23:32:00 -0700 | [diff] [blame] | 56 | public static final String MAC = "mac"; |
| 57 | public static final String IP = "ip"; |
| 58 | public static final String VLAN = "vlan"; |
Simon Hunt | a58d894 | 2017-08-11 12:51:14 -0700 | [diff] [blame] | 59 | public static final String VLAN_NONE = "vlan_none"; |
Simon Hunt | fb94011 | 2015-07-29 18:36:35 -0700 | [diff] [blame] | 60 | } |
| 61 | |
Simon Hunt | 3a0598f | 2015-08-04 19:59:04 -0700 | [diff] [blame] | 62 | /** |
Simon Hunt | 8d22c4b | 2015-08-06 16:24:43 -0700 | [diff] [blame] | 63 | * Defines identities of core buttons that appear on the topology |
Simon Hunt | 3a0598f | 2015-08-04 19:59:04 -0700 | [diff] [blame] | 64 | * details panel. |
| 65 | */ |
| 66 | public static final class CoreButtons { |
Simon Hunt | 8d22c4b | 2015-08-06 16:24:43 -0700 | [diff] [blame] | 67 | public static final ButtonId SHOW_DEVICE_VIEW = |
| 68 | new ButtonId("showDeviceView"); |
Simon Hunt | 3a0598f | 2015-08-04 19:59:04 -0700 | [diff] [blame] | 69 | |
Simon Hunt | 8d22c4b | 2015-08-06 16:24:43 -0700 | [diff] [blame] | 70 | public static final ButtonId SHOW_FLOW_VIEW = |
| 71 | new ButtonId("showFlowView"); |
Simon Hunt | 3a0598f | 2015-08-04 19:59:04 -0700 | [diff] [blame] | 72 | |
Simon Hunt | 8d22c4b | 2015-08-06 16:24:43 -0700 | [diff] [blame] | 73 | public static final ButtonId SHOW_PORT_VIEW = |
| 74 | new ButtonId("showPortView"); |
Simon Hunt | 3a0598f | 2015-08-04 19:59:04 -0700 | [diff] [blame] | 75 | |
Simon Hunt | 8d22c4b | 2015-08-06 16:24:43 -0700 | [diff] [blame] | 76 | public static final ButtonId SHOW_GROUP_VIEW = |
| 77 | new ButtonId("showGroupView"); |
Jian Li | 79f6732 | 2016-01-06 18:22:37 -0800 | [diff] [blame] | 78 | |
| 79 | public static final ButtonId SHOW_METER_VIEW = |
| 80 | new ButtonId("showMeterView"); |
Simon Hunt | 3a0598f | 2015-08-04 19:59:04 -0700 | [diff] [blame] | 81 | } |
Simon Hunt | 629b99e | 2015-07-27 17:38:33 -0700 | [diff] [blame] | 82 | } |