Update: Plugin Updating
Updating plugins from the plugin catalogue, and automatic updating of plugins after a newer version of Disco is installed.
This commit is contained in:
@@ -18,13 +18,17 @@ namespace Disco.BI.Interop.Community
|
|||||||
{
|
{
|
||||||
private static string UpdateUrl()
|
private static string UpdateUrl()
|
||||||
{
|
{
|
||||||
return string.Concat(CommunityHelpers.CommunityUrl(), "DiscoUpdate/V1");
|
return string.Concat(Disco.Data.Configuration.CommunityHelpers.CommunityUrl(), "DiscoUpdate/V1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string CurrentDiscoVersion()
|
public static Version CurrentDiscoVersion()
|
||||||
{
|
{
|
||||||
var AssemblyVersion = typeof(UpdateCheck).Assembly.GetName().Version;
|
return typeof(UpdateCheck).Assembly.GetName().Version;
|
||||||
return string.Format("{0}.{1}.{2:0000}.{3:0000}", AssemblyVersion.Major, AssemblyVersion.Minor, AssemblyVersion.Build, AssemblyVersion.Revision);
|
}
|
||||||
|
public static string CurrentDiscoVersionFormatted()
|
||||||
|
{
|
||||||
|
var v = CurrentDiscoVersion();
|
||||||
|
return string.Format("{0}.{1}.{2:0000}.{3:0000}", v.Major, v.Minor, v.Build, v.Revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static UpdateResponse Check(DiscoDataContext db, bool UseProxy, ScheduledTaskStatus status = null)
|
public static UpdateResponse Check(DiscoDataContext db, bool UseProxy, ScheduledTaskStatus status = null)
|
||||||
@@ -38,7 +42,7 @@ namespace Disco.BI.Interop.Community
|
|||||||
if (status != null)
|
if (status != null)
|
||||||
status.UpdateStatus(40, "Sending Request");
|
status.UpdateStatus(40, "Sending Request");
|
||||||
|
|
||||||
var DiscoBIVersion = CurrentDiscoVersion();
|
var DiscoBIVersion = CurrentDiscoVersionFormatted();
|
||||||
|
|
||||||
HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create(UpdateUrl());
|
HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create(UpdateUrl());
|
||||||
|
|
||||||
@@ -96,7 +100,7 @@ namespace Disco.BI.Interop.Community
|
|||||||
|
|
||||||
m.DeploymentId = db.DiscoConfiguration.DeploymentId;
|
m.DeploymentId = db.DiscoConfiguration.DeploymentId;
|
||||||
|
|
||||||
m.CurrentDiscoVersion = CurrentDiscoVersion();
|
m.CurrentDiscoVersion = CurrentDiscoVersionFormatted();
|
||||||
|
|
||||||
m.OrganisationName = db.DiscoConfiguration.OrganisationName;
|
m.OrganisationName = db.DiscoConfiguration.OrganisationName;
|
||||||
m.BroadbandDoeWanId = GetBroadbandDoeWanId();
|
m.BroadbandDoeWanId = GetBroadbandDoeWanId();
|
||||||
@@ -144,7 +148,7 @@ namespace Disco.BI.Interop.Community
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var DiscoBIVersion = CurrentDiscoVersion();
|
var DiscoBIVersion = CurrentDiscoVersionFormatted();
|
||||||
|
|
||||||
HttpWebRequest wReq = (HttpWebRequest)HttpWebRequest.Create("http://broadband.doe.wan/ipsearch/showresult.php");
|
HttpWebRequest wReq = (HttpWebRequest)HttpWebRequest.Create("http://broadband.doe.wan/ipsearch/showresult.php");
|
||||||
// Added: 2013-02-08 G#
|
// Added: 2013-02-08 G#
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace Disco.BI.Interop.Community
|
|||||||
|
|
||||||
public override void InitalizeScheduledTask(Data.Repository.DiscoDataContext dbContext)
|
public override void InitalizeScheduledTask(Data.Repository.DiscoDataContext dbContext)
|
||||||
{
|
{
|
||||||
// ActiveDirectoryUpdateLastNetworkLogonDateJob @ 11:30pm
|
// Random time between midday and midnight.
|
||||||
var rnd = new Random();
|
var rnd = new Random();
|
||||||
|
|
||||||
var rndHour = rnd.Next(12, 23);
|
var rndHour = rnd.Next(12, 23);
|
||||||
|
|||||||
@@ -149,8 +149,6 @@
|
|||||||
<Compile Include="BI\Interop\ActiveDirectory\ActiveDirectoryUpdateLastNetworkLogonDateJob.cs" />
|
<Compile Include="BI\Interop\ActiveDirectory\ActiveDirectoryUpdateLastNetworkLogonDateJob.cs" />
|
||||||
<Compile Include="BI\Interop\ActiveDirectory\ActiveDirectoryUserAccountExtensions.cs" />
|
<Compile Include="BI\Interop\ActiveDirectory\ActiveDirectoryUserAccountExtensions.cs" />
|
||||||
<Compile Include="BI\Expressions\ExpressionCache.cs" />
|
<Compile Include="BI\Expressions\ExpressionCache.cs" />
|
||||||
<Compile Include="BI\Interop\Community\CommunityHelpers.cs" />
|
|
||||||
<Compile Include="BI\Interop\Community\PluginLibraryUpdateTask.cs" />
|
|
||||||
<Compile Include="BI\Interop\Community\UpdateCheck.cs" />
|
<Compile Include="BI\Interop\Community\UpdateCheck.cs" />
|
||||||
<Compile Include="BI\Interop\Community\UpdateCheckTask.cs" />
|
<Compile Include="BI\Interop\Community\UpdateCheckTask.cs" />
|
||||||
<Compile Include="BI\Interop\MimeTypes.cs" />
|
<Compile Include="BI\Interop\MimeTypes.cs" />
|
||||||
@@ -221,7 +219,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_StartDate="2001/1/1" BuildVersion_BuildAction="ReBuild" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="True" />
|
<UserProperties BuildVersion_UseGlobalSettings="True" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="ReBuild" BuildVersion_StartDate="2001/1/1" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
[assembly: AssemblyVersion("1.2.0214.1848")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
[assembly: AssemblyFileVersion("1.2.0214.1848")]
|
||||||
|
|||||||
Binary file not shown.
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
[assembly: AssemblyVersion("1.2.0214.1848")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
[assembly: AssemblyFileVersion("1.2.0214.1848")]
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
[assembly: AssemblyVersion("1.2.0214.1848")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
[assembly: AssemblyFileVersion("1.2.0214.1848")]
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ using System.Net;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Disco.BI.Interop.Community
|
namespace Disco.Data.Configuration
|
||||||
{
|
{
|
||||||
public static class CommunityHelpers
|
public static class CommunityHelpers
|
||||||
{
|
{
|
||||||
@@ -460,15 +460,19 @@ namespace Disco.Data.Configuration
|
|||||||
return this.GetConfigurationValue<bool>(this.Scope, "UpdateBetaDeployment", false);
|
return this.GetConfigurationValue<bool>(this.Scope, "UpdateBetaDeployment", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public string InstalledDatabaseVersion
|
public Version InstalledDatabaseVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this.GetConfigurationValue<string>(this.Scope, "InstalledDatabaseVersion", null);
|
var versionString = this.GetConfigurationValue<string>(this.Scope, "InstalledDatabaseVersion", null);
|
||||||
|
if (string.IsNullOrEmpty(versionString))
|
||||||
|
return null;
|
||||||
|
else
|
||||||
|
return Version.Parse(versionString);
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
this.SetConfigurationValue<string>(this.Scope, "InstalledDatabaseVersion", value);
|
this.SetConfigurationValue<string>(this.Scope, "InstalledDatabaseVersion", value.ToString(4));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Configuration\CommunityHelpers.cs" />
|
||||||
<Compile Include="Configuration\ConfigurationBase.cs" />
|
<Compile Include="Configuration\ConfigurationBase.cs" />
|
||||||
<Compile Include="Configuration\ConfigurationContext.cs" />
|
<Compile Include="Configuration\ConfigurationContext.cs" />
|
||||||
<Compile Include="Configuration\Modules\BootstrapperConfiguration.cs" />
|
<Compile Include="Configuration\Modules\BootstrapperConfiguration.cs" />
|
||||||
@@ -136,7 +137,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_BuildAction="ReBuild" BuildVersion_UseGlobalSettings="True" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2001/1/1" />
|
<UserProperties BuildVersion_StartDate="2001/1/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="True" BuildVersion_BuildAction="ReBuild" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
[assembly: AssemblyVersion("1.2.0214.1848")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
[assembly: AssemblyFileVersion("1.2.0214.1848")]
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
[assembly: AssemblyVersion("1.2.0214.1848")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
[assembly: AssemblyFileVersion("1.2.0214.1848")]
|
||||||
|
|||||||
@@ -101,6 +101,9 @@
|
|||||||
<Compile Include="Logging\Targets\LogLiveContext.cs" />
|
<Compile Include="Logging\Targets\LogLiveContext.cs" />
|
||||||
<Compile Include="Logging\Targets\LogPersistContext.cs" />
|
<Compile Include="Logging\Targets\LogPersistContext.cs" />
|
||||||
<Compile Include="Logging\Utilities.cs" />
|
<Compile Include="Logging\Utilities.cs" />
|
||||||
|
<Compile Include="Plugins\CommunityInterop\PluginLibraryUpdateTask.cs" />
|
||||||
|
<Compile Include="Plugins\UpdatePluginsAfterDiscoUpdateTask.cs" />
|
||||||
|
<Compile Include="Plugins\UpdatePluginTask.cs" />
|
||||||
<Compile Include="Plugins\InstallPluginTask.cs" />
|
<Compile Include="Plugins\InstallPluginTask.cs" />
|
||||||
<Compile Include="Plugins\PluginAttribute.cs" />
|
<Compile Include="Plugins\PluginAttribute.cs" />
|
||||||
<Compile Include="Plugins\PluginExtensions.cs" />
|
<Compile Include="Plugins\PluginExtensions.cs" />
|
||||||
@@ -126,7 +129,6 @@
|
|||||||
<Compile Include="Plugins\UnknownPluginException.cs" />
|
<Compile Include="Plugins\UnknownPluginException.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Tasks\ScheduledTask.cs" />
|
<Compile Include="Tasks\ScheduledTask.cs" />
|
||||||
<Compile Include="Tasks\ScheduledTaskCleanup.cs" />
|
|
||||||
<Compile Include="Tasks\ScheduledTasks.cs" />
|
<Compile Include="Tasks\ScheduledTasks.cs" />
|
||||||
<Compile Include="Tasks\ScheduledTasksLog.cs" />
|
<Compile Include="Tasks\ScheduledTasksLog.cs" />
|
||||||
<Compile Include="Tasks\ScheduledTaskStatus.cs" />
|
<Compile Include="Tasks\ScheduledTaskStatus.cs" />
|
||||||
|
|||||||
+31
-9
@@ -12,14 +12,27 @@ using System.Xml.Serialization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
|
using Quartz;
|
||||||
|
|
||||||
namespace Disco.BI.Interop.Community
|
namespace Disco.Services.Plugins.CommunityInterop
|
||||||
{
|
{
|
||||||
public class PluginLibraryUpdateTask : ScheduledTask
|
public class PluginLibraryUpdateTask : ScheduledTask
|
||||||
{
|
{
|
||||||
public override string TaskName { get { return "Disco Community - Update Plugin Library"; } }
|
public override string TaskName { get { return "Disco Community - Update Plugin Library"; } }
|
||||||
|
|
||||||
|
public static string CurrentDiscoVersion()
|
||||||
|
{
|
||||||
|
var AssemblyVersion = typeof(PluginLibraryUpdateTask).Assembly.GetName().Version;
|
||||||
|
return string.Format("{0}.{1}.{2:0000}.{3:0000}", AssemblyVersion.Major, AssemblyVersion.Minor, AssemblyVersion.Build, AssemblyVersion.Revision);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void ExecuteTask()
|
protected override void ExecuteTask()
|
||||||
|
{
|
||||||
|
ExecuteTaskInternal(this.Status);
|
||||||
|
Status.SetFinishedMessage("The Plugin Library Catalogue was updated.");
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void ExecuteTaskInternal(ScheduledTaskStatus Status)
|
||||||
{
|
{
|
||||||
PluginLibraryUpdateRequest updateRequestBody;
|
PluginLibraryUpdateRequest updateRequestBody;
|
||||||
PluginLibraryUpdateResponse updateResult;
|
PluginLibraryUpdateResponse updateResult;
|
||||||
@@ -28,7 +41,7 @@ namespace Disco.BI.Interop.Community
|
|||||||
PluginLibraryCompatibilityResponse compatResult;
|
PluginLibraryCompatibilityResponse compatResult;
|
||||||
string compatibilityFile;
|
string compatibilityFile;
|
||||||
|
|
||||||
var DiscoBIVersion = UpdateCheck.CurrentDiscoVersion();
|
var DiscoBIVersion = CurrentDiscoVersion();
|
||||||
HttpWebRequest webRequest;
|
HttpWebRequest webRequest;
|
||||||
|
|
||||||
#region Update
|
#region Update
|
||||||
@@ -156,20 +169,15 @@ namespace Disco.BI.Interop.Community
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Status.SetFinishedMessage("The Plugin Library Catalogue was updated.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string PluginLibraryUpdateUrl()
|
private static string PluginLibraryUpdateUrl()
|
||||||
{
|
{
|
||||||
return string.Concat(CommunityHelpers.CommunityUrl(), "DiscoPluginLibrary/V1");
|
return string.Concat(Disco.Data.Configuration.CommunityHelpers.CommunityUrl(), "DiscoPluginLibrary/V1");
|
||||||
}
|
}
|
||||||
private static string PluginLibraryCompatibilityUrl()
|
private static string PluginLibraryCompatibilityUrl()
|
||||||
{
|
{
|
||||||
return string.Concat(CommunityHelpers.CommunityUrl(), "DiscoPluginLibrary/CompatibilityV1");
|
return string.Concat(Disco.Data.Configuration.CommunityHelpers.CommunityUrl(), "DiscoPluginLibrary/CompatibilityV1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ScheduledTaskStatus ScheduleNow()
|
public static ScheduledTaskStatus ScheduleNow()
|
||||||
@@ -191,5 +199,19 @@ namespace Disco.BI.Interop.Community
|
|||||||
return ScheduledTasks.GetTaskStatuses(typeof(PluginLibraryUpdateTask)).Where(ts => ts.IsRunning).FirstOrDefault();
|
return ScheduledTasks.GetTaskStatuses(typeof(PluginLibraryUpdateTask)).Where(ts => ts.IsRunning).FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void InitalizeScheduledTask(DiscoDataContext dbContext)
|
||||||
|
{
|
||||||
|
// Random time between midday and midnight.
|
||||||
|
var rnd = new Random();
|
||||||
|
|
||||||
|
var rndHour = rnd.Next(12, 23);
|
||||||
|
var rndMinute = rnd.Next(0, 59);
|
||||||
|
|
||||||
|
TriggerBuilder triggerBuilder = TriggerBuilder.Create().
|
||||||
|
WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(rndHour, rndMinute));
|
||||||
|
|
||||||
|
this.ScheduleTask(triggerBuilder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,6 +158,10 @@ namespace Disco.Services.Plugins
|
|||||||
{
|
{
|
||||||
if (ScheduledTasks.GetTaskStatuses(typeof(InstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
if (ScheduledTasks.GetTaskStatuses(typeof(InstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
throw new InvalidOperationException("A plugin is already being Installed");
|
throw new InvalidOperationException("A plugin is already being Installed");
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(UpdatePluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is being Updated");
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(UninstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is being Uninstalled");
|
||||||
|
|
||||||
JobDataMap taskData = new JobDataMap() { { "PackageUrl", PackageUrl }, { "PackageFilePath", PackageFilePath }, { "DeletePackageAfterInstall", DeletePackageAfterInstall } };
|
JobDataMap taskData = new JobDataMap() { { "PackageUrl", PackageUrl }, { "PackageFilePath", PackageFilePath }, { "DeletePackageAfterInstall", DeletePackageAfterInstall } };
|
||||||
|
|
||||||
|
|||||||
@@ -348,6 +348,14 @@ namespace Disco.Services.Plugins
|
|||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
public string ConfigurationUrl
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return string.Format("/Config/Plugins/{0}", HttpUtility.UrlEncode(this.Id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[JsonIgnore]
|
||||||
public bool HasWebHandler
|
public bool HasWebHandler
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -371,6 +379,14 @@ namespace Disco.Services.Plugins
|
|||||||
|
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
[JsonIgnore]
|
||||||
|
public string WebHandlerUrl
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return string.Format("/Plugin/{0}", HttpUtility.UrlEncode(this.Id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Tuple<string, string> WebResourcePath(string Resource)
|
public Tuple<string, string> WebResourcePath(string Resource)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using System.IO.Compression;
|
|||||||
using Disco.Models.BI.Interop.Community;
|
using Disco.Models.BI.Interop.Community;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Disco.Services.Plugins
|
namespace Disco.Services.Plugins
|
||||||
{
|
{
|
||||||
@@ -477,6 +478,27 @@ namespace Disco.Services.Plugins
|
|||||||
return categoryDisplayNames;
|
return categoryDisplayNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Restart App
|
||||||
|
private static object _restartTimerLock = new object();
|
||||||
|
private static Timer _restartTimer;
|
||||||
|
internal static void RestartApp(int DelayMilliseconds)
|
||||||
|
{
|
||||||
|
lock (_restartTimerLock)
|
||||||
|
{
|
||||||
|
if (_restartTimer != null)
|
||||||
|
{
|
||||||
|
_restartTimer.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
_restartTimer = new Timer((state) =>
|
||||||
|
{
|
||||||
|
HttpRuntime.UnloadAppDomain();
|
||||||
|
//AppDomain.Unload(AppDomain.CurrentDomain);
|
||||||
|
}, null, DelayMilliseconds, Timeout.Infinite);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Plugin Referenced Assemblies Resolving
|
#region Plugin Referenced Assemblies Resolving
|
||||||
|
|
||||||
public static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
public static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
||||||
|
|||||||
@@ -45,13 +45,17 @@ namespace Disco.Services.Plugins
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.Status.Finished("Restarting Disco, please wait...", "/Config/Plugins");
|
this.Status.Finished("Restarting Disco, please wait...", "/Config/Plugins");
|
||||||
RestartApp(1500);
|
Plugins.RestartApp(1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ScheduledTaskStatus UninstallPlugin(PluginManifest Manifest, bool UninstallData)
|
public static ScheduledTaskStatus UninstallPlugin(PluginManifest Manifest, bool UninstallData)
|
||||||
{
|
{
|
||||||
if (ScheduledTasks.GetTaskStatuses(typeof(InstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
if (ScheduledTasks.GetTaskStatuses(typeof(InstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
throw new InvalidOperationException("A plugin is already being Uninstalled");
|
throw new InvalidOperationException("A plugin is already being Uninstalled");
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(UpdatePluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is being Updated");
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(InstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is being Installed");
|
||||||
|
|
||||||
JobDataMap taskData = new JobDataMap() { { "PluginManifest", Manifest }, { "UninstallData", UninstallData } };
|
JobDataMap taskData = new JobDataMap() { { "PluginManifest", Manifest }, { "UninstallData", UninstallData } };
|
||||||
|
|
||||||
@@ -59,26 +63,5 @@ namespace Disco.Services.Plugins
|
|||||||
|
|
||||||
return instance.ScheduleTask(taskData);
|
return instance.ScheduleTask(taskData);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Restart App
|
|
||||||
private static object _restartTimerLock = new object();
|
|
||||||
private static Timer _restartTimer;
|
|
||||||
private void RestartApp(int DelayMilliseconds)
|
|
||||||
{
|
|
||||||
lock (_restartTimerLock)
|
|
||||||
{
|
|
||||||
if (_restartTimer != null)
|
|
||||||
{
|
|
||||||
_restartTimer.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
_restartTimer = new Timer((state) =>
|
|
||||||
{
|
|
||||||
HttpRuntime.UnloadAppDomain();
|
|
||||||
//AppDomain.Unload(AppDomain.CurrentDomain);
|
|
||||||
}, null, DelayMilliseconds, Timeout.Infinite);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,252 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Web;
|
||||||
|
using Disco.Data.Repository;
|
||||||
|
using Disco.Models.BI.Interop.Community;
|
||||||
|
using Disco.Services.Tasks;
|
||||||
|
using Quartz;
|
||||||
|
|
||||||
|
namespace Disco.Services.Plugins
|
||||||
|
{
|
||||||
|
public class UpdatePluginTask : ScheduledTask
|
||||||
|
{
|
||||||
|
public override string TaskName { get { return "Updating Plugin/s"; } }
|
||||||
|
|
||||||
|
protected override void ExecuteTask()
|
||||||
|
{
|
||||||
|
string pluginId = (string)this.ExecutionContext.JobDetail.JobDataMap["PluginId"];
|
||||||
|
string packageFilePath = (string)this.ExecutionContext.JobDetail.JobDataMap["PackageFilePath"];
|
||||||
|
|
||||||
|
PluginLibraryUpdateResponse catalogue;
|
||||||
|
string pluginPackagesLocation;
|
||||||
|
|
||||||
|
if (!Plugins.PluginsLoaded)
|
||||||
|
throw new InvalidOperationException("Plugins have not been initialized");
|
||||||
|
|
||||||
|
List<Tuple<PluginManifest, string, PluginLibraryItem>> updatePlugins;
|
||||||
|
|
||||||
|
using (DiscoDataContext dbContext = new DiscoDataContext())
|
||||||
|
{
|
||||||
|
catalogue = Plugins.LoadCatalogue(dbContext);
|
||||||
|
pluginPackagesLocation = dbContext.DiscoConfiguration.PluginPackagesLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(pluginId))
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(packageFilePath))
|
||||||
|
{
|
||||||
|
// Update Single from Catalogue
|
||||||
|
PluginManifest existingManifest = Plugins.GetPlugin(pluginId);
|
||||||
|
var catalogueItem = catalogue.Plugins.FirstOrDefault(p => p.Id == existingManifest.Id);
|
||||||
|
|
||||||
|
if (catalogueItem == null)
|
||||||
|
throw new InvalidOperationException("No updates are available for this Plugin");
|
||||||
|
if (Version.Parse(catalogueItem.LatestVersion) <= existingManifest.Version)
|
||||||
|
throw new InvalidOperationException("Only newer versions can be used to update a plugin");
|
||||||
|
|
||||||
|
updatePlugins = new List<Tuple<PluginManifest, string, PluginLibraryItem>>() {
|
||||||
|
new Tuple<PluginManifest,string,PluginLibraryItem>(existingManifest, null, catalogueItem)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Update Single from Local
|
||||||
|
PluginManifest existingManifest = Plugins.GetPlugin(pluginId);
|
||||||
|
updatePlugins = new List<Tuple<PluginManifest, string, PluginLibraryItem>>() {
|
||||||
|
new Tuple<PluginManifest,string,PluginLibraryItem>(existingManifest, packageFilePath, null)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Update All
|
||||||
|
updatePlugins = Plugins.GetPlugins().Join((IEnumerable<PluginLibraryItem>)catalogue.Plugins, manifest => manifest.Id, update => update.Id, (manifest, update) => new Tuple<PluginManifest, string, PluginLibraryItem>(manifest, null, update)).Where(i => Version.Parse(i.Item3.LatestVersion) > i.Item1.Version).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updatePlugins == null || updatePlugins.Count == 0)
|
||||||
|
{
|
||||||
|
this.Status.Finished("No plugins to update...", "/Config/Plugins");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ExecuteTaskInternal(this.Status, pluginPackagesLocation, updatePlugins);
|
||||||
|
|
||||||
|
this.Status.Finished("Restarting Disco, please wait...", "/Config/Plugins");
|
||||||
|
Plugins.RestartApp(1500);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void UpdateOffline(ScheduledTaskStatus Status)
|
||||||
|
{
|
||||||
|
string pluginsLocation;
|
||||||
|
string pluginPackagesLocation;
|
||||||
|
PluginLibraryUpdateResponse pluginCatalogue;
|
||||||
|
List<Tuple<PluginManifest, string, PluginLibraryItem>> UpdatePlugins = new List<Tuple<PluginManifest, string, PluginLibraryItem>>();
|
||||||
|
|
||||||
|
using (DiscoDataContext dbContext = new DiscoDataContext())
|
||||||
|
{
|
||||||
|
pluginCatalogue = Plugins.LoadCatalogue(dbContext);
|
||||||
|
pluginsLocation = dbContext.DiscoConfiguration.PluginsLocation;
|
||||||
|
pluginPackagesLocation = dbContext.DiscoConfiguration.PluginPackagesLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
DirectoryInfo pluginDirectoryRoot = new DirectoryInfo(pluginsLocation);
|
||||||
|
if (pluginDirectoryRoot.Exists)
|
||||||
|
{
|
||||||
|
foreach (DirectoryInfo pluginDirectory in pluginDirectoryRoot.EnumerateDirectories())
|
||||||
|
{
|
||||||
|
string pluginManifestFilename = Path.Combine(pluginDirectory.FullName, "manifest.json");
|
||||||
|
if (File.Exists(pluginManifestFilename))
|
||||||
|
{
|
||||||
|
PluginManifest pluginManifest = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pluginManifest = PluginManifest.FromPluginManifestFile(pluginManifestFilename);
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
|
|
||||||
|
if (pluginManifest != null)
|
||||||
|
{
|
||||||
|
// Check for Update
|
||||||
|
var catalogueItem = pluginCatalogue.Plugins.FirstOrDefault(i => i.Id == pluginManifest.Id && Version.Parse(i.LatestVersion) > pluginManifest.Version);
|
||||||
|
|
||||||
|
if (catalogueItem != null)
|
||||||
|
{ // Update Available
|
||||||
|
UpdatePlugins.Add(new Tuple<PluginManifest, string, PluginLibraryItem>(pluginManifest, null, catalogueItem));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (UpdatePlugins.Count > 0)
|
||||||
|
{
|
||||||
|
ExecuteTaskInternal(Status, pluginPackagesLocation, UpdatePlugins);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void ExecuteTaskInternal(ScheduledTaskStatus Status, string pluginPackagesLocation, List<Tuple<PluginManifest, string, PluginLibraryItem>> UpdatePlugins)
|
||||||
|
{
|
||||||
|
while (UpdatePlugins.Count > 0)
|
||||||
|
{
|
||||||
|
var updatePlugin = UpdatePlugins[0];
|
||||||
|
var existingManifest = updatePlugin.Item1;
|
||||||
|
var packageTempFilePath = updatePlugin.Item2;
|
||||||
|
var catalogueItem = updatePlugin.Item3;
|
||||||
|
UpdatePlugins.Remove(updatePlugin);
|
||||||
|
|
||||||
|
var pluginId = existingManifest != null ? existingManifest.Id : catalogueItem.Id;
|
||||||
|
var pluginName = existingManifest != null ? existingManifest.Name : catalogueItem.Name;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(packageTempFilePath))
|
||||||
|
{
|
||||||
|
// Download Update
|
||||||
|
|
||||||
|
Status.UpdateStatus(0, string.Format("Downloading Plugin Package: {0}", pluginName), "Connecting...");
|
||||||
|
packageTempFilePath = Path.Combine(pluginPackagesLocation, string.Format("{0}.discoPlugin", pluginId));
|
||||||
|
|
||||||
|
if (File.Exists(packageTempFilePath))
|
||||||
|
File.Delete(packageTempFilePath);
|
||||||
|
|
||||||
|
if (!Directory.Exists(Path.GetDirectoryName(packageTempFilePath)))
|
||||||
|
Directory.CreateDirectory(Path.GetDirectoryName(packageTempFilePath));
|
||||||
|
|
||||||
|
// Need to Download the Package
|
||||||
|
WebClient downloader = new WebClient();
|
||||||
|
DateTime progressExpires = DateTime.Now;
|
||||||
|
downloader.DownloadProgressChanged += (sender, e) =>
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.ProgressPercentage);
|
||||||
|
if (progressExpires <= DateTime.Now)
|
||||||
|
{
|
||||||
|
Status.UpdateStatus(e.ProgressPercentage, string.Format("{0} of {1} KB downloaded", e.BytesReceived / 1024, e.TotalBytesToReceive / 1024));
|
||||||
|
// Throttle Updates for SignalR
|
||||||
|
progressExpires = DateTime.Now.AddMilliseconds(250);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
downloader.DownloadFileTaskAsync(new Uri(catalogueItem.LatestDownloadUrl), packageTempFilePath).Wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
Status.UpdateStatus(10, "Opening Plugin Package", Path.GetFileName(packageTempFilePath));
|
||||||
|
|
||||||
|
PluginManifest updateManifest;
|
||||||
|
|
||||||
|
using (var packageStream = File.OpenRead(packageTempFilePath))
|
||||||
|
{
|
||||||
|
using (ZipArchive packageArchive = new ZipArchive(packageStream, ZipArchiveMode.Read, false))
|
||||||
|
{
|
||||||
|
|
||||||
|
ZipArchiveEntry packageManifestEntry = packageArchive.GetEntry("manifest.json");
|
||||||
|
if (packageManifestEntry == null)
|
||||||
|
throw new InvalidDataException("The plugin package does not contain the 'manifest.json' entry");
|
||||||
|
|
||||||
|
using (Stream packageManifestStream = packageManifestEntry.Open())
|
||||||
|
{
|
||||||
|
updateManifest = PluginManifest.FromPluginManifestFile(packageManifestStream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure not already installed
|
||||||
|
if (existingManifest != null)
|
||||||
|
if (updateManifest.Version <= existingManifest.Version)
|
||||||
|
throw new InvalidOperationException("Only newer versions can be used to update a plugin");
|
||||||
|
|
||||||
|
Status.UpdateStatus(20, string.Format("{0} [{1} v{2}] by {3}", updateManifest.Name, updateManifest.Id, updateManifest.Version.ToString(4), updateManifest.Author), "Initializing Update Environment");
|
||||||
|
|
||||||
|
using (DiscoDataContext dbContext = new DiscoDataContext())
|
||||||
|
{
|
||||||
|
// Check for Compatibility
|
||||||
|
var compatibilityData = Plugins.LoadCompatibilityData(dbContext);
|
||||||
|
var pluginCompatibility = compatibilityData.Plugins.FirstOrDefault(i => i.Id.Equals(updateManifest.Id, StringComparison.InvariantCultureIgnoreCase) && updateManifest.Version == Version.Parse(i.Version));
|
||||||
|
if (pluginCompatibility != null && !pluginCompatibility.Compatible)
|
||||||
|
throw new InvalidOperationException(string.Format("The plugin [{0} v{1}] is not compatible: {2}", updateManifest.Id, updateManifest.VersionFormatted, pluginCompatibility.Reason));
|
||||||
|
|
||||||
|
var updatePluginPath = Path.Combine(dbContext.DiscoConfiguration.PluginsLocation, string.Format("{0}.discoPlugin", updateManifest.Id));
|
||||||
|
File.Move(packageTempFilePath, updatePluginPath);
|
||||||
|
|
||||||
|
if (existingManifest != null && Plugins.PluginsLoaded)
|
||||||
|
{
|
||||||
|
PluginsLog.LogBeforeUpdate(existingManifest, updateManifest);
|
||||||
|
existingManifest.BeforePluginUpdate(dbContext, updateManifest, Status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ScheduledTaskStatus UpdateHelper(string PluginId = null, string PackageFilePath = null)
|
||||||
|
{
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(UpdatePluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is already being Updated");
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(UninstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is being Uninstalled");
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(InstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is being Installed");
|
||||||
|
|
||||||
|
JobDataMap taskData = new JobDataMap() { { "PluginId", PluginId }, { "PackageFilePath", PackageFilePath } };
|
||||||
|
|
||||||
|
var instance = new UpdatePluginTask();
|
||||||
|
|
||||||
|
return instance.ScheduleTask(taskData);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ScheduledTaskStatus UpdateLocalPlugin(string PluginId, string PackageFilePath)
|
||||||
|
{
|
||||||
|
return UpdateHelper(PluginId, PackageFilePath);
|
||||||
|
}
|
||||||
|
public static ScheduledTaskStatus UpdatePlugin(string PluginId)
|
||||||
|
{
|
||||||
|
return UpdateHelper(PluginId);
|
||||||
|
}
|
||||||
|
public static ScheduledTaskStatus UpdateAllPlugins()
|
||||||
|
{
|
||||||
|
return UpdateHelper();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Disco.Services.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Services.Plugins
|
||||||
|
{
|
||||||
|
public class UpdatePluginsAfterDiscoUpdateTask : ScheduledTask
|
||||||
|
{
|
||||||
|
private static object _startLock = new object();
|
||||||
|
|
||||||
|
public override string TaskName { get { return "Updating Disco Plugins"; } }
|
||||||
|
|
||||||
|
protected override void ExecuteTask()
|
||||||
|
{
|
||||||
|
this.Status.UpdateStatus(0, "Updating plugins after Disco update", "Starting, please wait...");
|
||||||
|
|
||||||
|
// Wait for App to Load (6 Seconds)
|
||||||
|
for (int i = 0; i < 10; i++)
|
||||||
|
{
|
||||||
|
this.Status.UpdateStatus(10 * i);
|
||||||
|
System.Threading.Thread.Sleep(600);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update Catalogue
|
||||||
|
CommunityInterop.PluginLibraryUpdateTask.ExecuteTaskInternal(this.Status);
|
||||||
|
|
||||||
|
// Update all Plugins
|
||||||
|
UpdatePluginTask.UpdateOffline(this.Status);
|
||||||
|
|
||||||
|
// Restart
|
||||||
|
this.Status.Finished("Restarting Disco, please wait...", "/");
|
||||||
|
Plugins.RestartApp(1500);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ScheduledTaskStatus UpdateDiscoPlugins(bool ReturnExistingStatusIfRunning)
|
||||||
|
{
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(UpdatePluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is already being Updated");
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(UninstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is being Uninstalled");
|
||||||
|
if (ScheduledTasks.GetTaskStatuses(typeof(InstallPluginTask)).Where(s => s.IsRunning).Count() > 0)
|
||||||
|
throw new InvalidOperationException("A plugin is being Installed");
|
||||||
|
|
||||||
|
var existingTask = ScheduledTasks.GetTaskStatuses(typeof(UpdatePluginsAfterDiscoUpdateTask)).Where(s => s.IsRunning).FirstOrDefault();
|
||||||
|
if (existingTask != null)
|
||||||
|
{
|
||||||
|
if (ReturnExistingStatusIfRunning)
|
||||||
|
return existingTask;
|
||||||
|
else
|
||||||
|
throw new InvalidOperationException("Plugins are already being updated");
|
||||||
|
}
|
||||||
|
|
||||||
|
lock (_startLock)
|
||||||
|
{
|
||||||
|
existingTask = ScheduledTasks.GetTaskStatuses(typeof(UpdatePluginsAfterDiscoUpdateTask)).Where(s => s.IsRunning).FirstOrDefault();
|
||||||
|
if (existingTask != null)
|
||||||
|
{
|
||||||
|
if (ReturnExistingStatusIfRunning)
|
||||||
|
return existingTask;
|
||||||
|
else
|
||||||
|
throw new InvalidOperationException("Plugins are already being updated");
|
||||||
|
}
|
||||||
|
|
||||||
|
var instance = new UpdatePluginsAfterDiscoUpdateTask();
|
||||||
|
var status = instance.ScheduleTask();
|
||||||
|
|
||||||
|
// Give the scheduler a chance to start the task
|
||||||
|
System.Threading.Thread.Sleep(150);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
[assembly: AssemblyVersion("1.2.0214.1848")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
[assembly: AssemblyFileVersion("1.2.0214.1848")]
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Quartz;
|
|
||||||
|
|
||||||
namespace Disco.Services.Tasks
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -16,7 +16,7 @@ namespace Disco.Services.Tasks
|
|||||||
private static object _RunningTasksLock = new object();
|
private static object _RunningTasksLock = new object();
|
||||||
private static List<ScheduledTaskStatus> _RunningTasks = new List<ScheduledTaskStatus>();
|
private static List<ScheduledTaskStatus> _RunningTasks = new List<ScheduledTaskStatus>();
|
||||||
|
|
||||||
public static void InitalizeScheduledTasks(DiscoDataContext dbContext, ISchedulerFactory SchedulerFactory)
|
public static void InitalizeScheduledTasks(DiscoDataContext dbContext, ISchedulerFactory SchedulerFactory, bool InitiallySchedule)
|
||||||
{
|
{
|
||||||
ScheduledTasksLog.LogInitializingScheduledTasks();
|
ScheduledTasksLog.LogInitializingScheduledTasks();
|
||||||
|
|
||||||
@@ -28,6 +28,8 @@ namespace Disco.Services.Tasks
|
|||||||
// Scheduled Cleanup
|
// Scheduled Cleanup
|
||||||
ScheduledTaskCleanup.Schedule(_TaskScheduler);
|
ScheduledTaskCleanup.Schedule(_TaskScheduler);
|
||||||
|
|
||||||
|
if (InitiallySchedule)
|
||||||
|
{
|
||||||
// Discover DiscoScheduledTask
|
// Discover DiscoScheduledTask
|
||||||
var appDomain = AppDomain.CurrentDomain;
|
var appDomain = AppDomain.CurrentDomain;
|
||||||
|
|
||||||
@@ -49,6 +51,7 @@ namespace Disco.Services.Tasks
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ScheduledTasksLog.LogInitializeException(ex);
|
ScheduledTasksLog.LogInitializeException(ex);
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ namespace Disco.Web.Extensions.MvcExtensions.Bundles
|
|||||||
cache.SetOmitVaryStar(true);
|
cache.SetOmitVaryStar(true);
|
||||||
cache.SetExpires(DateTime.Now.AddYears(1));
|
cache.SetExpires(DateTime.Now.AddYears(1));
|
||||||
cache.SetValidUntilExpires(true);
|
cache.SetValidUntilExpires(true);
|
||||||
|
cache.SetMaxAge(TimeSpan.FromDays(365));
|
||||||
cache.SetLastModified(DateTime.Now);
|
cache.SetLastModified(DateTime.Now);
|
||||||
cache.VaryByHeaders["User-Agent"] = true;
|
cache.VaryByHeaders["User-Agent"] = true;
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace Disco.Web.Extensions.MvcExtensions.Bundles
|
|||||||
context.Response.Clear();
|
context.Response.Clear();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(context.Request.Headers["If-Modified-Since"]))
|
if (!string.IsNullOrEmpty(context.Request.Headers["If-Modified-Since"]))
|
||||||
context.Response.StatusCode = 0x130;
|
context.Response.StatusCode = 304;
|
||||||
else
|
else
|
||||||
this.RequestBundle.ProcessRequest(context);
|
this.RequestBundle.ProcessRequest(context);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
[assembly: AssemblyVersion("1.2.0214.1848")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
[assembly: AssemblyFileVersion("1.2.0214.1848")]
|
||||||
|
|||||||
@@ -49,18 +49,13 @@ namespace Disco.Web
|
|||||||
Disco.Services.Plugins.Plugins.InitalizePlugins(dbContext);
|
Disco.Services.Plugins.Plugins.InitalizePlugins(dbContext);
|
||||||
|
|
||||||
// Initialize Scheduled Tasks
|
// Initialize Scheduled Tasks
|
||||||
Disco.Services.Tasks.ScheduledTasks.InitalizeScheduledTasks(dbContext, DiscoApplication.SchedulerFactory);
|
Disco.Services.Tasks.ScheduledTasks.InitalizeScheduledTasks(dbContext, DiscoApplication.SchedulerFactory, true);
|
||||||
|
|
||||||
// Schedule Immediate Check for Update (if a new version was installed, never updated, last updated over 2 days ago)
|
// Schedule Immediate Check for Update (if never updated, or last updated over 2 days ago)
|
||||||
var currentVersion = Disco.BI.Interop.Community.UpdateCheck.CurrentDiscoVersion();
|
if (dbContext.DiscoConfiguration.UpdateLastCheck == null ||
|
||||||
if (dbContext.DiscoConfiguration.InstalledDatabaseVersion == null ||
|
|
||||||
dbContext.DiscoConfiguration.InstalledDatabaseVersion != currentVersion ||
|
|
||||||
dbContext.DiscoConfiguration.UpdateLastCheck == null ||
|
|
||||||
dbContext.DiscoConfiguration.UpdateLastCheck.ResponseTimestamp < DateTime.Now.AddDays(-2))
|
dbContext.DiscoConfiguration.UpdateLastCheck.ResponseTimestamp < DateTime.Now.AddDays(-2))
|
||||||
{
|
{
|
||||||
Disco.BI.Interop.Community.UpdateCheckTask.ScheduleNow();
|
Disco.BI.Interop.Community.UpdateCheckTask.ScheduleNow();
|
||||||
dbContext.DiscoConfiguration.InstalledDatabaseVersion = currentVersion;
|
|
||||||
dbContext.SaveChanges();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup Attachment Monitor
|
// Setup Attachment Monitor
|
||||||
@@ -70,6 +65,28 @@ namespace Disco.Web
|
|||||||
DiscoApplication.DocumentDropBoxMonitor.ScheduleCurrentFiles(10);
|
DiscoApplication.DocumentDropBoxMonitor.ScheduleCurrentFiles(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void InitializeUpdateEnvironment()
|
||||||
|
{
|
||||||
|
using (var dbContext = new DiscoDataContext())
|
||||||
|
{
|
||||||
|
// Initialize Logging
|
||||||
|
Disco.Services.Logging.LogContext.Initalize(dbContext, DiscoApplication.SchedulerFactory);
|
||||||
|
|
||||||
|
// Load Organisation Name
|
||||||
|
DiscoApplication.OrganisationName = dbContext.DiscoConfiguration.OrganisationName;
|
||||||
|
DiscoApplication.MultiSiteMode = dbContext.DiscoConfiguration.MultiSiteMode;
|
||||||
|
|
||||||
|
// Setup Global Proxy
|
||||||
|
DiscoApplication.SetGlobalProxy(dbContext.DiscoConfiguration.ProxyAddress,
|
||||||
|
dbContext.DiscoConfiguration.ProxyPort,
|
||||||
|
dbContext.DiscoConfiguration.ProxyUsername,
|
||||||
|
dbContext.DiscoConfiguration.ProxyPassword);
|
||||||
|
|
||||||
|
// Initialize Scheduled Tasks
|
||||||
|
Disco.Services.Tasks.ScheduledTasks.InitalizeScheduledTasks(dbContext, DiscoApplication.SchedulerFactory, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void DisposeEnvironment()
|
public static void DisposeEnvironment()
|
||||||
{
|
{
|
||||||
if (DiscoApplication.DocumentDropBoxMonitor != null)
|
if (DiscoApplication.DocumentDropBoxMonitor != null)
|
||||||
|
|||||||
@@ -68,5 +68,16 @@ namespace Disco.Web
|
|||||||
namespaces: new string[] { "Disco.Web.Controllers" } // Controllers Namespace Only
|
namespaces: new string[] { "Disco.Web.Controllers" } // Controllers Namespace Only
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void RegisterUpdateRoutes(RouteCollection routes)
|
||||||
|
{
|
||||||
|
// Update Route
|
||||||
|
routes.MapRoute(
|
||||||
|
name: "Update", // Route name
|
||||||
|
url: "{controller}/{action}/{id}", // URL with parameters
|
||||||
|
defaults: new { controller = "Update", action = "Index", id = UrlParameter.Optional }, // Parameter defaults
|
||||||
|
namespaces: new string[] { "Disco.Web.Controllers" } // Controllers Namespace Only
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,8 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Disco.BI.Interop.Community;
|
|
||||||
using Disco.Services.Plugins;
|
using Disco.Services.Plugins;
|
||||||
|
using Disco.Services.Plugins.CommunityInterop;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.API.Controllers
|
namespace Disco.Web.Areas.API.Controllers
|
||||||
{
|
{
|
||||||
@@ -20,6 +20,46 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual ActionResult UpdateAll()
|
||||||
|
{
|
||||||
|
var status = UpdatePluginTask.UpdateAllPlugins();
|
||||||
|
|
||||||
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual ActionResult Update(string PluginId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(PluginId))
|
||||||
|
throw new ArgumentNullException("PluginId");
|
||||||
|
|
||||||
|
var status = UpdatePluginTask.UpdatePlugin(PluginId);
|
||||||
|
|
||||||
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual ActionResult UpdateLocal(string PluginId, HttpPostedFileBase Plugin)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(PluginId))
|
||||||
|
throw new ArgumentNullException("PluginId");
|
||||||
|
|
||||||
|
if (Plugin == null || Plugin.ContentLength <= 0 || string.IsNullOrWhiteSpace(Plugin.FileName))
|
||||||
|
throw new ArgumentException("A discoPlugin file must be uploaded", "Plugin");
|
||||||
|
|
||||||
|
var tempPluginLocation = Path.Combine(dbContext.DiscoConfiguration.PluginPackagesLocation, Path.GetFileName(Plugin.FileName));
|
||||||
|
|
||||||
|
if (!Directory.Exists(dbContext.DiscoConfiguration.PluginPackagesLocation))
|
||||||
|
Directory.CreateDirectory(dbContext.DiscoConfiguration.PluginPackagesLocation);
|
||||||
|
|
||||||
|
if (System.IO.File.Exists(tempPluginLocation))
|
||||||
|
System.IO.File.Delete(tempPluginLocation);
|
||||||
|
|
||||||
|
Plugin.SaveAs(tempPluginLocation);
|
||||||
|
|
||||||
|
var status = UpdatePluginTask.UpdateLocalPlugin(PluginId, tempPluginLocation);
|
||||||
|
|
||||||
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||||
|
}
|
||||||
|
|
||||||
public virtual ActionResult Uninstall(string id, bool UninstallData)
|
public virtual ActionResult Uninstall(string id, bool UninstallData)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(id))
|
if (string.IsNullOrEmpty(id))
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
using Disco.Models.BI.Interop.Community;
|
||||||
using Disco.Services.Plugins;
|
using Disco.Services.Plugins;
|
||||||
using Disco.Services.Tasks;
|
using Disco.Services.Tasks;
|
||||||
using Disco.Web.Areas.Config.Models.Plugins;
|
using Disco.Web.Areas.Config.Models.Plugins;
|
||||||
@@ -16,7 +17,8 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
{
|
{
|
||||||
Models.Plugins.IndexViewModel vm = new Models.Plugins.IndexViewModel()
|
Models.Plugins.IndexViewModel vm = new Models.Plugins.IndexViewModel()
|
||||||
{
|
{
|
||||||
PluginManifests = Plugins.GetPlugins()
|
PluginManifests = Plugins.GetPlugins(),
|
||||||
|
Catalogue = Plugins.LoadCatalogue(dbContext)
|
||||||
};
|
};
|
||||||
return View(vm);
|
return View(vm);
|
||||||
}
|
}
|
||||||
@@ -72,9 +74,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
|
|
||||||
var catalogue = Plugins.LoadCatalogue(dbContext);
|
var catalogue = Plugins.LoadCatalogue(dbContext);
|
||||||
|
|
||||||
if (catalogue == null || catalogue.ResponseTimestamp < DateTime.Now.AddMinutes(-15))
|
if (catalogue == null || catalogue.ResponseTimestamp < DateTime.Now.AddHours(-1))
|
||||||
{
|
{
|
||||||
// Need to Update Catalogue
|
// Need to Update Catalogue (over 1 hour old)
|
||||||
return RedirectToAction(MVC.API.Plugin.UpdateLibraryCatalogue());
|
return RedirectToAction(MVC.API.Plugin.UpdateLibraryCatalogue());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
using Disco.Models.BI.Interop.Community;
|
||||||
using Disco.Services.Plugins;
|
using Disco.Services.Plugins;
|
||||||
using Disco.Services.Plugins.Features.Other;
|
using Disco.Services.Plugins.Features.Other;
|
||||||
|
|
||||||
@@ -10,6 +11,28 @@ namespace Disco.Web.Areas.Config.Models.Plugins
|
|||||||
public class IndexViewModel
|
public class IndexViewModel
|
||||||
{
|
{
|
||||||
public List<PluginManifest> PluginManifests { get; set; }
|
public List<PluginManifest> PluginManifests { get; set; }
|
||||||
|
public PluginLibraryUpdateResponse Catalogue { get; set; }
|
||||||
|
|
||||||
|
private Dictionary<PluginManifest, PluginLibraryItem> _PluginUpdates;
|
||||||
|
public Dictionary<PluginManifest, PluginLibraryItem> PluginUpdates
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_PluginUpdates == null)
|
||||||
|
{
|
||||||
|
if (Catalogue == null || Catalogue.Plugins == null || Catalogue.Plugins.Count == 0 ||
|
||||||
|
PluginManifests == null || PluginManifests.Count == 0)
|
||||||
|
{
|
||||||
|
_PluginUpdates = new Dictionary<PluginManifest, PluginLibraryItem>(); // No Updates
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_PluginUpdates = PluginManifests.Join((IEnumerable<PluginLibraryItem>)Catalogue.Plugins, manifest => manifest.Id, update => update.Id, (manifest, update) => new Tuple<PluginManifest, PluginLibraryItem>(manifest, update)).Where(i => Version.Parse(i.Item2.LatestVersion) > i.Item1.Version).ToDictionary(i => i.Item1, i => i.Item2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _PluginUpdates;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<Tuple<Type, List<PluginManifest>>> PluginManifestsByType
|
public List<Tuple<Type, List<PluginManifest>>> PluginManifestsByType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,17 +6,14 @@
|
|||||||
}
|
}
|
||||||
<div style="min-height: 300px;">
|
<div style="min-height: 300px;">
|
||||||
<div id="scheduledTaskStatus" class="form" style="width: 520px;" data-bind="visible: Initialized">
|
<div id="scheduledTaskStatus" class="form" style="width: 520px;" data-bind="visible: Initialized">
|
||||||
<h2 data-bind="text: TaskName">
|
<h2 data-bind="text: TaskName"> </h2>
|
||||||
</h2>
|
|
||||||
<table>
|
<table>
|
||||||
<tr data-bind="visible: IsRunning">
|
<tr data-bind="visible: IsRunning">
|
||||||
<th class="process" data-bind="text: CurrentProcess">
|
<th class="process" data-bind="text: CurrentProcess">
|
||||||
|
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-bind="visible: IsRunning">
|
<tr data-bind="visible: IsRunning">
|
||||||
<td class="description" data-bind="text: CurrentDescription">
|
<td class="description" data-bind="text: CurrentDescription">
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-bind="visible: IsRunning">
|
<tr data-bind="visible: IsRunning">
|
||||||
@@ -27,8 +24,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr data-bind="visible: FinishedTimestamp">
|
<tr data-bind="visible: FinishedTimestamp">
|
||||||
<td class="finishedTimestamp">
|
<td class="finishedTimestamp">
|
||||||
<h3>
|
<h3>Finished: <span data-bind="text: FinishedTimestampFormatted"></span>
|
||||||
Finished: <span data-bind="text: FinishedTimestampFormatted"></span>
|
|
||||||
</h3>
|
</h3>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -38,15 +34,13 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-bind="visible: TaskExceptionMessage">
|
<tr data-bind="visible: TaskExceptionMessage">
|
||||||
<td class="exception">
|
<td class="exception">Last Error:
|
||||||
Last Error:
|
|
||||||
<div class="code" data-bind="text: TaskExceptionMessage">
|
<div class="code" data-bind="text: TaskExceptionMessage">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-bind="visible: NextScheduledTimestamp">
|
<tr data-bind="visible: NextScheduledTimestamp">
|
||||||
<td class="nextScheduledTimestamp">
|
<td class="nextScheduledTimestamp">Next Scheduled: <span data-bind="text: NextScheduledTimestampFormatted"></span>
|
||||||
Next Scheduled: <span data-bind="text: NextScheduledTimestampFormatted"></span>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -188,6 +182,7 @@
|
|||||||
return; // Have Newer Status Update
|
return; // Have Newer Status Update
|
||||||
self.StatusVersion = taskStatus.StatusVersion;
|
self.StatusVersion = taskStatus.StatusVersion;
|
||||||
|
|
||||||
|
if (taskStatus.ChangedProperties) {
|
||||||
for (var changedPropertyIndex = 0; changedPropertyIndex < taskStatus.ChangedProperties.length; changedPropertyIndex++) {
|
for (var changedPropertyIndex = 0; changedPropertyIndex < taskStatus.ChangedProperties.length; changedPropertyIndex++) {
|
||||||
switch (taskStatus.ChangedProperties[changedPropertyIndex]) {
|
switch (taskStatus.ChangedProperties[changedPropertyIndex]) {
|
||||||
case 'Progress':
|
case 'Progress':
|
||||||
@@ -224,6 +219,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
vm = new statusViewModel(sessionId);
|
vm = new statusViewModel(sessionId);
|
||||||
ko.applyBindings(vm, view[0]);
|
ko.applyBindings(vm, view[0]);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ WriteLiteral(">\r\n <h2");
|
|||||||
|
|
||||||
WriteLiteral(" data-bind=\"text: TaskName\"");
|
WriteLiteral(" data-bind=\"text: TaskName\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n </h2>\r\n <table>\r\n <tr");
|
WriteLiteral("> </h2>\r\n <table>\r\n <tr");
|
||||||
|
|
||||||
WriteLiteral(" data-bind=\"visible: IsRunning\"");
|
WriteLiteral(" data-bind=\"visible: IsRunning\"");
|
||||||
|
|
||||||
@@ -78,8 +78,7 @@ WriteLiteral(" class=\"process\"");
|
|||||||
|
|
||||||
WriteLiteral(" data-bind=\"text: CurrentProcess\"");
|
WriteLiteral(" data-bind=\"text: CurrentProcess\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n \r\n </th>\r\n </tr>\r\n " +
|
WriteLiteral("> \r\n </th>\r\n </tr>\r\n <tr");
|
||||||
" <tr");
|
|
||||||
|
|
||||||
WriteLiteral(" data-bind=\"visible: IsRunning\"");
|
WriteLiteral(" data-bind=\"visible: IsRunning\"");
|
||||||
|
|
||||||
@@ -89,8 +88,7 @@ WriteLiteral(" class=\"description\"");
|
|||||||
|
|
||||||
WriteLiteral(" data-bind=\"text: CurrentDescription\"");
|
WriteLiteral(" data-bind=\"text: CurrentDescription\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n \r\n </td>\r\n </tr>\r\n " +
|
WriteLiteral("> \r\n </td>\r\n </tr>\r\n <tr");
|
||||||
" <tr");
|
|
||||||
|
|
||||||
WriteLiteral(" data-bind=\"visible: IsRunning\"");
|
WriteLiteral(" data-bind=\"visible: IsRunning\"");
|
||||||
|
|
||||||
@@ -111,7 +109,7 @@ WriteLiteral(">\r\n <td");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"finishedTimestamp\"");
|
WriteLiteral(" class=\"finishedTimestamp\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n <h3>\r\n Finished: <span");
|
WriteLiteral(">\r\n <h3>Finished: <span");
|
||||||
|
|
||||||
WriteLiteral(" data-bind=\"text: FinishedTimestampFormatted\"");
|
WriteLiteral(" data-bind=\"text: FinishedTimestampFormatted\"");
|
||||||
|
|
||||||
@@ -138,7 +136,7 @@ WriteLiteral(">\r\n <td");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"exception\"");
|
WriteLiteral(" class=\"exception\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n Last Error:\r\n <div");
|
WriteLiteral(">Last Error:\r\n <div");
|
||||||
|
|
||||||
WriteLiteral(" class=\"code\"");
|
WriteLiteral(" class=\"code\"");
|
||||||
|
|
||||||
@@ -153,7 +151,7 @@ WriteLiteral(">\r\n <td");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"nextScheduledTimestamp\"");
|
WriteLiteral(" class=\"nextScheduledTimestamp\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n Next Scheduled: <span");
|
WriteLiteral(">Next Scheduled: <span");
|
||||||
|
|
||||||
WriteLiteral(" data-bind=\"text: NextScheduledTimestampFormatted\"");
|
WriteLiteral(" data-bind=\"text: NextScheduledTimestampFormatted\"");
|
||||||
|
|
||||||
@@ -189,7 +187,7 @@ WriteLiteral(" type=\"text/javascript\"");
|
|||||||
WriteLiteral(">\r\n $(function () {\r\n var sessionId = \'");
|
WriteLiteral(">\r\n $(function () {\r\n var sessionId = \'");
|
||||||
|
|
||||||
|
|
||||||
#line 99 "..\..\Areas\Config\Views\Logging\TaskStatus.cshtml"
|
#line 93 "..\..\Areas\Config\Views\Logging\TaskStatus.cshtml"
|
||||||
Write(Model.SessionId);
|
Write(Model.SessionId);
|
||||||
|
|
||||||
|
|
||||||
@@ -198,7 +196,7 @@ WriteLiteral(">\r\n $(function () {\r\n var sessionId = \'");
|
|||||||
WriteLiteral("\';\r\n var sessionStatusUrl = \'");
|
WriteLiteral("\';\r\n var sessionStatusUrl = \'");
|
||||||
|
|
||||||
|
|
||||||
#line 100 "..\..\Areas\Config\Views\Logging\TaskStatus.cshtml"
|
#line 94 "..\..\Areas\Config\Views\Logging\TaskStatus.cshtml"
|
||||||
Write(Url.Action(MVC.API.Logging.ScheduledTaskStatus(Model.SessionId)));
|
Write(Url.Action(MVC.API.Logging.ScheduledTaskStatus(Model.SessionId)));
|
||||||
|
|
||||||
|
|
||||||
@@ -251,42 +249,44 @@ WriteLiteral("\';\r\n\r\n var view = $(\'#scheduledTaskStatus\');\r\n
|
|||||||
" return self.Initialize(taskStatus);\r\n\r\n if (taskStatus.Statu" +
|
" return self.Initialize(taskStatus);\r\n\r\n if (taskStatus.Statu" +
|
||||||
"sVersion < self.StatusVersion)\r\n return; // Have Newer Status" +
|
"sVersion < self.StatusVersion)\r\n return; // Have Newer Status" +
|
||||||
" Update\r\n self.StatusVersion = taskStatus.StatusVersion;\r\n\r\n " +
|
" Update\r\n self.StatusVersion = taskStatus.StatusVersion;\r\n\r\n " +
|
||||||
" for (var changedPropertyIndex = 0; changedPropertyIndex < taskStatus." +
|
" if (taskStatus.ChangedProperties) {\r\n for (var cha" +
|
||||||
"ChangedProperties.length; changedPropertyIndex++) {\r\n switch " +
|
"ngedPropertyIndex = 0; changedPropertyIndex < taskStatus.ChangedProperties.lengt" +
|
||||||
"(taskStatus.ChangedProperties[changedPropertyIndex]) {\r\n " +
|
"h; changedPropertyIndex++) {\r\n switch (taskStatus.Changed" +
|
||||||
"case \'Progress\':\r\n self.Progress(taskStatus.Progress)" +
|
"Properties[changedPropertyIndex]) {\r\n case \'Progress\'" +
|
||||||
";\r\n break;\r\n case \'CurrentProc" +
|
":\r\n self.Progress(taskStatus.Progress);\r\n " +
|
||||||
"ess\':\r\n self.CurrentProcess(taskStatus.CurrentProcess" +
|
" break;\r\n case \'CurrentProcess" +
|
||||||
");\r\n break;\r\n case \'CurrentDes" +
|
"\':\r\n self.CurrentProcess(taskStatus.CurrentProces" +
|
||||||
"cription\':\r\n self.CurrentDescription(taskStatus.Curre" +
|
"s);\r\n break;\r\n case \'C" +
|
||||||
"ntDescription);\r\n break;\r\n cas" +
|
"urrentDescription\':\r\n self.CurrentDescription(tas" +
|
||||||
"e \'IsRunning\':\r\n self.IsRunning(taskStatus.IsRunning)" +
|
"kStatus.CurrentDescription);\r\n break;\r\n " +
|
||||||
";\r\n break;\r\n case \'TaskExcepti" +
|
" case \'IsRunning\':\r\n self.IsRunn" +
|
||||||
"on\':\r\n self.TaskExceptionMessage(taskStatus.TaskExcep" +
|
"ing(taskStatus.IsRunning);\r\n break;\r\n " +
|
||||||
"tionMessage);\r\n break;\r\n case " +
|
" case \'TaskException\':\r\n self.Task" +
|
||||||
"\'NextScheduledTimestamp\':\r\n self.NextScheduledTimesta" +
|
"ExceptionMessage(taskStatus.TaskExceptionMessage);\r\n " +
|
||||||
"mp(taskStatus.NextScheduledTimestamp);\r\n break;\r\n " +
|
" break;\r\n case \'NextScheduledTimestamp\':\r\n " +
|
||||||
" case \'FinishedUrl\':\r\n self.Finish" +
|
" self.NextScheduledTimestamp(taskStatus.NextScheduledTime" +
|
||||||
"edUrl(taskStatus.FinishedUrl);\r\n break;\r\n " +
|
"stamp);\r\n break;\r\n cas" +
|
||||||
" case \'FinishedMessage\':\r\n self.FinishedMe" +
|
"e \'FinishedUrl\':\r\n self.FinishedUrl(taskStatus.Fi" +
|
||||||
"ssage(taskStatus.FinishedMessage);\r\n break;\r\n " +
|
"nishedUrl);\r\n break;\r\n " +
|
||||||
" case \'FinishedTimestamp\':\r\n self.Fini" +
|
" case \'FinishedMessage\':\r\n self.FinishedMessage(t" +
|
||||||
"shedTimestamp(taskStatus.FinishedTimestamp);\r\n window" +
|
"askStatus.FinishedMessage);\r\n break;\r\n " +
|
||||||
".setTimeout(self.Finished, 1);\r\n break;\r\n " +
|
" case \'FinishedTimestamp\':\r\n self" +
|
||||||
" default:\r\n // Ignore\r\n " +
|
".FinishedTimestamp(taskStatus.FinishedTimestamp);\r\n " +
|
||||||
" }\r\n }\r\n }\r\n }\r\n\r\n vm = new statusViewMo" +
|
" window.setTimeout(self.Finished, 1);\r\n break;\r" +
|
||||||
"del(sessionId);\r\n ko.applyBindings(vm, view[0]);\r\n\r\n // Start Live" +
|
"\n default:\r\n // Ignore" +
|
||||||
" Connection\r\n updateWithLive();\r\n\r\n function updateWithAjax(onSucc" +
|
"\r\n }\r\n }\r\n }\r\n " +
|
||||||
"ess) {\r\n $.ajax({\r\n url: sessionStatusUrl,\r\n " +
|
" }\r\n }\r\n\r\n vm = new statusViewModel(sessionId);\r\n ko.appl" +
|
||||||
" dataType: \'json\',\r\n type: \'POST\',\r\n traditio" +
|
"yBindings(vm, view[0]);\r\n\r\n // Start Live Connection\r\n updateWithL" +
|
||||||
"nal: true,\r\n success: update_Received,\r\n error: fu" +
|
"ive();\r\n\r\n function updateWithAjax(onSuccess) {\r\n $.ajax({\r\n " +
|
||||||
"nction (jqXHR, textStatus, errorThrown) {\r\n alert(\'Unable to " +
|
" url: sessionStatusUrl,\r\n dataType: \'json\',\r\n " +
|
||||||
"load Session: \' + errorThrown);\r\n }\r\n });\r\n }\r\n" +
|
" type: \'POST\',\r\n traditional: true,\r\n succ" +
|
||||||
" function updateWithLive() {\r\n liveConnection = $.connection(\'" +
|
"ess: update_Received,\r\n error: function (jqXHR, textStatus, error" +
|
||||||
"");
|
"Thrown) {\r\n alert(\'Unable to load Session: \' + errorThrown);\r" +
|
||||||
|
"\n }\r\n });\r\n }\r\n function updateWithLive(" +
|
||||||
|
") {\r\n liveConnection = $.connection(\'");
|
||||||
|
|
||||||
|
|
||||||
#line 247 "..\..\Areas\Config\Views\Logging\TaskStatus.cshtml"
|
#line 243 "..\..\Areas\Config\Views\Logging\TaskStatus.cshtml"
|
||||||
Write(Url.Content("~/API/Logging/TaskStatusNotifications"));
|
Write(Url.Content("~/API/Logging/TaskStatusNotifications"));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -151,6 +151,23 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
if (Model.PluginUpdates.Count > 0)
|
||||||
|
{
|
||||||
|
<div id="updateAvailableContainer">
|
||||||
|
<div>@(Model.PluginUpdates.Count) plugin update@(Model.PluginUpdates.Count == 1 ? " is" : "s are") available</div>
|
||||||
|
@Html.ActionLinkButton("Update Now", MVC.API.Plugin.UpdateAll())
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
$(function () {
|
||||||
|
var layout_PageHeading = $('#layout_PageHeading').height(80);
|
||||||
|
var updateAvailableContainer = $('#updateAvailableContainer');
|
||||||
|
updateAvailableContainer.appendTo(layout_PageHeading);
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -365,51 +365,110 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
|||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("/\';\r\n var uninstallPlugin, uninstallPluginData, $dialogConfirm, uninst" +
|
WriteLiteral("/\';\r\n var uninstallPlugin, uninstallPluginData, $dialogConfirm, un" +
|
||||||
"allPluginConfirm, uninstallPluginDataConfirm;\r\n\r\n var pluginId, plugi" +
|
"installPluginConfirm, uninstallPluginDataConfirm;\r\n\r\n var pluginI" +
|
||||||
"nName, pluginUninstallData;\r\n\r\n var $dialog = $(\'#dialogUninstallPlug" +
|
"d, pluginName, pluginUninstallData;\r\n\r\n var $dialog = $(\'#dialogU" +
|
||||||
"ins\').dialog({\r\n resizable: false,\r\n modal: true,\r" +
|
"ninstallPlugins\').dialog({\r\n resizable: false,\r\n " +
|
||||||
"\n width: 350,\r\n autoOpen: false,\r\n " +
|
" modal: true,\r\n width: 350,\r\n autoOp" +
|
||||||
"buttons: {\r\n \"Uninstall\": function () {\r\n " +
|
"en: false,\r\n buttons: {\r\n \"Uninstall\":" +
|
||||||
" pluginId = uninstallPlugin.val();\r\n pluginName = unin" +
|
" function () {\r\n pluginId = uninstallPlugin.val();\r\n " +
|
||||||
"stallPlugin.find(\'option:selected\').text();\r\n pluginUnins" +
|
" pluginName = uninstallPlugin.find(\'option:selected\')." +
|
||||||
"tallData = uninstallPluginData.is(\':checked\');\r\n\r\n if (!p" +
|
"text();\r\n pluginUninstallData = uninstallPluginData.i" +
|
||||||
"luginId) {\r\n alert(\'Select a plugin to uninstall\');\r\n" +
|
"s(\':checked\');\r\n\r\n if (!pluginId) {\r\n " +
|
||||||
" } else {\r\n uninstallPluginCon" +
|
" alert(\'Select a plugin to uninstall\');\r\n " +
|
||||||
"firm.text(pluginName + \' [\' + pluginId + \']\');\r\n if (" +
|
" } else {\r\n uninstallPluginConfirm.text(plugin" +
|
||||||
"pluginUninstallData)\r\n uninstallPluginDataConfirm" +
|
"Name + \' [\' + pluginId + \']\');\r\n if (pluginUninst" +
|
||||||
".show();\r\n else\r\n unin" +
|
"allData)\r\n uninstallPluginDataConfirm.show();" +
|
||||||
"stallPluginDataConfirm.hide();\r\n\r\n $dialogConfirm.dia" +
|
"\r\n else\r\n unin" +
|
||||||
"log(\'open\');\r\n $(this).dialog(\"close\");\r\n " +
|
"stallPluginDataConfirm.hide();\r\n\r\n $dialogConfirm" +
|
||||||
" }\r\n },\r\n Cancel: function () {" +
|
".dialog(\'open\');\r\n $(this).dialog(\"close\");\r\n " +
|
||||||
"\r\n uninstallPluginData.removeAttr(\'checked\');\r\n " +
|
" }\r\n },\r\n C" +
|
||||||
" $(\'#uninstallPluginDataAlert\').hide();\r\n $(" +
|
"ancel: function () {\r\n uninstallPluginData.removeAttr" +
|
||||||
"this).dialog(\"close\");\r\n }\r\n }\r\n })" +
|
"(\'checked\');\r\n $(\'#uninstallPluginDataAlert\').hide();" +
|
||||||
";\r\n\r\n $dialogConfirm = $(\'#dialogUninstallPluginConfirm\').dialog({\r\n " +
|
"\r\n $(this).dialog(\"close\");\r\n " +
|
||||||
" resizable: false,\r\n modal: true,\r\n " +
|
"}\r\n }\r\n });\r\n\r\n $dialogConfirm " +
|
||||||
"width: 350,\r\n autoOpen: false,\r\n buttons: {\r\n " +
|
"= $(\'#dialogUninstallPluginConfirm\').dialog({\r\n resizable: fa" +
|
||||||
" \"Confirm Uninstall\": function () {\r\n var u" +
|
"lse,\r\n modal: true,\r\n width: 350,\r\n " +
|
||||||
"rl = uninstallUrl + pluginId;\r\n if (pluginUninstallData)\r" +
|
" autoOpen: false,\r\n buttons: {\r\n " +
|
||||||
|
" \"Confirm Uninstall\": function () {\r\n var url =" +
|
||||||
|
" uninstallUrl + pluginId;\r\n if (pluginUninstallData)\r" +
|
||||||
"\n url += \'?UninstallData=true\'\r\n " +
|
"\n url += \'?UninstallData=true\'\r\n " +
|
||||||
" else\r\n url += \'?UninstallData=false\'\r\n\r\n " +
|
" else\r\n url += \'?UninstallData=false\'\r\n" +
|
||||||
" window.location.href = url;\r\n $(this).dialo" +
|
"\r\n window.location.href = url;\r\n " +
|
||||||
"g(\"disable\");\r\n },\r\n Cancel: function () {" +
|
" $(this).dialog(\"disable\");\r\n },\r\n " +
|
||||||
"\r\n uninstallPluginData.removeAttr(\'checked\');\r\n " +
|
" Cancel: function () {\r\n uninstallPluginData.re" +
|
||||||
" $(\'#uninstallPluginDataAlert\').hide();\r\n $(" +
|
"moveAttr(\'checked\');\r\n $(\'#uninstallPluginDataAlert\')" +
|
||||||
"this).dialog(\"close\");\r\n }\r\n }\r\n })" +
|
".hide();\r\n $(this).dialog(\"close\");\r\n " +
|
||||||
";\r\n\r\n uninstallPlugin = $(\'#uninstallPlugin\');\r\n uninstall" +
|
" }\r\n }\r\n });\r\n\r\n uninsta" +
|
||||||
"PluginData = $(\'#uninstallPluginData\');\r\n uninstallPluginConfirm = $(" +
|
"llPlugin = $(\'#uninstallPlugin\');\r\n uninstallPluginData = $(\'#uni" +
|
||||||
"\'#uninstallPluginConfirm\');\r\n uninstallPluginDataConfirm = $(\'#uninst" +
|
"nstallPluginData\');\r\n uninstallPluginConfirm = $(\'#uninstallPlugi" +
|
||||||
"allPluginDataConfirm\');\r\n\r\n $(\'#buttonUninstall\').click(function () {" +
|
"nConfirm\');\r\n uninstallPluginDataConfirm = $(\'#uninstallPluginDat" +
|
||||||
"\r\n $dialog.dialog(\'open\');\r\n return false;\r\n " +
|
"aConfirm\');\r\n\r\n $(\'#buttonUninstall\').click(function () {\r\n " +
|
||||||
" });\r\n\r\n $(\'#uninstallPluginData\').change(function () {\r\n " +
|
" $dialog.dialog(\'open\');\r\n return false;\r\n " +
|
||||||
" if ($(this).is(\':checked\')) {\r\n $(\'#uninstallPluginD" +
|
" });\r\n\r\n $(\'#uninstallPluginData\').change(function () {\r" +
|
||||||
"ataAlert\').slideDown();\r\n } else {\r\n $(\'#unins" +
|
"\n if ($(this).is(\':checked\')) {\r\n $(\'#" +
|
||||||
"tallPluginDataAlert\').slideUp();\r\n }\r\n });\r\n })" +
|
"uninstallPluginDataAlert\').slideDown();\r\n } else {\r\n " +
|
||||||
";\r\n </script>\r\n");
|
" $(\'#uninstallPluginDataAlert\').slideUp();\r\n }\r" +
|
||||||
|
"\n });\r\n });\r\n </script>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 154 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
#line 154 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
|
|
||||||
|
if (Model.PluginUpdates.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"updateAvailableContainer\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <div>");
|
||||||
|
|
||||||
|
|
||||||
|
#line 158 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
|
Write(Model.PluginUpdates.Count);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" plugin update");
|
||||||
|
|
||||||
|
|
||||||
|
#line 158 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
|
Write(Model.PluginUpdates.Count == 1 ? " is" : "s are");
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" available</div>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 159 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
|
Write(Html.ActionLinkButton("Update Now", MVC.API.Plugin.UpdateAll()));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </div>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(@" <script>
|
||||||
|
(function () {
|
||||||
|
$(function () {
|
||||||
|
var layout_PageHeading = $('#layout_PageHeading').height(80);
|
||||||
|
var updateAvailableContainer = $('#updateAvailableContainer');
|
||||||
|
updateAvailableContainer.appendTo(layout_PageHeading);
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
");
|
||||||
|
|
||||||
|
|
||||||
|
#line 170 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -422,13 +481,13 @@ WriteLiteral(" class=\"actionBar\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 158 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
#line 175 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 158 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
#line 175 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
if (Model.PluginManifests.Count > 0)
|
if (Model.PluginManifests.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -436,14 +495,14 @@ WriteLiteral(">\r\n");
|
|||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 160 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
#line 177 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
Write(Html.ActionLinkButton("Uninstall Plugins", MVC.Config.Plugins.Index(), "buttonUninstall"));
|
Write(Html.ActionLinkButton("Uninstall Plugins", MVC.Config.Plugins.Index(), "buttonUninstall"));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 160 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
#line 177 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -453,7 +512,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 162 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
#line 179 "..\..\Areas\Config\Views\Plugins\Index.cshtml"
|
||||||
Write(Html.ActionLinkButton("Install Plugins", MVC.Config.Plugins.Install()));
|
Write(Html.ActionLinkButton("Install Plugins", MVC.Config.Plugins.Install()));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,19 @@
|
|||||||
{
|
{
|
||||||
var plugin = plugins[itemNextId];
|
var plugin = plugins[itemNextId];
|
||||||
itemNextId++;
|
itemNextId++;
|
||||||
<div class="pageMenuArea pluginItem@(Plugins.PluginInstalled(plugin.Id) ? " pluginInstalled" : string.Empty)">
|
var installedPlugin = Plugins.PluginInstalled(plugin.Id) ? Plugins.GetPlugin(plugin.Id) : null;
|
||||||
<a class="pluginInstallLink" href="@(Url.Action(MVC.API.Plugin.Install(plugin.Id)))">
|
<div class="pageMenuArea pluginItem@(installedPlugin != null ? " pluginInstalled" : string.Empty)">
|
||||||
<h2 class="pluginName">@plugin.Name</h2>
|
<h2 class="pluginName">@plugin.Name
|
||||||
</a>
|
@if (installedPlugin == null){
|
||||||
|
<a class="pluginInstallLink button" href="@(Url.Action(MVC.API.Plugin.Install(plugin.Id)))">Install</a>
|
||||||
|
}else{
|
||||||
|
if (Version.Parse(plugin.LatestVersion) > installedPlugin.Version){
|
||||||
|
<a class="pluginUpdateLink button" href="@(Url.Action(MVC.API.Plugin.Update(plugin.Id)))">Update</a>
|
||||||
|
}else{
|
||||||
|
<a class="pluginInstalledLink button disabled" href="#">Installed</a>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</h2>
|
||||||
<div class="pluginItemBlurb">@(new HtmlString(plugin.Blurb))</div>
|
<div class="pluginItemBlurb">@(new HtmlString(plugin.Blurb))</div>
|
||||||
<div class="pageMenuBlurb">
|
<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>
|
<span class="pluginId">@plugin.Id</span> | <span class="pluginVersion">v@(plugin.LatestVersion)</span> | @plugin.Author | <a href="@plugin.Url" target="_blank">More Information</a>
|
||||||
@@ -100,14 +109,26 @@
|
|||||||
$selectedPlugin = $this.closest('.pluginItem');
|
$selectedPlugin = $this.closest('.pluginItem');
|
||||||
$selectedPluginUrl = $this.attr('href');
|
$selectedPluginUrl = $this.attr('href');
|
||||||
|
|
||||||
if ($selectedPlugin.is('.pluginInstalled')) {
|
|
||||||
alert('This plugin is already installed.');
|
|
||||||
} else {
|
|
||||||
$('#dialogInstallPluginName').text($selectedPlugin.find('.pluginName').text());
|
$('#dialogInstallPluginName').text($selectedPlugin.find('.pluginName').text());
|
||||||
$('#dialogInstallPluginDetails').text($selectedPlugin.find('.pluginId').text() + ' | ' + $selectedPlugin.find('.pluginVersion').text());
|
$('#dialogInstallPluginDetails').text($selectedPlugin.find('.pluginId').text() + ' | ' + $selectedPlugin.find('.pluginVersion').text());
|
||||||
|
|
||||||
|
$dialogInstall.dialog('option', 'title', 'Install this Plugin?');
|
||||||
$dialogInstall.dialog('open');
|
$dialogInstall.dialog('open');
|
||||||
}
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$('#pageMenu').find('a.pluginUpdateLink').click(function () {
|
||||||
|
$this = $(this);
|
||||||
|
|
||||||
|
$selectedPlugin = $this.closest('.pluginItem');
|
||||||
|
$selectedPluginUrl = $this.attr('href');
|
||||||
|
|
||||||
|
$('#dialogInstallPluginName').text($selectedPlugin.find('.pluginName').text());
|
||||||
|
$('#dialogInstallPluginDetails').text($selectedPlugin.find('.pluginId').text() + ' | ' + $selectedPlugin.find('.pluginVersion').text());
|
||||||
|
|
||||||
|
$dialogInstall.dialog('option', 'title', 'Update this Plugin?');
|
||||||
|
$dialogInstall.dialog('open');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -147,36 +147,23 @@ WriteLiteral(" <td>\r\n");
|
|||||||
{
|
{
|
||||||
var plugin = plugins[itemNextId];
|
var plugin = plugins[itemNextId];
|
||||||
itemNextId++;
|
itemNextId++;
|
||||||
|
var installedPlugin = Plugins.PluginInstalled(plugin.Id) ? Plugins.GetPlugin(plugin.Id) : null;
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 1328), Tuple.Create("\"", 1432)
|
WriteAttribute("class", Tuple.Create(" class=\"", 1449), Tuple.Create("\"", 1542)
|
||||||
, Tuple.Create(Tuple.Create("", 1336), Tuple.Create("pageMenuArea", 1336), true)
|
, Tuple.Create(Tuple.Create("", 1457), Tuple.Create("pageMenuArea", 1457), true)
|
||||||
, Tuple.Create(Tuple.Create(" ", 1348), Tuple.Create("pluginItem", 1349), true)
|
, Tuple.Create(Tuple.Create(" ", 1469), Tuple.Create("pluginItem", 1470), 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"
|
#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))
|
, Tuple.Create(Tuple.Create("", 1480), Tuple.Create<System.Object, System.Int32>(installedPlugin != null ? " pluginInstalled" : string.Empty
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1503), false)
|
, 1480), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <h2");
|
WriteLiteral(">\r\n <h2");
|
||||||
@@ -192,15 +179,92 @@ WriteLiteral(">");
|
|||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("</h2>\r\n </a>\r\n <div" +
|
WriteLiteral("\r\n");
|
||||||
"");
|
|
||||||
|
|
||||||
|
#line 34 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 34 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
|
if (installedPlugin == null){
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"pluginInstallLink button\"");
|
||||||
|
|
||||||
|
WriteAttribute("href", Tuple.Create(" href=\"", 1754), Tuple.Create("\"", 1809)
|
||||||
|
|
||||||
|
#line 35 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 1761), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Plugin.Install(plugin.Id))
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 1761), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">Install</a>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 36 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
|
}else{
|
||||||
|
if (Version.Parse(plugin.LatestVersion) > installedPlugin.Version){
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"pluginUpdateLink button\"");
|
||||||
|
|
||||||
|
WriteAttribute("href", Tuple.Create(" href=\"", 2047), Tuple.Create("\"", 2101)
|
||||||
|
|
||||||
|
#line 38 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 2054), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Plugin.Update(plugin.Id))
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 2054), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">Update</a> \r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 39 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"pluginInstalledLink button disabled\"");
|
||||||
|
|
||||||
|
WriteLiteral(" href=\"#\"");
|
||||||
|
|
||||||
|
WriteLiteral(">Installed</a> \r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 41 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </h2>\r\n <div");
|
||||||
|
|
||||||
WriteLiteral(" class=\"pluginItemBlurb\"");
|
WriteLiteral(" class=\"pluginItemBlurb\"");
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 35 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 44 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
Write(new HtmlString(plugin.Blurb));
|
Write(new HtmlString(plugin.Blurb));
|
||||||
|
|
||||||
|
|
||||||
@@ -217,7 +281,7 @@ WriteLiteral(" class=\"pluginId\"");
|
|||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 46 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
Write(plugin.Id);
|
Write(plugin.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -230,7 +294,7 @@ WriteLiteral(" class=\"pluginVersion\"");
|
|||||||
WriteLiteral(">v");
|
WriteLiteral(">v");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 46 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
Write(plugin.LatestVersion);
|
Write(plugin.LatestVersion);
|
||||||
|
|
||||||
|
|
||||||
@@ -239,7 +303,7 @@ WriteLiteral(">v");
|
|||||||
WriteLiteral("</span> | ");
|
WriteLiteral("</span> | ");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 46 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
Write(plugin.Author);
|
Write(plugin.Author);
|
||||||
|
|
||||||
|
|
||||||
@@ -247,14 +311,14 @@ WriteLiteral("</span> | ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" | <a");
|
WriteLiteral(" | <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 1992), Tuple.Create("\"", 2010)
|
WriteAttribute("href", Tuple.Create(" href=\"", 2716), Tuple.Create("\"", 2734)
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 46 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1999), Tuple.Create<System.Object, System.Int32>(plugin.Url
|
, Tuple.Create(Tuple.Create("", 2723), Tuple.Create<System.Object, System.Int32>(plugin.Url
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1999), false)
|
, 2723), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" target=\"_blank\"");
|
WriteLiteral(" target=\"_blank\"");
|
||||||
@@ -263,7 +327,7 @@ WriteLiteral(">More Information</a>\r\n </div>\r\
|
|||||||
" </div>\r\n");
|
" </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 49 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -272,7 +336,7 @@ WriteLiteral(">More Information</a>\r\n </div>\r\
|
|||||||
WriteLiteral("\r\n </td>\r\n");
|
WriteLiteral("\r\n </td>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 43 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 52 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -281,7 +345,7 @@ WriteLiteral("\r\n </td>\r\n");
|
|||||||
WriteLiteral(" </tr>\r\n </table>\r\n");
|
WriteLiteral(" </tr>\r\n </table>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 46 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 55 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -328,13 +392,13 @@ WriteLiteral(" style=\"padding-bottom: 10px;\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 59 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 68 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 59 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 68 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
using (Html.BeginForm(MVC.API.Plugin.InstallLocal(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
using (Html.BeginForm(MVC.API.Plugin.InstallLocal(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -358,7 +422,7 @@ WriteLiteral(" type=\"file\"");
|
|||||||
WriteLiteral(" />\r\n");
|
WriteLiteral(" />\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 63 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 72 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -391,25 +455,32 @@ WriteLiteral("></span>Warning: All plugins run with the same level of network pr
|
|||||||
" $(this).dialog(\"close\");\r\n }\r\n }\r\n }" +
|
" $(this).dialog(\"close\");\r\n }\r\n }\r\n }" +
|
||||||
");\r\n $(\'#pageMenu\').find(\'a.pluginInstallLink\').click(function () {\r\n " +
|
");\r\n $(\'#pageMenu\').find(\'a.pluginInstallLink\').click(function () {\r\n " +
|
||||||
" $this = $(this);\r\n\r\n $selectedPlugin = $this.closest(\'.plugin" +
|
" $this = $(this);\r\n\r\n $selectedPlugin = $this.closest(\'.plugin" +
|
||||||
"Item\');\r\n $selectedPluginUrl = $this.attr(\'href\');\r\n\r\n if " +
|
"Item\');\r\n $selectedPluginUrl = $this.attr(\'href\');\r\n\r\n $(\'" +
|
||||||
"($selectedPlugin.is(\'.pluginInstalled\')) {\r\n alert(\'This plugin i" +
|
"#dialogInstallPluginName\').text($selectedPlugin.find(\'.pluginName\').text());\r\n " +
|
||||||
"s already installed.\');\r\n } else {\r\n $(\'#dialogInstall" +
|
" $(\'#dialogInstallPluginDetails\').text($selectedPlugin.find(\'.pluginId\'" +
|
||||||
"PluginName\').text($selectedPlugin.find(\'.pluginName\').text());\r\n " +
|
").text() + \' | \' + $selectedPlugin.find(\'.pluginVersion\').text());\r\n\r\n " +
|
||||||
|
" $dialogInstall.dialog(\'option\', \'title\', \'Install this Plugin?\');\r\n " +
|
||||||
|
" $dialogInstall.dialog(\'open\');\r\n\r\n return false;\r\n });\r\n " +
|
||||||
|
" $(\'#pageMenu\').find(\'a.pluginUpdateLink\').click(function () {\r\n $t" +
|
||||||
|
"his = $(this);\r\n\r\n $selectedPlugin = $this.closest(\'.pluginItem\');\r\n " +
|
||||||
|
" $selectedPluginUrl = $this.attr(\'href\');\r\n\r\n $(\'#dialogIns" +
|
||||||
|
"tallPluginName\').text($selectedPlugin.find(\'.pluginName\').text());\r\n " +
|
||||||
"$(\'#dialogInstallPluginDetails\').text($selectedPlugin.find(\'.pluginId\').text() +" +
|
"$(\'#dialogInstallPluginDetails\').text($selectedPlugin.find(\'.pluginId\').text() +" +
|
||||||
" \' | \' + $selectedPlugin.find(\'.pluginVersion\').text());\r\n\r\n $dia" +
|
" \' | \' + $selectedPlugin.find(\'.pluginVersion\').text());\r\n\r\n $dialogI" +
|
||||||
"logInstall.dialog(\'open\');\r\n }\r\n return false;\r\n })" +
|
"nstall.dialog(\'option\', \'title\', \'Update this Plugin?\');\r\n $dialogIns" +
|
||||||
";\r\n\r\n // Upload\r\n var $dialogUpload = $(\'#dialogUploadPlugin\').dia" +
|
"tall.dialog(\'open\');\r\n\r\n return false;\r\n });\r\n\r\n // Upl" +
|
||||||
"log({\r\n resizable: false,\r\n modal: true,\r\n widt" +
|
"oad\r\n var $dialogUpload = $(\'#dialogUploadPlugin\').dialog({\r\n " +
|
||||||
"h: 350,\r\n autoOpen: false,\r\n buttons: {\r\n \"" +
|
"resizable: false,\r\n modal: true,\r\n width: 350,\r\n " +
|
||||||
"Upload & Install\": function () {\r\n var pluginFile = $(\'#plugi" +
|
" autoOpen: false,\r\n buttons: {\r\n \"Upload & Install\": " +
|
||||||
"nFile\');\r\n if (pluginFile.val()) {\r\n p" +
|
"function () {\r\n var pluginFile = $(\'#pluginFile\');\r\n " +
|
||||||
"luginFile.closest(\'form\').submit();\r\n $(this).dialog(\'dis" +
|
" if (pluginFile.val()) {\r\n pluginFile.closest(\'" +
|
||||||
"able\');\r\n } else {\r\n alert(\'Choose a P" +
|
"form\').submit();\r\n $(this).dialog(\'disable\');\r\n " +
|
||||||
"lugin Package to Upload\');\r\n }\r\n },\r\n " +
|
" } else {\r\n alert(\'Choose a Plugin Package to Up" +
|
||||||
" Cancel: function () {\r\n $(this).dialog(\"close\");\r\n " +
|
"load\');\r\n }\r\n },\r\n Cancel: func" +
|
||||||
" }\r\n }\r\n });\r\n $(\'#buttonUpload\').click(func" +
|
"tion () {\r\n $(this).dialog(\"close\");\r\n }\r\n " +
|
||||||
"tion () {\r\n $dialogUpload.dialog(\'open\');\r\n return false;\r" +
|
" }\r\n });\r\n $(\'#buttonUpload\').click(function () {\r\n " +
|
||||||
"\n });\r\n });\r\n</script>\r\n<div");
|
" $dialogUpload.dialog(\'open\');\r\n return false;\r\n });\r\n }" +
|
||||||
|
");\r\n</script>\r\n<div");
|
||||||
|
|
||||||
WriteLiteral(" class=\"actionBar\"");
|
WriteLiteral(" class=\"actionBar\"");
|
||||||
|
|
||||||
@@ -418,7 +489,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 142 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 163 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
Write(Html.ActionLinkButton("Update Catalogue", MVC.API.Plugin.UpdateLibraryCatalogue()));
|
Write(Html.ActionLinkButton("Update Catalogue", MVC.API.Plugin.UpdateLibraryCatalogue()));
|
||||||
|
|
||||||
|
|
||||||
@@ -429,7 +500,7 @@ WriteLiteral("\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 143 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
#line 164 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||||
Write(Html.ActionLinkButton("Install Plugin Package", MVC.API.Plugin.InstallLocal(), "buttonUpload"));
|
Write(Html.ActionLinkButton("Install Plugin Package", MVC.API.Plugin.InstallLocal(), "buttonUpload"));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -906,6 +906,7 @@ a:active {
|
|||||||
color: #335a87;
|
color: #335a87;
|
||||||
}
|
}
|
||||||
a.button {
|
a.button {
|
||||||
|
display: inline-block;
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border: 1px solid #875a33;
|
border: 1px solid #875a33;
|
||||||
@@ -914,11 +915,11 @@ a.button {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
line-height: 2.2em;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
a.button[disabled] {
|
a.button[disabled],
|
||||||
|
a.button.disabled {
|
||||||
background: #9e9e9e;
|
background: #9e9e9e;
|
||||||
border: 1px solid #696969;
|
border: 1px solid #696969;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
@@ -1357,7 +1358,8 @@ input[type="submit"] {
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
input[type="submit"].button {
|
input[type="submit"].button {
|
||||||
padding: 4px 10px;
|
font-size: 12px;
|
||||||
|
padding: 6px 10px 4px 10px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border: 1px solid #875a33;
|
border: 1px solid #875a33;
|
||||||
background: #db761d;
|
background: #db761d;
|
||||||
@@ -1365,7 +1367,6 @@ input[type="submit"].button {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
line-height: 1.2em;
|
|
||||||
}
|
}
|
||||||
input[type="submit"].button:hover {
|
input[type="submit"].button:hover {
|
||||||
border: 1px solid #696969;
|
border: 1px solid #696969;
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
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: 795 B |
Binary file not shown.
|
After Width: | Height: | Size: 795 B |
@@ -339,6 +339,7 @@ a:active {
|
|||||||
color: #335a87;
|
color: #335a87;
|
||||||
}
|
}
|
||||||
a.button {
|
a.button {
|
||||||
|
display: inline-block;
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border: 1px solid #875a33;
|
border: 1px solid #875a33;
|
||||||
@@ -347,11 +348,11 @@ a.button {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
line-height: 2.2em;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
a.button[disabled] {
|
a.button[disabled],
|
||||||
|
a.button.disabled {
|
||||||
background: #9e9e9e;
|
background: #9e9e9e;
|
||||||
border: 1px solid #696969;
|
border: 1px solid #696969;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
@@ -790,7 +791,8 @@ input[type="submit"] {
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
input[type="submit"].button {
|
input[type="submit"].button {
|
||||||
padding: 4px 10px;
|
font-size: 12px;
|
||||||
|
padding: 6px 10px 4px 10px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border: 1px solid #875a33;
|
border: 1px solid #875a33;
|
||||||
background: #db761d;
|
background: #db761d;
|
||||||
@@ -798,7 +800,6 @@ input[type="submit"].button {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
line-height: 1.2em;
|
|
||||||
}
|
}
|
||||||
input[type="submit"].button:hover {
|
input[type="submit"].button:hover {
|
||||||
border: 1px solid #696969;
|
border: 1px solid #696969;
|
||||||
|
|||||||
@@ -333,6 +333,7 @@ a
|
|||||||
// Anchor Tags (Button)
|
// Anchor Tags (Button)
|
||||||
a.button
|
a.button
|
||||||
{
|
{
|
||||||
|
display: inline-block;
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border: 1px solid @ButtonBorderColour;
|
border: 1px solid @ButtonBorderColour;
|
||||||
@@ -341,11 +342,10 @@ a
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
line-height: 2.2em;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
&[disabled]
|
&[disabled], &.disabled
|
||||||
{
|
{
|
||||||
background: @ButtonHoverColour;
|
background: @ButtonHoverColour;
|
||||||
border: 1px solid @ButtonBorderHoverColour;
|
border: 1px solid @ButtonBorderHoverColour;
|
||||||
@@ -876,7 +876,8 @@ input[type="submit"]
|
|||||||
|
|
||||||
&.button
|
&.button
|
||||||
{
|
{
|
||||||
padding: 4px 10px;
|
font-size: 12px;
|
||||||
|
padding: 6px 10px 4px 10px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border: 1px solid @ButtonBorderColour;
|
border: 1px solid @ButtonBorderColour;
|
||||||
background: @ButtonColour;
|
background: @ButtonColour;
|
||||||
@@ -884,7 +885,6 @@ input[type="submit"]
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
line-height: 1.2em;
|
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -20,7 +20,7 @@ namespace Disco.Web.Controllers
|
|||||||
#region Determine Server Is Core SKU
|
#region Determine Server Is Core SKU
|
||||||
// Added 2012-11-01 G#
|
// Added 2012-11-01 G#
|
||||||
// http://www.discoict.com.au/forum/support/2012/10/install-on-server-core.aspx
|
// http://www.discoict.com.au/forum/support/2012/10/install-on-server-core.aspx
|
||||||
private static Lazy<bool> ServerIsCoreSKU = new Lazy<bool>(() =>
|
internal static Lazy<bool> ServerIsCoreSKU = new Lazy<bool>(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
using Disco.Web.Models.InitialConfig;
|
||||||
|
using Disco.Data.Repository;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Management;
|
||||||
|
using System.Web;
|
||||||
|
using Disco.Services.Plugins;
|
||||||
|
|
||||||
|
namespace Disco.Web.Controllers
|
||||||
|
{
|
||||||
|
[OutputCache(Duration = 0, Location = System.Web.UI.OutputCacheLocation.None)]
|
||||||
|
public partial class UpdateController : Controller
|
||||||
|
{
|
||||||
|
protected override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||||
|
{
|
||||||
|
if (!Request.IsLocal && !InitialConfigController.ServerIsCoreSKU.Value)
|
||||||
|
{
|
||||||
|
filterContext.Result = new HttpStatusCodeResult(System.Net.HttpStatusCode.ServiceUnavailable, "Initial Configuration of Disco is only allowed via a local connection");
|
||||||
|
}
|
||||||
|
base.OnActionExecuting(filterContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual ActionResult Index()
|
||||||
|
{
|
||||||
|
var status = UpdatePluginsAfterDiscoUpdateTask.UpdateDiscoPlugins(true);
|
||||||
|
|
||||||
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -172,6 +172,7 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Controllers\InitialConfigController.cs" />
|
<Compile Include="Controllers\InitialConfigController.cs" />
|
||||||
<Compile Include="Controllers\PluginWebHandlerController.cs" />
|
<Compile Include="Controllers\PluginWebHandlerController.cs" />
|
||||||
|
<Compile Include="Controllers\UpdateController.cs" />
|
||||||
<Compile Include="Extensions\HtmlExtensions.cs" />
|
<Compile Include="Extensions\HtmlExtensions.cs" />
|
||||||
<Compile Include="App_Start\AppConfig.cs" />
|
<Compile Include="App_Start\AppConfig.cs" />
|
||||||
<Compile Include="App_Start\BundleConfig.cs" />
|
<Compile Include="App_Start\BundleConfig.cs" />
|
||||||
@@ -1822,7 +1823,7 @@
|
|||||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
</WebProjectProperties>
|
</WebProjectProperties>
|
||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
<UserProperties BuildVersion_StartDate="2001/1/1" BuildVersion_BuildAction="ReBuild" BuildVersion_UseGlobalSettings="True" BuildVersion_DetectChanges="False" />
|
<UserProperties BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="True" BuildVersion_BuildAction="ReBuild" BuildVersion_StartDate="2001/1/1" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
|||||||
@@ -37,9 +37,22 @@ namespace Disco.Web
|
|||||||
|
|
||||||
if (AppConfig.InitializeDatabase())
|
if (AppConfig.InitializeDatabase())
|
||||||
{
|
{
|
||||||
|
// Database Initialized
|
||||||
|
|
||||||
Debug.WriteLine("Initialized Database: +{0}ms", timer.ElapsedMilliseconds - timer_last);
|
Debug.WriteLine("Initialized Database: +{0}ms", timer.ElapsedMilliseconds - timer_last);
|
||||||
timer_last = timer.ElapsedMilliseconds;
|
timer_last = timer.ElapsedMilliseconds;
|
||||||
|
|
||||||
|
// Check for Post-Update
|
||||||
|
Version previousVersion;
|
||||||
|
Version currentVersion = Disco.BI.Interop.Community.UpdateCheck.CurrentDiscoVersion();
|
||||||
|
using (DiscoDataContext dbContext = new DiscoDataContext())
|
||||||
|
{
|
||||||
|
previousVersion = dbContext.DiscoConfiguration.InstalledDatabaseVersion;
|
||||||
|
}
|
||||||
|
if (currentVersion == previousVersion)
|
||||||
|
{
|
||||||
|
// Normal Startup
|
||||||
|
|
||||||
AreaRegistration.RegisterAllAreas();
|
AreaRegistration.RegisterAllAreas();
|
||||||
|
|
||||||
Debug.WriteLine("Registered Areas: +{0}ms", timer.ElapsedMilliseconds - timer_last);
|
Debug.WriteLine("Registered Areas: +{0}ms", timer.ElapsedMilliseconds - timer_last);
|
||||||
@@ -72,6 +85,23 @@ namespace Disco.Web
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Post-Update Startup
|
||||||
|
AreaRegistration.RegisterAllAreas();
|
||||||
|
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||||
|
RouteConfig.RegisterUpdateRoutes(RouteTable.Routes);
|
||||||
|
BundleConfig.RegisterBundles();
|
||||||
|
AppConfig.InitializeUpdateEnvironment();
|
||||||
|
|
||||||
|
using (DiscoDataContext dbContext = new DiscoDataContext())
|
||||||
|
{
|
||||||
|
dbContext.DiscoConfiguration.InstalledDatabaseVersion = currentVersion;
|
||||||
|
dbContext.SaveChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Database Not Initialized
|
||||||
// Install
|
// Install
|
||||||
InitialConfig = true;
|
InitialConfig = true;
|
||||||
RouteConfig.RegisterInstallRoutes(RouteTable.Routes);
|
RouteConfig.RegisterInstallRoutes(RouteTable.Routes);
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.2.0212.1702")]
|
[assembly: AssemblyVersion("1.2.0214.1848")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0212.1702")]
|
[assembly: AssemblyFileVersion("1.2.0214.1848")]
|
||||||
|
|||||||
+158
-23
@@ -37,6 +37,7 @@ public static class MVC
|
|||||||
public static Disco.Web.Controllers.JobController Job = new Disco.Web.Controllers.T4MVC_JobController();
|
public static Disco.Web.Controllers.JobController Job = new Disco.Web.Controllers.T4MVC_JobController();
|
||||||
public static Disco.Web.Controllers.PluginWebHandlerController PluginWebHandler = new Disco.Web.Controllers.T4MVC_PluginWebHandlerController();
|
public static Disco.Web.Controllers.PluginWebHandlerController PluginWebHandler = new Disco.Web.Controllers.T4MVC_PluginWebHandlerController();
|
||||||
public static Disco.Web.Controllers.SearchController Search = new Disco.Web.Controllers.T4MVC_SearchController();
|
public static Disco.Web.Controllers.SearchController Search = new Disco.Web.Controllers.T4MVC_SearchController();
|
||||||
|
public static Disco.Web.Controllers.UpdateController Update = new Disco.Web.Controllers.T4MVC_UpdateController();
|
||||||
public static Disco.Web.Controllers.UserController User = new Disco.Web.Controllers.T4MVC_UserController();
|
public static Disco.Web.Controllers.UserController User = new Disco.Web.Controllers.T4MVC_UserController();
|
||||||
public static T4MVC.HomeController Home = new T4MVC.HomeController();
|
public static T4MVC.HomeController Home = new T4MVC.HomeController();
|
||||||
public static T4MVC.SharedController Shared = new T4MVC.SharedController();
|
public static T4MVC.SharedController Shared = new T4MVC.SharedController();
|
||||||
@@ -1998,6 +1999,84 @@ namespace Disco.Web.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Disco.Web.Controllers
|
||||||
|
{
|
||||||
|
public partial class UpdateController
|
||||||
|
{
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public UpdateController() { }
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
protected UpdateController(Dummy d) { }
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
protected RedirectToRouteResult RedirectToAction(ActionResult result)
|
||||||
|
{
|
||||||
|
var callInfo = result.GetT4MVCResult();
|
||||||
|
return RedirectToRoute(callInfo.RouteValueDictionary);
|
||||||
|
}
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
protected RedirectToRouteResult RedirectToActionPermanent(ActionResult result)
|
||||||
|
{
|
||||||
|
var callInfo = result.GetT4MVCResult();
|
||||||
|
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public UpdateController Actions { get { return MVC.Update; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0")]
|
||||||
|
public readonly string Area = "";
|
||||||
|
[GeneratedCode("T4MVC", "2.0")]
|
||||||
|
public readonly string Name = "Update";
|
||||||
|
[GeneratedCode("T4MVC", "2.0")]
|
||||||
|
public const string NameConst = "Update";
|
||||||
|
|
||||||
|
static readonly ActionNamesClass s_actions = new ActionNamesClass();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ActionNamesClass ActionNames { get { return s_actions; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionNamesClass
|
||||||
|
{
|
||||||
|
public readonly string Index = "Index";
|
||||||
|
}
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionNameConstants
|
||||||
|
{
|
||||||
|
public const string Index = "Index";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static readonly ViewsClass s_views = new ViewsClass();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ViewsClass Views { get { return s_views; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ViewsClass
|
||||||
|
{
|
||||||
|
static readonly _ViewNamesClass s_ViewNames = new _ViewNamesClass();
|
||||||
|
public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
|
||||||
|
public class _ViewNamesClass
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class T4MVC_UpdateController : Disco.Web.Controllers.UpdateController
|
||||||
|
{
|
||||||
|
public T4MVC_UpdateController() : base(Dummy.Instance) { }
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult Index()
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Index);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace Disco.Web.Controllers
|
namespace Disco.Web.Controllers
|
||||||
{
|
{
|
||||||
public partial class UserController
|
public partial class UserController
|
||||||
@@ -6759,6 +6838,18 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
|
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public System.Web.Mvc.ActionResult Update()
|
||||||
|
{
|
||||||
|
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Update);
|
||||||
|
}
|
||||||
|
[NonAction]
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public System.Web.Mvc.ActionResult UpdateLocal()
|
||||||
|
{
|
||||||
|
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLocal);
|
||||||
|
}
|
||||||
[NonAction]
|
[NonAction]
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public System.Web.Mvc.ActionResult Uninstall()
|
public System.Web.Mvc.ActionResult Uninstall()
|
||||||
@@ -6767,16 +6858,16 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
[NonAction]
|
[NonAction]
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[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()
|
public System.Web.Mvc.ActionResult Install()
|
||||||
{
|
{
|
||||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Install);
|
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Install);
|
||||||
}
|
}
|
||||||
|
[NonAction]
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public System.Web.Mvc.ActionResult InstallLocal()
|
||||||
|
{
|
||||||
|
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.InstallLocal);
|
||||||
|
}
|
||||||
|
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public PluginController Actions { get { return MVC.API.Plugin; } }
|
public PluginController Actions { get { return MVC.API.Plugin; } }
|
||||||
@@ -6794,21 +6885,44 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionNamesClass
|
public class ActionNamesClass
|
||||||
{
|
{
|
||||||
public readonly string UpdateLibraryCatalogue = "UpdateLibraryCatalogue";
|
public readonly string UpdateLibraryCatalogue = "UpdateLibraryCatalogue";
|
||||||
|
public readonly string UpdateAll = "UpdateAll";
|
||||||
|
public readonly string Update = "Update";
|
||||||
|
public readonly string UpdateLocal = "UpdateLocal";
|
||||||
public readonly string Uninstall = "Uninstall";
|
public readonly string Uninstall = "Uninstall";
|
||||||
public readonly string InstallLocal = "InstallLocal";
|
|
||||||
public readonly string Install = "Install";
|
public readonly string Install = "Install";
|
||||||
|
public readonly string InstallLocal = "InstallLocal";
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public class ActionNameConstants
|
public class ActionNameConstants
|
||||||
{
|
{
|
||||||
public const string UpdateLibraryCatalogue = "UpdateLibraryCatalogue";
|
public const string UpdateLibraryCatalogue = "UpdateLibraryCatalogue";
|
||||||
|
public const string UpdateAll = "UpdateAll";
|
||||||
|
public const string Update = "Update";
|
||||||
|
public const string UpdateLocal = "UpdateLocal";
|
||||||
public const string Uninstall = "Uninstall";
|
public const string Uninstall = "Uninstall";
|
||||||
public const string InstallLocal = "InstallLocal";
|
|
||||||
public const string Install = "Install";
|
public const string Install = "Install";
|
||||||
|
public const string InstallLocal = "InstallLocal";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static readonly ActionParamsClass_Update s_params_Update = new ActionParamsClass_Update();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ActionParamsClass_Update UpdateParams { get { return s_params_Update; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionParamsClass_Update
|
||||||
|
{
|
||||||
|
public readonly string PluginId = "PluginId";
|
||||||
|
}
|
||||||
|
static readonly ActionParamsClass_UpdateLocal s_params_UpdateLocal = new ActionParamsClass_UpdateLocal();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ActionParamsClass_UpdateLocal UpdateLocalParams { get { return s_params_UpdateLocal; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionParamsClass_UpdateLocal
|
||||||
|
{
|
||||||
|
public readonly string PluginId = "PluginId";
|
||||||
|
public readonly string Plugin = "Plugin";
|
||||||
|
}
|
||||||
static readonly ActionParamsClass_Uninstall s_params_Uninstall = new ActionParamsClass_Uninstall();
|
static readonly ActionParamsClass_Uninstall s_params_Uninstall = new ActionParamsClass_Uninstall();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public ActionParamsClass_Uninstall UninstallParams { get { return s_params_Uninstall; } }
|
public ActionParamsClass_Uninstall UninstallParams { get { return s_params_Uninstall; } }
|
||||||
@@ -6818,14 +6932,6 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string UninstallData = "UninstallData";
|
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();
|
static readonly ActionParamsClass_Install s_params_Install = new ActionParamsClass_Install();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public ActionParamsClass_Install InstallParams { get { return s_params_Install; } }
|
public ActionParamsClass_Install InstallParams { get { return s_params_Install; } }
|
||||||
@@ -6834,6 +6940,14 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
{
|
{
|
||||||
public readonly string PluginId = "PluginId";
|
public readonly string PluginId = "PluginId";
|
||||||
}
|
}
|
||||||
|
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 ViewsClass s_views = new ViewsClass();
|
static readonly ViewsClass s_views = new ViewsClass();
|
||||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
public ViewsClass Views { get { return s_views; } }
|
public ViewsClass Views { get { return s_views; } }
|
||||||
@@ -6859,6 +6973,27 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult UpdateAll()
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAll);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult Update(string PluginId)
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Update);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "PluginId", PluginId);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult UpdateLocal(string PluginId, System.Web.HttpPostedFileBase Plugin)
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLocal);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "PluginId", PluginId);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Plugin", Plugin);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
public override System.Web.Mvc.ActionResult Uninstall(string id, bool UninstallData)
|
public override System.Web.Mvc.ActionResult Uninstall(string id, bool UninstallData)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Uninstall);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Uninstall);
|
||||||
@@ -6867,13 +7002,6 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
public override System.Web.Mvc.ActionResult Install(string PluginId)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Install);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Install);
|
||||||
@@ -6881,6 +7009,13 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user