mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-16 02:06:13 +01:00
This commit is contained in:
@@ -217,68 +217,70 @@
|
||||
<span class="badge bg-red" id="load3">{$ three $}</span>
|
||||
</a>{% endcomment %}
|
||||
|
||||
{# <div class="dropdown" id="dashnav-btn">#}
|
||||
{# <a href="#" data-toggle="dropdown" data-placement="bottom"#}
|
||||
{# class="popover-button-header tooltip-button" title="{% trans 'Dashboard Quick Menu' %}">#}
|
||||
{# <i class="glyph-icon icon-linecons-cog"></i>#}
|
||||
{# </a>#}
|
||||
{# <div class="dropdown-menu float-right">#}
|
||||
{# <div class="box-sm">#}
|
||||
{# <div class="pad5T pad5B pad10L pad10R dashboard-buttons clearfix">#}
|
||||
{# <a href="{% url 'loadWebsitesHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-info" title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-dashboard opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "Websites" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'packagesHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-danger"#}
|
||||
{# title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-tags opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "Packages" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'dnsHome' %}" class="btn vertical-button remove-border btn-purple"#}
|
||||
{# title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-fire opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "DNS" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'loadFTPHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-azure"#}
|
||||
{# title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-bar-chart-o opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "FTP" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'loadTuningHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-yellow" title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-laptop opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "Tuning" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'serverStatusHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-warning" title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-code opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "Status" %}#}
|
||||
{# </a>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
<a class="header-btn" target="_blank" href="https://go.cyberpanel.net/community" title="{% trans 'Community' %}">
|
||||
{# <div class="dropdown" id="dashnav-btn">#}
|
||||
{# <a href="#" data-toggle="dropdown" data-placement="bottom"#}
|
||||
{# class="popover-button-header tooltip-button" title="{% trans 'Dashboard Quick Menu' %}">#}
|
||||
{# <i class="glyph-icon icon-linecons-cog"></i>#}
|
||||
{# </a>#}
|
||||
{# <div class="dropdown-menu float-right">#}
|
||||
{# <div class="box-sm">#}
|
||||
{# <div class="pad5T pad5B pad10L pad10R dashboard-buttons clearfix">#}
|
||||
{# <a href="{% url 'loadWebsitesHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-info" title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-dashboard opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "Websites" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'packagesHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-danger"#}
|
||||
{# title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-tags opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "Packages" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'dnsHome' %}" class="btn vertical-button remove-border btn-purple"#}
|
||||
{# title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-fire opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "DNS" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'loadFTPHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-azure"#}
|
||||
{# title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-bar-chart-o opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "FTP" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'loadTuningHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-yellow" title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-laptop opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "Tuning" %}#}
|
||||
{# </a>#}
|
||||
{# <a href="{% url 'serverStatusHome' %}"#}
|
||||
{# class="btn vertical-button remove-border btn-warning" title="{% trans '' %}">#}
|
||||
{# <span class="glyph-icon icon-separator-vertical pad0A medium">#}
|
||||
{# <i class="glyph-icon icon-code opacity-80 font-size-20"></i>#}
|
||||
{# </span>#}
|
||||
{# {% trans "Status" %}#}
|
||||
{# </a>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
<a class="header-btn" target="_blank" href="https://go.cyberpanel.net/community"
|
||||
title="{% trans 'Community' %}">
|
||||
<i class="glyph-icon icon-comments"></i>
|
||||
</a>
|
||||
<a class="header-btn" target="_blank" href="https://go.cyberpanel.net/support" title="{% trans 'Support' %}">
|
||||
<a class="header-btn" target="_blank" href="https://go.cyberpanel.net/support"
|
||||
title="{% trans 'Support' %}">
|
||||
<i class="glyph-icon icon-support"></i>
|
||||
</a>
|
||||
<a class="header-btn" id="logout-btn" href="{% url 'logout' %}" title="{% trans 'Logout' %}">
|
||||
@@ -286,7 +288,6 @@
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- #header-nav-right -->
|
||||
|
||||
@@ -494,124 +495,136 @@
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
|
||||
<li class="dnsAsWhole">
|
||||
<a title="{% trans 'DNS' %}">
|
||||
<i class="glyph-icon icon-sitemap"></i>
|
||||
<span>{% trans "DNS" %}</span>
|
||||
</a>
|
||||
<div class="sidebar-submenu">
|
||||
{% if dnsAsWhole %}
|
||||
|
||||
<ul>
|
||||
{% if admin or createNameServer %}
|
||||
<li><a href="{% url 'createNameserver' %}"
|
||||
title="{% trans 'Create Nameserver' %}"><span>{% trans "Create Nameserver" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin %}
|
||||
<li><a href="{% url 'configureDefaultNameServers' %}"
|
||||
title="{% trans 'Configure Default Nameservers' %}"><span>{% trans "Config Default Nameservers" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or createDNSZone %}
|
||||
<li><a href="{% url 'createDNSZone' %}"
|
||||
title="{% trans 'Create DNS Zone' %}"><span>{% trans "Create DNS Zone" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or deleteZone %}
|
||||
<li><a href="{% url 'deleteDNSZone' %}"
|
||||
title="{% trans 'Delete Zone' %}"><span>{% trans "Delete Zone" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or addDeleteRecords %}
|
||||
<li><a href="{% url 'addDeleteDNSRecords' %}"
|
||||
title="{% trans 'Add/Delete Records' %}"><span>{% trans "Add/Delete Records" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or addDeleteRecords %}
|
||||
<li class="addDeleteRecords"><a href="{% url 'addDeleteDNSRecordsCloudFlare' %}"
|
||||
title="{% trans 'CloudFlare' %}"><span>{% trans "CloudFlare" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<li class="dnsAsWhole">
|
||||
<a title="{% trans 'DNS' %}">
|
||||
<i class="glyph-icon icon-sitemap"></i>
|
||||
<span>{% trans "DNS" %}</span>
|
||||
</a>
|
||||
<div class="sidebar-submenu">
|
||||
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
<ul>
|
||||
{% if admin or createNameServer %}
|
||||
<li><a href="{% url 'createNameserver' %}"
|
||||
title="{% trans 'Create Nameserver' %}"><span>{% trans "Create Nameserver" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin %}
|
||||
<li><a href="{% url 'configureDefaultNameServers' %}"
|
||||
title="{% trans 'Configure Default Nameservers' %}"><span>{% trans "Config Default Nameservers" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or createDNSZone %}
|
||||
<li><a href="{% url 'createDNSZone' %}"
|
||||
title="{% trans 'Create DNS Zone' %}"><span>{% trans "Create DNS Zone" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or deleteZone %}
|
||||
<li><a href="{% url 'deleteDNSZone' %}"
|
||||
title="{% trans 'Delete Zone' %}"><span>{% trans "Delete Zone" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or addDeleteRecords %}
|
||||
<li><a href="{% url 'addDeleteDNSRecords' %}"
|
||||
title="{% trans 'Add/Delete Records' %}"><span>{% trans "Add/Delete Records" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or addDeleteRecords %}
|
||||
<li class="addDeleteRecords"><a
|
||||
href="{% url 'addDeleteDNSRecordsCloudFlare' %}"
|
||||
title="{% trans 'CloudFlare' %}"><span>{% trans "CloudFlare" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<li class="emailAsWhole">
|
||||
<a href="{% url 'loadEmailHome' %}" title="{% trans 'Email' %}">
|
||||
<i class="glyph-icon icon-paper-plane"></i>
|
||||
<span>{% trans "Email" %}</span>
|
||||
</a>
|
||||
<div class="sidebar-submenu">
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
|
||||
<ul>
|
||||
{% if admin or createEmail %}
|
||||
<li><a href="{% url 'createEmailAccount' %}"
|
||||
title="{% trans 'Create Email Account' %}"><span>{% trans "Create Email" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or listEmails %}
|
||||
<li><a href="{% url 'listEmails' %}"
|
||||
title="{% trans 'List Emails' %}"><span>{% trans "List Emails" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or deleteEmail %}
|
||||
<li><a href="{% url 'deleteEmailAccount' %}"
|
||||
title="{% trans 'Delete Email Account' %}"><span>{% trans "Delete Email" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or emailForwarding %}
|
||||
<li><a href="{% url 'emailForwarding' %}"
|
||||
title="{% trans 'Email Forwarding' %}"><span>{% trans "Email Forwarding" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or changeEmailPassword %}
|
||||
<li><a href="{% url 'changeEmailAccountPassword' %}"
|
||||
title="{% trans 'Change Password' %}"><span>{% trans "Change Password" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or dkimManager %}
|
||||
<li><a href="{% url 'dkimManager' %}"
|
||||
title="{% trans 'DKIM Manager' %}"><span>{% trans "DKIM Manager" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or createEmail %}
|
||||
<li><a href="/rainloop/index.php" title="{% trans 'Access Webmail' %}"
|
||||
target="_blank"><span>{% trans "Access Webmail" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
{% if emailAsWhole %}
|
||||
|
||||
<li class="ftpAsWhole">
|
||||
<a href="{% url 'ftpHome' %}" title="{% trans 'FTP' %}">
|
||||
<i class="glyph-icon icon-cloud-upload"></i>
|
||||
<span>{% trans "FTP" %}</span>
|
||||
</a>
|
||||
<div class="sidebar-submenu">
|
||||
<li class="emailAsWhole">
|
||||
<a href="{% url 'loadEmailHome' %}" title="{% trans 'Email' %}">
|
||||
<i class="glyph-icon icon-paper-plane"></i>
|
||||
<span>{% trans "Email" %}</span>
|
||||
</a>
|
||||
<div class="sidebar-submenu">
|
||||
|
||||
<ul>
|
||||
{% if admin or createFTPAccount %}
|
||||
<li><a href="{% url 'createFTPAccount' %}"
|
||||
title="{% trans 'Create FTP Account' %}"><span>{% trans "Create FTP Account" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or deleteFTPAccount %}
|
||||
<li><a href="{% url 'deleteFTPAccount' %}"
|
||||
title="{% trans 'Delete FTP Account' %}"><span>{% trans "Delete FTP Account" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or listFTPAccounts %}
|
||||
<li><a href="{% url 'listFTPAccounts' %}"
|
||||
title="{% trans 'List FTP Accounts' %}"><span>{% trans "List FTP Accounts" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul>
|
||||
{% if admin or createEmail %}
|
||||
<li><a href="{% url 'createEmailAccount' %}"
|
||||
title="{% trans 'Create Email Account' %}"><span>{% trans "Create Email" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or listEmails %}
|
||||
<li><a href="{% url 'listEmails' %}"
|
||||
title="{% trans 'List Emails' %}"><span>{% trans "List Emails" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or deleteEmail %}
|
||||
<li><a href="{% url 'deleteEmailAccount' %}"
|
||||
title="{% trans 'Delete Email Account' %}"><span>{% trans "Delete Email" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or emailForwarding %}
|
||||
<li><a href="{% url 'emailForwarding' %}"
|
||||
title="{% trans 'Email Forwarding' %}"><span>{% trans "Email Forwarding" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or changeEmailPassword %}
|
||||
<li><a href="{% url 'changeEmailAccountPassword' %}"
|
||||
title="{% trans 'Change Password' %}"><span>{% trans "Change Password" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or dkimManager %}
|
||||
<li><a href="{% url 'dkimManager' %}"
|
||||
title="{% trans 'DKIM Manager' %}"><span>{% trans "DKIM Manager" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or createEmail %}
|
||||
<li><a href="/rainloop/index.php" title="{% trans 'Access Webmail' %}"
|
||||
target="_blank"><span>{% trans "Access Webmail" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
{% if ftpAsWhole %}
|
||||
|
||||
<li class="ftpAsWhole">
|
||||
<a href="{% url 'ftpHome' %}" title="{% trans 'FTP' %}">
|
||||
<i class="glyph-icon icon-cloud-upload"></i>
|
||||
<span>{% trans "FTP" %}</span>
|
||||
</a>
|
||||
<div class="sidebar-submenu">
|
||||
|
||||
<ul>
|
||||
{% if admin or createFTPAccount %}
|
||||
<li><a href="{% url 'createFTPAccount' %}"
|
||||
title="{% trans 'Create FTP Account' %}"><span>{% trans "Create FTP Account" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or deleteFTPAccount %}
|
||||
<li><a href="{% url 'deleteFTPAccount' %}"
|
||||
title="{% trans 'Delete FTP Account' %}"><span>{% trans "Delete FTP Account" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or listFTPAccounts %}
|
||||
<li><a href="{% url 'listFTPAccounts' %}"
|
||||
title="{% trans 'List FTP Accounts' %}"><span>{% trans "List FTP Accounts" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
|
||||
{% endif¬ %}
|
||||
|
||||
<li>
|
||||
<a href="{% url 'loadBackupHome' %}" title="{% trans 'Backup' %}">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
|
||||
from manageServices.models import PDNSStatus
|
||||
from .processUtilities import ProcessUtilities
|
||||
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
@@ -863,3 +864,31 @@ class ACLManager:
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
|
||||
@staticmethod
|
||||
def GetServiceStatus(dic):
|
||||
if os.path.exists('/home/cyberpanel/postfix'):
|
||||
dic['emailAsWhole'] = 1
|
||||
else:
|
||||
dic['emailAsWhole'] = 0
|
||||
|
||||
if os.path.exists('/home/cyberpanel/pureftpd'):
|
||||
dic['ftpAsWhole'] = 1
|
||||
else:
|
||||
dic['ftpAsWhole'] = 0
|
||||
|
||||
try:
|
||||
pdns = PDNSStatus.objects.get(pk=1)
|
||||
dic['dnsAsWhole'] = pdns.serverStatus
|
||||
except:
|
||||
if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu or ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu20:
|
||||
pdnsPath = '/etc/powerdns'
|
||||
else:
|
||||
pdnsPath = '/etc/pdns'
|
||||
|
||||
if os.path.exists(pdnsPath):
|
||||
PDNSStatus(serverStatus=1).save()
|
||||
dic['dnsAsWhole'] = 1
|
||||
else:
|
||||
dic['dnsAsWhole'] = 0
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ class httpProc:
|
||||
except:
|
||||
pass
|
||||
|
||||
ACLManager.GetServiceStatus(self.data)
|
||||
|
||||
self.data.update(currentACL)
|
||||
|
||||
return render(self.request, self.templateName, self.data)
|
||||
|
||||
Reference in New Issue
Block a user