bug fix: add path to git commands

This commit is contained in:
Usman Nasir
2020-03-09 08:59:57 +05:00
parent bf255dcb90
commit 91af462271
5 changed files with 134 additions and 4 deletions

View File

@@ -5825,6 +5825,7 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
$scope.gitEnable = false;
$scope.branches = response.data.finalBranches;
$scope.deploymentKey = response.data.deploymentKey;
$scope.remote = response.data.remote;
} else {
$scope.gitTracking = false;
$scope.gitEnable = true;
@@ -5853,6 +5854,61 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
};
$scope.initRepo = function () {
$scope.cyberpanelLoading = false;
url = "/websites/initRepo";
var data = {
domain: $("#domain").text(),
folder: $scope.folder
};
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
$scope.cyberpanelLoading = true;
if (response.data.status === 1) {
new PNotify({
title: 'Success',
text: 'Repo initiated.',
type: 'success'
});
$scope.fetchFolderDetails();
} else {
new PNotify({
title: 'Operation Failed!',
text: response.data.error_message,
type: 'error'
});
}
}
function cantLoadInitialDatas(response) {
$scope.cyberpanelLoading = true;
new PNotify({
title: 'Operation Failed!',
text: 'Could not connect to server, please refresh this page.',
type: 'error'
});
}
};
function getCreationStatus() {
url = "/websites/installWordpressStatus";