Update: Plugin Framework Install & UI
This commit is contained in:
@@ -4,12 +4,21 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Disco.BI.Interop.Community;
|
||||
using Disco.Services.Plugins;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class PluginController : dbAdminController
|
||||
{
|
||||
public virtual ActionResult UpdateLibraryCatalogue()
|
||||
{
|
||||
var status = PluginLibraryUpdateTask.ScheduleNow();
|
||||
|
||||
status.SetFinishedUrl(Url.Action(MVC.Config.Plugins.Install()));
|
||||
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||
}
|
||||
|
||||
public virtual ActionResult Uninstall(string id, bool UninstallData)
|
||||
{
|
||||
@@ -23,7 +32,29 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||
}
|
||||
|
||||
public virtual ActionResult Install(HttpPostedFileBase Plugin)
|
||||
public virtual ActionResult Install(string PluginId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(PluginId))
|
||||
throw new ArgumentNullException("PluginId", "A PluginId must be supplied");
|
||||
|
||||
var catalogue = Plugins.LoadCatalogue(dbContext);
|
||||
var plugin = catalogue.Plugins.FirstOrDefault(p => p.Id.Equals(PluginId));
|
||||
|
||||
if (plugin == null)
|
||||
throw new ArgumentNullException("PluginId", "Plugin not found in catalogue");
|
||||
|
||||
// Already Installed?
|
||||
if (Plugins.PluginInstalled(plugin.Id))
|
||||
throw new InvalidOperationException("This plugin is already installed");
|
||||
|
||||
var tempPluginLocation = Path.Combine(dbContext.DiscoConfiguration.PluginPackagesLocation, string.Format("{0}.discoPlugin", plugin.Id));
|
||||
|
||||
var status = InstallPluginTask.InstallPlugin(plugin.LatestDownloadUrl, tempPluginLocation, true);
|
||||
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||
}
|
||||
|
||||
public virtual ActionResult InstallLocal(HttpPostedFileBase Plugin)
|
||||
{
|
||||
if (Plugin == null || Plugin.ContentLength <= 0 || string.IsNullOrWhiteSpace(Plugin.FileName))
|
||||
throw new ArgumentException("A discoPlugin file must be uploaded", "Plugin");
|
||||
@@ -36,10 +67,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
if (System.IO.File.Exists(tempPluginLocation))
|
||||
System.IO.File.Delete(tempPluginLocation);
|
||||
|
||||
|
||||
Plugin.SaveAs(tempPluginLocation);
|
||||
|
||||
var status = InstallPluginTask.InstallPlugin(tempPluginLocation, true);
|
||||
var status = InstallPluginTask.InstallLocalPlugin(tempPluginLocation, true);
|
||||
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||
}
|
||||
|
||||
@@ -1,122 +1,127 @@
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config
|
||||
{
|
||||
public class ConfigAreaRegistration : AreaRegistration
|
||||
{
|
||||
public override string AreaName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Config";
|
||||
}
|
||||
}
|
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
context.MapRoute(
|
||||
"Config_DeviceModel_GenericComponents",
|
||||
"Config/DeviceModel/GenericComponents",
|
||||
new { controller = "DeviceModel", action = "GenericComponents" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceModel",
|
||||
"Config/DeviceModel/{id}",
|
||||
new { controller = "DeviceModel", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceBatch_Create",
|
||||
"Config/DeviceBatch/Create",
|
||||
new { controller = "DeviceBatch", action = "Create", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceBatch_Timeline",
|
||||
"Config/DeviceBatch/Timeline",
|
||||
new { controller = "DeviceBatch", action = "Timeline" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceBatch",
|
||||
"Config/DeviceBatch/{id}",
|
||||
new { controller = "DeviceBatch", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceProfile_Create",
|
||||
"Config/DeviceProfile/Create",
|
||||
new { controller = "DeviceProfile", action = "Create" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceProfile_Defaults",
|
||||
"Config/DeviceProfile/Defaults",
|
||||
new { controller = "DeviceProfile", action = "Defaults" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceProfile",
|
||||
"Config/DeviceProfile/{id}",
|
||||
new { controller = "DeviceProfile", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_AttachmentType_Create",
|
||||
"Config/AttachmentType/Create",
|
||||
new { controller = "AttachmentType", action = "Create" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_AttachmentType_ExpressionBrowser_Type",
|
||||
"Config/AttachmentType/ExpressionBrowser/{type}",
|
||||
new { controller = "AttachmentType", action = "ExpressionBrowser", type = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_AttachmentType",
|
||||
"Config/AttachmentType/{id}",
|
||||
new { controller = "AttachmentType", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate_Create",
|
||||
"Config/DocumentTemplate/Create",
|
||||
new { controller = "DocumentTemplate", action = "Create", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate_ImportStatus",
|
||||
"Config/DocumentTemplate/ImportStatus",
|
||||
new { controller = "DocumentTemplate", action = "ImportStatus", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate_UndetectedPages",
|
||||
"Config/DocumentTemplate/UndetectedPages",
|
||||
new { controller = "DocumentTemplate", action = "UndetectedPages", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate_ExpressionBrowser",
|
||||
"Config/DocumentTemplate/ExpressionBrowser",
|
||||
new { controller = "DocumentTemplate", action = "ExpressionBrowser", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate",
|
||||
"Config/DocumentTemplate/{id}",
|
||||
new { controller = "DocumentTemplate", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
|
||||
context.MapRoute(
|
||||
"Config_Warranty",
|
||||
"Config/Warranty/{id}",
|
||||
new { controller = "Warranty", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
|
||||
context.MapRoute(
|
||||
"Config_Plugins",
|
||||
"Config/Plugins",
|
||||
new { controller = "Plugins", action = "Index"}
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_Plugins_Configure",
|
||||
"Config/Plugins/{PluginId}",
|
||||
new { controller = "Plugins", action = "Configure" }
|
||||
);
|
||||
|
||||
context.MapRoute(
|
||||
"Config_default",
|
||||
"Config/{controller}/{action}/{id}",
|
||||
new { controller = "Config", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config
|
||||
{
|
||||
public class ConfigAreaRegistration : AreaRegistration
|
||||
{
|
||||
public override string AreaName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Config";
|
||||
}
|
||||
}
|
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
context.MapRoute(
|
||||
"Config_DeviceModel_GenericComponents",
|
||||
"Config/DeviceModel/GenericComponents",
|
||||
new { controller = "DeviceModel", action = "GenericComponents" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceModel",
|
||||
"Config/DeviceModel/{id}",
|
||||
new { controller = "DeviceModel", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceBatch_Create",
|
||||
"Config/DeviceBatch/Create",
|
||||
new { controller = "DeviceBatch", action = "Create", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceBatch_Timeline",
|
||||
"Config/DeviceBatch/Timeline",
|
||||
new { controller = "DeviceBatch", action = "Timeline" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceBatch",
|
||||
"Config/DeviceBatch/{id}",
|
||||
new { controller = "DeviceBatch", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceProfile_Create",
|
||||
"Config/DeviceProfile/Create",
|
||||
new { controller = "DeviceProfile", action = "Create" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceProfile_Defaults",
|
||||
"Config/DeviceProfile/Defaults",
|
||||
new { controller = "DeviceProfile", action = "Defaults" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DeviceProfile",
|
||||
"Config/DeviceProfile/{id}",
|
||||
new { controller = "DeviceProfile", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_AttachmentType_Create",
|
||||
"Config/AttachmentType/Create",
|
||||
new { controller = "AttachmentType", action = "Create" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_AttachmentType_ExpressionBrowser_Type",
|
||||
"Config/AttachmentType/ExpressionBrowser/{type}",
|
||||
new { controller = "AttachmentType", action = "ExpressionBrowser", type = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_AttachmentType",
|
||||
"Config/AttachmentType/{id}",
|
||||
new { controller = "AttachmentType", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate_Create",
|
||||
"Config/DocumentTemplate/Create",
|
||||
new { controller = "DocumentTemplate", action = "Create", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate_ImportStatus",
|
||||
"Config/DocumentTemplate/ImportStatus",
|
||||
new { controller = "DocumentTemplate", action = "ImportStatus", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate_UndetectedPages",
|
||||
"Config/DocumentTemplate/UndetectedPages",
|
||||
new { controller = "DocumentTemplate", action = "UndetectedPages", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate_ExpressionBrowser",
|
||||
"Config/DocumentTemplate/ExpressionBrowser",
|
||||
new { controller = "DocumentTemplate", action = "ExpressionBrowser", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_DocumentTemplate",
|
||||
"Config/DocumentTemplate/{id}",
|
||||
new { controller = "DocumentTemplate", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
|
||||
context.MapRoute(
|
||||
"Config_Warranty",
|
||||
"Config/Warranty/{id}",
|
||||
new { controller = "Warranty", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
|
||||
context.MapRoute(
|
||||
"Config_Plugins",
|
||||
"Config/Plugins",
|
||||
new { controller = "Plugins", action = "Index"}
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_Plugins_Install",
|
||||
"Config/Plugins/Install",
|
||||
new { controller = "Plugins", action = "Install" }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_Plugins_Configure",
|
||||
"Config/Plugins/{PluginId}",
|
||||
new { controller = "Plugins", action = "Configure" }
|
||||
);
|
||||
|
||||
context.MapRoute(
|
||||
"Config_default",
|
||||
"Config/{controller}/{action}/{id}",
|
||||
new { controller = "Config", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,53 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Disco.Services.Logging;
|
||||
using Disco.Services.Logging.Models;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
public partial class LoggingController : dbAdminController
|
||||
{
|
||||
//
|
||||
// GET: /Config/Logs/
|
||||
|
||||
public virtual ActionResult Index()
|
||||
{
|
||||
var m = new Models.Logging.IndexModel()
|
||||
{
|
||||
LogModules = new Dictionary<LogBase, List<LogEventType>>()
|
||||
};
|
||||
foreach (var logModule in LogContext.LogModules.Values)
|
||||
{
|
||||
m.LogModules.Add(logModule, logModule.EventTypes.Values.Where(et => et.UsePersist).ToList());
|
||||
}
|
||||
|
||||
return View(m);
|
||||
}
|
||||
|
||||
public virtual ActionResult TaskStatus(string id)
|
||||
{
|
||||
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
string sessionId;
|
||||
do
|
||||
{
|
||||
System.Threading.Thread.Sleep(100);
|
||||
sessionId = Disco.Services.Tasks.ScheduledTasks.GetTaskStatuses(typeof(Disco.BI.Interop.ActiveDirectory.ActiveDirectoryUpdateLastNetworkLogonDateJob)).Select(t => t.SessionId).FirstOrDefault();
|
||||
} while (sessionId == null);
|
||||
|
||||
return View(new Models.Logging.TaskStatusModel() { SessionId = sessionId });
|
||||
}
|
||||
else
|
||||
{
|
||||
var taskStatus = Disco.Services.Tasks.ScheduledTasks.GetTaskStatus(id);
|
||||
return View(new Models.Logging.TaskStatusModel() { SessionId = taskStatus.SessionId });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Disco.Services.Logging;
|
||||
using Disco.Services.Logging.Models;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
public partial class LoggingController : dbAdminController
|
||||
{
|
||||
//
|
||||
// GET: /Config/Logs/
|
||||
|
||||
public virtual ActionResult Index()
|
||||
{
|
||||
var m = new Models.Logging.IndexModel()
|
||||
{
|
||||
LogModules = new Dictionary<LogBase, List<LogEventType>>()
|
||||
};
|
||||
foreach (var logModule in LogContext.LogModules.Values)
|
||||
{
|
||||
m.LogModules.Add(logModule, logModule.EventTypes.Values.Where(et => et.UsePersist).ToList());
|
||||
}
|
||||
|
||||
return View(m);
|
||||
}
|
||||
|
||||
public virtual ActionResult TaskStatus(string id)
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
throw new ArgumentNullException("id", "A Task Status Id is required");
|
||||
|
||||
var taskStatus = Disco.Services.Tasks.ScheduledTasks.GetTaskStatus(id);
|
||||
if (taskStatus == null)
|
||||
return RedirectToAction(MVC.Config.Logging.Index());
|
||||
|
||||
return View(new Models.Logging.TaskStatusModel() { SessionId = taskStatus.SessionId });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Services.Tasks;
|
||||
using Disco.Web.Areas.Config.Models.Plugins;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Controllers
|
||||
@@ -65,5 +66,27 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
}
|
||||
#endregion
|
||||
|
||||
public virtual ActionResult Install()
|
||||
{
|
||||
// Check for recent catalogue
|
||||
|
||||
var catalogue = Plugins.LoadCatalogue(dbContext);
|
||||
|
||||
if (catalogue == null || catalogue.ResponseTimestamp < DateTime.Now.AddMinutes(-15))
|
||||
{
|
||||
// Need to Update Catalogue
|
||||
return RedirectToAction(MVC.API.Plugin.UpdateLibraryCatalogue());
|
||||
}
|
||||
else
|
||||
{
|
||||
var model = new Models.Plugins.InstallModel()
|
||||
{
|
||||
Catalogue = catalogue
|
||||
};
|
||||
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Models.BI.Interop.Community;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Plugins
|
||||
{
|
||||
public class InstallModel
|
||||
{
|
||||
public PluginLibraryUpdateResponse Catalogue { get; set; }
|
||||
}
|
||||
}
|
||||
+22
-22
@@ -1,23 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Services.Plugins;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Plugins
|
||||
{
|
||||
public class PluginConfigurationViewModel
|
||||
{
|
||||
public PluginManifest Manifest { get; set; }
|
||||
public Type PluginViewType { get; set; }
|
||||
public object PluginViewModel { get; set; }
|
||||
|
||||
public PluginConfigurationViewModel(PluginConfigurationHandler.PluginConfigurationHandlerGetResponse response)
|
||||
{
|
||||
this.Manifest = response.Manifest;
|
||||
|
||||
this.PluginViewType = response.ViewType;
|
||||
this.PluginViewModel = response.ViewModel;
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Services.Plugins;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Plugins
|
||||
{
|
||||
public class PluginConfigurationViewModel
|
||||
{
|
||||
public PluginManifest Manifest { get; set; }
|
||||
public Type PluginViewType { get; set; }
|
||||
public object PluginViewModel { get; set; }
|
||||
|
||||
public PluginConfigurationViewModel(PluginConfigurationHandler.PluginConfigurationHandlerGetResponse response)
|
||||
{
|
||||
this.Manifest = response.Manifest;
|
||||
|
||||
this.PluginViewType = response.ViewType;
|
||||
this.PluginViewModel = response.ViewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,52 +1,52 @@
|
||||
@model Disco.Web.Areas.Config.Models.Expressions.EditorModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Expressions");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-ExpressionEditor");
|
||||
}
|
||||
<div id="expressionEditor">
|
||||
<div id="expressionEditorContainer">
|
||||
</div>
|
||||
<div id="expressionEditorExceptionContainer">
|
||||
<h3>
|
||||
Parse Error:</h3>
|
||||
<div id="expressionEditorException">
|
||||
</div>
|
||||
</div>
|
||||
<button id="expressionEditorValidateButton">
|
||||
Validate</button>
|
||||
@if (false)
|
||||
{ <script src="/ClientSource/Scripts/Core/jquery-1.7.1.js" type="text/javascript"></script>}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var initExpression = '@(Model.Expression)';
|
||||
var hostSrcUrl = '@(Links.ClientSource.Style.ExpressionEditor_htm)';
|
||||
var host = $('<iframe>').attr('src', hostSrcUrl).css({ width: '100%', height: 100, border: 'none' });
|
||||
$('#expressionEditorContainer').append(host);
|
||||
|
||||
var $expressionEditorExceptionContainer = $('#expressionEditorExceptionContainer');
|
||||
var $expressionEditorException = $('#expressionEditorException');
|
||||
|
||||
var editor = new DiscoExpressionEditor(host, '@(Url.Action(MVC.API.Expressions.ValidateExpression()))', initExpression);
|
||||
|
||||
editor.expressionExceptionChanged = function (e) {
|
||||
if (e && !e.ExpressionValid) {
|
||||
$expressionEditorException.text(e.Message);
|
||||
$expressionEditorExceptionContainer.slideDown();
|
||||
} else {
|
||||
$expressionEditorExceptionContainer.slideUp();
|
||||
}
|
||||
};
|
||||
editor.expressionValidated = function (result, e) {
|
||||
if (result)
|
||||
alert('Validation Passed');
|
||||
};
|
||||
|
||||
$('#expressionEditorValidateButton').click(function () {
|
||||
editor.validateExpression();
|
||||
});
|
||||
|
||||
|
||||
editor.hostInit();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@model Disco.Web.Areas.Config.Models.Expressions.EditorModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Expressions");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-ExpressionEditor");
|
||||
}
|
||||
<div id="expressionEditor">
|
||||
<div id="expressionEditorContainer">
|
||||
</div>
|
||||
<div id="expressionEditorExceptionContainer">
|
||||
<h3>
|
||||
Parse Error:</h3>
|
||||
<div id="expressionEditorException">
|
||||
</div>
|
||||
</div>
|
||||
<button id="expressionEditorValidateButton">
|
||||
Validate</button>
|
||||
@* @if (false)
|
||||
{ <script src="/ClientSource/Scripts/Core/jquery-1.7.1.js" type="text/javascript"></script>}*@
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var initExpression = '@(Model.Expression)';
|
||||
var hostSrcUrl = '@(Links.ClientSource.Style.ExpressionEditor_htm)';
|
||||
var host = $('<iframe>').attr('src', hostSrcUrl).css({ width: '100%', height: 100, border: 'none' });
|
||||
$('#expressionEditorContainer').append(host);
|
||||
|
||||
var $expressionEditorExceptionContainer = $('#expressionEditorExceptionContainer');
|
||||
var $expressionEditorException = $('#expressionEditorException');
|
||||
|
||||
var editor = new DiscoExpressionEditor(host, '@(Url.Action(MVC.API.Expressions.ValidateExpression()))', initExpression);
|
||||
|
||||
editor.expressionExceptionChanged = function (e) {
|
||||
if (e && !e.ExpressionValid) {
|
||||
$expressionEditorException.text(e.Message);
|
||||
$expressionEditorExceptionContainer.slideDown();
|
||||
} else {
|
||||
$expressionEditorExceptionContainer.slideUp();
|
||||
}
|
||||
};
|
||||
editor.expressionValidated = function (result, e) {
|
||||
if (result)
|
||||
alert('Validation Passed');
|
||||
};
|
||||
|
||||
$('#expressionEditorValidateButton').click(function () {
|
||||
editor.validateExpression();
|
||||
});
|
||||
|
||||
|
||||
editor.hostInit();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -1,169 +1,141 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.Expressions
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Expressions/Editor.cshtml")]
|
||||
public class Editor : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Expressions.EditorModel>
|
||||
{
|
||||
public Editor()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Expressions");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-ExpressionEditor");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditor\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditorContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditorExceptionContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>\r\n Parse Error:</h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditorException\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n <button");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditorValidateButton\"");
|
||||
|
||||
WriteLiteral(">\r\n Validate</button>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
if (false)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" src=\"/ClientSource/Scripts/Core/jquery-1.7.1.js\"");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral("></script>");
|
||||
|
||||
|
||||
#line 18 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var initExpression = \'");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
Write(Model.Expression);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var hostSrcUrl = \'");
|
||||
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
Write(Links.ClientSource.Style.ExpressionEditor_htm);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"';
|
||||
var host = $('<iframe>').attr('src', hostSrcUrl).css({ width: '100%', height: 100, border: 'none' });
|
||||
$('#expressionEditorContainer').append(host);
|
||||
|
||||
var $expressionEditorExceptionContainer = $('#expressionEditorExceptionContainer');
|
||||
var $expressionEditorException = $('#expressionEditorException');
|
||||
|
||||
var editor = new DiscoExpressionEditor(host, '");
|
||||
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
Write(Url.Action(MVC.API.Expressions.ValidateExpression()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"', initExpression);
|
||||
|
||||
editor.expressionExceptionChanged = function (e) {
|
||||
if (e && !e.ExpressionValid) {
|
||||
$expressionEditorException.text(e.Message);
|
||||
$expressionEditorExceptionContainer.slideDown();
|
||||
} else {
|
||||
$expressionEditorExceptionContainer.slideUp();
|
||||
}
|
||||
};
|
||||
editor.expressionValidated = function (result, e) {
|
||||
if (result)
|
||||
alert('Validation Passed');
|
||||
};
|
||||
|
||||
$('#expressionEditorValidateButton').click(function () {
|
||||
editor.validateExpression();
|
||||
});
|
||||
|
||||
|
||||
editor.hostInit();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.Expressions
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Expressions/Editor.cshtml")]
|
||||
public class Editor : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Expressions.EditorModel>
|
||||
{
|
||||
public Editor()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Expressions");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-ExpressionEditor");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditor\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditorContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditorExceptionContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>\r\n Parse Error:</h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditorException\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n <button");
|
||||
|
||||
WriteLiteral(" id=\"expressionEditorValidateButton\"");
|
||||
|
||||
WriteLiteral(">\r\n Validate</button>\r\n");
|
||||
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var initExpression = \'");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
Write(Model.Expression);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var hostSrcUrl = \'");
|
||||
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
Write(Links.ClientSource.Style.ExpressionEditor_htm);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"';
|
||||
var host = $('<iframe>').attr('src', hostSrcUrl).css({ width: '100%', height: 100, border: 'none' });
|
||||
$('#expressionEditorContainer').append(host);
|
||||
|
||||
var $expressionEditorExceptionContainer = $('#expressionEditorExceptionContainer');
|
||||
var $expressionEditorException = $('#expressionEditorException');
|
||||
|
||||
var editor = new DiscoExpressionEditor(host, '");
|
||||
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\Expressions\Editor.cshtml"
|
||||
Write(Url.Action(MVC.API.Expressions.ValidateExpression()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"', initExpression);
|
||||
|
||||
editor.expressionExceptionChanged = function (e) {
|
||||
if (e && !e.ExpressionValid) {
|
||||
$expressionEditorException.text(e.Message);
|
||||
$expressionEditorExceptionContainer.slideDown();
|
||||
} else {
|
||||
$expressionEditorExceptionContainer.slideUp();
|
||||
}
|
||||
};
|
||||
editor.expressionValidated = function (result, e) {
|
||||
if (result)
|
||||
alert('Validation Passed');
|
||||
};
|
||||
|
||||
$('#expressionEditorValidateButton').click(function () {
|
||||
editor.validateExpression();
|
||||
});
|
||||
|
||||
|
||||
editor.hostInit();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
@@ -3,72 +3,75 @@
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Plugins");
|
||||
}
|
||||
@{
|
||||
if (Model.PluginManifests.Count == 0)
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No Plugins are Installed</h2>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
var pluginGroups = Model.PluginManifestsByType;
|
||||
<div id="plugins">
|
||||
@{
|
||||
if (Model.PluginManifests.Count == 0)
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No Plugins are Installed</h2>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
var pluginGroups = Model.PluginManifestsByType;
|
||||
|
||||
|
||||
int itemsPerColumn = pluginGroups.Count / 3;
|
||||
var itemNextId = 0;
|
||||
int itemsPerColumn = pluginGroups.Count / 3;
|
||||
var itemNextId = 0;
|
||||
|
||||
<table id="pageMenu">
|
||||
<tr>
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
<td>
|
||||
@{
|
||||
int itemsForThisColumn = itemsPerColumn + (pluginGroups.Count % 3 > i ? 1 : 0);
|
||||
for (int i2 = 0; i2 < itemsForThisColumn && itemNextId < pluginGroups.Count; i2++)
|
||||
<table id="pageMenu">
|
||||
<tr>
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
var pluginGroup = pluginGroups[itemNextId];
|
||||
itemNextId++;
|
||||
<div class="pageMenuArea">
|
||||
<h2>@Plugins.PluginFeatureCategoryDisplayName(pluginGroup.Item1)</h2>
|
||||
@foreach (var pluginDefinition in pluginGroup.Item2)
|
||||
{
|
||||
@Html.ActionLink(pluginDefinition.Name, MVC.Config.Plugins.Configure(pluginDefinition.Id))
|
||||
<div class="pageMenuBlurb">
|
||||
@pluginDefinition.Id | v@(pluginDefinition.Version.ToString(3))
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<td>
|
||||
@{
|
||||
int itemsForThisColumn = itemsPerColumn + (pluginGroups.Count % 3 > i ? 1 : 0);
|
||||
for (int i2 = 0; i2 < itemsForThisColumn && itemNextId < pluginGroups.Count; i2++)
|
||||
{
|
||||
var pluginGroup = pluginGroups[itemNextId];
|
||||
itemNextId++;
|
||||
<div class="pageMenuArea">
|
||||
<h2>@Plugins.PluginFeatureCategoryDisplayName(pluginGroup.Item1)</h2>
|
||||
@foreach (var pluginDefinition in pluginGroup.Item2)
|
||||
{
|
||||
<a href="@Url.Action(MVC.Config.Plugins.Configure(pluginDefinition.Id))">
|
||||
<h3>@pluginDefinition.Name</h3>
|
||||
</a>
|
||||
<div class="pageMenuBlurb">
|
||||
<span class="pluginId">@pluginDefinition.Id</span> | <span class="pluginVersion">v@(pluginDefinition.VersionFormatted)</span> | @pluginDefinition.Author | <a href="@pluginDefinition.Url" target="_blank">More Information</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogUninstallPlugins" title="Uninstall Plugin">
|
||||
<div>
|
||||
@Html.DropDownList("uninstallPlugin", Model.PluginManifests.ToSelectListItems(null, true, "Select a Plugin to Uninstall"))
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogUninstallPlugins" title="Uninstall Plugin">
|
||||
<div>
|
||||
@Html.DropDownList("uninstallPlugin", Model.PluginManifests.ToSelectListItems(null, true, "Select a Plugin to Uninstall"))
|
||||
</div>
|
||||
<div>
|
||||
<input id="uninstallPluginData" type="checkbox" /><label for="uninstallPluginData"> Uninstall Plugin Data</label>
|
||||
<div id="uninstallPluginDataAlert" style="display: none; padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-error ui-corner-all">
|
||||
<span style="margin-right: 0.3em; float: left;" class="ui-icon ui-icon-alert"></span>NOTE: Data will be permanently deleted
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input id="uninstallPluginData" type="checkbox" /><label for="uninstallPluginData"> Uninstall Plugin Data</label>
|
||||
<div id="uninstallPluginDataAlert" style="display: none; padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-error ui-corner-all">
|
||||
<div id="dialogUninstallPluginConfirm" title="Confirm Plugin Uninstall">
|
||||
<div style="padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-highlight ui-corner-all">
|
||||
<span style="margin-right: 0.3em; float: left;" class="ui-icon ui-icon-help"></span>Are you sure you want to uninstall this plugin?
|
||||
<h4 id="uninstallPluginConfirm"></h4>
|
||||
</div>
|
||||
<div id="uninstallPluginDataConfirm" style="display: none; padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-error ui-corner-all">
|
||||
<span style="margin-right: 0.3em; float: left;" class="ui-icon ui-icon-alert"></span>NOTE: Data will be permanently deleted
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogUninstallPluginConfirm" title="Confirm Plugin Uninstall">
|
||||
<div style="padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-highlight ui-corner-all">
|
||||
<span style="margin-right: 0.3em; float: left;" class="ui-icon ui-icon-help"></span>Are you sure you want to uninstall this plugin?
|
||||
<h4 id="uninstallPluginConfirm"></h4>
|
||||
</div>
|
||||
<div id="uninstallPluginDataConfirm" style="display: none; padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-error ui-corner-all">
|
||||
<span style="margin-right: 0.3em; float: left;" class="ui-icon ui-icon-alert"></span>NOTE: Data will be permanently deleted
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
// Uninstall
|
||||
var uninstallUrl = '@(Url.Action(MVC.API.Plugin.Uninstall()))/';
|
||||
<script>
|
||||
$(function () {
|
||||
// Uninstall
|
||||
var uninstallUrl = '@(Url.Action(MVC.API.Plugin.Uninstall()))/';
|
||||
var uninstallPlugin, uninstallPluginData, $dialogConfirm, uninstallPluginConfirm, uninstallPluginDataConfirm;
|
||||
|
||||
var pluginId, pluginName, pluginUninstallData;
|
||||
@@ -147,55 +150,14 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
<div id="dialogInstallPlugin" title="Install Plugin">
|
||||
<div style="padding-bottom: 10px;">
|
||||
@using (Html.BeginForm(MVC.API.Plugin.Install(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
<label for="pluginFile">Plugin Package: </label>
|
||||
<input id="pluginFile" name="Plugin" type="file" />
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
<div style="padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-error ui-corner-all">
|
||||
<span style="margin-right: 0.3em; margin-bottom: 2em; float: left;" class="ui-icon ui-icon-alert"></span>Warning: All plugins run with the same level of network privileges as the Disco Web App.<br />
|
||||
<strong>Only install plugins from a trusted source.</strong>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
// Install
|
||||
var $dialogInstall = $('#dialogInstallPlugin').dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
width: 350,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Upload & Install": function () {
|
||||
var pluginFile = $('#pluginFile');
|
||||
if (pluginFile.val()) {
|
||||
pluginFile.closest('form').submit();
|
||||
$(this).dialog('disable');
|
||||
} else {
|
||||
alert('Choose a Plugin Package to Install');
|
||||
}
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#buttonInstall').click(function () {
|
||||
$dialogInstall.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="actionBar">
|
||||
@if (Model.PluginManifests.Count > 0)
|
||||
{
|
||||
@Html.ActionLinkButton("Uninstall Plugins", MVC.Config.Plugins.Index(), "buttonUninstall")
|
||||
}
|
||||
@Html.ActionLinkButton("Install Plugins", MVC.Config.Plugins.Index(), "buttonInstall")
|
||||
@Html.ActionLinkButton("Install Plugins", MVC.Config.Plugins.Install())
|
||||
</div>
|
||||
|
||||
@@ -54,89 +54,99 @@ namespace Disco.Web.Areas.Config.Views.Plugins
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"plugins\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
if (Model.PluginManifests.Count == 0)
|
||||
{
|
||||
#line 7 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
if (Model.PluginManifests.Count == 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>No Plugins are Installed</h2>\r\n </div> \r\n");
|
||||
WriteLiteral(">\r\n <h2>No Plugins are Installed</h2>\r\n </div> \r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
var pluginGroups = Model.PluginManifestsByType;
|
||||
#line 13 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
var pluginGroups = Model.PluginManifestsByType;
|
||||
|
||||
|
||||
int itemsPerColumn = pluginGroups.Count / 3;
|
||||
var itemNextId = 0;
|
||||
int itemsPerColumn = pluginGroups.Count / 3;
|
||||
var itemNextId = 0;
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" id=\"pageMenu\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n");
|
||||
WriteLiteral(">\r\n <tr>\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
int itemsForThisColumn = itemsPerColumn + (pluginGroups.Count % 3 > i ? 1 : 0);
|
||||
for (int i2 = 0; i2 < itemsForThisColumn && itemNextId < pluginGroups.Count; i2++)
|
||||
#line 24 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
var pluginGroup = pluginGroups[itemNextId];
|
||||
itemNextId++;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
int itemsForThisColumn = itemsPerColumn + (pluginGroups.Count % 3 > i ? 1 : 0);
|
||||
for (int i2 = 0; i2 < itemsForThisColumn && itemNextId < pluginGroups.Count; i2++)
|
||||
{
|
||||
var pluginGroup = pluginGroups[itemNextId];
|
||||
itemNextId++;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuArea\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>");
|
||||
WriteLiteral(">\r\n <h2>");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Plugins.PluginFeatureCategoryDisplayName(pluginGroup.Item1));
|
||||
#line 34 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Plugins.PluginFeatureCategoryDisplayName(pluginGroup.Item1));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -144,104 +154,142 @@ WriteLiteral(">\r\n <h2>");
|
||||
WriteLiteral("</h2>\r\n");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
foreach (var pluginDefinition in pluginGroup.Item2)
|
||||
{
|
||||
#line 35 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Html.ActionLink(pluginDefinition.Name, MVC.Config.Plugins.Configure(pluginDefinition.Id)));
|
||||
#line 35 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
foreach (var pluginDefinition in pluginGroup.Item2)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1435), Tuple.Create("\"", 1504)
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1442), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Configure(pluginDefinition.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1442), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <h3>");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(pluginDefinition.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral("</h3>\r\n </a>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" class=\"pluginId\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(pluginDefinition.Id);
|
||||
#line 41 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(pluginDefinition.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" | v");
|
||||
WriteLiteral("</span> | <span");
|
||||
|
||||
WriteLiteral(" class=\"pluginVersion\"");
|
||||
|
||||
WriteLiteral(">v");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(pluginDefinition.Version.ToString(3));
|
||||
#line 41 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(pluginDefinition.VersionFormatted);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
WriteLiteral("</span> | ");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
#line 41 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(pluginDefinition.Author);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
WriteLiteral(" | <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1885), Tuple.Create("\"", 1913)
|
||||
|
||||
#line 42 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1892), Tuple.Create<System.Object, System.Int32>(pluginDefinition.Url
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
, 1892), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">More Information</a>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n </table>\r\n");
|
||||
WriteLiteral(" </tr>\r\n </table>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUninstallPlugins\"");
|
||||
|
||||
WriteLiteral(" title=\"Uninstall Plugin\"");
|
||||
|
||||
WriteLiteral(">\r\n <div>\r\n");
|
||||
WriteLiteral(">\r\n <div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Html.DropDownList("uninstallPlugin", Model.PluginManifests.ToSelectListItems(null, true, "Select a Plugin to Uninstall")));
|
||||
#line 53 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Html.DropDownList("uninstallPlugin", Model.PluginManifests.ToSelectListItems(null, true, "Select a Plugin to Uninstall")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n <div>\r\n <input");
|
||||
WriteLiteral("\r\n </div>\r\n <div>\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"uninstallPluginData\"");
|
||||
|
||||
@@ -251,7 +299,7 @@ WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"uninstallPluginData\"");
|
||||
|
||||
WriteLiteral("> Uninstall Plugin Data</label>\r\n <div");
|
||||
WriteLiteral("> Uninstall Plugin Data</label>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"uninstallPluginDataAlert\"");
|
||||
|
||||
@@ -259,6 +307,45 @@ WriteLiteral(" style=\"display: none; padding: 0.7em 0.7em; margin-top: 8px;\"")
|
||||
|
||||
WriteLiteral(" class=\"ui-state-error ui-corner-all\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 0.3em; float: left;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral("></span>NOTE: Data will be permanently deleted\r\n </div>\r\n " +
|
||||
" </div>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUninstallPluginConfirm\"");
|
||||
|
||||
WriteLiteral(" title=\"Confirm Plugin Uninstall\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" style=\"padding: 0.7em 0.7em; margin-top: 8px;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-state-highlight ui-corner-all\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 0.3em; float: left;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-help\"");
|
||||
|
||||
WriteLiteral("></span>Are you sure you want to uninstall this plugin?\r\n <h4");
|
||||
|
||||
WriteLiteral(" id=\"uninstallPluginConfirm\"");
|
||||
|
||||
WriteLiteral("></h4>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"uninstallPluginDataConfirm\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none; padding: 0.7em 0.7em; margin-top: 8px;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-state-error ui-corner-all\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 0.3em; float: left;\"");
|
||||
@@ -266,52 +353,14 @@ WriteLiteral(" style=\"margin-right: 0.3em; float: left;\"");
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral("></span>NOTE: Data will be permanently deleted\r\n </div>\r\n </div" +
|
||||
">\r\n </div>\r\n");
|
||||
">\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUninstallPluginConfirm\"");
|
||||
|
||||
WriteLiteral(" title=\"Confirm Plugin Uninstall\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" style=\"padding: 0.7em 0.7em; margin-top: 8px;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-state-highlight ui-corner-all\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 0.3em; float: left;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-help\"");
|
||||
|
||||
WriteLiteral("></span>Are you sure you want to uninstall this plugin?\r\n <h4");
|
||||
|
||||
WriteLiteral(" id=\"uninstallPluginConfirm\"");
|
||||
|
||||
WriteLiteral("></h4>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"uninstallPluginDataConfirm\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none; padding: 0.7em 0.7em; margin-top: 8px;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-state-error ui-corner-all\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 0.3em; float: left;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral("></span>NOTE: Data will be permanently deleted\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n // Uninstall\r\n var " +
|
||||
"uninstallUrl = \'");
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n // Uninstall\r\n " +
|
||||
" var uninstallUrl = \'");
|
||||
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Url.Action(MVC.API.Plugin.Uninstall()));
|
||||
#line 74 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Url.Action(MVC.API.Plugin.Uninstall()));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -357,123 +406,29 @@ WriteLiteral("/\';\r\n var uninstallPlugin, uninstallPluginData, $dia
|
||||
" if ($(this).is(\':checked\')) {\r\n $(\'#uninstallPluginD" +
|
||||
"ataAlert\').slideDown();\r\n } else {\r\n $(\'#unins" +
|
||||
"tallPluginDataAlert\').slideUp();\r\n }\r\n });\r\n })" +
|
||||
";\r\n </script>\r\n");
|
||||
";\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 151 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogInstallPlugin\"");
|
||||
|
||||
WriteLiteral(" title=\"Install Plugin\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" style=\"padding-bottom: 10px;\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 155 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 155 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Plugin.Install(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <label");
|
||||
|
||||
WriteLiteral(" for=\"pluginFile\"");
|
||||
|
||||
WriteLiteral(">Plugin Package: </label>\r\n");
|
||||
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" id=\"pluginFile\"");
|
||||
|
||||
WriteLiteral(" name=\"Plugin\"");
|
||||
|
||||
WriteLiteral(" type=\"file\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 159 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
#line 154 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" style=\"padding: 0.7em 0.7em; margin-top: 8px;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-state-error ui-corner-all\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 0.3em; margin-bottom: 2em; float: left;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(@"></span>Warning: All plugins run with the same level of network privileges as the Disco Web App.<br />
|
||||
<strong>Only install plugins from a trusted source.</strong>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
// Install
|
||||
var $dialogInstall = $('#dialogInstallPlugin').dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
width: 350,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Upload & Install"": function () {
|
||||
var pluginFile = $('#pluginFile');
|
||||
if (pluginFile.val()) {
|
||||
pluginFile.closest('form').submit();
|
||||
$(this).dialog('disable');
|
||||
} else {
|
||||
alert('Choose a Plugin Package to Install');
|
||||
}
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#buttonInstall').click(function () {
|
||||
$dialogInstall.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div");
|
||||
WriteLiteral("\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 196 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
#line 158 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 196 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
#line 158 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
if (Model.PluginManifests.Count > 0)
|
||||
{
|
||||
|
||||
@@ -481,14 +436,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 198 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
#line 160 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Uninstall Plugins", MVC.Config.Plugins.Index(), "buttonUninstall"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 198 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
#line 160 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -498,8 +453,8 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 200 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Install Plugins", MVC.Config.Plugins.Index(), "buttonInstall"));
|
||||
#line 162 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Install Plugins", MVC.Config.Plugins.Install()));
|
||||
|
||||
|
||||
#line default
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
@model Disco.Web.Areas.Config.Models.Plugins.InstallModel
|
||||
@using Disco.Services.Plugins;
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Plugins", MVC.Config.Plugins.Index(), "Install Plugin");
|
||||
}
|
||||
<div id="pluginCatalog">
|
||||
<h4 id="pluginCatalogHeading">The plugin catalogue [<a href="http://discoict.com.au/">http://discoict.com.au</a>] was last updated @CommonHelpers.FriendlyDate(Model.Catalogue.ResponseTimestamp)
|
||||
</h4>
|
||||
@if (Model.Catalogue.Plugins.Count == 0)
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No Plugins are Available</h2>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
var plugins = Model.Catalogue.Plugins;
|
||||
int itemsPerColumn = plugins.Count / 3;
|
||||
var itemNextId = 0;
|
||||
<table id="pageMenu">
|
||||
<tr>
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
<td>
|
||||
@{
|
||||
int itemsForThisColumn = itemsPerColumn + (plugins.Count % 3 > i ? 1 : 0);
|
||||
for (int i2 = 0; i2 < itemsForThisColumn && itemNextId < plugins.Count; i2++)
|
||||
{
|
||||
var plugin = plugins[itemNextId];
|
||||
itemNextId++;
|
||||
<div class="pageMenuArea pluginItem@(Plugins.PluginInstalled(plugin.Id) ? " pluginInstalled" : string.Empty)">
|
||||
<a class="pluginInstallLink" href="@(Url.Action(MVC.API.Plugin.Install(plugin.Id)))">
|
||||
<h2 class="pluginName">@plugin.Name</h2>
|
||||
</a>
|
||||
<div class="pluginItemBlurb">@(new HtmlString(plugin.Blurb))</div>
|
||||
<div class="pageMenuBlurb">
|
||||
<span class="pluginId">@plugin.Id</span> | <span class="pluginVersion">v@(plugin.LatestVersion)</span> | @plugin.Author | <a href="@plugin.Url" target="_blank">More Information</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
}
|
||||
</div>
|
||||
<div id="dialogInstallPlugin" title="Install this Plugin?">
|
||||
<h2 id="dialogInstallPluginName"></h2>
|
||||
<h4 id="dialogInstallPluginDetails"></h4>
|
||||
|
||||
<div style="padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-highlight ui-corner-all">
|
||||
<span style="margin-right: 0.3em; margin-bottom: 2em; float: left;" class="ui-icon ui-icon-alert"></span>Warning: All plugins run with the same level of network privileges as the Disco Web App.<br />
|
||||
<strong>Only Install plugins from a trusted source.</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogUploadPlugin" title="Install Plugin Package">
|
||||
<div style="padding-bottom: 10px;">
|
||||
@using (Html.BeginForm(MVC.API.Plugin.InstallLocal(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
<label for="pluginFile">Plugin Package: </label>
|
||||
<input id="pluginFile" name="Plugin" type="file" />
|
||||
}
|
||||
</div>
|
||||
<div style="padding: 0.7em 0.7em; margin-top: 8px;" class="ui-state-error ui-corner-all">
|
||||
<span style="margin-right: 0.3em; margin-bottom: 2em; float: left;" class="ui-icon ui-icon-alert"></span>Warning: All plugins run with the same level of network privileges as the Disco Web App.<br />
|
||||
<strong>Only install plugins from a trusted source.</strong>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var $selectedPlugin;
|
||||
var $selectedPluginUrl;
|
||||
|
||||
// Install
|
||||
var $dialogInstall = $('#dialogInstallPlugin').dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
width: 350,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Install": function () {
|
||||
if ($selectedPlugin == null || !$selectedPluginUrl) {
|
||||
$(this).dialog("close");
|
||||
return;
|
||||
}
|
||||
$(this).dialog("disable");
|
||||
|
||||
window.location.href = $selectedPluginUrl;
|
||||
},
|
||||
Cancel: function () {
|
||||
$selectedPlugin = null;
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#pageMenu').find('a.pluginInstallLink').click(function () {
|
||||
$this = $(this);
|
||||
|
||||
$selectedPlugin = $this.closest('.pluginItem');
|
||||
$selectedPluginUrl = $this.attr('href');
|
||||
|
||||
if ($selectedPlugin.is('.pluginInstalled')) {
|
||||
alert('This plugin is already installed.');
|
||||
} else {
|
||||
$('#dialogInstallPluginName').text($selectedPlugin.find('.pluginName').text());
|
||||
$('#dialogInstallPluginDetails').text($selectedPlugin.find('.pluginId').text() + ' | ' + $selectedPlugin.find('.pluginVersion').text());
|
||||
|
||||
$dialogInstall.dialog('open');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Upload
|
||||
var $dialogUpload = $('#dialogUploadPlugin').dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
width: 350,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Upload & Install": function () {
|
||||
var pluginFile = $('#pluginFile');
|
||||
if (pluginFile.val()) {
|
||||
pluginFile.closest('form').submit();
|
||||
$(this).dialog('disable');
|
||||
} else {
|
||||
alert('Choose a Plugin Package to Upload');
|
||||
}
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#buttonUpload').click(function () {
|
||||
$dialogUpload.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Update Catalogue", MVC.API.Plugin.UpdateLibraryCatalogue())
|
||||
@Html.ActionLinkButton("Install Plugin Package", MVC.API.Plugin.InstallLocal(), "buttonUpload")
|
||||
</div>
|
||||
@@ -0,0 +1,443 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.Plugins
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
using Disco.Services.Plugins;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Plugins/Install.cshtml")]
|
||||
public class Install : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Plugins.InstallModel>
|
||||
{
|
||||
public Install()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Plugins", MVC.Config.Plugins.Index(), "Install Plugin");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"pluginCatalog\"");
|
||||
|
||||
WriteLiteral(">\r\n <h4");
|
||||
|
||||
WriteLiteral(" id=\"pluginCatalogHeading\"");
|
||||
|
||||
WriteLiteral(">The plugin catalogue [<a");
|
||||
|
||||
WriteLiteral(" href=\"http://discoict.com.au/\"");
|
||||
|
||||
WriteLiteral(">http://discoict.com.au</a>] was last updated ");
|
||||
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Catalogue.ResponseTimestamp));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </h4>\r\n");
|
||||
|
||||
|
||||
#line 9 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
if (Model.Catalogue.Plugins.Count == 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>No Plugins are Available</h2>\r\n </div> \r\n");
|
||||
|
||||
|
||||
#line 14 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
var plugins = Model.Catalogue.Plugins;
|
||||
int itemsPerColumn = plugins.Count / 3;
|
||||
var itemNextId = 0;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" id=\"pageMenu\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n");
|
||||
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
int itemsForThisColumn = itemsPerColumn + (plugins.Count % 3 > i ? 1 : 0);
|
||||
for (int i2 = 0; i2 < itemsForThisColumn && itemNextId < plugins.Count; i2++)
|
||||
{
|
||||
var plugin = plugins[itemNextId];
|
||||
itemNextId++;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1328), Tuple.Create("\"", 1432)
|
||||
, Tuple.Create(Tuple.Create("", 1336), Tuple.Create("pageMenuArea", 1336), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1348), Tuple.Create("pluginItem", 1349), true)
|
||||
|
||||
#line 31 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1359), Tuple.Create<System.Object, System.Int32>(Plugins.PluginInstalled(plugin.Id) ? " pluginInstalled" : string.Empty
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1359), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteLiteral(" class=\"pluginInstallLink\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1496), Tuple.Create("\"", 1551)
|
||||
|
||||
#line 32 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1503), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Plugin.Install(plugin.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1503), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <h2");
|
||||
|
||||
WriteLiteral(" class=\"pluginName\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h2>\r\n </a>\r\n <div" +
|
||||
"");
|
||||
|
||||
WriteLiteral(" class=\"pluginItemBlurb\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(new HtmlString(plugin.Blurb));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"pluginId\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span> | <span");
|
||||
|
||||
WriteLiteral(" class=\"pluginVersion\"");
|
||||
|
||||
WriteLiteral(">v");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.LatestVersion);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span> | ");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.Author);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" | <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1992), Tuple.Create("\"", 2010)
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1999), Tuple.Create<System.Object, System.Int32>(plugin.Url
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1999), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">More Information</a>\r\n </div>\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n </table>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogInstallPlugin\"");
|
||||
|
||||
WriteLiteral(" title=\"Install this Plugin?\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2");
|
||||
|
||||
WriteLiteral(" id=\"dialogInstallPluginName\"");
|
||||
|
||||
WriteLiteral("></h2>\r\n <h4");
|
||||
|
||||
WriteLiteral(" id=\"dialogInstallPluginDetails\"");
|
||||
|
||||
WriteLiteral("></h4>\r\n\r\n <div");
|
||||
|
||||
WriteLiteral(" style=\"padding: 0.7em 0.7em; margin-top: 8px;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-state-highlight ui-corner-all\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 0.3em; margin-bottom: 2em; float: left;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral("></span>Warning: All plugins run with the same level of network privileges as the" +
|
||||
" Disco Web App.<br />\r\n <strong>Only Install plugins from a trusted sourc" +
|
||||
"e.</strong>\r\n </div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUploadPlugin\"");
|
||||
|
||||
WriteLiteral(" title=\"Install Plugin Package\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" style=\"padding-bottom: 10px;\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 59 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Plugin.InstallLocal(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <label");
|
||||
|
||||
WriteLiteral(" for=\"pluginFile\"");
|
||||
|
||||
WriteLiteral(">Plugin Package: </label>\r\n");
|
||||
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" id=\"pluginFile\"");
|
||||
|
||||
WriteLiteral(" name=\"Plugin\"");
|
||||
|
||||
WriteLiteral(" type=\"file\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" style=\"padding: 0.7em 0.7em; margin-top: 8px;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-state-error ui-corner-all\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 0.3em; margin-bottom: 2em; float: left;\"");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral("></span>Warning: All plugins run with the same level of network privileges as the" +
|
||||
" Disco Web App.<br />\r\n <strong>Only install plugins from a trusted sourc" +
|
||||
"e.</strong>\r\n </div>\r\n</div>\r\n<script>\r\n $(function () {\r\n var $sel" +
|
||||
"ectedPlugin;\r\n var $selectedPluginUrl;\r\n\r\n // Install\r\n var" +
|
||||
" $dialogInstall = $(\'#dialogInstallPlugin\').dialog({\r\n resizable: fal" +
|
||||
"se,\r\n modal: true,\r\n width: 350,\r\n autoOpen: fa" +
|
||||
"lse,\r\n buttons: {\r\n \"Install\": function () {\r\n " +
|
||||
" if ($selectedPlugin == null || !$selectedPluginUrl) {\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n return;\r\n " +
|
||||
" }\r\n $(this).dialog(\"disable\");\r\n\r\n " +
|
||||
" window.location.href = $selectedPluginUrl;\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n $selectedPlugin = null;\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n }\r\n }\r\n }" +
|
||||
");\r\n $(\'#pageMenu\').find(\'a.pluginInstallLink\').click(function () {\r\n " +
|
||||
" $this = $(this);\r\n\r\n $selectedPlugin = $this.closest(\'.plugin" +
|
||||
"Item\');\r\n $selectedPluginUrl = $this.attr(\'href\');\r\n\r\n if " +
|
||||
"($selectedPlugin.is(\'.pluginInstalled\')) {\r\n alert(\'This plugin i" +
|
||||
"s already installed.\');\r\n } else {\r\n $(\'#dialogInstall" +
|
||||
"PluginName\').text($selectedPlugin.find(\'.pluginName\').text());\r\n " +
|
||||
"$(\'#dialogInstallPluginDetails\').text($selectedPlugin.find(\'.pluginId\').text() +" +
|
||||
" \' | \' + $selectedPlugin.find(\'.pluginVersion\').text());\r\n\r\n $dia" +
|
||||
"logInstall.dialog(\'open\');\r\n }\r\n return false;\r\n })" +
|
||||
";\r\n\r\n // Upload\r\n var $dialogUpload = $(\'#dialogUploadPlugin\').dia" +
|
||||
"log({\r\n resizable: false,\r\n modal: true,\r\n widt" +
|
||||
"h: 350,\r\n autoOpen: false,\r\n buttons: {\r\n \"" +
|
||||
"Upload & Install\": function () {\r\n var pluginFile = $(\'#plugi" +
|
||||
"nFile\');\r\n if (pluginFile.val()) {\r\n p" +
|
||||
"luginFile.closest(\'form\').submit();\r\n $(this).dialog(\'dis" +
|
||||
"able\');\r\n } else {\r\n alert(\'Choose a P" +
|
||||
"lugin Package to Upload\');\r\n }\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n $(this).dialog(\"close\");\r\n " +
|
||||
" }\r\n }\r\n });\r\n $(\'#buttonUpload\').click(func" +
|
||||
"tion () {\r\n $dialogUpload.dialog(\'open\');\r\n return false;\r" +
|
||||
"\n });\r\n });\r\n</script>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 142 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(Html.ActionLinkButton("Update Catalogue", MVC.API.Plugin.UpdateLibraryCatalogue()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 143 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(Html.ActionLinkButton("Install Plugin Package", MVC.API.Plugin.InstallLocal(), "buttonUpload"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -164,6 +164,12 @@
|
||||
</Compile>
|
||||
<Compile Include="Areas\API\Controllers\PluginController.cs" />
|
||||
<Compile Include="Areas\Config\Models\Config\IndexModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Plugins\InstallModel.cs" />
|
||||
<Compile Include="Areas\Config\Views\Plugins\Install.generated.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Install.cshtml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controllers\InitialConfigController.cs" />
|
||||
<Compile Include="Controllers\PluginWebHandlerController.cs" />
|
||||
<Compile Include="Extensions\HtmlExtensions.cs" />
|
||||
@@ -240,7 +246,7 @@
|
||||
<Compile Include="Areas\Config\Models\Logging\TaskStatusModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Organisation\IndexModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Plugins\IndexViewModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Plugins\ProviderConfigurationViewModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Plugins\PluginConfigurationViewModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Shared\LogEventsModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\SystemConfig\IndexModel.cs" />
|
||||
<Compile Include="Areas\Config\Views\Config\Index.generated.cs">
|
||||
@@ -743,6 +749,10 @@
|
||||
<ItemGroup>
|
||||
<Content Include="ClientBin\Disco.ClientBootstrapper.exe" />
|
||||
<Content Include="ClientBin\Disco.Silverlight.AttachmentUpload.xap" />
|
||||
<None Include="Areas\Config\Views\Plugins\Install.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Install.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="ClientSource\Scripts\Core.min.js.map">
|
||||
<DependentUpon>Core.js.bundle</DependentUpon>
|
||||
</None>
|
||||
@@ -1812,7 +1822,7 @@
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
<UserProperties BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="True" BuildVersion_BuildAction="ReBuild" BuildVersion_StartDate="2001/1/1" />
|
||||
<UserProperties BuildVersion_StartDate="2001/1/1" BuildVersion_BuildAction="ReBuild" BuildVersion_UseGlobalSettings="True" BuildVersion_DetectChanges="False" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||
|
||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.2.0208.1156")]
|
||||
[assembly: AssemblyFileVersion("1.2.0208.1156")]
|
||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
||||
|
||||
+44
-3
@@ -6767,6 +6767,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public System.Web.Mvc.ActionResult InstallLocal()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.InstallLocal);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public System.Web.Mvc.ActionResult Install()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Install);
|
||||
@@ -6787,14 +6793,18 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNamesClass
|
||||
{
|
||||
public readonly string UpdateLibraryCatalogue = "UpdateLibraryCatalogue";
|
||||
public readonly string Uninstall = "Uninstall";
|
||||
public readonly string InstallLocal = "InstallLocal";
|
||||
public readonly string Install = "Install";
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNameConstants
|
||||
{
|
||||
public const string UpdateLibraryCatalogue = "UpdateLibraryCatalogue";
|
||||
public const string Uninstall = "Uninstall";
|
||||
public const string InstallLocal = "InstallLocal";
|
||||
public const string Install = "Install";
|
||||
}
|
||||
|
||||
@@ -6808,13 +6818,21 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string id = "id";
|
||||
public readonly string UninstallData = "UninstallData";
|
||||
}
|
||||
static readonly ActionParamsClass_InstallLocal s_params_InstallLocal = new ActionParamsClass_InstallLocal();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_InstallLocal InstallLocalParams { get { return s_params_InstallLocal; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_InstallLocal
|
||||
{
|
||||
public readonly string Plugin = "Plugin";
|
||||
}
|
||||
static readonly ActionParamsClass_Install s_params_Install = new ActionParamsClass_Install();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Install InstallParams { get { return s_params_Install; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Install
|
||||
{
|
||||
public readonly string Plugin = "Plugin";
|
||||
public readonly string PluginId = "PluginId";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -6835,6 +6853,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public T4MVC_PluginController() : base(Dummy.Instance) { }
|
||||
|
||||
public override System.Web.Mvc.ActionResult UpdateLibraryCatalogue()
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLibraryCatalogue);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
public override System.Web.Mvc.ActionResult Uninstall(string id, bool UninstallData)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Uninstall);
|
||||
@@ -6843,10 +6867,17 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
public override System.Web.Mvc.ActionResult Install(System.Web.HttpPostedFileBase Plugin)
|
||||
public override System.Web.Mvc.ActionResult InstallLocal(System.Web.HttpPostedFileBase Plugin)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.InstallLocal);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Plugin", Plugin);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
public override System.Web.Mvc.ActionResult Install(string PluginId)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Install);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Plugin", Plugin);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "PluginId", PluginId);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
@@ -8369,6 +8400,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
public readonly string Index = "Index";
|
||||
public readonly string Configure = "Configure";
|
||||
public readonly string Install = "Install";
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -8376,6 +8408,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
public const string Index = "Index";
|
||||
public const string Configure = "Configure";
|
||||
public const string Install = "Install";
|
||||
}
|
||||
|
||||
|
||||
@@ -8400,9 +8433,11 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
public readonly string Configure = "Configure";
|
||||
public readonly string Index = "Index";
|
||||
public readonly string Install = "Install";
|
||||
}
|
||||
public readonly string Configure = "~/Areas/Config/Views/Plugins/Configure.cshtml";
|
||||
public readonly string Index = "~/Areas/Config/Views/Plugins/Index.cshtml";
|
||||
public readonly string Install = "~/Areas/Config/Views/Plugins/Install.cshtml";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8432,6 +8467,12 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
public override System.Web.Mvc.ActionResult Install()
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Install);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user