Skip to content

Commit

Permalink
Fixes GUI updates when collecting. (#401)
Browse files Browse the repository at this point in the history
* Fix Gui Spinner issue.
  • Loading branch information
gfs committed Apr 24, 2020
1 parent 9e5ae0a commit 2e6f58d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 0 additions & 1 deletion Cli/Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Utf8Json" Version="1.3.7" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions Cli/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
using AttackSurfaceAnalyzer.Utils;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using Utf8Json;

namespace AttackSurfaceAnalyzer.Gui.Controllers
{
Expand Down Expand Up @@ -51,7 +51,7 @@ public ActionResult GetMonitorResults(string RunId, int Offset, int NumResults)
output["Requested"] = NumResults;
output["Actual"] = results.Count;

return Json(JsonSerializer.Serialize(output));
return Json(JsonConvert.SerializeObject(output));
}

public ActionResult GetResults(string BaseId, string CompareId, int ResultType, int Offset, int NumResults)
Expand All @@ -65,7 +65,7 @@ public ActionResult GetResults(string BaseId, string CompareId, int ResultType,
output["Offset"] = Offset;
output["Requested"] = NumResults;
output["Actual"] = results.Count;
return Json(JsonSerializer.Serialize(output));
return Json(JsonConvert.SerializeObject(output));
}


Expand All @@ -91,7 +91,7 @@ public ActionResult GetCollectors()
Dictionary<string, object> output = new Dictionary<string, object>();
output.Add("RunId", RunId);
output.Add("Runs", dict);
return Json(JsonSerializer.Serialize(output));
return Json(JsonConvert.SerializeObject(output));
}

public ActionResult GetLatestRunId()
Expand All @@ -110,7 +110,7 @@ public ActionResult GetMonitorStatus()
}

//@TODO: Also return the RunId
return Json(JsonSerializer.Serialize(dict));
return Json(JsonConvert.SerializeObject(dict));
}

public ActionResult GetComparators()
Expand All @@ -124,7 +124,7 @@ public ActionResult GetComparators()
}

//@TODO: Also return the RunId
return Json(JsonSerializer.Serialize(dict));
return Json(JsonConvert.SerializeObject(dict));
}


Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ If you have .NET Core 3.1 installed you can install Attack Surface Analyzer with
Platform specific binaries for Attack Surface Analyzer are distributed via our GitHub [releases](https://github.com/Microsoft/AttackSurfaceAnalyzer/releases/latest) page.

## Note on Version
The latest stable version of Attack Surface Analyzer is 2.1 (see [Release\v2.1](https://github.com/Microsoft/AttackSurfaceAnalyzer/tree/release/v2.1)). 2.2 is available in Beta.
The latest stable version of Attack Surface Analyzer is 2.1 (see [Release\v2.1](https://github.com/Microsoft/AttackSurfaceAnalyzer/tree/release/v2.1)).

2.2 is available in Beta.

2.3 is now in development. You can see the features coming [here](https://github.com/microsoft/attacksurfaceanalyzer/issues?q=is%3Aissue+milestone%3Av2.3+).

## New Features in 2.2

Expand Down

0 comments on commit 2e6f58d

Please sign in to comment.