mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
fix(home): redirect home if edge endpoint is down (#4670)
* fix(home): redirect home if edge endpoint is down * fix(kubernetes): rephrase error message when endpoint is down Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io>
This commit is contained in:
parent
c542964073
commit
d1a21ef6c1
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,7 @@ angular.module('portainer.kubernetes', ['portainer.app']).config([
|
|||
}
|
||||
try {
|
||||
if (endpoint.Type === 7) {
|
||||
//edge
|
||||
try {
|
||||
await KubernetesHealthService.ping(endpoint.Id);
|
||||
endpoint.Status = 1;
|
||||
|
@ -27,6 +28,10 @@ angular.module('portainer.kubernetes', ['portainer.app']).config([
|
|||
|
||||
EndpointProvider.setEndpointID(endpoint.Id);
|
||||
await StateManager.updateEndpointState(endpoint, []);
|
||||
|
||||
if (endpoint.Type === 7 && endpoint.Status === 2) {
|
||||
throw new Error('Unable to contact Edge agent, please ensure that the agent is properly running on the remote environment.');
|
||||
}
|
||||
} catch (e) {
|
||||
Notifications.error('Failed loading endpoint', e);
|
||||
$state.go('portainer.home', {}, { reload: true });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue