Added uGoLive dashboard
@@ -87,4 +87,14 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="uGoLiveDashboardSection">
|
||||
<areas>
|
||||
<area>developer</area>
|
||||
</areas>
|
||||
<tab caption="uGoLive Checklist">
|
||||
<control>/umbraco/plugins/uGoLive/Dashboard.ascx</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
</dashBoard>
|
||||
|
||||
BIN
foreign dlls/Our.Umbraco.uGoLive.47x.dll
Normal file
BIN
foreign dlls/Our.Umbraco.uGoLive.Checks.dll
Normal file
BIN
foreign dlls/Our.Umbraco.uGoLive.dll
Normal file
@@ -35,6 +35,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{05329D
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
config templates\config\404handlers.config = config templates\config\404handlers.config
|
||||
config templates\config\ClientDependency.config = config templates\config\ClientDependency.config
|
||||
config templates\config\Dashboard.config = config templates\config\Dashboard.config
|
||||
config templates\config\ExamineIndex.config = config templates\config\ExamineIndex.config
|
||||
config templates\config\ExamineSettings.config = config templates\config\ExamineSettings.config
|
||||
config templates\config\formHandlers.config = config templates\config\formHandlers.config
|
||||
@@ -67,6 +68,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DLLs", "DLLs", "{F06D18F6-C
|
||||
foreign dlls\Microsoft.ApplicationBlocks.Data.dll = foreign dlls\Microsoft.ApplicationBlocks.Data.dll
|
||||
foreign dlls\WebPages\Microsoft.Web.Infrastructure.dll = foreign dlls\WebPages\Microsoft.Web.Infrastructure.dll
|
||||
foreign dlls\MySql.Data.dll = foreign dlls\MySql.Data.dll
|
||||
foreign dlls\Our.Umbraco.uGoLive.47x.dll = foreign dlls\Our.Umbraco.uGoLive.47x.dll
|
||||
foreign dlls\Our.Umbraco.uGoLive.Checks.dll = foreign dlls\Our.Umbraco.uGoLive.Checks.dll
|
||||
foreign dlls\Our.Umbraco.uGoLive.dll = foreign dlls\Our.Umbraco.uGoLive.dll
|
||||
foreign dlls\TidyNet.dll = foreign dlls\TidyNet.dll
|
||||
foreign dlls\UmbracoExamine.dll = foreign dlls\UmbracoExamine.dll
|
||||
foreign dlls\UrlRewritingNet.UrlRewriter.dll = foreign dlls\UrlRewritingNet.UrlRewriter.dll
|
||||
|
||||
@@ -95,4 +95,12 @@
|
||||
<control>/umbraco/plugins/courier/dashboard/CourierDashboard.ascx</control>
|
||||
</tab>
|
||||
</section>
|
||||
<section alias="uGoLiveDashboardSection">
|
||||
<areas>
|
||||
<area>developer</area>
|
||||
</areas>
|
||||
<tab caption="uGoLive Checklist">
|
||||
<control>/umbraco/plugins/uGoLive/Dashboard.ascx</control>
|
||||
</tab>
|
||||
</section>
|
||||
</dashBoard>
|
||||
@@ -110,6 +110,15 @@
|
||||
<Reference Include="Lucene.Net, Version=2.9.2.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>C:\Users\Shannon\Documents\Visual Studio 2008\Projects\Umbraco\Branch-4.1\foreign dlls\Lucene.Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Our.Umbraco.uGoLive">
|
||||
<HintPath>..\..\foreign dlls\Our.Umbraco.uGoLive.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Our.Umbraco.uGoLive.47x">
|
||||
<HintPath>..\..\foreign dlls\Our.Umbraco.uGoLive.47x.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Our.Umbraco.uGoLive.Checks">
|
||||
<HintPath>..\..\foreign dlls\Our.Umbraco.uGoLive.Checks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
|
||||
49
umbraco/presentation/umbraco/plugins/uGoLive/Dashboard.ascx
Normal file
@@ -0,0 +1,49 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Dashboard.ascx.cs" Inherits="Our.Umbraco.uGoLive.Web.Umbraco.Plugins.uGoLive.Dashboard" %>
|
||||
<%@ Import Namespace="umbraco.IO" %>
|
||||
<style type="text/css">
|
||||
.uGoLive .propertyItemContent img { vertical-align: middle; margin-right: 5px; }
|
||||
.uGoLive .propertypane .propertypane { padding: 10px 10px 0px; }
|
||||
.uGoLive .dashboardWrapper { padding: 5px 5px 5px 5px; overflow: hidden; color: #333; }
|
||||
.uGoLive .dashboardWrapper h2 { margin-top: 0; padding-bottom: 10px; border-bottom: 1px solid #CCC; padding-left: 37px; line-height: 32px; }
|
||||
.uGoLive .dashboardWrapper .dashboardIcon { position: absolute; top: 10px; left: 10px; }
|
||||
.uGoLive .dashboardWrapper h3 { margin-bottom: 10px; }
|
||||
.uGoLive .dashboardWrapper p { line-height: 1.4em; font-size: 1.1em; margin-top: 0; }
|
||||
.uGoLive #btnRunChecks { color: #fff; background: #f26e20; padding: 10px; border: 0; font-weight: bold; cursor: pointer; }
|
||||
.uGoLive #btnRunChecks.disabled { background: #f9b790; }
|
||||
.uGoLive a.disabled { cursor: default; opacity:0.3; filter:alpha(opacity=30); }
|
||||
</style>
|
||||
<script type="text/javascript" src="/umbraco/plugins/uGoLive/Dashboard.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
(function ($) {
|
||||
|
||||
$(function () {
|
||||
|
||||
Our.Umbraco.uGoLive.Dashboard.init({
|
||||
basePath: '<%= IOHelper.ResolveUrl(IOHelper.returnPath("umbracoBaseDirectory", "~/base")) %>',
|
||||
umbracoPath: '<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>'
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery)
|
||||
|
||||
</script>
|
||||
|
||||
<div class="uGoLive">
|
||||
<div class="propertypane">
|
||||
<div>
|
||||
<div class="propertyItem">
|
||||
<div class="dashboardWrapper">
|
||||
<h2>uGoLive Checklist</h2>
|
||||
<img src="/umbraco/plugins/uGoLive/icon.png" alt="uGoLive" class="dashboardIcon" />
|
||||
<p>The uGoLive checklist is a checklist of the most widely accredited best practises when deploying an Umbraco website. uGoLive performs a complete system check against these practises, and highlights any areas that need attention.</p>
|
||||
<button id="btnRunChecks">Run All Checks</button>
|
||||
<div class="checks">
|
||||
<asp:PlaceHolder ID="phChecks" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
170
umbraco/presentation/umbraco/plugins/uGoLive/Dashboard.js
Normal file
@@ -0,0 +1,170 @@
|
||||
var Our = Our || {};
|
||||
Our.Umbraco = Our.Umbraco || {};
|
||||
Our.Umbraco.uGoLive = Our.Umbraco.uGoLive || {};
|
||||
|
||||
(function ($) {
|
||||
|
||||
Our.Umbraco.uGoLive.Dashboard = (function() {
|
||||
|
||||
var checks = [];
|
||||
var currentCheckIndex = -1;
|
||||
var basePath = "/base";
|
||||
var umbracoPath = "/umbraco";
|
||||
|
||||
function performNextCheck() {
|
||||
var checkId = checks[currentCheckIndex];
|
||||
performCheck(checkId, function(data) {
|
||||
if(currentCheckIndex + 1 == checks.length) {
|
||||
// Re-enable the "Run All Checks" button
|
||||
var $btn = $("#btnRunChecks");
|
||||
$btn.text("Re-Run All Checks");
|
||||
$btn.removeClass("disabled");
|
||||
$("a.check").removeAttr("disabled");
|
||||
} else {
|
||||
// Run the next check
|
||||
currentCheckIndex++;
|
||||
performNextCheck();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function performCheck(checkId, callBack) {
|
||||
$("span.status[data-check-id=" + checkId + "]").html("<img src='" + umbracoPath + "/plugins/uGoLive/throbber.gif' alt='Checking...' /> Checking...");
|
||||
$.getJSON(basePath + '/uGoLive/Check/'+ checkId +'.aspx', function(data) {
|
||||
|
||||
var $checkEl = $("span.status[data-check-id=" + checkId + "]");
|
||||
|
||||
$checkEl.empty();
|
||||
|
||||
switch(data.Status.Value) {
|
||||
case "Passed":
|
||||
$checkEl.append("<img src='" + umbracoPath + "/plugins/uGoLive/tick.png' alt='Passed' />");
|
||||
$("a.rectify[data-check-id=" + checkId + "][data-check-can-rectify='true']").addClass("disabled");
|
||||
break;
|
||||
case "Indeterminate":
|
||||
$checkEl.append("<img src='" + umbracoPath + "/plugins/uGoLive/error.png' alt='Indeterminate' />");
|
||||
$("a.rectify[data-check-id=" + checkId + "][data-check-can-rectify='true']").removeClass("disabled");
|
||||
break;
|
||||
case "Failed":
|
||||
$checkEl.append("<img src='" + umbracoPath + "/plugins/uGoLive/cross.png' alt='Failed' />");
|
||||
$("a.rectify[data-check-id=" + checkId + "][data-check-can-rectify='true']").removeClass("disabled");
|
||||
break;
|
||||
}
|
||||
|
||||
if($.trim(data.Message) != "")
|
||||
$checkEl.append(data.Message);
|
||||
|
||||
if(callBack != undefined)
|
||||
callBack(data);
|
||||
});
|
||||
}
|
||||
|
||||
function performRectify(checkId, callBack) {
|
||||
$("span.status[data-check-id=" + checkId + "]").html("<img src='" + umbracoPath + "/plugins/uGoLive/throbber.gif' alt='Rectifying...' /> Rectifying...");
|
||||
$.getJSON(basePath + '/uGoLive/Rectify/'+ checkId +'.aspx', function(data) {
|
||||
|
||||
var $checkEl = $("span.status[data-check-id=" + checkId + "]");
|
||||
|
||||
$checkEl.empty();
|
||||
|
||||
switch(data.Status.Value) {
|
||||
case "Success":
|
||||
$checkEl.append("<img src='" + umbracoPath + "/plugins/uGoLive/tick.png' alt='Passed' />");
|
||||
$("a.rectify[data-check-id=" + checkId + "][data-check-can-rectify='true']").addClass("disabled");
|
||||
break;
|
||||
case "Failed":
|
||||
$checkEl.append("<img src='" + umbracoPath + "/plugins/uGoLive/cross.png' alt='Failed' />");
|
||||
$("a.rectify[data-check-id=" + checkId + "][data-check-can-rectify='true']").removeClass("disabled");
|
||||
break;
|
||||
}
|
||||
|
||||
if($.trim(data.Message) != "")
|
||||
$checkEl.append(data.Message);
|
||||
|
||||
if(callBack != undefined)
|
||||
callBack(data);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
init: function (o) {
|
||||
|
||||
// Set the paths
|
||||
if (typeof(o.umbracoPath) != 'undefined')
|
||||
umbracoPath = o.umbracoPath;
|
||||
if (typeof(o.basePath) != 'undefined')
|
||||
basePath = o.basePath;
|
||||
|
||||
// Parse all checks
|
||||
$("span.status").each(function (idx, el)
|
||||
{
|
||||
checks.push($(el).attr("data-check-id"));
|
||||
});
|
||||
|
||||
// Hookup run all check button
|
||||
$("#btnRunChecks").click(function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var $this = $(this);
|
||||
|
||||
if(!$this.hasClass("disabled")) {
|
||||
|
||||
// Clear out previous checks
|
||||
$("span.status").empty();
|
||||
|
||||
// Update button
|
||||
$this.text("Running checks...");
|
||||
$this.addClass("disabled");
|
||||
$("a.check").attr("disabled", "disabled");
|
||||
|
||||
// Start checks
|
||||
currentCheckIndex = 0;
|
||||
performNextCheck();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// Hookup individual check buttons
|
||||
$("a.check").click(function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var $this = $(this);
|
||||
|
||||
if(!$this.hasClass("disabled")) {
|
||||
|
||||
$this.addClass("disabled");
|
||||
var checkId = $this.attr("data-check-id");
|
||||
performCheck(checkId, function(data) {
|
||||
$this.removeClass("disabled");
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// Hookup individual rectify buttons
|
||||
$("a.rectify").click(function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var $this = $(this);
|
||||
|
||||
if(!$this.hasClass("disabled")) {
|
||||
|
||||
$this.addClass("disabled");
|
||||
var checkId = $this.attr("data-check-id");
|
||||
performRectify(checkId, function(data) {
|
||||
//$this.removeAttr("disabled");
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
})(jQuery)
|
||||
BIN
umbraco/presentation/umbraco/plugins/uGoLive/cog.png
Normal file
|
After Width: | Height: | Size: 512 B |
BIN
umbraco/presentation/umbraco/plugins/uGoLive/cross.png
Normal file
|
After Width: | Height: | Size: 655 B |
BIN
umbraco/presentation/umbraco/plugins/uGoLive/error.png
Normal file
|
After Width: | Height: | Size: 666 B |
BIN
umbraco/presentation/umbraco/plugins/uGoLive/help.png
Normal file
|
After Width: | Height: | Size: 786 B |
BIN
umbraco/presentation/umbraco/plugins/uGoLive/icon.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
umbraco/presentation/umbraco/plugins/uGoLive/run.png
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
umbraco/presentation/umbraco/plugins/uGoLive/throbber.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
umbraco/presentation/umbraco/plugins/uGoLive/tick.png
Normal file
|
After Width: | Height: | Size: 537 B |