mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 13:56:01 +01:00
This commit is contained in:
@@ -5836,7 +5836,7 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
$scope.autoCommitCurrent = response.data.autoCommitCurrent;
|
$scope.autoCommitCurrent = response.data.autoCommitCurrent;
|
||||||
$scope.autoPushCurrent = response.data.autoPushCurrent;
|
$scope.autoPushCurrent = response.data.autoPushCurrent;
|
||||||
$scope.emailLogsCurrent = response.data.emailLogsCurrent;
|
$scope.emailLogsCurrent = response.data.emailLogsCurrent;
|
||||||
$scope.currentCommands = response.data.commands;
|
document.getElementById("currentCommands").value = response.data.commands;
|
||||||
$scope.webhookCommandCurrent = response.data.webhookCommandCurrent;
|
$scope.webhookCommandCurrent = response.data.webhookCommandCurrent;
|
||||||
} else {
|
} else {
|
||||||
$scope.gitTracking = false;
|
$scope.gitTracking = false;
|
||||||
@@ -6677,17 +6677,40 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
|
|
||||||
url = "/websites/saveGitConfigurations";
|
url = "/websites/saveGitConfigurations";
|
||||||
|
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
domain: $("#domain").text(),
|
domain: $("#domain").text(),
|
||||||
folder: $scope.folder,
|
folder: $scope.folder,
|
||||||
autoCommit: $scope.autoCommit,
|
autoCommit: $scope.autoCommit,
|
||||||
autoPush: $scope.autoPush,
|
autoPush: $scope.autoPush,
|
||||||
emailLogs: $scope.emailLogs,
|
emailLogs: $scope.emailLogs,
|
||||||
commands: $scope.commands,
|
commands: document.getElementById("currentCommands").value,
|
||||||
webhookCommand: $scope.webhookCommand
|
webhookCommand: $scope.webhookCommand
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ($scope.autoCommit === undefined){
|
||||||
|
$scope.autoCommitCurrent = 'Never';
|
||||||
|
}else{
|
||||||
|
$scope.autoCommitCurrent = $scope.autoCommit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($scope.autoPush === undefined){
|
||||||
|
$scope.autoPushCurrent = 'Never';
|
||||||
|
}else{
|
||||||
|
$scope.autoPushCurrent = $scope.autoPush;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($scope.emailLogs === undefined){
|
||||||
|
$scope.emailLogsCurrent = false;
|
||||||
|
}else{
|
||||||
|
$scope.emailLogsCurrent = $scope.emailLogs;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($scope.webhookCommand === undefined){
|
||||||
|
$scope.webhookCommandCurrent = false;
|
||||||
|
}else{
|
||||||
|
$scope.webhookCommandCurrent = $scope.webhookCommand;
|
||||||
|
}
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRFToken': getCookie('csrftoken')
|
'X-CSRFToken': getCookie('csrftoken')
|
||||||
|
|||||||
@@ -5836,7 +5836,7 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
$scope.autoCommitCurrent = response.data.autoCommitCurrent;
|
$scope.autoCommitCurrent = response.data.autoCommitCurrent;
|
||||||
$scope.autoPushCurrent = response.data.autoPushCurrent;
|
$scope.autoPushCurrent = response.data.autoPushCurrent;
|
||||||
$scope.emailLogsCurrent = response.data.emailLogsCurrent;
|
$scope.emailLogsCurrent = response.data.emailLogsCurrent;
|
||||||
$scope.currentCommands = response.data.commands;
|
document.getElementById("currentCommands").value = response.data.commands;
|
||||||
$scope.webhookCommandCurrent = response.data.webhookCommandCurrent;
|
$scope.webhookCommandCurrent = response.data.webhookCommandCurrent;
|
||||||
} else {
|
} else {
|
||||||
$scope.gitTracking = false;
|
$scope.gitTracking = false;
|
||||||
@@ -6677,17 +6677,40 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
|
|
||||||
url = "/websites/saveGitConfigurations";
|
url = "/websites/saveGitConfigurations";
|
||||||
|
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
domain: $("#domain").text(),
|
domain: $("#domain").text(),
|
||||||
folder: $scope.folder,
|
folder: $scope.folder,
|
||||||
autoCommit: $scope.autoCommit,
|
autoCommit: $scope.autoCommit,
|
||||||
autoPush: $scope.autoPush,
|
autoPush: $scope.autoPush,
|
||||||
emailLogs: $scope.emailLogs,
|
emailLogs: $scope.emailLogs,
|
||||||
commands: $scope.commands,
|
commands: document.getElementById("currentCommands").value,
|
||||||
webhookCommand: $scope.webhookCommand
|
webhookCommand: $scope.webhookCommand
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ($scope.autoCommit === undefined){
|
||||||
|
$scope.autoCommitCurrent = 'Never';
|
||||||
|
}else{
|
||||||
|
$scope.autoCommitCurrent = $scope.autoCommit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($scope.autoPush === undefined){
|
||||||
|
$scope.autoPushCurrent = 'Never';
|
||||||
|
}else{
|
||||||
|
$scope.autoPushCurrent = $scope.autoPush;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($scope.emailLogs === undefined){
|
||||||
|
$scope.emailLogsCurrent = false;
|
||||||
|
}else{
|
||||||
|
$scope.emailLogsCurrent = $scope.emailLogs;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($scope.webhookCommand === undefined){
|
||||||
|
$scope.webhookCommandCurrent = false;
|
||||||
|
}else{
|
||||||
|
$scope.webhookCommandCurrent = $scope.webhookCommand;
|
||||||
|
}
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRFToken': getCookie('csrftoken')
|
'X-CSRFToken': getCookie('csrftoken')
|
||||||
|
|||||||
@@ -189,8 +189,7 @@
|
|||||||
<option>Weekly</option>
|
<option>Weekly</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="current-pack ng-binding">Currently: {$ autoCommitCurrent
|
<div class="current-pack ng-binding">Currently: {$ autoCommitCurrent $}
|
||||||
$}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -234,10 +233,9 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">{% trans "Commands" %}</label>
|
<label class="col-sm-3 control-label">{% trans "Commands" %}</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<textarea ng-model="$parent.commands"
|
<textarea id="currentCommands"
|
||||||
placeholder="Add Commands to run after every commit, each line must contain one command only."
|
|
||||||
rows="4"
|
rows="4"
|
||||||
class="form-control">{$ currentCommands $}</textarea>
|
class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user