mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix merge conflicts
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
98d63daef6
commit
1707a95eef
15 files changed
+57
-61
No files matched your search
@@ -24,11 +24,7 @@ import { action, observable, makeObservable } from "mobx";
|
||||
import { Singleton } from "../../common/utils";
|
||||
import { LensExtension } from "../lens-extension";
|
||||
|
||||
export interface IBaseRegistry<T> {
|
||||
add(items: T | T[], extension?: LensExtension): () => void;
|
||||
}
|
||||
|
||||
export class BaseRegistry<T, I = T> extends Singleton implements IBaseRegistry<T> {
|
||||
export class BaseRegistry<T, I = T> extends Singleton {
|
||||
private items = observable.map<T, I>([], { deep: false });
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import type React from "react";
|
||||
import { BaseRegistry, IBaseRegistry } from "./base-registry";
|
||||
import { BaseRegistry } from "./base-registry";
|
||||
|
||||
export interface KubeObjectMenuComponents {
|
||||
MenuItem: React.ComponentType<any>;
|
||||
@@ -32,11 +32,8 @@ export interface KubeObjectMenuRegistration {
|
||||
components: KubeObjectMenuComponents;
|
||||
}
|
||||
|
||||
export interface IKubeObjectMenuRegistry extends IBaseRegistry<KubeObjectMenuRegistration> {
|
||||
getItemsForKind(kind: string, apiVersion: string): any;
|
||||
}
|
||||
|
||||
export class KubeObjectMenuRegistry extends BaseRegistry<KubeObjectMenuRegistration> implements IKubeObjectMenuRegistry {
|
||||
export class KubeObjectMenuRegistry extends BaseRegistry<KubeObjectMenuRegistration> {
|
||||
getItemsForKind = (kind: string, apiVersion: string) =>
|
||||
this.getItems().filter((item) =>
|
||||
item.kind === kind && item.apiVersions.includes(apiVersion),
|
||||
|
||||
Reference in new issue
Block a user