-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cluster dashboard opening and state refreshing #1006
Conversation
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
@@ -110,7 +111,7 @@ export class Cluster implements ClusterModel { | |||
|
|||
protected bindEvents() { | |||
logger.info(`[CLUSTER]: bind events`, this.getMeta()); | |||
const refreshTimer = setInterval(() => this.online && this.refresh(), 30000); // every 30s | |||
const refreshTimer = setInterval(() => !this.disconnected && this.refresh(), 30000); // every 30s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to refresh connection status even when cluster is offline/not accessible, to get dashboard opened automatically when the connection comes back online.
@@ -44,8 +44,8 @@ export class App extends React.Component { | |||
const clusterId = getHostedClusterId(); | |||
logger.info(`[APP]: Init dashboard, clusterId=${clusterId}, frameId=${frameId}`) | |||
await Terminal.preloadFonts() | |||
await clusterIpc.activate.invokeFromRenderer(clusterId, frameId); | |||
await getHostedCluster().whenReady; // cluster.refresh() is done at this point | |||
await clusterIpc.setFrameId.invokeFromRenderer(clusterId, frameId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClusterStatus component will activate the cluster so at this point we only need to sync frame id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Fix cluster dashboard opening and state refreshing Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Fix cluster dashboard opening and state refreshing Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Fix cluster dashboard opening and state refreshing (#1006) Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This PR fixes cluster dashboard opening so that auth proxy is not opened multiple times. Also cluster state is refreshed now also when cluster is not accessible/online, to automatically get cluster dashboard back when the cluster connection comes back.
Cluster overview does not try to refresh events and metrics anymore if cluster is not available.
Signed-off-by: Lauri Nevala lauri.nevala@gmail.com