mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Improve naming
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
bef83d15e2
commit
78397d7f5c
@ -9,7 +9,7 @@ import catalogEntitySettingItemsInjectable from "./settings.injectable";
|
|||||||
export type HasCatalogEntitySettingItems = (entity: CatalogEntity) => boolean;
|
export type HasCatalogEntitySettingItems = (entity: CatalogEntity) => boolean;
|
||||||
|
|
||||||
const hasCatalogEntitySettingItemsInjectable = getInjectable({
|
const hasCatalogEntitySettingItemsInjectable = getInjectable({
|
||||||
id: "has-catalog-entity-settings",
|
id: "has-catalog-entity-setting-items",
|
||||||
instantiate: (di): HasCatalogEntitySettingItems => (entity) => {
|
instantiate: (di): HasCatalogEntitySettingItems => (entity) => {
|
||||||
const items = di.inject(catalogEntitySettingItemsInjectable, entity);
|
const items = di.inject(catalogEntitySettingItemsInjectable, entity);
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ interface Dependencies {
|
|||||||
getClusterById: GetClusterById;
|
getClusterById: GetClusterById;
|
||||||
}
|
}
|
||||||
|
|
||||||
function NonInjectedProxyKubernetesClusterSettings({ entity, getClusterById }: EntitySettingViewProps & Dependencies) {
|
function NonInjectedNamespaceKubernetesClusterSettings({ entity, getClusterById }: EntitySettingViewProps & Dependencies) {
|
||||||
const cluster = getClusterById(entity.getId());
|
const cluster = getClusterById(entity.getId());
|
||||||
|
|
||||||
if (!cluster) {
|
if (!cluster) {
|
||||||
@ -29,7 +29,7 @@ function NonInjectedProxyKubernetesClusterSettings({ entity, getClusterById }: E
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const NamespaceKubernetesClusterSettings = withInjectables<Dependencies, EntitySettingViewProps>(NonInjectedProxyKubernetesClusterSettings, {
|
const NamespaceKubernetesClusterSettings = withInjectables<Dependencies, EntitySettingViewProps>(NonInjectedNamespaceKubernetesClusterSettings, {
|
||||||
getProps: (di, props) => ({
|
getProps: (di, props) => ({
|
||||||
...props,
|
...props,
|
||||||
getClusterById: di.inject(getClusterByIdInjectable),
|
getClusterById: di.inject(getClusterByIdInjectable),
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import type { CatalogEntity } from "../../api/catalog-entity";
|
|||||||
import { entitySettingInjectionToken } from "./token";
|
import { entitySettingInjectionToken } from "./token";
|
||||||
|
|
||||||
const catalogEntitySettingItemsInjectable = getInjectable({
|
const catalogEntitySettingItemsInjectable = getInjectable({
|
||||||
id: "entity-settings",
|
id: "catalog-entity-setting-items",
|
||||||
instantiate: (di, entity) => {
|
instantiate: (di, entity) => {
|
||||||
const computedInjectMany = di.inject(computedInjectManyInjectable);
|
const computedInjectMany = di.inject(computedInjectManyInjectable);
|
||||||
const items = computedInjectMany(entitySettingInjectionToken);
|
const items = computedInjectMany(entitySettingInjectionToken);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user