diff --git a/Hippo/Controllers/AccountController.cs b/Hippo/Controllers/AccountController.cs index b8bcd3b93..803de0a1a 100644 --- a/Hippo/Controllers/AccountController.cs +++ b/Hippo/Controllers/AccountController.cs @@ -156,7 +156,7 @@ public async Task Logout() TraceMethodEntry(); await _signInManager.SignOutAsync(); - return RedirectToAction("Index", "Home"); + return RedirectToAction("Index", "App"); } [HttpPost] diff --git a/Hippo/Controllers/AppController.cs b/Hippo/Controllers/AppController.cs index ded4a44fc..9d86c5190 100644 --- a/Hippo/Controllers/AppController.cs +++ b/Hippo/Controllers/AppController.cs @@ -307,7 +307,7 @@ public async Task NewChannel(Guid id, AppNewChannelForm form) return RedirectToAction(nameof(Index)); } - return View(form); + return RedirectToAction(nameof(Index)); } private static IEnumerable ParseEnvironmentVariables(string text) diff --git a/Hippo/Controllers/HomeController.cs b/Hippo/Controllers/HomeController.cs deleted file mode 100644 index 4c2b606d8..000000000 --- a/Hippo/Controllers/HomeController.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace Hippo.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - } -} diff --git a/Hippo/Startup.cs b/Hippo/Startup.cs index c63b3496d..67e556355 100644 --- a/Hippo/Startup.cs +++ b/Hippo/Startup.cs @@ -152,7 +152,7 @@ public void Configure(IApplicationBuilder app, IServiceProvider serviceProvider) endpoints.MapReverseProxy(); endpoints.MapControllerRoute( name: "default", - pattern: "{controller=Home}/{action=Index}/{id?}"); + pattern: "{controller=App}/{action=Index}/{id?}"); }); if (HostingEnvironment.IsDevelopment() && Configuration["InMemoryDB"] != "true") diff --git a/Hippo/Views/Account/Index.cshtml b/Hippo/Views/Account/Index.cshtml new file mode 100644 index 000000000..29818a62d --- /dev/null +++ b/Hippo/Views/Account/Index.cshtml @@ -0,0 +1,3 @@ +@{ + ViewData["Title"] = "Account"; +} diff --git a/Hippo/Views/Account/Login.cshtml b/Hippo/Views/Account/Login.cshtml index 695690b43..d4ecd18db 100644 --- a/Hippo/Views/Account/Login.cshtml +++ b/Hippo/Views/Account/Login.cshtml @@ -4,29 +4,55 @@ ViewData["Title"] = "Log In"; } -
-
-
-
-
- - - +
+
+

Log in to Hippo

+ + + +
+

Don't have an account yet? Register here.

+
diff --git a/Hippo/Views/Account/Register.cshtml b/Hippo/Views/Account/Register.cshtml index 664b10a16..249017332 100644 --- a/Hippo/Views/Account/Register.cshtml +++ b/Hippo/Views/Account/Register.cshtml @@ -4,34 +4,70 @@ ViewData["Title"] = "Register"; } -
-
-
-
-
- - - +
+
+

Register a Hippo Account

+ +
+
+ +
+ +
+ + + + +

+
+
+
+ +
+ + + + +

+
+
+
+ +
+ + + + +

+
+
+
+ +
+ + + + +

+
+
+
+
+ +
+
+
+
+
+
+
+
-
- - - -
-
- - - -
-
- - - -
-
- -
- +
+ +
+

Already have an account? Log in here. +

diff --git a/Hippo/Views/App/Delete.cshtml b/Hippo/Views/App/Delete.cshtml index d816f4ce3..73ef21f73 100644 --- a/Hippo/Views/App/Delete.cshtml +++ b/Hippo/Views/App/Delete.cshtml @@ -1,18 +1,42 @@ @model Hippo.Models.Application -
-
-
-

Are you sure?

-
-
-
- -
- - Cancel +@{ + ViewData["Title"] = "Delete Application"; + Layout = "_Layout"; +} + +
+
+
+
+

Are you sure?

+
+ +
+
+

Application @Html.DisplayFor(model => model.Name) will be deleted.

- +
+ +
+
+ + + Cancel +
+
+ + @*
+
+
+
+ + + Cancel +
+
+
+
*@
diff --git a/Hippo/Views/App/Details.cshtml b/Hippo/Views/App/Details.cshtml index 749138875..1bcacb87b 100644 --- a/Hippo/Views/App/Details.cshtml +++ b/Hippo/Views/App/Details.cshtml @@ -1,102 +1,163 @@ @model Hippo.ViewModels.AppDetails -
-
- - - - - - - - - - - - - - - -
@Html.DisplayNameFor(model => model.Application.Name)@Html.DisplayNameFor(model => model.Application.Created)@Html.DisplayNameFor(model => model.Application.Modified)
@Html.DisplayFor(model => model.Application.Name)@Html.DisplayFor(model => model.Application.Created)@Html.DisplayFor(model => model.Application.Modified)
-
+@{ + ViewData["Title"] = @Html.DisplayFor(model => model.Application.Name); + Layout = "_AppLayout"; +} - +
-
-

Channels

-
-
- @foreach (var item in Model.Channels) { -
- @if (item.Status().Health == Hippo.Models.HealthLevel.Healthy) - { - Healthy (on @item.ActiveRevision.RevisionNumber) - served on @item.ServedOn() - } - else - { - Unhealthy (@string.Join("; ", item.Status().Messages)) - } -
-
@Html.DisplayFor(modelItem => item.Name)
+

Recent Activity

+ +
+
+
+
+
+ Showing all activity. +
+
-
- Edit - @* Details - Delete *@ +
+
+
+
    + @foreach (var revision in Model.Revisions.OrderByDescending(r => r.OrderKey())) { +
  • + @* + @Html.DisplayFor(modelItem => channel.Name) + *@ + @Html.DisplayFor(modelItem => revision.RevisionNumber)  + @* @if (modelItem => revision.revisionName) { + was pushed. + } else { *@ + was deployed to  + @string.Join(", ", revision.ActiveOn().Select(c => c.Name)) + @* via @Html.DisplayFor(modelItem => revision.revisionSelectionStrategy) *@ +
  • + } +
- } -
-
-

Revisions

+
- - - - - - - - - @foreach (var item in Model.Revisions.OrderByDescending(r => r.OrderKey())) { - - - - - } - -
RevisionActive On
@item.RevisionNumber@string.Join(", ", item.ActiveOn().Select(c => c.Name))
-
-

Recent Activity

-
- - - - - - - - - - - - @foreach (var item in Model.RecentActivity) { - - - - - - - - } - -
WhenWhatChannelWhatWho
@item.Timestamp@item.EventKind@Model.ChannelNameFor(item)@item.Description@item.UserName
+ @foreach (var channel in Model.Channels) { +
+
+
+

Environment Info

+ + @* @if (ChannelRevisionSelectionStrategy == SelectedRevisionNumber) { + Deployment locked to version + @Html.DisplayFor(modelItem => channel.SelectedRevisionNumber) + } else { + Auto deploying + @Html.DisplayFor(modelItem => channel.RangeRule) + } *@ + + + + + + + + + + + + + + + + + +
@Html.DisplayNameFor(model => model.Application.Name)@Html.DisplayNameFor(model => model.Application.Created)@Html.DisplayNameFor(model => model.Application.Modified)
@Html.DisplayFor(model => model.Application.Name)@Html.DisplayFor(model => model.Application.Created)@Html.DisplayFor(model => model.Application.Modified)
+ +
    +
  • @Html.DisplayFor(modelItem => channel.Id)
  • +
  • @Html.DisplayFor(modelItem => channel.RevisionSelectionStrategy)
  • +
  • +
  • @Html.DisplayFor(modelItem => channel)
  • +
+
+
+ +
+
+
    + @foreach (var revision in Model.Revisions.OrderByDescending(r => r.OrderKey())) { +
  • + @* + @Html.DisplayFor(modelItem => channel.Name) + *@ + @Html.DisplayFor(modelItem => revision.RevisionNumber)  + @* @if (modelItem => revision.revisionName) { + was pushed. + } else { *@ + was deployed to  + @string.Join(", ", revision.ActiveOn().Select(c => c.Name)) + @* via @Html.DisplayFor(modelItem => revision.revisionSelectionStrategy) *@ +
  • + } +
+ + + + + + + + + + + + + @foreach (var item in Model.RecentActivity) { + + + + + + + + } + +
WhenWhatChannelWhatWho
@item.Timestamp@item.EventKind@Model.ChannelNameFor(item)@item.Description@item.UserName
+
+
+ + +
+ }
diff --git a/Hippo/Views/App/Edit.cshtml b/Hippo/Views/App/Edit.cshtml index 68f764024..cea7218bf 100644 --- a/Hippo/Views/App/Edit.cshtml +++ b/Hippo/Views/App/Edit.cshtml @@ -1,33 +1,69 @@ @model Hippo.ViewModels.AppEditForm -
-
- -
- - - -
- -
-

WARNING!

-

If you change the bindle name, ALL channels will stop working until - you register revisions of the new bindle that satisfy the channels' - rules!

-
-
- - - -
-
-

WARNING!

-
-
- - Cancel +@{ + ViewData["Title"] = "Edit Application"; + Layout = "_Layout"; +} + +
+
+ +
+

Edit Application

+ + +
+
+ +
+
+
+ +

+
+
+
+
+
+ +
+
+
+ +

+
+
+
+
+

+ Warning +

+
+
+
+
+

If you change the Bindle name, ALL channels will stop working until you register revisions of the new bindle that satisfy the channels' rules!

+
+
+
+
+
+
+
+
+ + Cancel +
+
+
+
+
+
+
+ +
- +
@section Scripts { @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} diff --git a/Hippo/Views/App/EditChannel.cshtml b/Hippo/Views/App/EditChannel.cshtml index bcf33812a..ee84d4c88 100644 --- a/Hippo/Views/App/EditChannel.cshtml +++ b/Hippo/Views/App/EditChannel.cshtml @@ -1,46 +1,124 @@ @model Hippo.ViewModels.AppEditChannelForm -

Edit channel @Model.ChannelName

+@{ + ViewData["Title"] = "Configure Environment"; +} -
-
- - -
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - Cancel +
+
+ + + + + +
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +

+
+
+
+
+
+ +
+
+
+ +

+
+
+
+
+ +
+ +
+ @foreach (var strategy in Model.RevisionSelectionStrategies) { + + } +

+ +
+
+ +
+
+
+
+
+ +
+
+

+
+
+
+ +
+
+ +
+
+
+ +

You can choose to deply all versions of your app (enter an *) or limit deploys to a specific range.

+ +

Examples:
+ To deploy minor releases that follow v1.0, set the range to 1<. To follow v1.0 but exclude releases beyond v2.0, set the range to 1-2.

+

+
+
+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+

+
+
+
+
+
- +
@section Scripts { @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} diff --git a/Hippo/Views/App/Index.cshtml b/Hippo/Views/App/Index.cshtml index 4ac444c61..d90df1fa7 100644 --- a/Hippo/Views/App/Index.cshtml +++ b/Hippo/Views/App/Index.cshtml @@ -1,29 +1,61 @@ @model IEnumerable -
- -
- @foreach (var item in Model) { -
- @if (item.Status().Health == Hippo.Models.HealthLevel.Healthy) - { - Healthy - } - else - { - Unhealthy (@string.Join("; ", item.Status().Messages)) - } -
-
@Html.DisplayFor(modelItem => item.Name)
-
-
- Edit - Details - Delete +@{ + ViewData["Title"] = "Your Apps"; + Layout = "_Layout"; +} + +
+ @foreach (var item in Model) { + + } + +
diff --git a/Hippo/Views/App/New.cshtml b/Hippo/Views/App/New.cshtml index 94482de30..ce257bede 100644 --- a/Hippo/Views/App/New.cshtml +++ b/Hippo/Views/App/New.cshtml @@ -1,23 +1,56 @@ -@model Hippo.ViewModels.AppNewForm - -
-
-
- - - -
-
- - - -
-
- - Cancel -
-
- -@section Scripts { - @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} -} +@model Hippo.ViewModels.AppNewForm + +@{ + ViewData["Title"] = "New Application"; + Layout = "_Layout"; +} + +
+
+ +
+

Create a New Application

+ +
+
+
+
+ +
+
+
+ +

+
+
+
+
+
+ +
+
+
+ +

+
+
+
+
+
+ + Cancel +
+
+
+
+ +
+
+
+
+
+
+ +@section Scripts { + @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} +} diff --git a/Hippo/Views/App/NewChannel.cshtml b/Hippo/Views/App/NewChannel.cshtml index a566d21bf..a7482bdd7 100644 --- a/Hippo/Views/App/NewChannel.cshtml +++ b/Hippo/Views/App/NewChannel.cshtml @@ -1,50 +1,134 @@ @model Hippo.ViewModels.AppNewChannelForm -

Reconfigure a channel

+@{ + ViewData["Title"] = "Add an Environment"; +} -
-
- -
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - Cancel +
+
+ + + +
+ +
+
+
+ +
+
+
+ +

+
+
+
+
+
+ +
+
+
+ +

+
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+ +

+
+
+
+ +
+ +
+
+ @foreach (var strategy in Model.RevisionSelectionStrategies) { + + } +

+ +
+
+ +
+
+
+
+
+ +
+
+

+
+
+
+ +
+
+ +
+
+
+ +

You can choose to deply all versions of your app (enter an *) or limit deploys to a specific range.

+ +

Examples:
+ To deploy minor releases that follow v1.0, set the range to 1<. To follow v1.0 but exclude releases beyond v2.0, set the range to 1-2.

+

+
+
+
+
+
+
+
+
+
+ + Cancel +
+
+
+
+
+
+ +
+
+
+
+

+
+
+
+
+
- +
@section Scripts { @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} diff --git a/Hippo/Views/App/RegisterRevision.cshtml b/Hippo/Views/App/RegisterRevision.cshtml index ce7900640..a8c7c6251 100644 --- a/Hippo/Views/App/RegisterRevision.cshtml +++ b/Hippo/Views/App/RegisterRevision.cshtml @@ -1,5 +1,10 @@ @model Hippo.ViewModels.AppRegisterRevisionForm +@{ + ViewData["Title"] = "Revision"; + Layout = "_AppLayout"; +} +

Register a revision for an application

diff --git a/Hippo/Views/Home/Index.cshtml b/Hippo/Views/Home/Index.cshtml index c9e8ea9ba..54e392a9b 100644 --- a/Hippo/Views/Home/Index.cshtml +++ b/Hippo/Views/Home/Index.cshtml @@ -1,3 +1,3 @@ @{ - ViewData["Title"] = "Home Page"; + ViewData["Title"] = "Home"; } diff --git a/Hippo/Views/Shared/_AppLayout.cshtml b/Hippo/Views/Shared/_AppLayout.cshtml new file mode 100644 index 000000000..f073f9c8f --- /dev/null +++ b/Hippo/Views/Shared/_AppLayout.cshtml @@ -0,0 +1,45 @@ + + + + + Hippo + + + + + + + + + + + + +
+
+
+
+ @RenderBody() +
+
+
+ +
+
+ +
+
+
+ @RenderBody() +
+
+
+
+ + + + @* If one of the pages creates a section called scripts, load it here + *@ + @RenderSection("scripts", false) + + diff --git a/Hippo/Views/Shared/_Layout.cshtml b/Hippo/Views/Shared/_Layout.cshtml index 716808896..25ee82dbf 100644 --- a/Hippo/Views/Shared/_Layout.cshtml +++ b/Hippo/Views/Shared/_Layout.cshtml @@ -11,35 +11,50 @@ - + @if (User.Identity.IsAuthenticated) { + -
- - -
- - -
-
-
-
- @ViewBag.Title +
+
+ + +
+
+
+
+ @ViewBag.Title +
-
- -
-
- @RenderBody() + +
+
+ @RenderBody() +
+
+ +
+ +
+ + } else { + +
+ +
+
+
+ @RenderBody() +
-
- -
- -
+ +
+ } + + @* If one of the pages creates a section called scripts, load it here *@ @RenderSection("scripts", false) diff --git a/Hippo/Views/Shared/_NavAppTopbar.cshtml b/Hippo/Views/Shared/_NavAppTopbar.cshtml new file mode 100644 index 000000000..a6af62065 --- /dev/null +++ b/Hippo/Views/Shared/_NavAppTopbar.cshtml @@ -0,0 +1,35 @@ +
+
+ +
+
diff --git a/Hippo/Views/Shared/_NavBreadcrumb.cshtml b/Hippo/Views/Shared/_NavBreadcrumb.cshtml index 5d907aa09..646263678 100644 --- a/Hippo/Views/Shared/_NavBreadcrumb.cshtml +++ b/Hippo/Views/Shared/_NavBreadcrumb.cshtml @@ -1,12 +1,11 @@ -