mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-07-11 11:23:34 +02:00
backups to aws s3
This commit is contained in:
@@ -7,4 +7,4 @@ Link : http://sciactive.com/pnotify/
|
||||
.ui-pnotify-closer,.ui-pnotify-sticker{float:right;margin-left:.2em}
|
||||
.ui-pnotify-history-container{position:absolute;top:0;right:18px;width:70px;border-top:none;padding:0;-webkit-border-top-left-radius:0;-moz-border-top-left-radius:0;border-top-left-radius:0;-webkit-border-top-right-radius:0;-moz-border-top-right-radius:0;border-top-right-radius:0;z-index:10000}.ui-pnotify-history-container.ui-pnotify-history-fixed{position:fixed}.ui-pnotify-history-container .ui-pnotify-history-header{padding:2px;text-align:center}.ui-pnotify-history-container button{cursor:pointer;display:block;width:100%}.ui-pnotify-history-container .ui-pnotify-history-pulldown{display:block;margin:0 auto}.ui-pnotify-history-brighttheme{background-color:#8fcedd;border:0 solid #0286a5;color:#012831}.ui-pnotify-history-brighttheme button{text-transform:uppercase;font-weight:700;padding:4px 8px;border:none;background:0 0}.ui-pnotify-history-brighttheme .ui-pnotify-history-pulldown::after{display:block;font-size:16px;line-height:14px;padding-bottom:4px;content:"⌄";text-align:center;font-weight:700;font-family:Arial,sans-serif}
|
||||
.ui-pnotify-container{position:relative;left:0}@media (max-width:480px){.ui-pnotify-mobile-able.ui-pnotify{position:fixed;top:0;right:0;left:0;width:auto!important;font-size:1.2em;-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased;-ms-font-smoothing:antialiased;font-smoothing:antialiased}.ui-pnotify-mobile-able.ui-pnotify .ui-pnotify-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-bottom-width:5px}.ui-pnotify-mobile-able .ui-pnotify-container{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ui-pnotify-mobile-able.ui-pnotify.stack-bottomleft,.ui-pnotify-mobile-able.ui-pnotify.stack-topleft{left:0;right:0}.ui-pnotify-mobile-able.ui-pnotify.stack-bottomleft,.ui-pnotify-mobile-able.ui-pnotify.stack-bottomright{left:0;right:0;bottom:0;top:auto}.ui-pnotify-mobile-able.ui-pnotify.stack-bottomleft .ui-pnotify-shadow,.ui-pnotify-mobile-able.ui-pnotify.stack-bottomright .ui-pnotify-shadow{border-top-width:5px;border-bottom-width:1px}}
|
||||
.ui-pnotify.ui-pnotify-nonblock-fade{opacity:.2}.ui-pnotify.ui-pnotify-nonblock-hide{display:none!important}
|
||||
.ui-pnotify.ui-pnotify-nonblock-fade{opacity:.2}.ui-pnotify.ui-pnotify-nonblock-hide{display:none!important}
|
||||
@@ -636,4 +636,143 @@ app.controller('lswsSwitch', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
app.controller('topProcesses', function ($scope, $http, $timeout) {
|
||||
|
||||
$scope.cyberPanelLoading = true;
|
||||
|
||||
$scope.topProcessesStatus = function () {
|
||||
|
||||
$scope.cyberPanelLoading = false;
|
||||
|
||||
url = "/serverstatus/topProcessesStatus";
|
||||
|
||||
var data = {};
|
||||
|
||||
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.processes = JSON.parse(response.data.data);
|
||||
|
||||
//CPU Details
|
||||
$scope.cores = response.data.cores;
|
||||
$scope.modelName = response.data.modelName;
|
||||
$scope.cpuMHZ = response.data.cpuMHZ;
|
||||
$scope.cacheSize = response.data.cacheSize;
|
||||
|
||||
//CPU Load
|
||||
$scope.cpuNow = response.data.cpuNow;
|
||||
$scope.cpuOne = response.data.cpuOne;
|
||||
$scope.cpuFive = response.data.cpuFive;
|
||||
$scope.cpuFifteen = response.data.cpuFifteen;
|
||||
|
||||
//CPU Time spent
|
||||
$scope.ioWait = response.data.ioWait;
|
||||
$scope.idleTime = response.data.idleTime;
|
||||
$scope.hwInterrupts = response.data.hwInterrupts;
|
||||
$scope.Softirqs = response.data.Softirqs;
|
||||
|
||||
//Memory
|
||||
$scope.totalMemory = response.data.totalMemory;
|
||||
$scope.freeMemory = response.data.freeMemory;
|
||||
$scope.usedMemory = response.data.usedMemory;
|
||||
$scope.buffCache = response.data.buffCache;
|
||||
|
||||
//Swap
|
||||
$scope.swapTotalMemory = response.data.swapTotalMemory;
|
||||
$scope.swapFreeMemory = response.data.swapFreeMemory;
|
||||
$scope.swapUsedMemory = response.data.swapUsedMemory;
|
||||
$scope.swapBuffCache = response.data.swapBuffCache;
|
||||
|
||||
//Processes
|
||||
$scope.totalProcesses = response.data.totalProcesses;
|
||||
$scope.runningProcesses = response.data.runningProcesses;
|
||||
$scope.sleepingProcesses = response.data.sleepingProcesses;
|
||||
$scope.stoppedProcesses = response.data.stoppedProcesses;
|
||||
$scope.zombieProcesses = response.data.zombieProcesses;
|
||||
|
||||
$timeout($scope.topProcessesStatus, 3000);
|
||||
}
|
||||
else {
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.cyberPanelLoading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: 'Could not connect to server, please refresh this page',
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
$scope.topProcessesStatus();
|
||||
|
||||
$scope.killProcess = function (pid) {
|
||||
|
||||
$scope.cyberPanelLoading = false;
|
||||
|
||||
url = "/serverstatus/killProcess";
|
||||
|
||||
var data = {
|
||||
pid: pid
|
||||
};
|
||||
|
||||
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) {
|
||||
new PNotify({
|
||||
title: 'Success',
|
||||
text: 'Process successfully killed.',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
else {
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.cyberPanelLoading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: 'Could not connect to server, please refresh this page',
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
});
|
||||
@@ -9,6 +9,4 @@
|
||||
.website-content-box{
|
||||
border-radius: 25px;
|
||||
border-color:#3498db
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user