46 lines
1.2 KiB
Plaintext
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 %>').success(function(data, status, headers, config) {
|
||
|
$scope.serverPlugins = data.data;
|
||
|
});
|
||
|
}
|