Skip to content
4 changes: 2 additions & 2 deletions src/dotnet/APIView/APIView/Model/CodeDiagnosticLevel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace APIView
{
Expand All @@ -9,4 +9,4 @@ public enum CodeDiagnosticLevel
Warning = 2,
Error = 3
}
}
}
41 changes: 41 additions & 0 deletions src/dotnet/APIView/APIViewWeb/Client/css/pages/review.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,45 @@
margin-left: 10px;
color: var(--success-color);
font-size: medium;
}

.approval-list-group-item {
list-style-type: none;
}

.revision-title {
margin-bottom: 0;
}

.revision-info {
display: inline-block;
padding-left: 5px;
}

.status-icon {
font-size: 0.8em;

&.deleted {
color: black;
}

&.approval-reverted {
color: red;
}

&.created {
color: darkorange;
}

&.approved {
color: forestgreen;
}

&.undeleted {
color: yellow;
}
}

.revision-info:last-child {
margin-left: 17px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public enum CommentChangeAction
}

public abstract class ChangeHistoryModel
{
{
public string ChangedBy { get; set; }
public DateTime? ChangedOn { get; set; }
public string Notes { get; set; }
Expand Down
67 changes: 66 additions & 1 deletion src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Review.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
@using APIViewWeb.Helpers
@using APIViewWeb.LeanModels;
@using APIViewWeb.Models
@using System
@using System.Text.RegularExpressions
@{
Layout = "Shared/_Layout";
ViewData["Title"] = Model.ReviewContent.Review.PackageName;
Expand Down Expand Up @@ -504,11 +506,74 @@
<label class="form-check-label" for="reviewViewedSwitch">Mark as Viewed</label>
</form>
</div>
</li>
<li class="list-group-item">
<div>
<p class="small revision-title">Change History:</p>
@foreach (var change in Model.ReviewContent.ActiveAPIRevision.ChangeHistory)
{
<li class="list-group-item approval-list-group-item">
<div class="d-flex align-items-start">
<div class="me-3">
@{
var changeAction = change.ChangeAction.ToString();
string iconClass = "";
switch (changeAction)
{
case "Created":
iconClass = "bi bi-plus-circle-fill created status-icon";
break;
case "Approved":
iconClass = "bi bi-check-circle-fill approved status-icon";
break;
case "ApprovalReverted":
iconClass = "bi bi-arrow-left-circle-fill approval-reverted status-icon";
break;
case "Deleted":
iconClass = "bi bi-backspace-fill deleted status-icon";
break;
case "UnDeleted":
iconClass = "bi bi-plus-circle-fill undeleted status-icon";
break;
}
}

<div class="revision-events">
@if (!string.IsNullOrEmpty(iconClass))
{
<i class="@iconClass"></i>
}
@if (change.ChangeAction.ToString() == "Created")
{
<span class="small revision-info">Created:</span>
}
else if (change.ChangeAction.ToString() == "Approved")
{
<span class="small revision-info">Approved:</span>
}
else if (change.ChangeAction.ToString() == "ApprovalReverted")
{
<span class="small revision-info">Reverted:</span>
}
else if (change.ChangeAction.ToString() == "Deleted")
{
<span class="small revision-info">Deleted:</span>
}
else if (change.ChangeAction.ToString() == "UnDeleted")
{
<span class="small revision-info">UnDeleted:</span>
}
<span class="small revision-info">@change.ChangedBy</span><br />
<span data-bs-toggle="tooltip" title="@change.ChangedOn" date="@(change.ChangedOn.GetValueOrDefault())" class="small revision-info"></span>
</div>
</div>
</li>
}
</div>
</li>
</ul>
</div>
</div>

<div class="container-fluid mx-0 px-0 sub-header-content">
<div class="row px-3 py-2 border-bottom" id="review-info-bar">
<partial name="Shared/_ReviewBadge" model="(Model.ReviewContent.Review, Model.ReviewContent.ActiveAPIRevision, Model.ReviewContent.DiffAPIRevision, Model.UserPreference)" />
Expand Down
2 changes: 1 addition & 1 deletion src/dotnet/APIView/APIViewWeb/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((hostingContext, config) =>
{
config.AddEnvironmentVariables(prefix: "APIVIEW_");
config.AddEnvironmentVariables(prefix: "APIVIEW_");
IConfiguration settings = config.Build();
string connectionString = settings.GetValue<string>("APPCONFIG");
// Load configuration from Azure App Configuration
Expand Down