diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2019-10-31 13:23:51 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2019-10-31 13:23:51 -0400 |
| commit | 7a6b426ab2f6309a3be276166b395198e96c445e (patch) | |
| tree | cd0ae14d2056c767f2ddd08b0b4a4a20234fa59f /www/js/MenuController.js | |
| parent | 20e35612d7577fb8616bf95cdeacdbc8c8b6a290 (diff) | |
#857 api caching layer
Diffstat (limited to 'www/js/MenuController.js')
| -rw-r--r-- | www/js/MenuController.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/www/js/MenuController.js b/www/js/MenuController.js index 318e4d15..92aca6da 100644 --- a/www/js/MenuController.js +++ b/www/js/MenuController.js @@ -400,6 +400,35 @@ angular.module('zmApp.controllers').controller('MenuController', ['$scope', '$io }; + $scope.flushAPICache = function() { + + NVR.flushAPICache() + .then ( function () { + showCachePopup($translate.instant('kFlushAllCachesMessageOk')); + }) + .catch (function (err) { + showCachePopup($translate.instant('kFlushAllCachesMessageOk')+JSON.stringify(err)); + }); + + function showCachePopup(str) { + $rootScope.zmPopup = $ionicPopup.alert({ + template: str, + + title: $translate.instant('kNote'), + + buttons: [ + { + text: $translate.instant('kButtonOk'), + } + ] + }); + + + } + + }; + + $scope.switchLang = function () { $scope.lang = NVR.getLanguages(); $scope.myopt = { |
