2
0
Fork 0
tcrud/lib/www_views/node-ff-tcrud/uiAngularServerPlugins/js/server-plugins.ejs
2017-12-23 22:45:27 +01:00

46 lines
1.2 KiB
Plaintext

'use strict';
//
// Auto generated controller server plugin controller
//
crudRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/ui/server/plugins', {
templateUrl: '<%= troot.tmeta.tserver.tslugs.tbase %>/<%= troot.tmeta.tserver.tslugs.tplugin %>/uiAngularServerPlugins/thtml/plugins',
controller: XPageServerPlugins,
});
});
function XPageServerPlugins($scope, $http) {
$scope.message = '';
$scope.doReload = function () {
window.location.reload(true);
};
$scope.doClearServerUrl = function () {
FFSpaLoader.clearServerUrl(function(err) {
if (err) {
$scope.message = 'Error: '+err;
} else {
$scope.message = 'Cleared server url';
}
$scope.$apply();
});
};
$scope.doClearCache = function () {
FFSpaLoader.clearCache(function(err) {
if (err) {
$scope.message = 'Error: '+err;
} else {
$scope.message = 'Cleared cache';
}
$scope.$apply();
});
};
$http.get('<%= troot.tmeta.tserver.tslugs.tbase %>/<%= troot.tmeta.tserver.tslugs.tserver %>/<%= troot.tmeta.tplugin.serverInfoPlugins.tslug %>').then(function(response) {
$scope.serverPlugins = response.data.data;
});
}