mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-06 18:26:15 +02:00
Merge pull request #868 from usmannasir/v2.1.3-dev
show number of commits on vm
This commit is contained in:
@@ -58,6 +58,8 @@
|
||||
<div class="current-pack col-sm-9" style="margin: 0px!important; padding: 0px!important;">{{ latestBuild }} </div>
|
||||
<label class="col-sm-3 control-label " style="margin: 0px!important; padding: 0px!important;">{% trans "Latest Commit :" %}  </label>
|
||||
<div class="current-pack col-sm-9" style="margin: 0px!important; padding: 0px!important;">{{ latestcomit }} </div>
|
||||
<label class="col-sm-3 control-label " style="margin: 0px!important; padding: 0px!important;">{% trans "# commits since update :" %}  </label>
|
||||
<div class="current-pack col-sm-9" style="margin: 0px!important; padding: 0px!important;">{{ numCommits }} </div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -84,4 +86,4 @@
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -120,6 +120,14 @@ def versionManagment(request):
|
||||
|
||||
Currentcomt = output.rstrip("\n")
|
||||
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")
|
||||
|
||||
if(Currentcomt == latestcomit):
|
||||
notechk = False;
|
||||
@@ -127,7 +135,7 @@ def versionManagment(request):
|
||||
|
||||
template = 'baseTemplate/versionManagment.html'
|
||||
finalData = {'build': currentBuild, 'currentVersion': currentVersion, 'latestVersion': latestVersion,
|
||||
'latestBuild': latestBuild, 'latestcomit': latestcomit, "Currentcomt": Currentcomt, "Notecheck" : notechk }
|
||||
'latestBuild': latestBuild, 'latestcomit': latestcomit, "Currentcomt": Currentcomt, "Notecheck" : notechk, "numCommits": numCommits }
|
||||
|
||||
|
||||
proc = httpProc(request, template, finalData, 'versionManagement')
|
||||
|
||||
Reference in New Issue
Block a user