Removed type check for dashboard status URL from published status controller and moved to interface.
This commit is contained in:
@@ -161,8 +161,14 @@ namespace Umbraco.Web.PublishedCache
|
||||
|
||||
#endregion
|
||||
|
||||
#region Status
|
||||
|
||||
string GetStatus();
|
||||
|
||||
string StatusUrl { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
void Collect();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1788,6 +1788,8 @@ AND cmsContentNu.nodeId IS NULL
|
||||
" and " + ms + " snapshot" + (ms > 1 ? "s" : "") + ".";
|
||||
}
|
||||
|
||||
public override string StatusUrl => "views/dashboard/settings/nucache.html";
|
||||
|
||||
public override void Collect()
|
||||
{
|
||||
var contentCollect = _contentStore.CollectAsync();
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace Umbraco.Web.PublishedCache
|
||||
|
||||
public abstract string GetStatus();
|
||||
|
||||
public virtual string StatusUrl => string.Empty;
|
||||
|
||||
public virtual void Collect()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -17,13 +17,12 @@ namespace Umbraco.Web.Editors
|
||||
[HttpGet]
|
||||
public string GetPublishedStatusUrl()
|
||||
{
|
||||
return "views/dashboard/settings/nucache.html";
|
||||
if (!string.IsNullOrWhiteSpace(_publishedSnapshotService.StatusUrl))
|
||||
{
|
||||
return _publishedSnapshotService.StatusUrl;
|
||||
}
|
||||
|
||||
// TODO: do we need this check?
|
||||
//if (_publishedSnapshotService is PublishedCache.NuCache.PublishedSnapshotService)
|
||||
// return "views/dashboard/settings/nucache.html";
|
||||
|
||||
//throw new NotSupportedException("Not supported: " + _publishedSnapshotService.GetType().FullName);
|
||||
throw new NotSupportedException("Not supported: " + _publishedSnapshotService.GetType().FullName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user