mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix build due to removal of old extended collections (#4779)
This commit is contained in:
1 parent
ac42a6565f
commit
0b1696fe16
8 files changed
+41
-65
No files matched your search
@@ -12,7 +12,7 @@ import { DrawerItem, DrawerTitle } from "../drawer";
|
||||
import { Input } from "../input";
|
||||
import { Button } from "../button";
|
||||
import { Notifications } from "../notifications";
|
||||
import { base64, ObservableToggleSet } from "../../utils";
|
||||
import { base64, toggle } from "../../utils";
|
||||
import { Icon } from "../icon";
|
||||
import { secretsStore } from "./secrets.store";
|
||||
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||
@@ -27,7 +27,7 @@ interface Props extends KubeObjectDetailsProps<Secret> {
|
||||
export class SecretDetails extends React.Component<Props> {
|
||||
@observable isSaving = false;
|
||||
@observable data: { [name: string]: string } = {};
|
||||
revealSecret = new ObservableToggleSet<string>();
|
||||
revealSecret = new Set<string>();
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
@@ -99,7 +99,7 @@ export class SecretDetails extends React.Component<Props> {
|
||||
<Icon
|
||||
material={revealSecret ? "visibility" : "visibility_off"}
|
||||
tooltip={revealSecret ? "Hide" : "Show"}
|
||||
onClick={() => this.revealSecret.toggle(name)}
|
||||
onClick={() => toggle(this.revealSecret, name)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { action, comparer, computed, IReactionDisposer, makeObservable, reaction } from "mobx";
|
||||
import { autoBind, noop, StorageHelper, ToggleSet } from "../../../utils";
|
||||
import { autoBind, noop, StorageHelper, toggle } from "../../../utils";
|
||||
import { KubeObjectStore, KubeObjectStoreLoadingParams } from "../../../../common/k8s-api/kube-object.store";
|
||||
import { Namespace, namespacesApi } from "../../../../common/k8s-api/endpoints/namespaces.api";
|
||||
|
||||
@@ -175,10 +175,10 @@ export class NamespaceStore extends KubeObjectStore<Namespace> {
|
||||
*/
|
||||
@action
|
||||
toggleContext(namespaces: string | string[]) {
|
||||
const nextState = new ToggleSet(this.contextNamespaces);
|
||||
const nextState = new Set(this.contextNamespaces);
|
||||
|
||||
for (const namespace of [namespaces].flat()) {
|
||||
nextState.toggle(namespace);
|
||||
toggle(nextState, namespace);
|
||||
}
|
||||
|
||||
this.dependencies.storage.set([...nextState]);
|
||||
@@ -191,9 +191,9 @@ export class NamespaceStore extends KubeObjectStore<Namespace> {
|
||||
* @param namespace The name of a namespace
|
||||
*/
|
||||
toggleSingle(namespace: string) {
|
||||
const nextState = new ToggleSet(this.contextNamespaces);
|
||||
const nextState = new Set(this.contextNamespaces);
|
||||
|
||||
nextState.toggle(namespace);
|
||||
toggle(nextState, namespace);
|
||||
this.dependencies.storage.set([...nextState]);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,31 +8,17 @@ import "./item-list-layout.scss";
|
||||
import React, { ReactNode } from "react";
|
||||
import { computed, makeObservable, untracked } from "mobx";
|
||||
import type { ConfirmDialogParams } from "../confirm-dialog";
|
||||
import type {
|
||||
TableCellProps,
|
||||
TableProps,
|
||||
TableRowProps,
|
||||
TableSortCallbacks,
|
||||
} from "../table";
|
||||
import {
|
||||
boundMethod,
|
||||
cssNames,
|
||||
IClassName,
|
||||
noop,
|
||||
ObservableToggleSet,
|
||||
StorageHelper,
|
||||
} from "../../utils";
|
||||
import type { TableCellProps, TableProps, TableRowProps, TableSortCallbacks } from "../table";
|
||||
import { boundMethod, cssNames, IClassName, noop, StorageHelper } from "../../utils";
|
||||
import type { AddRemoveButtonsProps } from "../add-remove-buttons";
|
||||
import type { ItemObject, ItemStore } from "../../../common/item.store";
|
||||
import type { SearchInputUrlProps } from "../input";
|
||||
import { Filter, FilterType, pageFilters } from "./page-filters.store";
|
||||
import { PageFiltersList } from "./page-filters-list";
|
||||
import { UserStore } from "../../../common/user-store";
|
||||
import type { NamespaceStore } from "../+namespaces/namespace-store/namespace.store";
|
||||
import namespaceStoreInjectable from "../+namespaces/namespace-store/namespace-store.injectable";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import itemListLayoutStorageInjectable
|
||||
from "./storage.injectable";
|
||||
import itemListLayoutStorageInjectable from "./storage.injectable";
|
||||
import { ItemListLayoutContent } from "./content";
|
||||
import { ItemListLayoutHeader } from "./header";
|
||||
import groupBy from "lodash/groupBy";
|
||||
@@ -142,10 +128,6 @@ class NonInjectedItemListLayout<I extends ItemObject> extends React.Component<It
|
||||
throw new Error("[ItemListLayout]: configurable list require props.tableId to be specified");
|
||||
}
|
||||
|
||||
if (isConfigurable && !UserStore.getInstance().hiddenTableColumns.has(tableId)) {
|
||||
UserStore.getInstance().hiddenTableColumns.set(tableId, new ObservableToggleSet());
|
||||
}
|
||||
|
||||
if (preloadStores) {
|
||||
this.loadStores();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user