-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plugin: Add API health checks (#189)
* add client test staus endpoint * show API connection health messages * show client ip range * add admin js and ignore build directories from the repo * update npm build commands * get api connection status to the browser * enqueue admin js * make sure the backend data is available in the site editor * cleanup status check * cleanup script
- Loading branch information
Showing
11 changed files
with
230 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ node_modules/ | |
*.zip | ||
|
||
/vendor/ | ||
/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
(function ( { wp, wpcloud } ) { | ||
if (!wp || !wpcloud ) { | ||
return; | ||
} | ||
if (!wpcloud.apiConnected) { | ||
wp.data.dispatch('core/notices').createNotice( | ||
'error', | ||
'You are not connected to the WP Cloud API. Station requires a valid API connection to function properly.', // Text string to display. | ||
{ | ||
isDismissible: false, | ||
actions: [ | ||
{ | ||
url: '/wp-admin/admin.php?page=wpcloud_admin_settings', | ||
label: 'WP Cloud Settings', | ||
}, | ||
], | ||
} | ||
); | ||
} | ||
})( window ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.