diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index 7542b08a8..3fea84603 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -2640,6 +2640,65 @@ app.controller('listWebsites', function ($scope, $http) { }; + $scope.ScanWordpressSite = function () { + + $('#cyberPanelLoading').show(); + + + var url = "/websites/ScanWordpressSite"; + + var data = { + + } + + + var config = { + headers: { + 'X-CSRFToken': getCookie('csrftoken') + } + }; + + + $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas); + + + function ListInitialDatas(response) { + + $('#cyberPanelLoading').hide(); + + if (response.data.status === 1) { + new PNotify({ + title: 'Success!', + text: 'Successfully Saved!.', + type: 'success' + }); + location.reload(); + + } else { + new PNotify({ + title: 'Operation Failed!', + text: response.data.error_message, + type: 'error' + }); + + } + + } + + function cantLoadInitialDatas(response) { + $('#cyberPanelLoading').hide(); + new PNotify({ + title: 'Operation Failed!', + text: response.data.error_message, + type: 'error' + }); + + + } + + + }; + }); diff --git a/websiteFunctions/templates/websiteFunctions/WPsitesList.html b/websiteFunctions/templates/websiteFunctions/WPsitesList.html index 47d60824b..5fd531d2e 100644 --- a/websiteFunctions/templates/websiteFunctions/WPsitesList.html +++ b/websiteFunctions/templates/websiteFunctions/WPsitesList.html @@ -90,8 +90,12 @@
+
{% trans "On this page you can launch, list, modify and delete Wordpress Sites from your server." %}
@@ -190,6 +194,38 @@ + +