Usman Nasir
2022-02-28 15:09:15 +05:00
parent 4c3db218c1
commit 332d1f1e02
3 changed files with 215 additions and 171 deletions

View File

@@ -275,10 +275,12 @@
{# </div>#}
{# </div>#}
{# </div>#}
<a class="header-btn" target="_blank" href="https://go.cyberpanel.net/community" title="{% trans 'Community' %}">
<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>

View File

@@ -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

View File

@@ -55,6 +55,8 @@ class httpProc:
except:
pass
ACLManager.GetServiceStatus(self.data)
self.data.update(currentACL)
return render(self.request, self.templateName, self.data)