mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 14:26:16 +01:00
switchoff security DOne Frontend
This commit is contained in:
@@ -947,6 +947,9 @@
|
||||
<li><a href="{% url 'packageManager' %}"
|
||||
title="{% trans 'Package Manager' %}"><span>{% trans "Package Manager" %}</span></a>
|
||||
</li>
|
||||
<li><a href="{% url 'Switchoffsecurity' %}"
|
||||
title="{% trans 'Switch off security' %}"><span>{% trans "Switch off security" %}</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><!-- .sidebar-submenu -->
|
||||
@@ -1057,12 +1060,12 @@
|
||||
<li><a href="{% url 'mailQueue' %}"
|
||||
title="{% trans 'Mail Queue' %}"><span>{% trans "Mail Queue" %}</span></a>
|
||||
</li>
|
||||
{# <li><a href="{% url 'emailPolicyServer' %}"#}
|
||||
{# title="{% trans 'Email Policy Server' %}"><span>{% trans "Email Policy Server" %}</span></a>#}
|
||||
{# </li>#}
|
||||
{# <li><a href="{% url 'listDomains' %}"#}
|
||||
{# title="{% trans 'Email Limits' %}"><span>{% trans "Email Limits" %}</span></a>#}
|
||||
{# </li>#}
|
||||
{# <li><a href="{% url 'emailPolicyServer' %}"#}
|
||||
{# title="{% trans 'Email Policy Server' %}"><span>{% trans "Email Policy Server" %}</span></a>#}
|
||||
{# </li>#}
|
||||
{# <li><a href="{% url 'listDomains' %}"#}
|
||||
{# title="{% trans 'Email Limits' %}"><span>{% trans "Email Limits" %}</span></a>#}
|
||||
{# </li>#}
|
||||
<li><a href="{% url 'SpamAssassin' %}"
|
||||
title="{% trans 'SpamAssassin Configurations' %}"><span>{% trans "SpamAssassin" %}</span></a>
|
||||
</li>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* Java script code to start/stop litespeed */
|
||||
app.controller('litespeedStatus', function ($scope, $http) {
|
||||
|
||||
@@ -424,6 +423,87 @@ app.controller('readCyberCPLogFile', function ($scope, $http) {
|
||||
|
||||
/* Services */
|
||||
|
||||
|
||||
app.controller('securityrule', function ($scope, $http) {
|
||||
|
||||
$scope.securityruleLoading = true;
|
||||
|
||||
|
||||
$scope.ActivateTags = ['Agents', 'AppsInitialization', 'Backdoor', 'Bruteforce', 'CWAF', 'Domains', 'Drupal', 'FilterASP',
|
||||
'FilterGen', 'FilterInFarme', 'FilterOther', 'FilterPHP', 'FiltersEnd', 'FilterSQL', 'Generic', 'HTTP', 'HTTPDoS',
|
||||
'Incoming', 'Initialzation', 'JComponent', 'Joomla', 'Other', 'OtherApps', 'PHPGen', 'Protocol', 'Request', 'RoRGen',
|
||||
'SQLi', 'WHMCS', 'WordPress', 'WPPlugin', 'XSS']
|
||||
|
||||
$scope.DeactivatedTags = []
|
||||
|
||||
|
||||
$scope.toggleActivation = function (tag) {
|
||||
var index = $scope.ActivateTags.indexOf(tag);
|
||||
if (index > -1) {
|
||||
$scope.ActivateTags.splice(index, 1);
|
||||
$scope.DeactivatedTags.push(tag);
|
||||
} else {
|
||||
index = $scope.DeactivatedTags.indexOf(tag);
|
||||
if (index > -1) {
|
||||
$scope.DeactivatedTags.splice(index, 1);
|
||||
$scope.ActivateTags.push(tag);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$scope.applychanges = function () {
|
||||
|
||||
$scope.securityruleLoading = false;
|
||||
url = "/serverstatus/securityruleUpdate";
|
||||
|
||||
var data = {
|
||||
ActivateTags: $scope.ActivateTags,
|
||||
DeactivatedTags: $scope.DeactivatedTags,
|
||||
RuleID: $scope.ruleID,
|
||||
Regular_expressions: $scope.Regular_expressions
|
||||
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
$scope.securityruleLoading = true;
|
||||
if (response.data.status === 1) {
|
||||
new PNotify({
|
||||
title: 'Done',
|
||||
text: "Changes Applied",
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.securityruleLoading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: 'Could not connect to server, please refresh this page',
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.controller('servicesManager', function ($scope, $http) {
|
||||
|
||||
$scope.services = false;
|
||||
|
||||
170
serverStatus/templates/serverStatus/Switchoffsecurity.html
Normal file
170
serverStatus/templates/serverStatus/Switchoffsecurity.html
Normal file
@@ -0,0 +1,170 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Switch off security - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
|
||||
<style>
|
||||
.tagcontainer {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.tags-container {
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
overflow-y: auto;
|
||||
margin-right: 10px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.tags-label {
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
width: calc(100% - 20px); /* Adjusted width to accommodate the icon */
|
||||
justify-content: space-between;
|
||||
margin: 5px 0; /* Added margin top and bottom */
|
||||
display: flex; /* Added to ensure icon and text are aligned */
|
||||
align-items: center; /* Added to vertically center the icon */
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.tags:hover {
|
||||
background-color: lightblue;
|
||||
}
|
||||
|
||||
.tag-icon {
|
||||
display: none; /* Initially hide the SVG icon */
|
||||
}
|
||||
|
||||
.tags:hover .tag-icon {
|
||||
display: inline-block; /* Show the SVG icon on hover */
|
||||
}
|
||||
|
||||
/* Adjusted SVG styling */
|
||||
svg {
|
||||
flex-shrink: 0; /* Prevent SVG from shrinking */
|
||||
margin-left: 5px; /* Added space between text and icon */
|
||||
}
|
||||
|
||||
.search-input {
|
||||
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><g fill="none" stroke="currentColor"><circle cx="11" cy="11" r="5.5"/><path stroke-linecap="round" stroke-linejoin="round" d="m15 15l4 4"/></g></svg>');
|
||||
background-repeat: no-repeat;
|
||||
background-position: calc(100% - 10px) center;
|
||||
padding-right: 30px; /* Adjust based on the size of your SVG icon */
|
||||
}
|
||||
|
||||
.search-input:focus {
|
||||
outline: none; /* Optional: Remove outline on focus */
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Switch off security rules" %} <img src="{% static 'images/lsON.png' %}"
|
||||
style="margin-bottom: 5px;"></h2>
|
||||
<p>{% trans "Here you can switch off security rules. It is handy if you find out that a security rule is too restrictive for some websites. To deactivate security rules, specify their IDs (for example, 340003 or 340005-340007), tags (for example, CVE-2011-4898), or regular expressions used in rule messages (for example, XSS)." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-controller="securityrule" class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="content-box-header">
|
||||
{% trans "Security Rules" %} <img ng-hide="securityruleLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</h3>
|
||||
<div class="example-box-wrapper">
|
||||
|
||||
<form action="/" id="createPackages"
|
||||
class="form-horizontal bordered-row panel-body">
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Security Rule IDs" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="dom" type="text" class="form-control" ng-model="ruleID"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group tagcontainer">
|
||||
<div>
|
||||
<div class="tags-label">Activate Tags</div>
|
||||
<div class="tags-container">
|
||||
<input type="text" ng-model="tagFilter" placeholder="Search tags"
|
||||
class="search-input">
|
||||
<div ng-repeat="tag in ActivateTags | filter:tagFilter"
|
||||
ng-click="toggleActivation(tag)">
|
||||
<span class="tags">{$ tag $}
|
||||
<svg class="tag-icon" xmlns="http://www.w3.org/2000/svg" width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24">
|
||||
<path fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2" d="m10 17l5-5-5-5"/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tags-label">Deactivated Tags</div>
|
||||
<div class="tags-container">
|
||||
<input type="text" ng-model="deactivatedTagFilter" placeholder="Search tags"
|
||||
class="search-input">
|
||||
<div ng-repeat="tag in DeactivatedTags | filter:deactivatedTagFilter"
|
||||
ng-click="toggleActivation(tag)">
|
||||
<span class="tags">{$ tag $}
|
||||
<svg class="tag-icon" xmlns="http://www.w3.org/2000/svg" width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24">
|
||||
<path fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2" d="m14 7l-5 5 5 5"/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Regular expressions in rule messages " %}</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea name="dom" type="text" class="form-control" ng-model="Regular_expressions"
|
||||
rows="5"
|
||||
required> </textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button
|
||||
type="button" ng-click="applychanges()"
|
||||
class="btn btn-primary btn-lg">{% trans "Save Changes" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -27,4 +27,8 @@ urlpatterns = [
|
||||
url(r'^CyberPanelPort$', views.CyberPanelPort, name='CyberPanelPort'),
|
||||
url(r'^submitPortChange$', views.submitPortChange, name='submitPortChange'),
|
||||
|
||||
|
||||
url(r'^Switchoffsecurity$', views.Switchoffsecurity, name='Switchoffsecurity'),
|
||||
url(r'^securityruleUpdate$', views.securityruleUpdate, name='securityruleUpdate'),
|
||||
|
||||
]
|
||||
@@ -28,11 +28,19 @@ EXPIRE = 3
|
||||
VERSION = '2.3'
|
||||
BUILD = 5
|
||||
|
||||
|
||||
def serverStatusHome(request):
|
||||
proc = httpProc(request, 'serverStatus/index.html',
|
||||
None, 'admin')
|
||||
return proc.render()
|
||||
|
||||
|
||||
def Switchoffsecurity(request):
|
||||
proc = httpProc(request, 'serverStatus/Switchoffsecurity.html',
|
||||
None, 'admin')
|
||||
return proc.render()
|
||||
|
||||
|
||||
def litespeedStatus(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -91,6 +99,7 @@ def litespeedStatus(request):
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[litespeedStatus]")
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def stopOrRestartLitespeed(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -124,10 +133,12 @@ def stopOrRestartLitespeed(request):
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[stopOrRestartLitespeed]")
|
||||
return HttpResponse("Not Logged in as admin")
|
||||
|
||||
|
||||
def cyberCPMainLogFile(request):
|
||||
proc = httpProc(request, 'serverStatus/cybercpmainlogfile.html', None, 'admin')
|
||||
return proc.render()
|
||||
|
||||
|
||||
def getFurtherDataFromLogFile(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -151,6 +162,7 @@ def getFurtherDataFromLogFile(request):
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[getFurtherDataFromLogFile]")
|
||||
return HttpResponse("Not Logged in as admin")
|
||||
|
||||
|
||||
def services(request):
|
||||
data = {}
|
||||
|
||||
@@ -168,6 +180,7 @@ def services(request):
|
||||
proc = httpProc(request, 'serverStatus/services.html', data, 'admin')
|
||||
return proc.render()
|
||||
|
||||
|
||||
def servicesStatus(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -276,6 +289,7 @@ def servicesStatus(request):
|
||||
except KeyError:
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def servicesAction(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -328,6 +342,7 @@ def servicesAction(request):
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
|
||||
def switchTOLSWS(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -361,6 +376,35 @@ def switchTOLSWS(request):
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def securityruleUpdate(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
|
||||
if currentACL['admin'] == 1:
|
||||
pass
|
||||
else:
|
||||
return ACLManager.loadErrorJson('status', 0)
|
||||
|
||||
data = json.loads(request.body)
|
||||
|
||||
ActivateTags = data['ActivateTags']
|
||||
DeactivatedTags = data['DeactivatedTags']
|
||||
RuleID = data['RuleID']
|
||||
Regular_expressions = data['Regular_expressions']
|
||||
|
||||
data_ret = {'status': 1, 'error_message': "None", }
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException as msg:
|
||||
data_ret = {'status': 0, 'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def switchTOLSWSStatus(request):
|
||||
try:
|
||||
|
||||
@@ -387,10 +431,11 @@ def switchTOLSWSStatus(request):
|
||||
except BaseException as msg:
|
||||
command = "sudo rm -f " + serverStatusUtil.ServerStatusUtil.lswsInstallStatusPath
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
data_ret = {'status': 0,'abort': 1, 'requestStatus': str(msg), 'installed': 0}
|
||||
data_ret = {'status': 0, 'abort': 1, 'requestStatus': str(msg), 'installed': 0}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def licenseStatus(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -407,7 +452,8 @@ def licenseStatus(request):
|
||||
serial = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
if serial.find('No such file or directory') > -1:
|
||||
final_dic = {'status': 1, "erroMessage": 0, 'lsSerial': 'Trial License in use.', 'lsexpiration': 'Trial license expires 15 days after activation.'}
|
||||
final_dic = {'status': 1, "erroMessage": 0, 'lsSerial': 'Trial License in use.',
|
||||
'lsexpiration': 'Trial license expires 15 days after activation.'}
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
@@ -427,6 +473,7 @@ def licenseStatus(request):
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
|
||||
def refreshLicense(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -439,7 +486,6 @@ def refreshLicense(request):
|
||||
else:
|
||||
return ACLManager.loadErrorJson('status', 0)
|
||||
|
||||
|
||||
command = 'sudo /usr/local/lsws/bin/lshttpd -V'
|
||||
ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
@@ -512,6 +558,7 @@ def topProcesses(request):
|
||||
proc = httpProc(request, "serverStatus/topProcesses.html", None, 'admin')
|
||||
return proc.render()
|
||||
|
||||
|
||||
def topProcessesStatus(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -586,7 +633,6 @@ def topProcessesStatus(request):
|
||||
memoryInf0[1] = list(filter(None, memoryInf0[1].split(' ')))
|
||||
memoryInf0[2] = list(filter(None, memoryInf0[2].split(' ')))
|
||||
|
||||
|
||||
try:
|
||||
data['totalMemory'] = '%sMB' % (memoryInf0[1][1])
|
||||
except:
|
||||
@@ -606,7 +652,6 @@ def topProcessesStatus(request):
|
||||
except:
|
||||
data['buffCache'] = '%sMB' % ('0')
|
||||
|
||||
|
||||
## Swap
|
||||
|
||||
try:
|
||||
@@ -682,7 +727,7 @@ def topProcessesStatus(request):
|
||||
|
||||
data['TotalDisk'] = '%s GB' % (total // (2 ** 30))
|
||||
data['TotalDiskUsed'] = '%s GB' % (used // (2 ** 30))
|
||||
data['TotalDiskFree'] =' %s GB' % (free // (2 ** 30))
|
||||
data['TotalDiskFree'] = ' %s GB' % (free // (2 ** 30))
|
||||
|
||||
final_json = json.dumps(data)
|
||||
return HttpResponse(final_json)
|
||||
@@ -692,6 +737,7 @@ def topProcessesStatus(request):
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def killProcess(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -721,10 +767,12 @@ def killProcess(request):
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
|
||||
def packageManager(request):
|
||||
proc = httpProc(request, "serverStatus/packageManager.html", None, 'admin')
|
||||
return proc.render()
|
||||
|
||||
|
||||
def fetchPackages(request):
|
||||
try:
|
||||
|
||||
@@ -842,8 +890,7 @@ def fetchPackages(request):
|
||||
|
||||
## make list of packages that need update
|
||||
|
||||
|
||||
#if os.path.exists(ProcessUtilities.debugPath):
|
||||
# if os.path.exists(ProcessUtilities.debugPath):
|
||||
# logging.CyberCPLogFileWriter.writeToFile('All packages: %s' % (str(packages)))
|
||||
|
||||
from s3Backups.s3Backups import S3Backups
|
||||
@@ -896,7 +943,9 @@ def fetchPackages(request):
|
||||
else:
|
||||
lock = 0
|
||||
|
||||
dic = {'package': nowSplitted[0].split('/')[0], 'version': '%s %s' % (nowSplitted[1].split(' ')[1], nowSplitted[1].split(' ')[2]), 'upgrade': upgrade, 'lock': lock}
|
||||
dic = {'package': nowSplitted[0].split('/')[0],
|
||||
'version': '%s %s' % (nowSplitted[1].split(' ')[1], nowSplitted[1].split(' ')[2]),
|
||||
'upgrade': upgrade, 'lock': lock}
|
||||
|
||||
counter = counter + 1
|
||||
if checker == 0:
|
||||
@@ -923,7 +972,6 @@ def fetchPackages(request):
|
||||
else:
|
||||
upgrade = 'Upgrade available'
|
||||
|
||||
|
||||
if details[0].split('.')[0] in locked:
|
||||
lock = 1
|
||||
else:
|
||||
@@ -965,7 +1013,8 @@ def fetchPackages(request):
|
||||
|
||||
json_data = json_data + ']'
|
||||
|
||||
data_ret = {'status': 1, 'packages': json_data, 'pagination': pagination, 'fetchedPackages': counter, 'totalPackages': len(packages)}
|
||||
data_ret = {'status': 1, 'packages': json_data, 'pagination': pagination, 'fetchedPackages': counter,
|
||||
'totalPackages': len(packages)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
@@ -974,6 +1023,7 @@ def fetchPackages(request):
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def fetchPackageDetails(request):
|
||||
try:
|
||||
|
||||
@@ -1004,6 +1054,7 @@ def fetchPackageDetails(request):
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def updatePackage(request):
|
||||
try:
|
||||
|
||||
@@ -1043,6 +1094,7 @@ def updatePackage(request):
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def lockStatus(request):
|
||||
try:
|
||||
|
||||
@@ -1179,7 +1231,7 @@ def submitPortChange(request):
|
||||
|
||||
ProcessUtilities.executioner('systemctl restart lscpd')
|
||||
|
||||
data_ret = {'status': 1,}
|
||||
data_ret = {'status': 1, }
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user