diff --git a/CyberCP/settings.py b/CyberCP/settings.py index 0dd5d5dd9..a8420f766 100644 --- a/CyberCP/settings.py +++ b/CyberCP/settings.py @@ -24,7 +24,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'xr%j*p!*$0d%(-(e%@-*hyoz4$f%y77coq0u)6pwmjg4)q&19f' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = False +DEBUG = True ALLOWED_HOSTS = ['*'] @@ -110,15 +110,15 @@ DATABASES = { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'cyberpanel', 'USER': 'cyberpanel', - 'PASSWORD': 'Bz9gF7Hr7X4RtD', + 'PASSWORD': 'a9AwLb7zY7ZwCd', 'HOST': '127.0.0.1', - 'PORT':'3307' + 'PORT':'' }, 'rootdb': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mysql', 'USER': 'root', - 'PASSWORD': 'sXm5VlRaAsXkDd', + 'PASSWORD': '3bL8X7wGo0kT3b', 'HOST': 'localhost', 'PORT': '', }, diff --git a/dockerManager/decorators.py b/dockerManager/decorators.py index d2320b7ba..f2edd4004 100644 --- a/dockerManager/decorators.py +++ b/dockerManager/decorators.py @@ -31,8 +31,7 @@ def preDockerRun(function): else: return render(request, 'dockerManager/install.html', {'status':admin.type, 'conErr':0}) - # Check if docker is running and we are able to connect - + # Check if docker is running and we are able to connect try: client = docker.from_env() client.ping() diff --git a/serverStatus/static/images/docker.png b/serverStatus/static/images/docker.png new file mode 100644 index 000000000..cdf0c6fc2 Binary files /dev/null and b/serverStatus/static/images/docker.png differ diff --git a/serverStatus/static/serverStatus/serverStatus.js b/serverStatus/static/serverStatus/serverStatus.js index 1a9b88863..8ccf90154 100644 --- a/serverStatus/static/serverStatus/serverStatus.js +++ b/serverStatus/static/serverStatus/serverStatus.js @@ -394,6 +394,7 @@ app.controller('servicesManager', function ($scope, $http) { function ListInitialDatas(response) { + console.log(response.data) if (response.data.status.litespeed) { $scope.olsStatus = "Running"; @@ -408,9 +409,19 @@ app.controller('servicesManager', function ($scope, $http) { $scope.olsStart = true; $scope.olsStop = false; } + + if (response.data.status.docker) { + $scope.dockerStatus = "Running"; + $scope.dockerStart = false; + $scope.dockerStop = true; + } + else { + $scope.dockerStatus = "Stopped"; + $scope.dockerStart = true; + $scope.dockerStop = false; + } // Update SQL stats - if (response.data.status.mysql) { $scope.sqlStatus = "Running"; $scope.sqlStats = true; @@ -468,7 +479,7 @@ app.controller('servicesManager', function ($scope, $http) { } - }; + } getServiceStatus(); $scope.serviceAction = function (serviceName, action) { diff --git a/serverStatus/templates/serverStatus/services.html b/serverStatus/templates/serverStatus/services.html index dab445905..3153b4597 100644 --- a/serverStatus/templates/serverStatus/services.html +++ b/serverStatus/templates/serverStatus/services.html @@ -123,6 +123,28 @@ + {% if isDocker %} +
+