mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
236 lines
14 KiB
HTML
Executable File
236 lines
14 KiB
HTML
Executable File
{% extends "baseTemplate/index.html" %}
|
|
{% load i18n %}
|
|
{% block title %}{% trans "Manage Git - CyberPanel" %}{% endblock %}
|
|
{% block content %}
|
|
|
|
{% load static %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
|
|
|
<div class="container">
|
|
<div id="page-title">
|
|
<h2>{% trans "Manage GIT" %}</h2>
|
|
<p>{% trans "Manage and track folders via Git for " %} {{ domainName }}.</p>
|
|
</div>
|
|
|
|
|
|
<div ng-controller="manageGIT" class="panel">
|
|
<div class="panel-body">
|
|
<h3 class="title-hero">
|
|
{% trans "Manage and track folders via Git for " %} <span id="domain">{{ domainName }}</span>. <img
|
|
ng-hide="cyberpanelLoading" src="{% static 'images/loading.gif' %}">
|
|
</h3>
|
|
<div class="example-box-wrapper">
|
|
<form action="/" class="form-horizontal bordered-row">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "Select Folder to Track" %} </label>
|
|
<div class="col-sm-6">
|
|
<select ng-change="fetchFolderDetails()" ng-model="folder" class="form-control">
|
|
{% for item in folders %}
|
|
<option>{{ item }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<p style="margin: 2%"
|
|
ng-hide="gitTracking">{% trans "This folder does not have Git tracking, click below to initiate a repository and start tracking files." %}</p>
|
|
<button ng-hide="gitTracking" style="margin-left: 2%" type="button" class="btn btn-primary"
|
|
ng-click="initRepo()">
|
|
Init Repo
|
|
</button>
|
|
|
|
<table ng-hide="gitEnable" style="margin-top: 2%" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Total Commits</th>
|
|
<th>Branch</th>
|
|
<th>Remote</th>
|
|
|
|
<th>Manage</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>{$ totalCommits $}</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">×
|
|
</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 id="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></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div id="showStatus" class="modal fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-body">
|
|
|
|
<form name="containerSettingsForm" action="/" class="form-horizontal">
|
|
<div ng-hide="loadingSticks" class="form-group">
|
|
<div class="col-sm-12">
|
|
<div class="loading-stick">
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<div class="stick bg-azure"></div>
|
|
<h1>Pleas wait...</h1>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-12">
|
|
<textarea rows="3"
|
|
class="form-control">{$ commandStatus $}</textarea>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{% endblock %} |