view commits

This commit is contained in:
Usman Nasir
2020-03-12 18:56:28 +05:00
parent c254164475
commit 79d06972cf
6 changed files with 174 additions and 154 deletions

View File

@@ -43,7 +43,7 @@
<button data-toggle="modal" data-target="#attachExistingRepo" ng-disabled="home==0"
ng-hide="gitTracking" style="margin-left: 2%" type="button" class="btn btn-primary">
Attach Existing Repo <img
ng-hide="cyberpanelLoading" src="{% static 'images/loading.gif' %}">
ng-hide="cyberpanelLoading" src="{% static 'images/loading.gif' %}">
</button>
<div id="attachExistingRepo" class="modal fade" role="dialog">
@@ -384,7 +384,8 @@
<input name="radio-toggle-1" type="radio">
Push To Remote
</a>
<a ng-click="fetchGitignore()" data-toggle="modal" data-target="#gitignore" href="#" class="btn btn-info">
<a ng-click="fetchGitignore()" data-toggle="modal" data-target="#gitignore" href="#"
class="btn btn-info">
<input name="radio-toggle-1" type="radio">
Edit .gitignore
</a>
@@ -403,7 +404,8 @@
<form name="containerSettingsForm" action="/" class="form-horizontal">
<div class="form-group">
<label class="col-sm-12 control-label" style="text-align: center;">{% trans "Contents of .gitignore, use the box below to Add/Edit content of .gitingore file." %}</label>
<label class="col-sm-12 control-label"
style="text-align: center;">{% trans "Contents of .gitignore, use the box below to Add/Edit content of .gitingore file." %}</label>
</div>
<hr>
@@ -411,7 +413,8 @@
<div class="form-group">
<div class="col-sm-12">
<textarea ng-model="gitIgnoreContent" rows="3" class="form-control"></textarea>
<textarea ng-model="gitIgnoreContent" rows="3"
class="form-control"></textarea>
</div>
</div>
@@ -422,8 +425,8 @@
<button type="button"
class="btn btn-primary"
ng-click="saveGitIgnore()">Save<img ng-hide="$parent.cyberpanelLoading"
src="/static/images/loading.gif"
style="display: none;">
src="/static/images/loading.gif"
style="display: none;">
</button>
<button type="button"
class="btn btn-default" data-dismiss="modal">
@@ -452,7 +455,8 @@
<form name="containerSettingsForm" action="/" class="form-horizontal">
<div class="form-group">
<label class="col-sm-13 control-label" style="text-align: center;">{% trans "Removing git tracking is not reversible, it will delete all of your commit history, however your files stays there." %}</label>
<label class="col-sm-13 control-label"
style="text-align: center;">{% trans "Removing git tracking is not reversible, it will delete all of your commit history, however your files stays there." %}</label>
</div>
</form>
@@ -616,7 +620,7 @@
</td>
<td>
<button data-toggle="modal" data-target="#settings" style="margin-left: 2%"
<button ng-click="fetchCommits()" style="margin-left: 2%"
type="button" class="btn btn-primary">
{% trans "View Commits" %}
</button>
@@ -630,149 +634,18 @@
<table ng-hide="gitCommitsTable" style="margin-top: 2%" class="table">
<thead>
<tr>
<th>Total Commits</th>
<th>Branch</th>
<th>Remote</th>
<th>Commits</th>
<th>Commit Hash</th>
<th>Description</th>
<th>Commiter</th>
<th>Commit Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="bs-badge badge-success">{$ totalCommits $}</span>
</td>
<td>
<select ng-change="changeBranch()" ng-model="branchName" class="form-control">
<option ng-repeat="branch in branches track by $index">{$ branch $}</option>
</select>
</td>
<td>
<button data-toggle="modal" data-target="#settings" style="margin-left: 2%"
type="button" class="btn btn-primary">
{% trans "View/Setup Remote" %}
</button>
<div id="settings" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;
</button>
<h4 class="modal-title">{% trans "Setup Remote" %}</h4>
</div>
<div class="modal-body">
<form name="containerSettingsForm" action="/" class="form-horizontal">
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Git Host" %}</label>
<div class="col-sm-6">
<input placeholder="Ex. github.com or gitlab.com"
name="gitHost" type="text" class="form-control"
ng-model="$parent.gitHost" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Username" %}</label>
<div class="col-sm-6">
<input name="gitUsername" type="text" class="form-control"
ng-model="$parent.gitUsername" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Repo Name" %}</label>
<div class="col-sm-6">
<input name="gitReponame" type="text" class="form-control"
ng-model="$parent.gitReponame" required>
</div>
</div>
<hr>
<div class="form-group">
<div class="col-sm-12">
<table class="table">
<thead>
<tr>
<th>{% trans "Current Remote" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="form-group">
<div class="col-sm-12">
<textarea rows="2"
class="form-control">{$ remoteResult $}</textarea>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<hr>
<div class="form-group">
<div class="col-sm-12">
<table class="table">
<thead>
<tr>
<th>{% trans "Deployment Key" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="form-group">
<div class="col-sm-12">
<textarea rows="5"
class="form-control">{$ deploymentKey $}</textarea>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" ng-disabled="savingSettings"
class="btn btn-primary"
ng-click="setupRemote()">Save <img ng-hide="cyberpanelLoading"
src="/static/images/loading.gif"
style="display: none;">
</button>
<button type="button" ng-disabled="savingSettings"
class="btn btn-default" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
</td>
<td>
<button data-toggle="modal" data-target="#settings" style="margin-left: 2%"
type="button" class="btn btn-primary">
{% trans "View Commits" %}
</button>
</td>
<tr ng-repeat="commit in commits track by $index">
<td ng-bind="commit.commit"></td>
<td ng-bind="commit.message"></td>
<td ng-bind="commit.name"></td>
<td ng-bind="commit.date"></td>
</tr>
</tbody>
</table>