Favicons, page improvements
@@ -36,6 +36,12 @@ namespace LeafWeb.Core.Tests.Remote
|
||||
return new PiscalSshClient(_piscalConnectionString);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Unconfigured()
|
||||
{
|
||||
var client = new PiscalSshClient(null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SubmitLeafInputFile()
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace LeafWeb.WebCms.Tests.Models
|
||||
public void CanConstructFromLeafInputFile()
|
||||
{
|
||||
var leafInput = GetLeafInput();
|
||||
var viewModel = new ResultStatusViewModel(leafInput);
|
||||
var viewModel = new ResultItemViewModel(leafInput);
|
||||
|
||||
Assert.That(viewModel.CurrentStatus, Is.EqualTo(leafInput.CurrentStatus.ToString()));
|
||||
Assert.That(viewModel.LeafInputId, Is.EqualTo(leafInput.Id));
|
||||
@@ -50,7 +50,7 @@ namespace LeafWeb.WebCms.Tests.Models
|
||||
var leafInput = GetLeafInput();
|
||||
leafInput.CurrentStatus = LeafInputStatusType.Running;
|
||||
leafInput.OutputFiles = new LeafOutputFile[0];
|
||||
var viewModel = new ResultStatusViewModel(leafInput);
|
||||
var viewModel = new ResultItemViewModel(leafInput);
|
||||
|
||||
Assert.That(viewModel.CurrentStatus, Is.EqualTo(LeafInputStatusType.Running.ToString()));
|
||||
//Assert.That(viewModel.LeafOutputFilenames, Has.Length.EqualTo(0));
|
||||
@@ -71,7 +71,7 @@ namespace LeafWeb.WebCms.Tests.Models
|
||||
Status = LeafInputStatusType.Exception
|
||||
}
|
||||
};
|
||||
var viewModel = new ResultStatusViewModel(leafInput);
|
||||
var viewModel = new ResultItemViewModel(leafInput);
|
||||
|
||||
Assert.That(viewModel.CurrentStatus, Is.EqualTo(LeafInputStatusType.Exception.ToString()));
|
||||
//Assert.That(viewModel.ErrorMessages[0], Is.EqualTo(leafInput.StatusHistory.First().Description));
|
||||
|
||||
@@ -1 +1 @@
|
||||
C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.uciyyxfl.dll
|
||||
C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.jzue3-mr.dll
|
||||
@@ -20,7 +20,7 @@ using Umbraco.ModelsBuilder.Umbraco;
|
||||
|
||||
[assembly: PureLiveAssembly]
|
||||
[assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "c5118162be4a0dc0")]
|
||||
[assembly:System.Reflection.AssemblyVersion("0.0.0.5")]
|
||||
[assembly:System.Reflection.AssemblyVersion("0.0.0.2")]
|
||||
|
||||
namespace Umbraco.Web.PublishedContentModels
|
||||
{
|
||||
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "App",
|
||||
"icons": [
|
||||
{
|
||||
"src": "\/android-icon-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
@@ -1,10 +1,12 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Hangfire;
|
||||
using LeafWeb.Core.Entities;
|
||||
using LeafWeb.Core.Utility;
|
||||
using LeafWeb.WebCms.Models;
|
||||
using LeafWeb.WebCms.Services;
|
||||
using LeafWeb.WebCms.Services.PiscalQueue;
|
||||
|
||||
namespace LeafWeb.WebCms.Controllers
|
||||
{
|
||||
@@ -12,12 +14,28 @@ namespace LeafWeb.WebCms.Controllers
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
var viewModel =
|
||||
var resultItems =
|
||||
DataService.GetLeafInputs()
|
||||
.OrderByDescending(f => f.Id)
|
||||
.ToList()
|
||||
.Select(leafInput => new ResultStatusViewModel(leafInput));
|
||||
return View(viewModel);
|
||||
.Select(leafInput => new ResultItemViewModel(leafInput));
|
||||
|
||||
string serviceDescription;
|
||||
try
|
||||
{
|
||||
serviceDescription = new PiscalService().ServiceDescription;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
serviceDescription = "Exception while initializing";
|
||||
}
|
||||
|
||||
var queueViewModel = new QueueViewModel
|
||||
{
|
||||
Items = resultItems, ServerDescription = serviceDescription
|
||||
};
|
||||
|
||||
return View(queueViewModel);
|
||||
}
|
||||
|
||||
public ActionResult Details(int id)
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace LeafWeb.WebCms.Controllers
|
||||
DataService.GetLeafInputs()
|
||||
.OrderByDescending(f => f.Id)
|
||||
.ToList()
|
||||
.Select(leafInput => new ResultStatusViewModel(leafInput));
|
||||
.Select(leafInput => new ResultItemViewModel(leafInput));
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 202 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
@@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace LeafWeb.WebCms.Models
|
||||
{
|
||||
public class QueueViewModel
|
||||
{
|
||||
public string ServerDescription { get; set; }
|
||||
public string ServerStatus { get; set; }
|
||||
public IEnumerable<ResultItemViewModel> Items { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using LeafWeb.Core.Entities;
|
||||
|
||||
namespace LeafWeb.WebCms.Models
|
||||
{
|
||||
public class ResultStatusViewModel
|
||||
public class ResultItemViewModel
|
||||
{
|
||||
public int LeafInputId { get; set; }
|
||||
public string LeafInputName { get; set; }
|
||||
@@ -22,9 +22,9 @@ namespace LeafWeb.WebCms.Models
|
||||
//public string[] LeafOutputFilenames { get; set; }
|
||||
//public bool HasLeafChartOutputFile { get; set; }
|
||||
|
||||
static ResultStatusViewModel()
|
||||
static ResultItemViewModel()
|
||||
{
|
||||
Mapper.CreateMap<LeafInput, ResultStatusViewModel>()
|
||||
Mapper.CreateMap<LeafInput, ResultItemViewModel>()
|
||||
.ForMember(dest => dest.LeafInputId, opt => opt.MapFrom(src => src.Id))
|
||||
.ForMember(dest => dest.HasLeafChart, opt => opt.ResolveUsing(src => src.OutputFiles.Any(o => o.IsLeafChartFile)))
|
||||
//.ForMember(dest => dest.LeafOutputFilenames,
|
||||
@@ -52,7 +52,7 @@ namespace LeafWeb.WebCms.Models
|
||||
;
|
||||
}
|
||||
|
||||
public ResultStatusViewModel(LeafInput leafInput)
|
||||
public ResultItemViewModel(LeafInput leafInput)
|
||||
{
|
||||
Mapper.Map(leafInput, this);
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.min.js");
|
||||
}
|
||||
|
||||
<div class="container">
|
||||
<div class="container top-buffer">
|
||||
<div class="row">
|
||||
<div class="col-md-7 well">
|
||||
@using (Html.BeginUmbracoForm<UmbLoginController>("HandleLogin"))
|
||||
|
||||
@@ -28,8 +28,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<!-- Meta tags -->
|
||||
<!-- Meta tags -->
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/Content/favicon/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/Content/favicon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/Content/favicon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/Content/favicon/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/Content/favicon/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/Content/favicon/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/Content/favicon/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/Content/favicon/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/Content/favicon/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/Content/favicon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/Content/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/Content/favicon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/Content/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="/Content/favicon/manifest.json">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
}
|
||||
|
||||
|
||||
@using (Html.BeginUmbracoForm<QueueController>(
|
||||
@*@using (Html.BeginUmbracoForm<QueueController>(
|
||||
"SendUserChartLink", null, new { @class = "confirm", confirm_msg = "Confirm sending email to user" }))
|
||||
{
|
||||
<input type="hidden" name="id" value="@Model.LeafInputId" />
|
||||
<button type="submit" class="btn btn-default" @{if (!Model.HasLeafChart) { <text> disabled="disabled" </text> }}>
|
||||
<span class="glyphicon glyphicon-send"></span> Email User Chart link
|
||||
</button>
|
||||
}
|
||||
@DeleteLink(Model.LeafInputId, Model.IsDeletable)
|
||||
}*@
|
||||
@DeleteLink(Model.LeafInputId, Model.Identifier, Model.IsDeletable)
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.DisplayForModel()
|
||||
@@ -44,11 +44,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
@helper DeleteLink(int id, bool deletable)
|
||||
@helper DeleteLink(int id, string identifier, bool deletable)
|
||||
{
|
||||
using (Html.BeginUmbracoForm<QueueController>(
|
||||
"Delete", null, new { @class = "confirm", confirm_msg = "Deletion cannot be undone! Confirm deleting '" + identifier + "'." }))
|
||||
{
|
||||
using (Html.BeginUmbracoForm<QueueController>(
|
||||
"Delete", null, new { @class = "confirm", confirm_msg = "Deletion cannot be undone!" }))
|
||||
{
|
||||
<input type="hidden" name="id" value="@id" />
|
||||
<button type="submit" class="btn btn-default" @{if (!deletable) { <text> disabled="disabled" </text> }}>
|
||||
<span class="glyphicon glyphicon-remove"></span> Delete
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
@model IEnumerable<ResultStatusViewModel>
|
||||
@model QueueViewModel
|
||||
|
||||
@{
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
var grid = new WebGrid(Model.Items, rowsPerPage: 45);
|
||||
}
|
||||
|
||||
<dl>
|
||||
<dt>Service description</dt>
|
||||
<dd>@Model.ServerDescription</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@grid.Table(columns:
|
||||
grid.Columns(
|
||||
grid.Column("LeafInputIdentifier", "Identifier"),
|
||||
grid.Column("LeafInputSiteId", "Site Id"),
|
||||
grid.Column("LeafInputName", "Submitted By"),
|
||||
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus)),
|
||||
grid.Column("Total Results: " + Model.Count(), format: item => Btns(item))),
|
||||
grid.Column("Total Results: " + Model.Items.Count(), format: item => Btns(item))),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
|
||||
)
|
||||
@grid.BootstrapPager()
|
||||
@@ -78,7 +84,7 @@
|
||||
}
|
||||
@helper DeleteLink(dynamic item)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_DeleteForm", (Tuple<int, bool>)Tuple.Create(item.LeafInputId, item.IsDeletable))
|
||||
@Html.Partial("DisplayTemplates/_DeleteForm", (Tuple<int, string, bool>)Tuple.Create(item.LeafInputId, item.LeafInputIdentifier, item.IsDeletable))
|
||||
}
|
||||
|
||||
@helper DisableItem(bool disabled)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model IEnumerable<LeafWeb.WebCms.Models.ResultStatusViewModel>
|
||||
@model IEnumerable<ResultItemViewModel>
|
||||
|
||||
@{
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
@using LeafWeb.WebCms.Controllers
|
||||
@model Tuple<int, bool>
|
||||
@{
|
||||
var leafInputId = Model.Item1;
|
||||
var isDeletable = Model.Item2;
|
||||
}
|
||||
@using (Html.BeginUmbracoForm<QueueController>("Delete", null, new { @class = "confirm", confirm_msg = "Deletion cannot be undone!" }))
|
||||
@model Tuple<int, string, bool>
|
||||
@{
|
||||
var leafInputId = Model.Item1;
|
||||
var identifier = Model.Item2;
|
||||
var isDeletable = Model.Item3;
|
||||
}
|
||||
@using (Html.BeginUmbracoForm<QueueController>("Delete", null,
|
||||
new { @class = "confirm", confirm_msg = "Deletion cannot be undone! Confirm deleting '" + identifier + "'." }))
|
||||
{
|
||||
<input type="hidden" name="id" value="@leafInputId"/>
|
||||
<button type="submit" class="btn btn-link" @{if (!isDeletable) { <text> disabled="disabled" </text> }}>
|
||||
|
||||
@@ -634,6 +634,32 @@
|
||||
<Content Include="Content\bootstrap_leafweb.min.css">
|
||||
<DependentUpon>bootstrap_leafweb.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Content\favicon\android-icon-144x144.png" />
|
||||
<Content Include="Content\favicon\android-icon-192x192.png" />
|
||||
<Content Include="Content\favicon\android-icon-36x36.png" />
|
||||
<Content Include="Content\favicon\android-icon-48x48.png" />
|
||||
<Content Include="Content\favicon\android-icon-72x72.png" />
|
||||
<Content Include="Content\favicon\android-icon-96x96.png" />
|
||||
<Content Include="Content\favicon\apple-icon-114x114.png" />
|
||||
<Content Include="Content\favicon\apple-icon-120x120.png" />
|
||||
<Content Include="Content\favicon\apple-icon-144x144.png" />
|
||||
<Content Include="Content\favicon\apple-icon-152x152.png" />
|
||||
<Content Include="Content\favicon\apple-icon-180x180.png" />
|
||||
<Content Include="Content\favicon\apple-icon-57x57.png" />
|
||||
<Content Include="Content\favicon\apple-icon-60x60.png" />
|
||||
<Content Include="Content\favicon\apple-icon-72x72.png" />
|
||||
<Content Include="Content\favicon\apple-icon-76x76.png" />
|
||||
<Content Include="Content\favicon\apple-icon-precomposed.png" />
|
||||
<Content Include="Content\favicon\apple-icon.png" />
|
||||
<Content Include="Content\favicon\browserconfig.xml" />
|
||||
<Content Include="Content\favicon\favicon-16x16.png" />
|
||||
<Content Include="Content\favicon\favicon-32x32.png" />
|
||||
<Content Include="Content\favicon\favicon-96x96.png" />
|
||||
<Content Include="Content\favicon\manifest.json" />
|
||||
<Content Include="Content\favicon\ms-icon-144x144.png" />
|
||||
<Content Include="Content\favicon\ms-icon-150x150.png" />
|
||||
<Content Include="Content\favicon\ms-icon-310x310.png" />
|
||||
<Content Include="Content\favicon\ms-icon-70x70.png" />
|
||||
<Content Include="Content\font-awesome.css" />
|
||||
<Content Include="Content\font-awesome.min.css" />
|
||||
<Content Include="Content\glyphicon_animate.css" />
|
||||
@@ -712,6 +738,18 @@
|
||||
<Content Include="Media\1059\leafweb-logo-grad-large-nobkgnd.png" />
|
||||
<Content Include="Media\1059\leafweb-logo-grad-large-nobkgnd_thumb.jpg" />
|
||||
<Content Include="Media\1059\leafweb-logo-grad-large-nobkgnd_thumb.png" />
|
||||
<Content Include="Media\1060\forest-nature-trees.jpg" />
|
||||
<Content Include="Media\1060\forest-nature-trees_big-thumb.jpg" />
|
||||
<Content Include="Media\1060\forest-nature-trees_thumb.jpg" />
|
||||
<Content Include="Media\1061\green-leaf.jpg" />
|
||||
<Content Include="Media\1061\green-leaf_big-thumb.jpg" />
|
||||
<Content Include="Media\1061\green-leaf_thumb.jpg" />
|
||||
<Content Include="Media\1062\maple.jpg" />
|
||||
<Content Include="Media\1062\maple_big-thumb.jpg" />
|
||||
<Content Include="Media\1062\maple_thumb.jpg" />
|
||||
<Content Include="Media\1063\wood-nature-leaves-tree.jpg" />
|
||||
<Content Include="Media\1063\wood-nature-leaves-tree_big-thumb.jpg" />
|
||||
<Content Include="Media\1063\wood-nature-leaves-tree_thumb.jpg" />
|
||||
<Content Include="packages.config" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff2" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff" />
|
||||
@@ -885,7 +923,8 @@
|
||||
<Compile Include="Models\LeafInputDetails.cs" />
|
||||
<Compile Include="Models\LeafInputCreate.cs" />
|
||||
<Compile Include="Models\LeafInputStatusViewModel.cs" />
|
||||
<Compile Include="Models\ResultStatusViewModel.cs" />
|
||||
<Compile Include="Models\ResultItemViewModel.cs" />
|
||||
<Compile Include="Models\QueueViewModel.cs" />
|
||||
<Compile Include="Models\SelectListViewModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Services\DownloadUrlService.cs" />
|
||||
|
||||