From 96d74dde044e34d44daa9d14660610274a57f7c1 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sat, 30 Apr 2022 01:26:19 +0500 Subject: [PATCH] reverse number of commits --- .../baseTemplate/versionManagment.html | 128 ++++++++++-------- baseTemplate/views.py | 18 +-- 2 files changed, 77 insertions(+), 69 deletions(-) diff --git a/baseTemplate/templates/baseTemplate/versionManagment.html b/baseTemplate/templates/baseTemplate/versionManagment.html index f0326dbd7..433c9b915 100755 --- a/baseTemplate/templates/baseTemplate/versionManagment.html +++ b/baseTemplate/templates/baseTemplate/versionManagment.html @@ -3,87 +3,95 @@ {% block title %}{% trans "Version Management - CyberPanel" %}"{% endblock %} {% block content %} -{% load static %} + {% load static %} -
-
-

{% trans "Version Management" %}

-

{% trans "On this page you can manage versions and or upgrade to latest version of CyberPanel" %}

-
- {% if Notecheck %} +
+
+

{% trans "Version Management" %}

+

{% trans "On this page you can manage versions and or upgrade to latest version of CyberPanel" %}

+
+ {% if Notecheck %}
-

{% trans "Note: Latest commit does not match, please upgrade." %}

+

{% trans "Note: Latest commit does not match, please upgrade." %}

{% endif %} -
-
-

- CyberPanel -

-
+
+
+

+ CyberPanel +

+
-
-
+ +
- -
{{ currentVersion }}
+ +
{{ currentVersion }}
-
+
+
+ +
{{ build }}
+ +
{{ Currentcomt }}
-
- -
{{ build }}
- -
{{ Currentcomt }}
- -
+
+
+ +
{{ latestVersion }}
-
- -
{{ latestVersion }}
+ +
+ + +
+ +
{{ latestBuild }}
+ +
{{ latestcomit }}
+ {% comment %} +
{{ numCommits }}
{% endcomment %} + +
+ + +
+
+ +
+
+ + +
- - -
- -
{{ latestBuild }}
- -
{{ latestcomit }}
- -
{{ numCommits }}
- -
- - -
-
- -
-
- - - - - - - - +
+ +
-
- - - -
{% endblock %} diff --git a/baseTemplate/views.py b/baseTemplate/views.py index c1bd9b7f3..a27c4172a 100755 --- a/baseTemplate/views.py +++ b/baseTemplate/views.py @@ -119,18 +119,18 @@ def versionManagment(request): output = ProcessUtilities.outputExecutioner(command) Currentcomt = output.rstrip("\n") - notechk = True; + notechk = True - command ="git fetch" - output = ProcessUtilities.outputExecutioner(command) - - command ="git -C /usr/local/CyberCP/ log %s..%s --pretty=oneline | wc -l" % ( Currentcomt, latestcomit) - output = ProcessUtilities.outputExecutioner(command) - - numCommits = output.rstrip("\n") + # command ="git fetch -C /usr/local/CyberCP/" + # output = ProcessUtilities.outputExecutioner(command) + # + # command ="git -C /usr/local/CyberCP/ log %s..%s --pretty=oneline | wc -l" % ( Currentcomt, latestcomit) + # output = ProcessUtilities.outputExecutioner(command) + # + # numCommits = output.rstrip("\n") if(Currentcomt == latestcomit): - notechk = False; + notechk = False template = 'baseTemplate/versionManagment.html'