Gets local package installation 'working', now needs a little UI work.
This commit is contained in:
23
src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs
Normal file
23
src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
/// <summary>
|
||||
/// This is used for the response of PostAddFile so that we can analyze the response in a filter and remove the
|
||||
/// temporary files that were created.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
internal class PostedFiles : IHaveUploadedFiles, INotificationModel
|
||||
{
|
||||
public PostedFiles()
|
||||
{
|
||||
UploadedFiles = new List<ContentItemFile>();
|
||||
Notifications = new List<Notification>();
|
||||
}
|
||||
public List<ContentItemFile> UploadedFiles { get; private set; }
|
||||
|
||||
[DataMember(Name = "notifications")]
|
||||
public List<Notification> Notifications { get; private set; }
|
||||
}
|
||||
}
|
||||
75
src/Umbraco.Web/Models/LocalPackageInstallModel.cs
Normal file
75
src/Umbraco.Web/Models/LocalPackageInstallModel.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Web.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// A model that represents uploading a local package
|
||||
/// </summary>
|
||||
[DataContract(Name = "localPackageInstallModel")]
|
||||
public class LocalPackageInstallModel : PackageInstallModel, IHaveUploadedFiles, INotificationModel
|
||||
{
|
||||
public LocalPackageInstallModel()
|
||||
{
|
||||
UploadedFiles = new List<ContentItemFile>();
|
||||
Notifications = new List<Notification>();
|
||||
}
|
||||
|
||||
public List<ContentItemFile> UploadedFiles { get; private set; }
|
||||
|
||||
[DataMember(Name = "notifications")]
|
||||
public List<Notification> Notifications { get; private set; }
|
||||
|
||||
[DataMember(Name = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[DataMember(Name = "url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
[DataMember(Name = "version")]
|
||||
public string Version { get; set; }
|
||||
|
||||
[DataMember(Name = "containsUnsecureFiles")]
|
||||
public bool ContainsUnsecureFiles { get; set; }
|
||||
|
||||
[DataMember(Name = "containsTemplateConflicts")]
|
||||
public bool ContainsTemplateConflicts { get; set; }
|
||||
|
||||
[DataMember(Name = "containsStyleSheetConflicts")]
|
||||
public bool ContainsStyleSheetConflicts { get; set; }
|
||||
|
||||
[DataMember(Name = "containsMacroConflict")]
|
||||
public bool ContainsMacroConflict { get; set; }
|
||||
|
||||
[DataMember(Name = "containsLegacyPropertyEditors")]
|
||||
public bool ContainsLegacyPropertyEditors { get; set; }
|
||||
|
||||
[DataMember(Name = "containsBinaryFileErrors")]
|
||||
public bool ContainsBinaryFileErrors { get; set; }
|
||||
|
||||
[DataMember(Name = "conflictingTemplateAliases")]
|
||||
public IDictionary<string, string> ConflictingTemplateAliases { get; set; }
|
||||
|
||||
[DataMember(Name = "conflictingStyleSheetNames")]
|
||||
public IDictionary<string, string> ConflictingStyleSheetNames { get; set; }
|
||||
|
||||
[DataMember(Name = "conflictingMacroAliases")]
|
||||
public IDictionary<string, string> ConflictingMacroAliases { get; set; }
|
||||
|
||||
[DataMember(Name = "readMe")]
|
||||
public string ReadMe { get; set; }
|
||||
|
||||
[DataMember(Name = "licenseUrl")]
|
||||
public string LicenseUrl { get; set; }
|
||||
|
||||
[DataMember(Name = "license")]
|
||||
public string License { get; set; }
|
||||
|
||||
[DataMember(Name = "authorUrl")]
|
||||
public string AuthorUrl { get; set; }
|
||||
|
||||
[DataMember(Name = "author")]
|
||||
public string Author { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
@@ -10,7 +9,7 @@ namespace Umbraco.Web.Models
|
||||
[DataContract(Name = "packageInstallModel")]
|
||||
public class PackageInstallModel
|
||||
{
|
||||
[DataMember(Name="id")]
|
||||
[DataMember(Name = "id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[DataMember(Name = "packageGuid")]
|
||||
@@ -24,5 +23,7 @@ namespace Umbraco.Web.Models
|
||||
|
||||
[DataMember(Name = "zipFilePath")]
|
||||
public string ZipFilePath { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user