Skip to content
Browse files
birth of package manager
  • Loading branch information
usmannasir committed Apr 29, 2020
1 parent f54b8fb commit 1e7ffe679bfa200fdcf1998d264845f49ba9e301
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 3 deletions.
@@ -765,6 +765,9 @@
<li><a href="{% url 'services' %}"
title="{% trans 'Services Status' %}"><span>{% trans "Services Status" %}</span></a>
<li><a href="{% url 'packageManager' %}"
title="{% trans 'Package Manager' %}"><span>{% trans "Package Manager" %}</span></a>

</div><!-- .sidebar-submenu -->
@@ -0,0 +1,81 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Package Manager - CyberPanel" %}{% endblock %}
{% block content %}

{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->

<div ng-controller="litespeedStatus" class="container">

<div id="page-title">
<h2>{% trans "Package Manager" %}</h2>
<p>{% trans "On this page you can manage your system packages. On backend system available package manager is used (apt/yum)." %}</p>

<div class="row">
<div class="col-md-12">
<div class="panel">
<div class="panel-body">

<div class="example-box-wrapper">
<ul class="nav-responsive nav nav-tabs">
<li class="dropdown pull-right tabdrop"><a class="dropdown-toggle"
data-toggle="dropdown" href="#"
class="glyph-icon icon-align-justify"></i> <b class="caret"></b></a>
<ul class="dropdown-menu" style="display: none;">
<li><a href="#tab5" data-toggle="tab">Section 5</a></li>
<li><a href="#tab6" data-toggle="tab">Section 6</a></li>
<li><a href="#tab7" data-toggle="tab">Section 7</a></li>
<li><a href="#tab8" data-toggle="tab">Section 8</a></li>
<li><a href="#tab9" data-toggle="tab">Section 9</a></li>
<li class=""><a href="#tab1" data-toggle="tab">Section 1</a></li>
<li class=""><a href="#tab2" data-toggle="tab">Section 2</a></li>
<li class=""><a href="#tab3" data-toggle="tab">Section 3</a></li>
<li class="active"><a href="#tab4" data-toggle="tab">Section 4</a></li>

<div class="tab-content">
<div class="tab-pane" id="tab1">
<p>I'm in Section 1.</p>
<div class="tab-pane" id="tab2">
<p>Howdy, I'm in Section 2.</p>
<div class="tab-pane" id="tab3">
<p>Howdy, I'm in Section 3.</p>
<div class="tab-pane active" id="tab4">
<p>Howdy, I'm in Section 4.</p>
<div class="tab-pane" id="tab5">
<p>Howdy, I'm in Section 5.</p>
<div class="tab-pane" id="tab6">
<p>Howdy, I'm in Section 6.</p>
<div class="tab-pane" id="tab7">
<p>Howdy, I'm in Section 7.</p>
<div class="tab-pane" id="tab8">
<p>Howdy, I'm in Section 8.</p>
<div class="tab-pane" id="tab9">
<p>Howdy, I'm in Section 9.</p>

{% endblock %}
@@ -18,5 +18,6 @@
url(r'^topProcesses$', views.topProcesses, name='topProcesses'),
url(r'^topProcessesStatus$', views.topProcessesStatus, name='topProcessesStatus'),
url(r'^killProcess$', views.killProcess, name='killProcess'),
url(r'^packageManager$', views.packageManager, name='packageManager'),

@@ -505,7 +505,6 @@ def topProcesses(request):
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[litespeedStatus]")
return redirect(loadLoginPage)

def topProcessesStatus(request):
userID = request.session['userID']
@@ -628,7 +627,6 @@ def topProcessesStatus(request):
json_data = json.dumps(data_ret)
return HttpResponse(json_data)

def killProcess(request):
userID = request.session['userID']
@@ -656,4 +654,22 @@ def killProcess(request):
except KeyError as msg:
final_dic = {'status': 0, 'erroMessage': str(msg)}
final_json = json.dumps(final_dic)
return HttpResponse(final_json)
return HttpResponse(final_json)

def packageManager(request):
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)

if currentACL['admin'] == 1:
return ACLManager.loadError()

templateName = "serverStatus/packageManager.html"
proc = httpProc(request, templateName)
return proc.renderPre()

except KeyError as msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[packageManager]")
return redirect(loadLoginPage)

0 comments on commit 1e7ffe6

Please sign in to comment.