diff --git a/crawl/service/ICMP.cs b/crawl/service/ICMP.cs
index 3a264ab..e71e810 100644
--- a/crawl/service/ICMP.cs
+++ b/crawl/service/ICMP.cs
@@ -14,14 +14,14 @@ namespace ln.skyscanner.crawl.tests
{
public class ICMP : CrawlService
{
+ public Ping Ping { get; private set; }
+
public ICMP()
:base("ping")
{}
public override bool Check(Crawl crawl)
{
- using (Ping ping = new Ping())
- {
int nSuccess = 0;
long roundTripTime = 0;
@@ -29,7 +29,7 @@ namespace ln.skyscanner.crawl.tests
{
//HostCrawl.setState("ICMP check [{0}/10]", n);
- PingReply pingReply = ping.Send(crawl.Host.PrimaryIP, 500);
+ PingReply pingReply = Ping.Send(crawl.Host.PrimaryIP, 500);
if (pingReply.Status == IPStatus.Success)
{
nSuccess++;
@@ -59,7 +59,6 @@ namespace ln.skyscanner.crawl.tests
crawl.Host.SetHint("ping.rta", null);
crawl.Host.SetHint("ping.out_of_ten", 0);
}
- }
return true;
}
diff --git a/entities/DeviceType.cs b/entities/DeviceType.cs
new file mode 100644
index 0000000..f7e3f7a
--- /dev/null
+++ b/entities/DeviceType.cs
@@ -0,0 +1,16 @@
+using System;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+namespace ln.skyscanner.entities
+{
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum DeviceType
+ {
+ UNKNOWN,
+ ROUTER,
+ PTP,
+ PTMP,
+ UPS,
+ SERVER
+ }
+}
diff --git a/entities/GlobalNetwork.cs b/entities/GlobalNetwork.cs
index 619b824..92ea984 100644
--- a/entities/GlobalNetwork.cs
+++ b/entities/GlobalNetwork.cs
@@ -268,10 +268,10 @@ namespace ln.skyscanner.entities
if (httpIndex.Contains("
B5c"))
{
node.Product = "B5c";
+ node.DeviceType = DeviceType.PTP;
}
}
-
if (crawledHost.GetHint("http.server", "").Equals("Viprinet"))
node.Vendor = "Viprinet";
@@ -280,6 +280,12 @@ namespace ln.skyscanner.entities
node.Vendor = "Ubiquity";
}
+ if (crawledHost.GetHint("ubiquity.ptp",false))
+ {
+ node.DeviceType = DeviceType.PTP;
+ }
+
+
foreach (Network4 network in node.Networks)
EnsureSubnet(network);
diff --git a/entities/Node.cs b/entities/Node.cs
index c2fd5a9..2ff205e 100644
--- a/entities/Node.cs
+++ b/entities/Node.cs
@@ -40,6 +40,8 @@ namespace ln.skyscanner.entities
public string ProductLine { get; set; }
public CheckSeverity Severity { get; set; } = CheckSeverity.PLANNED;
+ public DeviceType DeviceType { get; set; }
+
public List Interfaces { get; private set; } = new List();
[JsonIgnore]
diff --git a/ln.skyscanner.csproj b/ln.skyscanner.csproj
index b37d9c7..2ffa880 100644
--- a/ln.skyscanner.csproj
+++ b/ln.skyscanner.csproj
@@ -80,6 +80,7 @@
+
@@ -95,12 +96,6 @@
PreserveNewest
-
- PreserveNewest
-
-
- PreserveNewest
-
PreserveNewest
@@ -138,9 +133,6 @@
PreserveNewest
-
- PreserveNewest
-
PreserveNewest
@@ -199,6 +191,15 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
@@ -215,6 +216,7 @@
+
diff --git a/templates/static/crawlerhosts.html b/templates/static/crawler/hosts.html
similarity index 100%
rename from templates/static/crawlerhosts.html
rename to templates/static/crawler/hosts.html
diff --git a/templates/static/summary.html b/templates/static/crawler/status.html
similarity index 54%
rename from templates/static/summary.html
rename to templates/static/crawler/status.html
index 3170b17..ad1f9a8 100644
--- a/templates/static/summary.html
+++ b/templates/static/crawler/status.html
@@ -1,33 +1,6 @@
<%frame "frame.html"%>
-
Übersicht
-
-
-
-
-
-
Crawler
+
Crawler Status
@@ -97,28 +70,6 @@
}
- $("#cbCrawlHosts").on("click", function(){ skyapi().call("api/crawler","ToggleCrawlHosts"); } );
- $("#cbCrawlSubnets").on("click", function(){ skyapi().call("api/crawler","ToggleCrawlSubnets"); } );
-
createCrawlerTables();
skyapi().addRefresh(refreshCrawlerTables, 1);
- skyapi().addRefresh(
- function(){
- skyapi().call(
- "api/crawler",
- "GetCrawlSubnets",
- [],
- function(r){
- $("#cbCrawlSubnets").prop("checked", r);
- } );
- skyapi().call(
- "api/crawler",
- "GetCrawlHosts",
- [],
- function(r){
- $("#cbCrawlHosts").prop("checked", r);
- } );
- },
- 1
- );
diff --git a/templates/static/crawlersubnets.html b/templates/static/crawler/subnets.html
similarity index 100%
rename from templates/static/crawlersubnets.html
rename to templates/static/crawler/subnets.html
diff --git a/templates/static/network/index.html b/templates/static/network/index.html
index 35c65b4..23f8bc7 100644
--- a/templates/static/network/index.html
+++ b/templates/static/network/index.html
@@ -20,6 +20,14 @@
+
+
+
diff --git a/templates/static/topnav.html b/templates/static/topnav.html
index 681fdaa..7e988e3 100644
--- a/templates/static/topnav.html
+++ b/templates/static/topnav.html
@@ -30,10 +30,13 @@