blob: 6ee1b0222b8ccc267d8dfdbf5cbbff6e6e5d6c64 [file] [log] [blame]
rama-huaweic78f3092016-05-19 18:09:29 +05301/*
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 */
16package org.onosproject.sfcweb;
17
18import org.onosproject.net.DeviceId;
19import org.onosproject.net.HostId;
20import org.onosproject.ui.UiTopoOverlay;
21import org.onosproject.ui.topo.PropertyPanel;
22
23
24/**
25 * Our sfcweb topology overlay.
26 */
27public class SfcwebUiTopovOverlay extends UiTopoOverlay {
28
29 // NOTE: this must match the ID defined in sfcwebTopov.js
30 private static final String OVERLAY_ID = "SFC-Service-overlay";
31 private static final String MY_DEVICE_TITLE = "SFF specific device details";
32 private static final String MY_HOST_TITLE = "SF specific host details";
33
34 public SfcwebUiTopovOverlay() {
35 super(OVERLAY_ID);
36 }
37
38 @Override
39 public void modifyDeviceDetails(PropertyPanel pp, DeviceId deviceId) {
40 pp.title(MY_DEVICE_TITLE);
41 pp.removeAllProps();
42 pp.addProp("SFF Device Id", deviceId.toString());
43 }
44
45 @Override
46 public void modifyHostDetails(PropertyPanel pp, HostId hostId) {
47 pp.title(MY_HOST_TITLE);
48 pp.removeAllProps();
49 pp.addProp("SF host Address", hostId.toString());
50 }
51
52}