mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
filemanager overhaul
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
app.controller('installDocker', function ($scope, $http, $timeout, $window) {
|
||||
$scope.installDockerStatus = true;
|
||||
$scope.installBoxGen = true;
|
||||
@@ -120,18 +118,27 @@ app.controller('runContainer', function ($scope, $http) {
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.goBackDisable = true;
|
||||
|
||||
$scope.volList = {};
|
||||
$scope.volListNumber = 0;
|
||||
$scope.addVolField = function () {
|
||||
$scope.volList[$scope.volListNumber] = {'dest': '', 'src': ''};
|
||||
$scope.volListNumber = $scope.volListNumber + 1;
|
||||
console.log($scope.volList)
|
||||
};
|
||||
$scope.removeVolField = function () {
|
||||
delete $scope.volList[$scope.volListNumber - 1];
|
||||
$scope.volListNumber = $scope.volListNumber - 1;
|
||||
};
|
||||
|
||||
$scope.addEnvField = function () {
|
||||
var countEnv = Object.keys($scope.envList).length;
|
||||
$scope.envList[countEnv + 1] = {'name': '', 'value': ''};
|
||||
}
|
||||
};
|
||||
|
||||
var statusFile;
|
||||
|
||||
$scope.createContainer = function () {
|
||||
|
||||
console.log($scope.iport);
|
||||
console.log($scope.portType);
|
||||
|
||||
$scope.containerCreationLoading = true;
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
@@ -157,7 +164,8 @@ app.controller('runContainer', function ($scope, $http) {
|
||||
memory: memory,
|
||||
dockerOwner: dockerOwner,
|
||||
image: image,
|
||||
envList: $scope.envList
|
||||
envList: $scope.envList,
|
||||
volList: $scope.volList
|
||||
|
||||
};
|
||||
|
||||
@@ -165,8 +173,6 @@ app.controller('runContainer', function ($scope, $http) {
|
||||
data[port + "/" + protocol] = $scope.eport[port];
|
||||
});
|
||||
|
||||
console.log(data)
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
@@ -314,7 +320,7 @@ app.controller('listContainers', function ($scope, $http) {
|
||||
if (response.data.delContainerStatus === 1) {
|
||||
location.reload();
|
||||
}
|
||||
else if (response.data.delContainerStatus == 2) {
|
||||
else if (response.data.delContainerStatus === 2) {
|
||||
(new PNotify({
|
||||
title: response.data.error_message,
|
||||
text: 'Delete anyway?',
|
||||
@@ -382,7 +388,6 @@ app.controller('listContainers', function ($scope, $http) {
|
||||
else {
|
||||
name = $scope.activeLog;
|
||||
}
|
||||
console.log(name)
|
||||
$scope.logs = "Loading...";
|
||||
|
||||
url = "/docker/getContainerLogs";
|
||||
@@ -420,7 +425,7 @@ app.controller('listContainers', function ($scope, $http) {
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
url = "/docker/getContainerList";
|
||||
|
||||
@@ -697,7 +702,16 @@ app.controller('viewContainer', function ($scope, $http) {
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$scope.addVolField = function () {
|
||||
$scope.volList[$scope.volListNumber] = {'dest': '', 'src': ''};
|
||||
$scope.volListNumber = $scope.volListNumber + 1;
|
||||
};
|
||||
$scope.removeVolField = function () {
|
||||
delete $scope.volList[$scope.volListNumber - 1];
|
||||
$scope.volListNumber = $scope.volListNumber - 1;
|
||||
};
|
||||
|
||||
$scope.saveSettings = function () {
|
||||
$('#containerSettingLoading').show();
|
||||
@@ -709,10 +723,11 @@ app.controller('viewContainer', function ($scope, $http) {
|
||||
memory: $scope.memory,
|
||||
startOnReboot: $scope.startOnReboot,
|
||||
envConfirmation: $scope.envConfirmation,
|
||||
envList: $scope.envList
|
||||
envList: $scope.envList,
|
||||
volList: $scope.volList
|
||||
};
|
||||
|
||||
console.log(data)
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
|
||||
Reference in New Issue
Block a user