mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use ItemObject from list-layout package
Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
This commit is contained in:
parent
933a52d56f
commit
1f04fde82d
@ -3,14 +3,11 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
import autoBind from "auto-bind";
|
||||
import orderBy from "lodash/orderBy";
|
||||
import { action, computed, observable, when, makeObservable } from "mobx";
|
||||
|
||||
export interface ItemObject {
|
||||
getId(): string;
|
||||
getName(): string;
|
||||
}
|
||||
|
||||
export abstract class ItemStore<Item extends ItemObject> {
|
||||
protected defaultSorting = (item: Item) => item.getName();
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import type { ItemObject } from "../../item.store";
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
import type { HelmReleaseDetails } from "./helm-releases.api/request-details.injectable";
|
||||
|
||||
export interface HelmReleaseUpdateDetails {
|
||||
|
||||
@ -22,7 +22,7 @@ import {
|
||||
isTypedArray,
|
||||
isRecord,
|
||||
} from "@k8slens/utilities";
|
||||
import type { ItemObject } from "../item.store";
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
import type { Patch } from "rfc6902";
|
||||
import assert from "assert";
|
||||
import type { JsonObject } from "type-fest";
|
||||
|
||||
@ -13,7 +13,7 @@ import { Icon } from "../icon";
|
||||
import { SubHeader } from "../layout/sub-header";
|
||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||
import { cssNames, prevDefault } from "@k8slens/utilities";
|
||||
import type { ItemObject } from "../../../common/item.store";
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
import { Spinner } from "../spinner";
|
||||
import type { ApiManager } from "../../../common/k8s-api/api-manager";
|
||||
import { KubeObjectAge } from "../kube-object/age";
|
||||
|
||||
@ -19,7 +19,7 @@ import type { AddRemoveButtonsProps } from "../add-remove-buttons";
|
||||
import { AddRemoveButtons } from "../add-remove-buttons";
|
||||
import { NoItems } from "../no-items";
|
||||
import { Spinner } from "../spinner";
|
||||
import type { ItemObject } from "../../../common/item.store";
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
import type { Filter, PageFiltersStore } from "./page-filters/store";
|
||||
import type { LensTheme } from "../../themes/lens-theme";
|
||||
import { MenuActions } from "../menu/menu-actions";
|
||||
|
||||
@ -10,7 +10,7 @@ import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { IClassName } from "@k8slens/utilities";
|
||||
import { cssNames, isDefined } from "@k8slens/utilities";
|
||||
import type { ItemObject } from "../../../common/item.store";
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
import type { Filter } from "./page-filters/store";
|
||||
import type { HeaderCustomizer, HeaderPlaceholders, ItemListStore, SearchFilter } from "./list-layout";
|
||||
import { SearchInputUrl } from "../input";
|
||||
|
||||
@ -14,7 +14,7 @@ import type { TableCellProps, TableProps, TableRowProps, TableSortCallbacks } fr
|
||||
import type { IClassName, SingleOrMany } from "@k8slens/utilities";
|
||||
import { cssNames, noop } from "@k8slens/utilities";
|
||||
import type { AddRemoveButtonsProps } from "../add-remove-buttons";
|
||||
import type { ItemObject } from "../../../common/item.store";
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
import type { SearchInputUrlProps } from "../input";
|
||||
import type { PageFiltersStore } from "./page-filters/store";
|
||||
import { FilterType } from "./page-filters/store";
|
||||
|
||||
@ -29,8 +29,7 @@ import type { ToggleKubeDetailsPane } from "../kube-detail-params/toggle-details
|
||||
import kubeSelectedUrlParamInjectable from "../kube-detail-params/kube-selected-url.injectable";
|
||||
import toggleKubeDetailsPaneInjectable from "../kube-detail-params/toggle-details.injectable";
|
||||
import type { ClusterContext } from "../../cluster-frame-context/cluster-frame-context";
|
||||
import type { KubeObjectListLayoutColumn } from "@k8slens/list-layout";
|
||||
import type { ItemObject } from "../../../common/item.store";
|
||||
import type { KubeObjectListLayoutColumn, ItemObject } from "@k8slens/list-layout";
|
||||
import { kubeObjectListLayoutColumnInjectionToken } from "@k8slens/list-layout";
|
||||
import { sortBy } from "lodash";
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import { getSorted } from "./sorting";
|
||||
import type { TableModel } from "./table-model/table-model";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import tableModelInjectable from "./table-model/table-model.injectable";
|
||||
import type { ItemObject } from "../../../common/item.store";
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
import assert from "assert";
|
||||
import orderByUrlParamInjectable from "./order-by-url-param.injectable";
|
||||
import sortByUrlParamInjectable from "./sort-by-url-param.injectable";
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
import autoBind from "auto-bind";
|
||||
import type { ItemObject } from "../../common/item.store";
|
||||
import type { ItemObject } from "@k8slens/list-layout";
|
||||
|
||||
export type ForwardedPortStatus = "Active" | "Disabled";
|
||||
export interface ForwardedPort {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user