From fdd497c69789d9aa2e4dfb13d7c80d72176bef1c Mon Sep 17 00:00:00 2001 From: chengfan Date: Fri, 25 Nov 2016 22:17:58 +0800 Subject: [PATCH] ONOS-5622 fix the map Map selection dialog style problem Change-Id: Iaafd49725dff74deade4dd7d28ee4e9b72604f27 --- core/api/src/main/java/org/onosproject/ui/UiTopoMap.java | 5 +++++ web/gui/src/main/webapp/app/view/topo/topo.css | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/api/src/main/java/org/onosproject/ui/UiTopoMap.java b/core/api/src/main/java/org/onosproject/ui/UiTopoMap.java index 1a1d2340c2..ec4e239173 100644 --- a/core/api/src/main/java/org/onosproject/ui/UiTopoMap.java +++ b/core/api/src/main/java/org/onosproject/ui/UiTopoMap.java @@ -16,6 +16,8 @@ package org.onosproject.ui; +import static com.google.common.base.Preconditions.checkState; + /** * Represents a geographically-based map to be used in the user interface * topology view. Instances of this class are immutable. @@ -26,6 +28,8 @@ public class UiTopoMap { private final String desc; private final String filePath; private final double scale; + private static final int MAX_LENGTH = 32; + private static final String DES_EXC_LIM = "Description is too long"; /** @@ -37,6 +41,7 @@ public class UiTopoMap { * @param scale map scale */ public UiTopoMap(String id, String desc, String filePath, double scale) { + checkState(desc.length() <= MAX_LENGTH, DES_EXC_LIM); this.id = id; this.desc = desc; this.filePath = filePath; diff --git a/web/gui/src/main/webapp/app/view/topo/topo.css b/web/gui/src/main/webapp/app/view/topo/topo.css index 854c99b17d..eb8655655f 100644 --- a/web/gui/src/main/webapp/app/view/topo/topo.css +++ b/web/gui/src/main/webapp/app/view/topo/topo.css @@ -255,5 +255,5 @@ html[data-platform='iPad'] #topo-p-detail { } .map-list select { - font-size: 20px; + font-size: 16px; }