mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
c3467abe34
commit
17f94c58c7
2 files changed
+6
-10
No files matched your search
@@ -132,9 +132,9 @@ export class Workspace implements WorkspaceModel, WorkspaceState {
|
|||||||
Object.assign(this, state);
|
Object.assign(this, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@action [updateFromModel](model: WorkspaceModel) {
|
[updateFromModel] = action((model: WorkspaceModel) => {
|
||||||
Object.assign(this, model);
|
Object.assign(this, model);
|
||||||
}
|
});
|
||||||
|
|
||||||
toJSON(): WorkspaceModel {
|
toJSON(): WorkspaceModel {
|
||||||
return toJS({
|
return toJS({
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import React from "react";
|
|||||||
import { computed, observable } from "mobx";
|
import { computed, observable } from "mobx";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { clusterStore } from "../../../common/cluster-store";
|
import { clusterStore } from "../../../common/cluster-store";
|
||||||
import { Workspace, workspaceStore } from "../../../common/workspace-store";
|
import { workspaceStore } from "../../../common/workspace-store";
|
||||||
import { WorkspaceOverview } from "./workspace-overview";
|
import { WorkspaceOverview } from "./workspace-overview";
|
||||||
import { PageLayout } from "../layout/page-layout";
|
import { PageLayout } from "../layout/page-layout";
|
||||||
import { Notifications } from "../notifications";
|
import { Notifications } from "../notifications";
|
||||||
@@ -13,13 +13,9 @@ import { Icon } from "../icon";
|
|||||||
export class LandingPage extends React.Component {
|
export class LandingPage extends React.Component {
|
||||||
@observable showHint = true;
|
@observable showHint = true;
|
||||||
|
|
||||||
get workspace(): Workspace {
|
|
||||||
return workspaceStore.currentWorkspace;
|
|
||||||
}
|
|
||||||
|
|
||||||
@computed
|
@computed
|
||||||
get clusters() {
|
get clusters() {
|
||||||
return clusterStore.getByWorkspaceId(this.workspace.id);
|
return clusterStore.getByWorkspaceId(workspaceStore.currentWorkspaceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@@ -36,11 +32,11 @@ export class LandingPage extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const showBackButton = this.clusters.length > 0;
|
const showBackButton = this.clusters.length > 0;
|
||||||
const header = <><Icon svg="logo-lens" big /> <h2>{this.workspace.name}</h2></>;
|
const header = <><Icon svg="logo-lens" big /> <h2>{workspaceStore.currentWorkspace.name}</h2></>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageLayout className="LandingOverview flex" header={header} provideBackButtonNavigation={showBackButton} showOnTop={true}>
|
<PageLayout className="LandingOverview flex" header={header} provideBackButtonNavigation={showBackButton} showOnTop={true}>
|
||||||
<WorkspaceOverview workspace={this.workspace}/>
|
<WorkspaceOverview />
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user