mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-06-19 19:12:01 +02:00
finish structure for applications manager page
This commit is contained in:
BIN
static/manageServices/images/elastic-search.png
Normal file
BIN
static/manageServices/images/elastic-search.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 913 B |
@@ -2,7 +2,6 @@
|
||||
* Created by usman on 6/22/18.
|
||||
*/
|
||||
|
||||
|
||||
/* Java script code */
|
||||
|
||||
app.controller('powerDNS', function ($scope, $http, $timeout, $window) {
|
||||
@@ -163,11 +162,8 @@ app.controller('powerDNS', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
});
|
||||
|
||||
|
||||
/* Java script code */
|
||||
|
||||
|
||||
|
||||
/* Java script code */
|
||||
|
||||
app.controller('postfix', function ($scope, $http, $timeout, $window) {
|
||||
@@ -298,7 +294,6 @@ app.controller('postfix', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
/* Java script code */
|
||||
|
||||
|
||||
/* Java script code */
|
||||
|
||||
app.controller('pureFTPD', function ($scope, $http, $timeout, $window) {
|
||||
@@ -427,4 +422,73 @@ app.controller('pureFTPD', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
});
|
||||
|
||||
/* Java script code */
|
||||
|
||||
/* Java script code */
|
||||
|
||||
app.controller('manageApplications', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
|
||||
$scope.cyberpanelLoading = true;
|
||||
|
||||
$scope.saveStatus = function (service) {
|
||||
|
||||
$scope.cyberpanelLoading = false;
|
||||
|
||||
|
||||
url = "/manageservices/saveStatus";
|
||||
|
||||
var data = {
|
||||
status: serviceStatus,
|
||||
service: service
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
$scope.cyberpanelLoading = true;
|
||||
|
||||
if (response.data.status === 1) {
|
||||
|
||||
$scope.failedToFetch = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.changesApplied = false;
|
||||
|
||||
}
|
||||
else {
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
|
||||
$scope.failedToFetch = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.changesApplied = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.serviceLoading = true;
|
||||
$scope.failedToFetch = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.changesApplied = true;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
$scope.removeInstall = function (appName, status) {
|
||||
$scope.status = status;
|
||||
$scope.appName = appName;
|
||||
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
/* Java script code */
|
||||
Reference in New Issue
Block a user