mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Linter fixes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
81c276f3a3
commit
cc8db57def
@ -1,3 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
// Extensions-api -> Cluster frame custom modal registration
|
// Extensions-api -> Cluster frame custom modal registration
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import type { RenderResult } from "@testing-library/react";
|
import type { RenderResult } from "@testing-library/react";
|
||||||
import { computed, runInAction } from "mobx";
|
import { computed, runInAction } from "mobx";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { ClusterModalRegistration, clusterModalsInjectionToken } from "../../extensions/registries";
|
import type { ClusterModalRegistration } from "../../extensions/registries";
|
||||||
import { ApplicationBuilder, getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
|
import { clusterModalsInjectionToken } from "../../extensions/registries";
|
||||||
|
import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
|
||||||
|
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
|
||||||
|
|
||||||
describe("cluster modal elements", () => {
|
describe("cluster modal elements", () => {
|
||||||
let builder: ApplicationBuilder;
|
let builder: ApplicationBuilder;
|
||||||
@ -50,8 +56,8 @@ const testClusterModalsInjectable = getInjectable({
|
|||||||
id: "test-modal-id",
|
id: "test-modal-id",
|
||||||
Component: () => <div data-testid="test-modal">test modal</div>,
|
Component: () => <div data-testid="test-modal">test modal</div>,
|
||||||
visible: computed(() => true),
|
visible: computed(() => true),
|
||||||
}])
|
}]);
|
||||||
},
|
},
|
||||||
|
|
||||||
injectionToken: clusterModalsInjectionToken
|
injectionToken: clusterModalsInjectionToken,
|
||||||
});
|
});
|
||||||
@ -1,3 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { computed } from "mobx";
|
import { computed } from "mobx";
|
||||||
import { clusterFrameChildComponentInjectionToken } from "../frames/cluster-frame/cluster-frame-child-component-injection-token";
|
import { clusterFrameChildComponentInjectionToken } from "../frames/cluster-frame/cluster-frame-child-component-injection-token";
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { ExtensionRegistrator, extensionRegistratorInjectionToken } from "../../extensions/extension-loader/extension-registrator-injection-token";
|
import type { ExtensionRegistrator } from "../../extensions/extension-loader/extension-registrator-injection-token";
|
||||||
|
import { extensionRegistratorInjectionToken } from "../../extensions/extension-loader/extension-registrator-injection-token";
|
||||||
import type { LensRendererExtension } from "../../extensions/lens-renderer-extension";
|
import type { LensRendererExtension } from "../../extensions/lens-renderer-extension";
|
||||||
|
|
||||||
const clusterModalsRegistratorInjectable = getInjectable({
|
const clusterModalsRegistratorInjectable = getInjectable({
|
||||||
|
|||||||
@ -1,9 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
import { pipeline } from "@ogre-tools/fp";
|
import { pipeline } from "@ogre-tools/fp";
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx";
|
import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx";
|
||||||
import { flatMap } from "lodash/fp";
|
import { flatMap } from "lodash/fp";
|
||||||
import type { IComputedValue } from "mobx";
|
import type { IComputedValue } from "mobx";
|
||||||
import { ClusterModalRegistration, clusterModalsInjectionToken } from "../../extensions/registries";
|
import type { ClusterModalRegistration } from "../../extensions/registries";
|
||||||
|
import { clusterModalsInjectionToken } from "../../extensions/registries";
|
||||||
|
|
||||||
const clusterModalsInjectable = getInjectable({
|
const clusterModalsInjectable = getInjectable({
|
||||||
id: "cluster-modals",
|
id: "cluster-modals",
|
||||||
@ -18,7 +23,7 @@ const clusterModalsInjectable = getInjectable({
|
|||||||
);
|
);
|
||||||
|
|
||||||
return registrations;
|
return registrations;
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dereference = (items: IComputedValue<ClusterModalRegistration[]>) =>
|
const dereference = (items: IComputedValue<ClusterModalRegistration[]>) =>
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
import styles from "./cluster-modals.module.css";
|
import styles from "./cluster-modals.module.css";
|
||||||
|
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
@ -17,7 +21,7 @@ export const NonInjectedClusterModals = ({ clusterModals }: Dependencies) => {
|
|||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
export const ClusterModals = withInjectables<Dependencies>(NonInjectedClusterModals, {
|
export const ClusterModals = withInjectables<Dependencies>(NonInjectedClusterModals, {
|
||||||
getProps: (di, props) => ({
|
getProps: (di, props) => ({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user