mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
commit table
This commit is contained in:
@@ -5794,6 +5794,7 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
$scope.gitTracking = true;
|
$scope.gitTracking = true;
|
||||||
$scope.gitEnable = true;
|
$scope.gitEnable = true;
|
||||||
$scope.statusBox = true;
|
$scope.statusBox = true;
|
||||||
|
$scope.gitCommitsTable = true;
|
||||||
|
|
||||||
var statusFile;
|
var statusFile;
|
||||||
|
|
||||||
@@ -5830,9 +5831,12 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
$scope.remote = response.data.remote;
|
$scope.remote = response.data.remote;
|
||||||
$scope.remoteResult = response.data.remoteResult;
|
$scope.remoteResult = response.data.remoteResult;
|
||||||
$scope.totalCommits = response.data.totalCommits;
|
$scope.totalCommits = response.data.totalCommits;
|
||||||
|
$scope.home = response.data.home;
|
||||||
} else {
|
} else {
|
||||||
$scope.gitTracking = false;
|
$scope.gitTracking = false;
|
||||||
$scope.gitEnable = true;
|
$scope.gitEnable = true;
|
||||||
|
$scope.home = response.data.home;
|
||||||
|
$scope.deploymentKey = response.data.deploymentKey;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
new PNotify({
|
new PNotify({
|
||||||
@@ -6256,12 +6260,21 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function getCreationStatus() {
|
$scope.attachRepoGIT = function () {
|
||||||
|
$scope.cyberpanelLoading = false;
|
||||||
|
$scope.commandStatus = "";
|
||||||
|
$scope.statusBox = false;
|
||||||
|
|
||||||
|
url = "/websites/attachRepoGIT";
|
||||||
|
|
||||||
url = "/websites/installWordpressStatus";
|
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
statusFile: statusFile
|
domain: $("#domain").text(),
|
||||||
|
folder: $scope.folder,
|
||||||
|
gitHost: $scope.gitHost,
|
||||||
|
gitUsername: $scope.gitUsername,
|
||||||
|
gitReponame: $scope.gitReponame,
|
||||||
|
overrideData: $scope.overrideData
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
@@ -6270,62 +6283,199 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
function ListInitialDatas(response) {
|
function ListInitialDatas(response) {
|
||||||
|
|
||||||
|
|
||||||
if (response.data.abort === 1) {
|
|
||||||
|
|
||||||
if (response.data.installStatus === 1) {
|
|
||||||
|
|
||||||
$scope.cyberpanelLoading = true;
|
$scope.cyberpanelLoading = true;
|
||||||
$scope.installationDetailsForm = true;
|
|
||||||
$scope.installationProgress = false;
|
|
||||||
$scope.goBackDisable = false;
|
|
||||||
|
|
||||||
$("#installProgress").css("width", "100%");
|
|
||||||
$scope.installPercentage = "100";
|
|
||||||
$scope.currentStatus = response.data.currentStatus;
|
|
||||||
$timeout.cancel();
|
|
||||||
|
|
||||||
|
if (response.data.status === 1) {
|
||||||
|
new PNotify({
|
||||||
|
title: 'Success',
|
||||||
|
text: 'Changes applied.',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
$scope.commandStatus = response.data.commandStatus;
|
||||||
|
$scope.fetchFolderDetails();
|
||||||
} else {
|
} else {
|
||||||
|
new PNotify({
|
||||||
$scope.cyberpanelLoading = true;
|
title: 'Operation Failed!',
|
||||||
$scope.installationDetailsForm = true;
|
text: response.data.error_message,
|
||||||
$scope.installationProgress = false;
|
type: 'error'
|
||||||
$scope.goBackDisable = false;
|
});
|
||||||
|
$scope.commandStatus = response.data.commandStatus;
|
||||||
$scope.currentStatus = response.data.error_message;
|
|
||||||
|
|
||||||
$("#installProgress").css("width", "0%");
|
|
||||||
$scope.installPercentage = "0";
|
|
||||||
$scope.goBackDisable = false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
$("#installProgress").css("width", response.data.installationProgress + "%");
|
|
||||||
$scope.installPercentage = response.data.installationProgress;
|
|
||||||
$scope.currentStatus = response.data.currentStatus;
|
|
||||||
$timeout(getCreationStatus, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
$scope.cyberpanelLoading = false;
|
||||||
|
new PNotify({
|
||||||
|
title: 'Operation Failed!',
|
||||||
|
text: 'Could not connect to server, please refresh this page.',
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.removeTracking = function () {
|
||||||
|
|
||||||
|
$scope.cyberpanelLoading = false;
|
||||||
|
|
||||||
|
url = "/websites/removeTracking";
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
$scope.cyberpanelLoading = true;
|
||||||
$scope.installationDetailsForm = true;
|
if (response.data.status === 1) {
|
||||||
$scope.installationProgress = false;
|
new PNotify({
|
||||||
$scope.goBackDisable = false;
|
title: 'Success',
|
||||||
|
text: 'Changes applied.',
|
||||||
|
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'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.fetchGitignore = function () {
|
||||||
|
|
||||||
|
$scope.cyberpanelLoading = false;
|
||||||
|
|
||||||
|
url = "/websites/fetchGitignore";
|
||||||
|
|
||||||
|
|
||||||
|
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: 'Successfully fetched.',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
$scope.gitIgnoreContent = response.data.gitIgnoreContent;
|
||||||
|
} 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'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.saveGitIgnore = function () {
|
||||||
|
|
||||||
|
$scope.cyberpanelLoading = false;
|
||||||
|
|
||||||
|
url = "/websites/saveGitIgnore";
|
||||||
|
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
domain: $("#domain").text(),
|
||||||
|
folder: $scope.folder,
|
||||||
|
gitIgnoreContent: $scope.gitIgnoreContent
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
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: 'Successfully saved.',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
} 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'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
/* Java script code to git tracking ends here */
|
/* Java script code to git tracking ends here */
|
||||||
|
|||||||
@@ -5794,6 +5794,7 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
$scope.gitTracking = true;
|
$scope.gitTracking = true;
|
||||||
$scope.gitEnable = true;
|
$scope.gitEnable = true;
|
||||||
$scope.statusBox = true;
|
$scope.statusBox = true;
|
||||||
|
$scope.gitCommitsTable = true;
|
||||||
|
|
||||||
var statusFile;
|
var statusFile;
|
||||||
|
|
||||||
|
|||||||
@@ -625,6 +625,8 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<hr ng-hide="gitCommitsTable">
|
||||||
|
|
||||||
<table ng-hide="gitCommitsTable" style="margin-top: 2%" class="table">
|
<table ng-hide="gitCommitsTable" style="margin-top: 2%" class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user