mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
clean-up/update "todo/fixme-comments"
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
b1e6f8da19
commit
51901183cf
@ -61,7 +61,7 @@ export class BaseStore<T = any> extends Singleton {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const storedModel = Object.assign({}, this.storeConfig.store);
|
const storedModel = Object.assign({}, this.storeConfig.store);
|
||||||
Reflect.deleteProperty(storedModel, "__internal__"); // fixme: avoid "external-internals"
|
Reflect.deleteProperty(storedModel, "__internal__"); // todo: avoid "external-internals"
|
||||||
logger.info(`[STORE]: LOADED from ${this.storeConfig.path}`);
|
logger.info(`[STORE]: LOADED from ${this.storeConfig.path}`);
|
||||||
this.fromStore(storedModel);
|
this.fromStore(storedModel);
|
||||||
this.isLoaded = true;
|
this.isLoaded = true;
|
||||||
@ -69,8 +69,7 @@ export class BaseStore<T = any> extends Singleton {
|
|||||||
|
|
||||||
protected async save(model: T) {
|
protected async save(model: T) {
|
||||||
logger.info(`[STORE]: SAVING ${this.name}`);
|
logger.info(`[STORE]: SAVING ${this.name}`);
|
||||||
// todo: avoid multiple file updates
|
// todo: update when fixed https://github.com/sindresorhus/conf/issues/114
|
||||||
// fixme: https://github.com/sindresorhus/conf/issues/114
|
|
||||||
Object.entries(model).forEach(([key, value]) => {
|
Object.entries(model).forEach(([key, value]) => {
|
||||||
this.storeConfig.set(key, value);
|
this.storeConfig.set(key, value);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export interface IpcMessageOpts<A extends any[] = any> {
|
|||||||
channel: IpcChannel
|
channel: IpcChannel
|
||||||
webContentId?: number; // sends to single webContents view
|
webContentId?: number; // sends to single webContents view
|
||||||
filter?: (webContent: WebContents) => boolean
|
filter?: (webContent: WebContents) => boolean
|
||||||
timeout?: number; // fixme: add support
|
timeout?: number; // todo: add support
|
||||||
args?: A;
|
args?: A;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ export class SelfSubjectRulesReview extends KubeObject {
|
|||||||
static kind = "SelfSubjectRulesReview"
|
static kind = "SelfSubjectRulesReview"
|
||||||
|
|
||||||
spec: {
|
spec: {
|
||||||
// fixme: add more types from api docs
|
// todo: add more types from api docs
|
||||||
namespace?: string;
|
namespace?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import get from "lodash/get";
|
import get from "lodash/get";
|
||||||
import { IKubeObjectMetadata, KubeObject } from "./kube-object";
|
import { KubeObject } from "./kube-object";
|
||||||
|
|
||||||
interface IToleration {
|
interface IToleration {
|
||||||
key?: string;
|
key?: string;
|
||||||
@ -47,9 +47,7 @@ export interface IAffinity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class WorkloadKubeObject extends KubeObject {
|
export class WorkloadKubeObject extends KubeObject {
|
||||||
|
spec: any; // todo: add proper types
|
||||||
// fixme: add type
|
|
||||||
spec: any;
|
|
||||||
|
|
||||||
getSelectors(): string[] {
|
getSelectors(): string[] {
|
||||||
const selector = this.spec.selector;
|
const selector = this.spec.selector;
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export class CrdList extends React.Component {
|
|||||||
if (selectedGroups.length == 1) placeholder = <><Trans>Group</Trans>: {selectedGroups[0]}</>
|
if (selectedGroups.length == 1) placeholder = <><Trans>Group</Trans>: {selectedGroups[0]}</>
|
||||||
if (selectedGroups.length >= 2) placeholder = <><Trans>Groups</Trans>: {selectedGroups.join(", ")}</>
|
if (selectedGroups.length >= 2) placeholder = <><Trans>Groups</Trans>: {selectedGroups.join(", ")}</>
|
||||||
return {
|
return {
|
||||||
// fixme: move to global filters
|
// todo: move to global filters
|
||||||
filters: (
|
filters: (
|
||||||
<Select
|
<Select
|
||||||
className="group-select"
|
className="group-select"
|
||||||
|
|||||||
@ -11,11 +11,9 @@ import { DrawerItem } from "../drawer";
|
|||||||
import { KubeObjectDetailsProps } from "../kube-object";
|
import { KubeObjectDetailsProps } from "../kube-object";
|
||||||
import { apiManager } from "../../api/api-manager";
|
import { apiManager } from "../../api/api-manager";
|
||||||
import { crdStore } from "./crd.store";
|
import { crdStore } from "./crd.store";
|
||||||
import { KubeObject } from "../../api/kube-object";
|
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
||||||
|
|
||||||
// fixme: provide type-safe check for status
|
interface Props extends KubeObjectDetailsProps {
|
||||||
interface Props extends KubeObjectDetailsProps<KubeObject & { status: any }> {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import { Animate } from "../animate";
|
|||||||
import { cssNames, noop, stopPropagation } from "../../utils";
|
import { cssNames, noop, stopPropagation } from "../../utils";
|
||||||
import { navigation } from "../../navigation";
|
import { navigation } from "../../navigation";
|
||||||
|
|
||||||
|
// todo: refactor + handle animation-end in props.onClose()?
|
||||||
|
|
||||||
export interface DialogProps {
|
export interface DialogProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
isOpen?: boolean;
|
isOpen?: boolean;
|
||||||
@ -24,7 +26,6 @@ interface DialogState {
|
|||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fixme: handle animation end props.onClose() (await props.close()?)
|
|
||||||
@observer
|
@observer
|
||||||
export class Dialog extends React.PureComponent<DialogProps, DialogState> {
|
export class Dialog extends React.PureComponent<DialogProps, DialogState> {
|
||||||
private contentElem: HTMLElement;
|
private contentElem: HTMLElement;
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { autobind, cssNames } from "../../utils";
|
|||||||
import { Animate } from "../animate";
|
import { Animate } from "../animate";
|
||||||
|
|
||||||
// todo: refactor -- better positioning + remove "flying effect"
|
// todo: refactor -- better positioning + remove "flying effect"
|
||||||
// fixme: always render outside of parent element ("overflow: auto" should not affect tooltip)
|
// todo: always render outside of parent element ("overflow: auto" should not affect tooltip)
|
||||||
|
|
||||||
export interface TooltipProps {
|
export interface TooltipProps {
|
||||||
htmlFor: string;
|
htmlFor: string;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user