mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-17 02:31:09 +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,6 +495,8 @@
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
|
||||
{% if dnsAsWhole %}
|
||||
|
||||
<li class="dnsAsWhole">
|
||||
<a title="{% trans 'DNS' %}">
|
||||
<i class="glyph-icon icon-sitemap"></i>
|
||||
@@ -528,7 +531,8 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if admin or addDeleteRecords %}
|
||||
<li class="addDeleteRecords"><a href="{% url 'addDeleteDNSRecordsCloudFlare' %}"
|
||||
<li class="addDeleteRecords"><a
|
||||
href="{% url 'addDeleteDNSRecordsCloudFlare' %}"
|
||||
title="{% trans 'CloudFlare' %}"><span>{% trans "CloudFlare" %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -537,6 +541,10 @@
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if emailAsWhole %}
|
||||
|
||||
<li class="emailAsWhole">
|
||||
<a href="{% url 'loadEmailHome' %}" title="{% trans 'Email' %}">
|
||||
<i class="glyph-icon icon-paper-plane"></i>
|
||||
@@ -585,6 +593,9 @@
|
||||
</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>
|
||||
@@ -613,6 +624,8 @@
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
|
||||
{% endif¬ %}
|
||||
|
||||
<li>
|
||||
<a href="{% url 'loadBackupHome' %}" title="{% trans 'Backup' %}">
|
||||
<i class="glyph-icon tooltip-button icon-copy" title=".icon-folder"></i>
|
||||
|
||||
@@ -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