ONOS-5622 fix the map Map selection dialog style problem
Change-Id: Iaafd49725dff74deade4dd7d28ee4e9b72604f27
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 1a1d234..ec4e239 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 @@
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 @@
* @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 854c99b..eb86556 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 @@
}
.map-list select {
- font-size: 20px;
+ font-size: 16px;
}