();
157 |
158 | foreach (var rollUpItem in rollUp)
159 | {
160 | var item = rollUpItem.Value.Where(b => b.Key.Equals(analyzerStatusLabel));
161 | result.Add((item.Count() != 0) ? item.First().Value : 0);
162 | }
163 |
164 | return result.ToArray();
165 | }
166 |
167 | private string CreateLegend()
168 | {
169 | //Create string builder with starting div
170 | StringBuilder result = new StringBuilder("\"");
171 |
172 | //add legend items
173 | foreach (var uniqueAnalyzerStatusLabel in GetUniqueAnalyzerStatusLabels(Model))
174 | {
175 | result.Append($"{uniqueAnalyzerStatusLabel.ToString()}");
176 | }
177 |
178 | //add ending div
179 | result.Append("
\"");
180 |
181 | return result.ToString();
182 | }
183 | }
184 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/FxApi/Index.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @model Microsoft.Fx.Portability.ApiInformation
6 | @using DotNetStatus
7 |
8 | @{
9 | ViewBag.Title = @Model.Definition.DocId;
10 | }
11 |
12 |
13 |
20 |
21 | @if (!string.IsNullOrEmpty(Model.RecommendedChanges))
22 | {
23 |
24 | Recommended changes:
25 | @Model.RecommendedChanges
26 |
27 | }
28 |
29 |
Supported on:
30 |
31 | @foreach (var target in Model.Supported.GroupBy(s => s.Identifier))
32 | {
33 | -
34 | @foreach (var version in target.OrderByDescending(t => t.Version))
35 | {
36 | @version.Version
37 | }
38 | @target.Key
39 |
40 | }
41 |
42 |
43 | @if (Model.AdditionalInformation.Any())
44 | {
45 |
Additional information:
46 | foreach (var additional in Model.AdditionalInformation)
47 | {
48 |
49 |
50 |
@additional.Title
51 |
52 | @*
@Html.Markdown(additional.Html)
*@
53 |
@additional.Markdown
54 |
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @{
6 | ViewBag.Title = "Diagnostic Tools";
7 | }
8 |
9 |
10 |
.NET Compatibility Diagnostic Tools
11 |
12 |
13 |
14 |
15 | This site provides information about the available compatibility diagnostic tools. These tools are helpful in identifying potential
16 | .NET Framework Compatibility
17 | issues when moving from one .NET Framework version to another. Below are the links to the tools.
18 |
19 |
20 |
38 |
39 |
40 | If you want to learn more about these tools, you should check out this Channel 9 video:
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Shared/Error.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @{
6 | Layout = null;
7 | }
8 |
9 |
10 |
11 |
12 |
13 | Error
14 |
15 |
16 |
17 | Error.
18 | An error occurred while processing your request.
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | @ViewBag.Title
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | @RenderSection("scripts", required: false)
42 |
43 |
44 |
45 |
74 |
75 | @RenderBody()
76 |
77 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Submission/Index.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @using Microsoft.Fx.Portability;
6 | @using Microsoft.Fx.Portability.ObjectModel;
7 |
8 | @{
9 | ViewBag.Title = "View Submission Result";
10 |
11 | var exception = Model as PortabilityAnalyzerException;
12 | var m = Model as AnalyzeResponse;
13 | }
14 |
15 | @if (exception != null)
16 | {
17 | @Html.Partial("_Find", exception)
18 | }
19 | else if (m != null && Model.Targets == null)
20 | {
21 | @Html.Partial("_Find", m)
22 | }
23 | else if (m != null)
24 | {
25 |
26 |
View result for @m.SubmissionId
27 |
28 |
29 | @Html.Partial("_SubmissionResult", m)
30 |
31 | }
32 | else
33 | {
34 | @Html.Partial("_Find")
35 | }
36 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Submission/_Find.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @using Microsoft.Fx.Portability;
6 | @using Microsoft.Fx.Portability.ObjectModel;
7 |
8 | @{
9 | ViewBag.Title = "Find";
10 | }
11 |
12 |
13 |
14 |
Please enter a submission id
15 |
16 |
17 | @if (Model is AnalyzeResponse)
18 | {
19 | var submissionId = (Model as AnalyzeResponse).SubmissionId;
20 |
21 |
22 |
23 | No submission was found that matches '@submissionId'.
24 |
25 | }
26 | else if (Model is PortabilityAnalyzerException)
27 | {
28 |
29 |
30 | Unknown error:
31 | There was a problem searching for your submission. Please try again.
32 |
33 | }
34 |
35 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Submission/_SubmissionResult.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @model Microsoft.Fx.Portability.ObjectModel.AnalyzeResponse
6 |
7 | @if (Model.MissingDependencies.Any())
8 | {
9 |
10 | @{
11 | var count = 0;
12 | var panelGroupName = "assemblyPanelGroup";
13 | var grouped = Model.MissingDependencies.GroupBy(a => a.TypeDocId).OrderBy(a => a.Key).Where(a => !string.IsNullOrEmpty(a.Key));
14 | }
15 |
16 | @if (grouped.Any())
17 | {
18 |
19 | @foreach (var item in grouped)
20 | {
21 | var panelName = string.Format("assemblyPanel{0}", count++);
22 |
23 |
24 |
29 |
30 |
31 |
32 |
33 | API |
34 | @foreach (var target in Model.Targets)
35 | {
36 | @target |
37 | }
38 |
39 | @foreach (var value in item)
40 | {
41 |
42 | @value |
43 | @for (var i = 0; i < Model.Targets.Count; i++)
44 | {
45 | var supportedTarget = value.TargetStatus[i];
46 | var actualTarget = Model.Targets[i].Version;
47 |
48 | if (supportedTarget == null || actualTarget < supportedTarget)
49 | {
50 | |
51 | }
52 | else
53 | {
54 | |
55 | }
56 | }
57 |
58 | }
59 |
60 |
61 |
62 |
63 | }
64 |
65 | }
66 | else
67 | {
68 |
69 | @{
70 | var panelName = string.Format("assemblyPanel{0}", count++);
71 | }
72 |
73 |
74 |
79 |
80 |
81 |
82 |
83 | Type Name |
84 | @foreach (var target in Model.Targets)
85 | {
86 | @target |
87 | }
88 |
89 | @foreach (var item in Model.MissingDependencies)
90 | {
91 |
92 | @item.MemberDocId |
93 | @for (var i = 0; i < Model.Targets.Count; i++)
94 | {
95 | var supportedTarget = item.TargetStatus[i];
96 | var actualTarget = Model.Targets[i].Version;
97 |
98 | if (supportedTarget == null || actualTarget < supportedTarget)
99 | {
100 | |
101 | }
102 | else
103 | {
104 | |
105 | }
106 | }
107 |
108 | }
109 |
110 |
111 |
112 |
113 |
114 | }
115 |
116 | }
117 | else
118 | {
119 |
120 |
You are good to go for the following platforms
121 |
122 | @foreach (var target in Model.Targets)
123 | {
124 | - @target
125 | }
126 |
127 |
128 | }
129 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Usage/Index.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @model Microsoft.Fx.Portability.ObjectModel.UsageDataCollection
6 |
7 | @{
8 | ViewBag.Title = "API Usage";
9 | }
10 |
11 |
12 |
.NET Framework API usage data from the .NET Portability Analyzer tool
13 |
14 |
15 |
16 | @await Html.PartialAsync("_Usage", Model)
17 |
18 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Usage/_Error.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | There was a problem loading the page. Please try again in a few minutes.
6 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Usage/_Legend.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 |
6 |
7 |
8 | This data is a summary of the data we have collected from ApiPort (console and VS extension) submissions. This data is from @Model.SubmissionCount.ToString("N0") submissions.
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | |
17 |
18 | Supported API
19 | |
20 |
21 |
22 |
23 | This API is supported on the target
24 | |
25 |
26 |
27 |
28 |
29 |
30 |
31 | |
32 |
33 | Not supported API
34 | |
35 |
36 |
37 |
38 | The API is not supported on the target. It may, however, be available via NuGet
39 | |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | R
52 |
53 |
54 | |
55 |
56 | Recommended changes
57 | |
58 |
59 |
60 |
61 | These changes help your code be the most portable
62 | |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | S
73 |
74 |
75 | |
76 |
77 | Source compatible
78 | |
79 |
80 |
81 |
82 | The API used is not available, but there are equivalents that the compiler will use.
83 | |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Usage/_Usage.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @model Microsoft.Fx.Portability.ObjectModel.UsageDataCollection
6 |
7 | @if (Model == null)
8 | {
9 | @Html.Partial("_Error")
10 | }
11 | else
12 | {
13 | @Html.Partial("_UsageGrid", Model)
14 | }
15 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/Usage/_UsageGrid.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @model Microsoft.Fx.Portability.ObjectModel.UsageDataCollection
6 |
7 | @using Microsoft.Fx.Portability.ObjectModel;
8 |
9 | @{
10 | var numberInfo = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.Clone() as System.Globalization.NumberFormatInfo;
11 | numberInfo.PercentPositivePattern = 1;
12 |
13 | const string UpdateButtonJS = "$('#updateBtn').click()";
14 |
15 | var topSelectionListItems = new SortedSet(new[] { 25, 50, 100, 150, 250, Model.Top })
16 | .Select(top => new SelectListItem
17 | {
18 | Text = top.ToString(),
19 | Value = top.ToString(),
20 | Selected = Model.Top == top
21 | });
22 |
23 | var filters = new[]
24 | {
25 | new { Filter = UsageDataFilter.HideSupported, Description = "APIs that lack support on some platforms" },
26 | new { Filter = UsageDataFilter.ShowAll, Description = "All APIs" }
27 | };
28 |
29 | var hideSupportedSelectionListItems = filters
30 | .OrderBy(f => f.Description)
31 | .Select(f => new SelectListItem { Text = f.Description, Value = f.Filter.ToString(), Selected = Model.Filter == f.Filter });
32 | }
33 |
34 |
35 |
166 |
167 |
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers"
--------------------------------------------------------------------------------
/src/DotNetStatus/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | *@
4 |
5 | @{
6 | Layout = "/Views/Shared/_Layout.cshtml";
7 | }
8 |
--------------------------------------------------------------------------------
/src/DotNetStatus/appsettings.development.json:
--------------------------------------------------------------------------------
1 | {
2 | "ApiPortService": {
3 | "Url": "http://Localhost:25451"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/DotNetStatus/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ApiPortService": {
3 | "Url": "https://portability.dot.net"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/css/DotNetStatus.css:
--------------------------------------------------------------------------------
1 | /* Copyright (c) Microsoft. All rights reserved.
2 | Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | */
4 |
5 | .status-table-header {
6 | background-color: #eeeeee
7 | }
8 |
9 | .status-table-footer {
10 | background-color: #eeeeee
11 | }
12 |
13 | .status-cell-alignment {
14 | text-align: center;
15 | vertical-align: middle;
16 | }
17 |
18 | .status-chart-legenditem {
19 | padding: 3px;
20 | border: solid;
21 | border-width: 4px;
22 | margin: 5px;
23 | text-align: center;
24 | }
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/css/PopoverStyles.css:
--------------------------------------------------------------------------------
1 | .apiinfo {
2 | color: white;
3 | font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
4 | }
5 |
6 | a.apiinfo:link {
7 | color: white;
8 | text-decoration: none;
9 | }
10 |
11 | a.apiinfo:visited {
12 | color: white;
13 | text-decoration: none;
14 | }
15 |
16 | a.apiinfo:hover {
17 | color: lightgray;
18 | text-decoration: none;
19 | }
20 |
21 | a.apiinfo:active {
22 | color: white;
23 | text-decoration: none;
24 | }
25 |
26 | .sourcecompatibility {
27 | background-color: purple;
28 | }
29 |
30 | .recommendedchange {
31 | background-color: mediumpurple;
32 | }
33 |
34 | .legend {
35 | border: hidden;
36 | }
37 |
38 | div.apiinfo.legend, .sourcecompatibility, .recommendedchange {
39 | width: 30px;
40 | height: 30px;
41 | text-align: center;
42 | }
43 |
44 | td.legend-key {
45 | width: 50px;
46 | }
47 |
48 | span.apiinfo.legend {
49 | display: table-cell;
50 | vertical-align: middle;
51 | padding: 0;
52 | }
53 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/css/navbar.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 20px;
3 | padding-bottom: 20px;
4 | }
5 |
6 | .navbar {
7 | margin-bottom: 20px;
8 | }
9 |
10 | .docId {
11 | font-family: Consolas,monospace;
12 | }
13 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/css/search.css:
--------------------------------------------------------------------------------
1 | .ui-autocomplete {
2 | /* Need to set z-index high so it will show above the navbar */
3 | z-index: 100000;
4 | }
5 |
6 | .invalid-query {
7 | background-color: lightcoral;
8 | color: white;
9 | }
10 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/css/usageicons.css:
--------------------------------------------------------------------------------
1 | .centerHeader {
2 | text-align: center;
3 | }
4 |
5 | /* All Icons */
6 | .IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded {
7 | min-width: 18px;
8 | min-height: 18px;
9 | background-repeat: no-repeat;
10 | background-position: center;
11 | }
12 |
13 | /* Success icon encoded */
14 | .IconSuccessEncoded {
15 | /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
16 | /* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
17 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+eMgQ77v3Xf3Pe51YKGqqisAEwCR1TIAsiAIblSo6xrdHeJR85Xle3mdmCQKb0PsfqyxxzM8K15HZADl/H5+sHpZwYfxyRjTs+kWwKBx8yoHd2mRiuzF8mkJniWH/13u3Fjrs/EdhsdDFHGB/DLXEJBDLh1MWPAhPo1BLB4WX5yQywHR+m3tVe/t97D52CB/ziG0nIgD/qDuYg8WuCcVZ2YGwlJ3YDugkpR/VNcAEx6GEKhERSr71FuO4YCM4XBdwKvecjIlkSnsO0Hyp/GxSeJAdzBKzpOtnPwyyiPdAZhpZptT04tU+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==);
18 | }
19 |
20 | /* Information icon encoded */
21 | .IconInfoEncoded {
22 | /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
23 | /* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
24 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
25 | }
26 |
27 | /* Warning icon encoded */
28 | .IconWarningEncoded {
29 | /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
30 | /* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
31 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
32 | }
33 |
34 | /* Error icon encoded */
35 | .IconErrorEncoded {
36 | /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
37 | /* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
38 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
39 | }
40 |
41 | .table-responsive {
42 | overflow: auto;
43 | overflow-y: hidden;
44 | }
45 |
46 | no-wrap {
47 | width: 1px;
48 | white-space: nowrap;
49 | }
50 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/js/AppInsights.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | var appInsights = window.appInsights || function (config) {
5 | function s(config) { t[config] = function () { var i = arguments; t.queue.push(function () { t[config].apply(t, i) }) } } var t = { config: config }, r = document, f = window, e = "script", o = r.createElement(e), i, u; for (o.src = config.url || "//az416426.vo.msecnd.net/scripts/a/ai.0.js", r.getElementsByTagName(e)[0].parentNode.appendChild(o), t.cookie = r.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) s("track" + i.pop()); return config.disableExceptionTracking || (i = "onerror", s("_" + i), u = f[i], f[i] = function (config, r, f, e, o) { var s = u && u(config, r, f, e, o); return s !== !0 && t["_" + i](config, r, f, e, o), s }), t
6 | }({
7 | instrumentationKey: "1d7e09ed-05de-4699-97a4-2edbfdb0e139"
8 | });
9 |
10 | window.appInsights = appInsights;
11 | appInsights.trackPageView();
12 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/js/DotNetStatus.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | "use strict";
5 | var sortArrowSpan = "Sort-Arrow-Span";
6 |
7 | /// Remove the sort-Arrow-Span from all elements in the header section of an HTML table
8 | /// The header section object of an HTML table
9 | function removeSortArrowSpan(thead) {
10 | thead.find("#" + sortArrowSpan).remove();
11 | }
12 |
13 | /// Sets the Sort-Arrow-Span on the Table Header table cell
14 | /// The table cell object from the header section of an HTML table
15 | /// Order by ascending or descending
16 | function setSortArrowSpan(headCell, order) {
17 | if (order === 1) {
18 | $(headCell).append("");
19 | } else {
20 | $(headCell).append("");
21 | }
22 | }
23 |
24 | /// Sets the data-SortDirection attribute on a table cell object from the header section of an HTML table
25 | /// HTMLTableHeader cell object
26 | /// Order by ascending or descending
27 | function setDataSortAttribute(headCell, order) {
28 | if (order === 1) {
29 | headCell.setAttribute("data-SortDirection", "ascending");
30 | } else {
31 | headCell.setAttribute("data-SortDirection", "descending");
32 | }
33 | }
34 |
35 | /// Fills an array with the rows from the body section of an HTML table
36 | /// The rows from the body section of an HTML table
37 | function fillArrayWithCellsFromRows(rows) {
38 | var cells, i, j;
39 | var arr = [];
40 |
41 | for (i = 0; i < rows.length; i += 1) {
42 | cells = rows[i].cells;
43 | arr[i] = [];
44 | for (j = 0; j < cells.length; j += 1) {
45 | arr[i][j] = cells[j].innerHTML;
46 | }
47 | }
48 |
49 | return arr;
50 | }
51 |
52 | /// Returns an array sorted by the specified column number and ordered by the orderending/descending parameter
53 | /// An array of items to sort
54 | /// Order by ascending or descending
55 | /// The column number to sort on
56 | /// Boolean representing whether column is a number or not
57 | function sortArray(arr, order, colToSortOn, isColumnANumber) {
58 | return arr.sort(function (a, b) {
59 | var x = a[colToSortOn];
60 | var y = b[colToSortOn];
61 |
62 | //if x and y are ints then compare by the value rather then by text
63 | if (isColumnANumber) {
64 | x = parseInt(x);
65 | y = parseInt(y);
66 | }
67 |
68 | if (x === y) {
69 | return 0;
70 | } else {
71 | if (x > y) {
72 | return order;
73 | } else {
74 | return -1 * order;
75 | }
76 | }
77 | });
78 | }
79 |
80 | /// Sorts an rows of an HTML table body
81 | /// The HTMLelement object representing the header section of an HTML table
82 | /// The HTMLelement object representing the body section of an HTML table
83 | /// Integer of the column to sort on
84 | /// Boolean representing whether column is a number or not
85 | function tableSort(thead, tbody, colToSortOn, isColumnANumber) {
86 | var order, arr, i;
87 | var rows = tbody[0].rows;
88 |
89 | //Compute whether to sort ascending or descending based on the the data-SortDirection attribute
90 | var headCell = thead[0].rows[0].cells[colToSortOn];
91 | if (headCell.hasAttribute("data-SortDirection") && headCell.getAttribute("data-SortDirection") === "descending") {
92 | order = 1;
93 | } else {
94 | order = -1;
95 | }
96 |
97 | //set sorting arrow and sortdirection attribute
98 | removeSortArrowSpan(thead);
99 | setDataSortAttribute(headCell, order);
100 | setSortArrowSpan(headCell, order);
101 |
102 | //fill and sort the array of table rows
103 | arr = sortArray(fillArrayWithCellsFromRows(rows), order, colToSortOn, isColumnANumber);
104 |
105 | // replace existing rows with new rows created from the sorted array
106 | for (i = 0; i < rows.length; i += 1) {
107 | rows[i].innerHTML = "" + arr[i].join(" | ") + " | ";
108 | }
109 | }
110 |
111 | /// Returns a ChartJS pie chart config
112 | /// The values representing the data
113 | /// The labels of the values
114 | /// The colors to be used for each data value
115 | function GetPieChartConfig(data, labels, colors) {
116 | var config = {
117 | type: 'pie',
118 | data: {
119 | datasets: [{
120 | data: data,
121 | backgroundColor: colors
122 | }],
123 | labels: labels
124 | },
125 | options: {
126 | responsive: true,
127 | showTooltips: true
128 | }
129 | };
130 |
131 | return config;
132 | }
133 |
134 | /// Returns a ChartJS stacked bar chart config
135 | /// The chart datasets data values
136 | /// The labels of the datasets
137 | function GetStackedBarChartConfig(dataSets, labels) {
138 | var barChartData = {
139 | labels: labels,
140 | datasets: dataSets
141 | };
142 |
143 | var chartconfig = {
144 | type: 'bar',
145 | data: barChartData,
146 | options: {
147 | responsive: true,
148 | scales: {
149 | xAxes: [{
150 | stacked: true
151 | }],
152 | yAxes: [{
153 | stacked: true
154 | }]
155 | }
156 | }
157 | };
158 |
159 | return chartconfig;
160 | }
161 |
162 | /// Refreshes the contentPlaceHolder HTMLElement with new data from the data service
163 | /// The HTMLelement object to replace the content of
164 | /// The route to call on the data service
165 | function refreshChart(contentPlaceHolder, route) {
166 |
167 | contentPlaceHolder.hide();
168 | $.get('/Data/' + route, function (data) {
169 | contentPlaceHolder.html(data);
170 | contentPlaceHolder.fadeIn(1000);
171 | });
172 | }
173 |
174 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/js/PopoverHelpers.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | function InitializePopovers() {
5 | $(".popup-marker").popover();
6 | $(".popup-marker").on('click', function (e) { e.preventDefault(); return true; });
7 |
8 | $('.popup-marker').popover();
9 |
10 | $('body').on('click', function (e) {
11 | $('.popup-marker').each(function () {
12 | if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover-marker').has(e.target).length === 0) {
13 | $(this).popover('hide');
14 | }
15 | });
16 | });
17 | }
18 |
19 | $(document).ready(InitializePopovers);
20 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/js/Search.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | $(document).ready(function () {
5 | var $searchTextBox = $("#searchTextBox");
6 | var $searchButton = $("#searchButton");
7 | var $hiddenDocId = $("#docId");
8 |
9 | function DisableButton() {
10 | $searchButton.attr('disabled', 'disabled');
11 | }
12 |
13 | function EnableButton() {
14 | $searchButton.removeAttr('disabled');
15 | }
16 |
17 | function InvalidTextBox() {
18 | $searchTextBox.addClass('invalid-query');
19 | }
20 |
21 | function ValidTextBox() {
22 | $searchTextBox.removeClass('invalid-query');
23 | }
24 |
25 | DisableButton();
26 |
27 | function ValidateTextBox(url) {
28 | var query = $searchTextBox.val();
29 |
30 | // If search box is empty, invalid mark (if applied)
31 | if (query == '') {
32 | ValidTextBox();
33 | } else {
34 | // Call API to see if search box contains valid query
35 | $.ajax({
36 | type: "GET",
37 | url: url,
38 | data: "query=" + query,
39 | error: function (err) {
40 | InvalidTextBox();
41 | DisableButton();
42 | },
43 | success: function (output) {
44 | ValidTextBox();
45 | EnableButton();
46 | $hiddenDocId.val(output.docId);
47 | }
48 | });
49 | }
50 | }
51 |
52 | var autocompleteUrl = $searchTextBox.data("autocomplete-url");
53 | var validateUrl = $searchTextBox.data("autocomplete-validate-url");
54 |
55 | $searchTextBox.change(function () {
56 | ValidateTextBox(validateUrl)
57 | });
58 |
59 | $searchTextBox.keyup(function (e) {
60 | // Check if ESC was pressed
61 | if (e.keyCode == 27) {
62 | $searchTextBox.val("");
63 | }
64 |
65 | ValidateTextBox(validateUrl);
66 | });
67 |
68 | // Initialize Bootstrap autocomplete
69 | $searchTextBox.autocomplete({
70 | source: autocompleteUrl,
71 | focus: function (event, ui) {
72 | $searchTextBox.val(ui.item.fullName);
73 | $hiddenDocId.val(ui.item.docId);
74 |
75 | ValidateTextBox(validateUrl);
76 |
77 | return false;
78 | },
79 | select: function (event, ui) {
80 | $hiddenDocId.val(ui.item.docId);
81 | $searchTextBox.val(ui.item.fullName);
82 |
83 | ValidateTextBox(validateUrl);
84 |
85 | $searchButton.click();
86 |
87 | return true;
88 | }
89 | })
90 | // Display only full name from results data
91 | .autocomplete("instance")._renderItem = function (ul, item) {
92 | return $("")
93 | .append("" + item.fullName + "")
94 | .appendTo(ul);
95 | };
96 | });
97 |
--------------------------------------------------------------------------------
/src/DotNetStatus/assets/js/ie10-viewport-bug-workaround.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * IE10 viewport hack for Surface/desktop Windows 8 bug
3 | * Copyright 2014 Twitter, Inc.
4 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For
5 | * details, see http://creativecommons.org/licenses/by/3.0/.
6 | */
7 |
8 | // See the Getting Started docs for more information:
9 | // http://getbootstrap.com/getting-started/#support-ie10-width
10 |
11 | (function () {
12 | 'use strict';
13 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
14 | var msViewportStyle = document.createElement('style')
15 | msViewportStyle.appendChild(
16 | document.createTextNode(
17 | '@-ms-viewport{width:auto!important}'
18 | )
19 | )
20 | document.querySelector('head').appendChild(msViewportStyle)
21 | }
22 | })();
23 |
--------------------------------------------------------------------------------
/src/DotNetStatus/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "DotNetStatus",
3 | "private": true,
4 | "dependencies": {
5 | "jquery": "2.1.3",
6 | "jquery-ui": "1.11.2",
7 | "jquery-ui-smoothness": "1.11.1",
8 | "bootstrap": "3.3.1",
9 | "chartjs": "2.0.0-beta"
10 | },
11 | "exportsOverride": {
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/DotNetStatus/gulpfile.js:
--------------------------------------------------------------------------------
1 | ///
2 | var gulp = require("gulp"),
3 | rimraf = require("rimraf"),
4 | concat = require("gulp-concat"),
5 | cssmin = require("gulp-cssmin"),
6 | uglify = require("gulp-uglify"),
7 | gulpPath = require('gulp-path'),
8 | gutil = require('gulp-util');
9 |
10 | var assets = new gulpPath.Base({
11 | src: './assets/',
12 | dest: './wwwroot/'
13 | }),
14 | root = new gulpPath.Base();
15 |
16 | var paths = {
17 | lib: assets.Path('lib'),
18 | bower: root.Path('bower_components'),
19 | css: assets.Path('css', 'css'),
20 | js: assets.Path('js', 'js'),
21 | };
22 |
23 | paths.minCss = paths.css.files('/**/*', 'min.css')[0];
24 | paths.minJs = paths.js.files('/**/*', 'min.js')[0];
25 |
26 | paths.concatJsDest = gulpPath.filesPaths(paths.js.dest, 'site', 'min.js')[0];
27 | paths.concatCssDest = gulpPath.filesPaths(paths.css.dest, 'site', 'min.css')[0];
28 |
29 | gulp.task("clean:js", function (callback) {
30 | var destination = paths.js.dest[0];
31 | gutil.log('Cleaning [' + destination + '] ...');
32 | rimraf(destination, callback);
33 | });
34 |
35 | gulp.task("clean:css", function (callback) {
36 | var destination = paths.css.dest[0];
37 | gutil.log('Cleaning [' + destination + '] ...');
38 | rimraf(destination, callback);
39 | });
40 |
41 | gulp.task("clean:lib", function (callback) {
42 | var destination = paths.lib.dest[0];
43 |
44 | gutil.log('Cleaning [' + destination + '] ...');
45 | rimraf(destination, callback);
46 | });
47 |
48 | gulp.task("clean", ["clean:js", "clean:css", "clean:lib"]);
49 |
50 | gulp.task("min:js", function () {
51 | var source = paths.js.src[0];
52 | var destination = paths.concatJsDest;
53 | var minifiedFiles = '!' + paths.minJs;
54 |
55 | gutil.log('Concat files from ' + source + ' except [' + minifiedFiles +'] to ' + destination + '...');
56 |
57 | gulp.src([source, minifiedFiles], { base: "." })
58 | .pipe(concat(destination))
59 | .pipe(uglify())
60 | .pipe(gulp.dest("."));
61 | });
62 |
63 | gulp.task("min:css", function () {
64 | var source = paths.css.src[0];
65 | var destination = paths.concatCssDest;
66 | var minifiedFiles = '!' + paths.minCss;
67 |
68 | gutil.log('Concat files from ' + source + ' except [' + minifiedFiles +'] to ' + destination + '...');
69 |
70 | gulp.src([source, "!" + minifiedFiles])
71 | .pipe(concat(destination))
72 | .pipe(cssmin())
73 | .pipe(gulp.dest("."));
74 | });
75 |
76 | gulp.task("copy", function () {
77 | var bower = {
78 | "bootstrap": "bootstrap/dist/**/*.{js,map,css,ttf,svg,woff,eot}",
79 | "jquery": "jquery/dist/jquery*.{js,map}",
80 | "jquery-ui": "jquery-ui/jquery-ui.js",
81 | "jquery-ui-smoothness": "jquery-ui-smoothness/jquery-ui.css",
82 | "chartjs" : "chartjs/Chart*"
83 | };
84 |
85 | gutil.log('Copying bower_components to wwwroot/lib...');
86 |
87 | for (var module in bower) {
88 |
89 | var bowerSource = paths.bower.files(bower[module])[0]
90 | var libFolder = gulpPath.filesPaths(paths.lib.dest, module)[0];
91 |
92 | gutil.log('Source [' + bowerSource + '], Destination [' + libFolder + ']');
93 |
94 | gulp.src(bowerSource)
95 | .pipe(gulp.dest(libFolder));
96 | };
97 | });
98 |
99 | gulp.task("min", ["min:js", "min:css"]);
100 |
101 | gulp.task("build", ["copy", "min"]);
102 |
--------------------------------------------------------------------------------
/src/DotNetStatus/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.0.0",
3 | "name": "dotnetstatus",
4 | "description": "Dependencies for DotNetStatus website",
5 | "license": "MIT",
6 | "repository": "https://github.com/microsoft/dotnet-apiweb",
7 | "devDependencies": {
8 | "gulp": "3.9.1",
9 | "gulp-concat": "2.6.0",
10 | "gulp-cssmin": "0.1.7",
11 | "gulp-uglify": "2.0.0",
12 | "gulp-path": "3.0.3",
13 | "gulp-util": "3.0.7",
14 | "rimraf": "2.5.4"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/DotNetStatus/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.AspNetCore.Diagnostics": "1.0.0",
4 | "Microsoft.AspNetCore.Mvc": "1.0.1",
5 | "Microsoft.AspNetCore.Mvc.Core": "1.0.1",
6 | "Microsoft.AspNetCore.Razor.Tools": {
7 | "version": "1.0.0-preview2-final",
8 | "type": "build"
9 | },
10 | "Microsoft.AspNetCore.Routing": "1.0.1",
11 | "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
12 | "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
13 | "Microsoft.AspNetCore.StaticFiles": "1.0.0",
14 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
15 | "Microsoft.Extensions.Configuration.Json": "1.0.0",
16 | "Microsoft.Extensions.Logging": "1.0.0",
17 | "Microsoft.Extensions.Logging.Console": "1.0.0",
18 | "Microsoft.Extensions.Logging.Debug": "1.0.0",
19 | "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
20 | "Microsoft.Fx.Portability": "2.1.0-alpha-00126",
21 | "Microsoft.NETCore.App": {
22 | "version": "1.0.1",
23 | "type": "platform"
24 | },
25 | "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
26 | "System.Diagnostics.TraceSource": "4.0.0",
27 | "System.Net.Http": "4.1.0"
28 | },
29 |
30 | "tools": {
31 | "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
32 | "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
33 | },
34 |
35 | "commands": {
36 | "web": "Microsoft.AspNet.Server.Kestrel"
37 | },
38 |
39 | "frameworks": {
40 | "netcoreapp1.0": {
41 | "imports": [
42 | "dotnet5.6",
43 | "portable-net45+win8"
44 | ]
45 | }
46 | },
47 | "buildOptions": {
48 | "emitEntryPoint": true,
49 | "preserveCompilationContext": true
50 | },
51 |
52 | "runtimeOptions": {
53 | "configProperties": {
54 | "System.GC.Server": true
55 | }
56 | },
57 |
58 | "publishOptions": {
59 | "include": [
60 | "wwwroot",
61 | "**/*.cshtml",
62 | "appsettings.json",
63 | "web.config"
64 | ],
65 | "exclude": [
66 | "node_modules",
67 | "bower_components",
68 | "**.xproj",
69 | "**.user",
70 | "**.vspscc"
71 | ]
72 | },
73 | "scripts": {
74 | "prepublish": [ "npm install", "bower install", "gulp clean", "gulp build" ],
75 | "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/DotNetStatus/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/DotNetStatus/wwwroot/img/dotnet.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/dotnet-apiweb/80ae5f043406ee1fa85baf5ddfe7f7f7e6b1c83f/src/DotNetStatus/wwwroot/img/dotnet.ico
--------------------------------------------------------------------------------
/src/DotNetStatus/wwwroot/img/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/dotnet-apiweb/80ae5f043406ee1fa85baf5ddfe7f7f7e6b1c83f/src/DotNetStatus/wwwroot/img/loader.gif
--------------------------------------------------------------------------------