mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
more review comment addressing, added overview to workspace command palette
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
5e7379f187
commit
b756eb3323
@ -46,7 +46,7 @@ export class WorkspaceClusterStore extends ItemStore<ClusterItem> {
|
|||||||
|
|
||||||
const clusterId = cluster.id;
|
const clusterId = cluster.id;
|
||||||
|
|
||||||
return super.removeItem(clusterItem, async () => clusterStore.removeById(clusterId));
|
return super.removeItem(clusterItem, () => clusterStore.removeById(clusterId));
|
||||||
}
|
}
|
||||||
|
|
||||||
async removeSelectedItems() {
|
async removeSelectedItems() {
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
.WorkspaceOverview {
|
.WorkspaceOverview {
|
||||||
|
background-color: var(--mainBackground);
|
||||||
|
|
||||||
.TableCell {
|
.TableCell {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: left;
|
align-items: left;
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import { clusterViewURL } from "../cluster-manager/cluster-view.route";
|
|||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class ChooseWorkspace extends React.Component {
|
export class ChooseWorkspace extends React.Component {
|
||||||
|
private static overviewActionId = "__overview__";
|
||||||
private static addActionId = "__add__";
|
private static addActionId = "__add__";
|
||||||
private static removeActionId = "__remove__";
|
private static removeActionId = "__remove__";
|
||||||
private static editActionId = "__edit__";
|
private static editActionId = "__edit__";
|
||||||
@ -23,6 +24,8 @@ export class ChooseWorkspace extends React.Component {
|
|||||||
return { value: workspace.id, label: workspace.name };
|
return { value: workspace.id, label: workspace.name };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
options.push({ value: ChooseWorkspace.overviewActionId, label: "Workspace: Overview" });
|
||||||
|
|
||||||
options.push({ value: ChooseWorkspace.addActionId, label: "Add workspace ..." });
|
options.push({ value: ChooseWorkspace.addActionId, label: "Add workspace ..." });
|
||||||
|
|
||||||
if (options.length > 1) {
|
if (options.length > 1) {
|
||||||
@ -37,6 +40,13 @@ export class ChooseWorkspace extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onChange(id: string) {
|
onChange(id: string) {
|
||||||
|
if (id === ChooseWorkspace.overviewActionId) {
|
||||||
|
navigate(landingURL()); // overview of active workspace. TODO: change name from landing
|
||||||
|
CommandOverlay.close();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (id === ChooseWorkspace.addActionId) {
|
if (id === ChooseWorkspace.addActionId) {
|
||||||
CommandOverlay.open(<AddWorkspace />);
|
CommandOverlay.open(<AddWorkspace />);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user