2
0
Fork 0
tcrud/lib/www_views/node-ff-tcrud/uiAngularServerPlugins/js/server-plugins.ejs

46 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2017-06-10 14:53:29 +00:00
'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();
});
};
2017-12-23 21:45:27 +00:00
$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;
2017-06-10 14:53:29 +00:00
});
}