blob: 98999825188988560ee50a83dc2db08973c40b11 [file] [log] [blame]
Simon Hunt1ee09852015-09-29 12:28:14 -07001#set( $symbol_pound = '#' )
2#set( $symbol_dollar = '$' )
3#set( $symbol_escape = '\' )
4/*
5 * Copyright 2014,2015 Open Networking Laboratory
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package ${package};
20
21import org.onosproject.ui.UiTopoOverlay;
22import org.onosproject.ui.topo.ButtonId;
23import org.onosproject.ui.topo.PropertyPanel;
24import org.onosproject.ui.topo.TopoConstants.CoreButtons;
25import org.onosproject.ui.topo.TopoConstants.Glyphs;
26
27import static org.onosproject.ui.topo.TopoConstants.Properties.*;
28
29/**
30 * Our topology overlay.
31 */
32public class AppUiTopovOverlay extends UiTopoOverlay {
33
34 // NOTE: this must match the ID defined in sampleTopov.js
35 private static final String OVERLAY_ID = "meowster-overlay";
36
37 private static final String MY_TITLE = "My App Rocks!";
38 private static final String MY_VERSION = "Beta-1.0.0042";
39 private static final String MY_DEVICE_TITLE = "I changed the title";
40
41 private static final ButtonId FOO_BUTTON = new ButtonId("foo");
42 private static final ButtonId BAR_BUTTON = new ButtonId("bar");
43
44 public AppUiTopovOverlay() {
45 super(OVERLAY_ID);
46 }
47
48
49 @Override
50 public void modifySummary(PropertyPanel pp) {
51 pp.title(MY_TITLE)
52 .typeId(Glyphs.CROWN)
53 .removeProps(
54 TOPOLOGY_SSCS,
55 INTENTS,
56 TUNNELS,
57 FLOWS,
58 VERSION
59 )
60 .addProp(VERSION, MY_VERSION);
61 }
62
63 @Override
64 public void modifyDeviceDetails(PropertyPanel pp) {
65 pp.title(MY_DEVICE_TITLE);
66 pp.removeProps(LATITUDE, LONGITUDE);
67
68 pp.addButton(FOO_BUTTON)
69 .addButton(BAR_BUTTON);
70
71 pp.removeButtons(CoreButtons.SHOW_PORT_VIEW)
72 .removeButtons(CoreButtons.SHOW_GROUP_VIEW);
73 }
74
75}