Usman Nasir
2020-08-15 11:23:01 +05:00
parent 06deeea14e
commit 74b8f8cae2
7 changed files with 273 additions and 0 deletions

View File

@@ -824,6 +824,7 @@ app.controller('listOSPackages', function ($scope, $http, $timeout) {
});
}
}
function cantLoadInitialData(response) {
$scope.cyberpanelLoading = true;
new PNotify({
@@ -867,6 +868,7 @@ app.controller('listOSPackages', function ($scope, $http, $timeout) {
});
}
}
function cantLoadInitialData(response) {
$scope.cyberpanelLoading = true;
new PNotify({
@@ -909,6 +911,7 @@ app.controller('listOSPackages', function ($scope, $http, $timeout) {
});
}
}
function cantLoadInitialData(response) {
$scope.cyberpanelLoading = true;
new PNotify({
@@ -997,6 +1000,7 @@ app.controller('listOSPackages', function ($scope, $http, $timeout) {
});
}
}
function cantLoadInitialData(response) {
$scope.cyberpanelLoading = true;
new PNotify({
@@ -1009,4 +1013,56 @@ app.controller('listOSPackages', function ($scope, $http, $timeout) {
};
});
app.controller('changePort', function ($scope, $http, $timeout) {
$scope.cyberpanelLoading = true;
$scope.changeCPPort = function () {
$scope.cyberpanelLoading = false;
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
var data = {
port: $scope.port
};
dataurl = "/serverstatus/submitPortChange";
$http.post(dataurl, data, config).then(ListInitialData, cantLoadInitialData);
function ListInitialData(response) {
$scope.cyberpanelLoading = true;
if (response.data.status === 1) {
new PNotify({
title: 'Success!',
text: 'Port changed, open CyberPanel on new port.',
type: 'success'
});
} else {
new PNotify({
title: 'Error!',
text: response.data.error_message,
type: 'error'
});
}
}
function cantLoadInitialData(response) {
$scope.cyberpanelLoading = true;
new PNotify({
title: 'Success!',
text: 'Port changed, open CyberPanel on new port.',
type: 'success'
});
}
};
});