Removed concrete type checks for back-office published cache details, so now working from interface. Renamed controller and FE assets to more generic name.

This commit is contained in:
Andy Butland
2020-02-04 19:18:35 +01:00
parent 28267087ef
commit b0c752bc5c
9 changed files with 56 additions and 75 deletions

View File

@@ -1,4 +1,4 @@
function nuCacheController($scope, $http, umbRequestHelper, localizationService, overlayService) {
function publishedSnapshotCacheController($scope, $http, umbRequestHelper, localizationService, overlayService) {
var vm = this;
@@ -35,7 +35,7 @@
if (vm.working) return;
vm.working = true;
umbRequestHelper.resourcePromise(
$http.get(umbRequestHelper.getApiUrl("nuCacheStatusBaseUrl", "Collect")),
$http.get(umbRequestHelper.getApiUrl("publishedSnapshotCacheStatusBaseUrl", "Collect")),
'Failed to verify the cache.')
.then(function (result) {
vm.working = false;
@@ -47,7 +47,7 @@
if (vm.working) return;
vm.working = true;
umbRequestHelper.resourcePromise(
$http.get(umbRequestHelper.getApiUrl("nuCacheStatusBaseUrl", "GetStatus")),
$http.get(umbRequestHelper.getApiUrl("publishedSnapshotCacheStatusBaseUrl", "GetStatus")),
'Failed to verify the cache.')
.then(function (result) {
vm.working = false;
@@ -83,7 +83,7 @@
vm.working = true;
umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("nuCacheStatusBaseUrl", "ReloadCache")),
$http.post(umbRequestHelper.getApiUrl("publishedSnapshotCacheStatusBaseUrl", "ReloadCache")),
'Failed to trigger a cache reload')
.then(function (result) {
vm.working = false;
@@ -94,7 +94,7 @@
vm.working = true;
umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("nuCacheStatusBaseUrl", "RebuildDbCache")),
$http.post(umbRequestHelper.getApiUrl("publishedSnapshotCacheStatusBaseUrl", "RebuildDbCache")),
'Failed to rebuild the cache.')
.then(function (result) {
vm.working = false;
@@ -109,4 +109,4 @@
init();
}
angular.module("umbraco").controller("Umbraco.Dashboard.NuCacheController", nuCacheController);
angular.module("umbraco").controller("Umbraco.Dashboard.PublishedSnapshotCacheController", publishedSnapshotCacheController);

View File

@@ -1,4 +1,4 @@
<div id="nuCache" style="position: relative;" ng-controller="Umbraco.Dashboard.NuCacheController as vm">
<div id="nuCache" style="position: relative;" ng-controller="Umbraco.Dashboard.PublishedSnapshotCacheController as vm">
<div ng-show="vm.loading || vm.working" style="background: rgba(255, 255, 255, 0.60); position: absolute; left: 0; right: 0; top: 0; bottom: 0;">
<umb-load-indicator></umb-load-indicator>

View File

@@ -7,8 +7,6 @@
$http.get(umbRequestHelper.getApiUrl('publishedStatusBaseUrl', 'GetPublishedStatusUrl')),
'Failed to get published status url')
.then(function (result) {
//result = 'views/dashboard/developer/nucache.html'
vm.includeUrl = result;
});