-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathGraph.cshtml
87 lines (73 loc) · 3.48 KB
/
Graph.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!-- Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
See LICENSE in the source repository root for complete license information. -->
@using Resources
@using Newtonsoft.Json;
@using MicrosoftGraph_Security_API_Sample.Models
@{
ViewBag.Title = Resource.App_Name;
ViewBag.Top = 1;
var AlertFilters = Session["AlertFilters"] as AlertFilter;
var AlertResults = Session["GetAlertResults"] as AlertResultsModel;
var currentAlert = Session["CurrentAlert"] as AlertModel;
var SubscriptionFilters = Session["SubscriptionFilters"] as SubscriptionFilters;
var UpdateAlertFilters = Session["UpdateAlertFilters"] as UpdateAlertModel;
}
<h1 class="text-center">@ViewBag.Title</h1>
<hr />
<div class="container-fluid">
<div class="row">
<div class="col-md-7">
@Html.Partial("_FilterPartialView", AlertFilters)
@if (AlertResults != null && Request.IsAuthenticated)
{
<hr />
<h2>Matching alerts</h2>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="container-table">
@if (AlertResults.Alerts?.Any() ?? false)
{
<table class="table table-striped" border="1" cellpadding="10">
<thead>
<tr>
<th>Title</th>
<th>Category</th>
<th>Status</th>
<th>ID</th>
<th>Provider</th>
</tr>
</thead>
<tbody>
@foreach (var alert in AlertResults.Alerts)
{
<tr>
<td>@Html.ActionLink(alert.Title, "GetAlert", new { id = alert.Id })</td>
<td>@alert.Category</td>
<td>@alert.Status</td>
<td>@alert.Id</td>
<td>@alert.Provider</td>
</tr>
}
</tbody>
</table>
}
else
{
@("No matching alerts")
}
</div>
</div>
</div>
</div>
}
<hr />
@Html.Partial("_UpdateAlertPartialView", new UpdateAlertModel { AlertId = currentAlert?.Id })
<hr />
@Html.Partial("_SubscriptionPartialView", SubscriptionFilters)
</div>
<div class="col-md-5">
@Html.Partial("Alert")
</div>
</div>
</div>