From 79e03617775033605a75b9bb533de3ffd5e1e7a7 Mon Sep 17 00:00:00 2001 From: Hassan Hashmi <75794688+habbi-hb@users.noreply.github.com> Date: Mon, 20 Jun 2022 13:27:55 +0500 Subject: [PATCH] wphomechanges --- .../websiteFunctions/websiteFunctions.js | 102 +++++++ .../websiteFunctions/WPsiteHome.html | 273 +++++++++++------- websiteFunctions/urls.py | 3 + websiteFunctions/views.py | 44 +++ websiteFunctions/website.py | 40 +++ 5 files changed, 359 insertions(+), 103 deletions(-) diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index 26051c096..464f48eb9 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -1476,6 +1476,108 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo }; + + $scope.installwpcore = function () { + + $('#wordpresshomeloading').show(); + var data = { + WPid: $('#WPid').html(), + } + + $scope.wordpresshomeloading = false; + + var url = "/websites/installwpcore"; + + var config = { + headers: { + 'X-CSRFToken': getCookie('csrftoken') + } + }; + + + $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas); + + + function ListInitialDatas(response) { + $('#wordpresshomeloading').hide(); + $scope.wordpresshomeloading = true; + + if (response.data.status === 1) { + new PNotify({ + title: 'Success!', + text: 'installwpcore done.', + type: 'success' + }); + } else { + new PNotify({ + title: 'Operation Failed!', + text: response.data.error_message, + type: 'error' + }); + + } + + } + + function cantLoadInitialDatas(response) { + $('#wordpresshomeloading').hide(); + $scope.wordpresshomeloading = true; + alert(response) + + } + + }; + + $scope.dataintegrity = function () { + + $('#wordpresshomeloading').show(); + var data = { + WPid: $('#WPid').html(), + } + + $scope.wordpresshomeloading = false; + + var url = "/websites/dataintegrity"; + + var config = { + headers: { + 'X-CSRFToken': getCookie('csrftoken') + } + }; + + + $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas); + + + function ListInitialDatas(response) { + $('#wordpresshomeloading').hide(); + $scope.wordpresshomeloading = true; + + if (response.data.status === 1) { + new PNotify({ + title: 'Success!', + text: 'dataintegrity done.', + type: 'success' + }); + } else { + new PNotify({ + title: 'Operation Failed!', + text: response.data.error_message, + type: 'error' + }); + + } + + } + + function cantLoadInitialDatas(response) { + $('#wordpresshomeloading').hide(); + $scope.wordpresshomeloading = true; + alert(response) + + } + }; + }); diff --git a/websiteFunctions/templates/websiteFunctions/WPsiteHome.html b/websiteFunctions/templates/websiteFunctions/WPsiteHome.html index 0a6fbec1c..b09bbaeb8 100644 --- a/websiteFunctions/templates/websiteFunctions/WPsiteHome.html +++ b/websiteFunctions/templates/websiteFunctions/WPsiteHome.html @@ -65,7 +65,7 @@ Open +
+
WP Corn
+
+ + +
+
@@ -498,110 +509,53 @@
-
- - - Manage Application - - - - Autoupdate Configurations - +
+ -
@@ -610,6 +564,119 @@
+ + + + + + +