Beispiel #1
0
 public string GetClass(Item s)
 {
     if (s.IsFrontend)
         return "frontend";
     if (s.IsBackend)
         return "backend";
     if (s.IsServer)
         return s.ProxyServerStatus.ToString();
     return "";
 }
Beispiel #2
0
        public static IHtmlString ToStatusSpan(this Data.HAProxy.Item item)
        {
            if (item.Status == "UP")
            {
                return(MvcHtmlString.Empty);
            }

            switch (item.MonitorStatus)
            {
            case MonitorStatus.Good:
                return(string.Format("({0})", item.Status).AsHtml());

            default:
                return(string.Format("(<b>{0}</b>)", item.Status).AsHtml());
            }
        }
        public static IHtmlString ToStatusSpan(this Data.HAProxy.Item item)
        {
            if (item.Status == "UP")
            {
                return(MvcHtmlString.Empty);
            }

            switch (item.MonitorStatus)
            {
            case MonitorStatus.Good:
                return(("(" + item.Status + ")").AsHtml());

            default:
                return(("(<b>" + item.Status + "</b>)").AsHtml());
            }
        }