mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix cluster dashboard opening when cluster is initally offline (#1042)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
44ce51613b
commit
abe6a4e0b1
@ -184,6 +184,9 @@ export class Cluster implements ClusterModel {
|
|||||||
this.refreshEvents(),
|
this.refreshEvents(),
|
||||||
this.refreshAllowedResources(),
|
this.refreshAllowedResources(),
|
||||||
]);
|
]);
|
||||||
|
if (!this.ready) {
|
||||||
|
this.ready = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.pushState();
|
this.pushState();
|
||||||
}
|
}
|
||||||
@ -234,7 +237,7 @@ export class Cluster implements ClusterModel {
|
|||||||
const apiUrl = this.kubeProxyUrl + path;
|
const apiUrl = this.kubeProxyUrl + path;
|
||||||
return request(apiUrl, {
|
return request(apiUrl, {
|
||||||
json: true,
|
json: true,
|
||||||
timeout: 5000,
|
timeout: 30000,
|
||||||
...options,
|
...options,
|
||||||
headers: {
|
headers: {
|
||||||
Host: `${this.id}.${new URL(this.kubeProxyUrl).host}`, // required in ClusterManager.getClusterForRequest()
|
Host: `${this.id}.${new URL(this.kubeProxyUrl).host}`, // required in ClusterManager.getClusterForRequest()
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { hasLoadedView } from "./lens-views";
|
|||||||
export class ClusterView extends React.Component {
|
export class ClusterView extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const cluster = getMatchedCluster();
|
const cluster = getMatchedCluster();
|
||||||
const showStatus = cluster && (!cluster.available || !hasLoadedView(cluster.id))
|
const showStatus = cluster && (!cluster.available || !hasLoadedView(cluster.id) || !cluster.ready)
|
||||||
return (
|
return (
|
||||||
<div className="ClusterView">
|
<div className="ClusterView">
|
||||||
{showStatus && (
|
{showStatus && (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user