import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentMap;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.codehaus.jackson.map.ObjectMapper;
-import org.opendaylight.controller.web.DaylightWebUtil;
-import org.opendaylight.controller.web.IDaylightWeb;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
import org.opendaylight.controller.forwarding.staticrouting.IForwardingStaticRouting;
import org.opendaylight.controller.forwarding.staticrouting.StaticRouteConfig;
import org.opendaylight.controller.sal.authorization.Privilege;
import org.opendaylight.controller.sal.core.Name;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.core.NodeConnector;
+import org.opendaylight.controller.sal.core.State;
import org.opendaylight.controller.sal.core.Tier;
import org.opendaylight.controller.sal.utils.GlobalConstants;
import org.opendaylight.controller.sal.utils.HexEncode;
import org.opendaylight.controller.switchmanager.SubnetConfig;
import org.opendaylight.controller.switchmanager.Switch;
import org.opendaylight.controller.switchmanager.SwitchConfig;
+import org.opendaylight.controller.web.DaylightWebUtil;
+import org.opendaylight.controller.web.IDaylightWeb;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
import com.google.gson.Gson;
Config portStatus = ((Config) switchManager
.getNodeConnectorProp(nodeConnector,
Config.ConfigPropName));
+ State portState = ((State) switchManager
+ .getNodeConnectorProp(nodeConnector,
+ State.StatePropName));
String nodeConnectorName = (ncName != null) ? ncName
.getValue() : "";
if (portStatus != null) {
if (portStatus.getValue() == Config.ADMIN_UP) {
- nodeConnectorName = "<span style='color:green;'>"
- + nodeConnectorName + "</span>";
+ if (portState.getValue() == State.EDGE_UP) {
+ nodeConnectorName = "<span class='admin-up'>"
+ + nodeConnectorName + "</span>";
+ } else if (portState.getValue() == State.EDGE_DOWN) {
+ nodeConnectorName = "<span class='edge-down'>"
+ + nodeConnectorName + "</span>";
+ }
} else if (portStatus.getValue() == Config.ADMIN_DOWN) {
- nodeConnectorName = "<span style='color:red;'>"
+ nodeConnectorName = "<span class='admin-down'>"
+ nodeConnectorName + "</span>";
}
}