diff --git a/websiteFunctions/templates/websiteFunctions/WPsitesList.html b/websiteFunctions/templates/websiteFunctions/WPsitesList.html index 14298a370..0a8f4f7fc 100644 --- a/websiteFunctions/templates/websiteFunctions/WPsitesList.html +++ b/websiteFunctions/templates/websiteFunctions/WPsitesList.html @@ -87,6 +87,42 @@ } }; + $scope.ScanWordpressSite = function () { + $('#cyberPanelLoading').show(); + var url = "{% url 'ScanWordpressSite' %}"; + var data = {}; + var config = { + headers: { + 'X-CSRFToken': getCookie('csrftoken') + } + }; + + $http.post(url, data, config).then(function(response) { + $('#cyberPanelLoading').hide(); + if (response.data.status === 1) { + new PNotify({ + title: 'Success!', + text: 'WordPress sites scanned successfully!', + type: 'success' + }); + location.reload(); + } else { + new PNotify({ + title: 'Operation Failed!', + text: response.data.error_message, + type: 'error' + }); + } + }, function(response) { + $('#cyberPanelLoading').hide(); + new PNotify({ + title: 'Operation Failed!', + text: response.data.error_message, + type: 'error' + }); + }); + }; + $scope.updateSetting = function(site, setting) { var settingMap = { 'search-indexing': 'searchIndex', @@ -355,6 +391,7 @@

{% trans "WordPress Sites" %}

+ Install WordPress
@@ -602,6 +639,4 @@ margin-left: 4px; } -{% endblock content %} - - +{% endblock content %} \ No newline at end of file