mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: comma-spacing (error) & comma-dangle (error) (#4200)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
02e77afcd1
commit
c6dce043a7
406 files changed
+1590
-1580
No files matched your search
@@ -35,8 +35,8 @@ import { AppPaths } from "../../../../common/app-paths";
|
||||
jest.mock("react-monaco-editor", () => ({
|
||||
monaco: {
|
||||
editor: {
|
||||
getModel: jest.fn()
|
||||
}
|
||||
getModel: jest.fn(),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -58,11 +58,11 @@ jest.mock("electron", () => ({
|
||||
AppPaths.init();
|
||||
|
||||
const initialTabs: DockTab[] = [
|
||||
{ id: "terminal", kind: TabKind.TERMINAL, title: "Terminal", pinned: false, },
|
||||
{ id: "create", kind: TabKind.CREATE_RESOURCE, title: "Create resource", pinned: false, },
|
||||
{ id: "edit", kind: TabKind.EDIT_RESOURCE, title: "Edit resource", pinned: false, },
|
||||
{ id: "install", kind: TabKind.INSTALL_CHART, title: "Install chart", pinned: false, },
|
||||
{ id: "logs", kind: TabKind.POD_LOGS, title: "Logs", pinned: false, },
|
||||
{ id: "terminal", kind: TabKind.TERMINAL, title: "Terminal", pinned: false },
|
||||
{ id: "create", kind: TabKind.CREATE_RESOURCE, title: "Create resource", pinned: false },
|
||||
{ id: "edit", kind: TabKind.EDIT_RESOURCE, title: "Edit resource", pinned: false },
|
||||
{ id: "install", kind: TabKind.INSTALL_CHART, title: "Install chart", pinned: false },
|
||||
{ id: "logs", kind: TabKind.POD_LOGS, title: "Logs", pinned: false },
|
||||
];
|
||||
|
||||
const getComponent = () => (
|
||||
@@ -129,7 +129,7 @@ describe("<DockTabs />", () => {
|
||||
TabKind.CREATE_RESOURCE,
|
||||
TabKind.EDIT_RESOURCE,
|
||||
TabKind.INSTALL_CHART,
|
||||
TabKind.POD_LOGS
|
||||
TabKind.POD_LOGS,
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -170,7 +170,7 @@ describe("<DockTabs />", () => {
|
||||
rerender(getComponent());
|
||||
|
||||
expect(getTabKinds()).toEqual(
|
||||
initialTabs.slice(0, 4).map(tab => tab.kind)
|
||||
initialTabs.slice(0, 4).map(tab => tab.kind),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -191,8 +191,8 @@ describe("<DockTabs />", () => {
|
||||
|
||||
it("disables 'Close To The Right' item if last tab clicked", () => {
|
||||
dockStore.tabs = [
|
||||
{ id: "terminal", kind: TabKind.TERMINAL, title: "Terminal", pinned: false, },
|
||||
{ id: "logs", kind: TabKind.POD_LOGS, title: "Pod Logs", pinned: false, },
|
||||
{ id: "terminal", kind: TabKind.TERMINAL, title: "Terminal", pinned: false },
|
||||
{ id: "logs", kind: TabKind.POD_LOGS, title: "Pod Logs", pinned: false },
|
||||
];
|
||||
const { container, getByText } = renderTabs();
|
||||
const tab = container.querySelectorAll(".Tab")[1];
|
||||
|
||||
@@ -88,7 +88,7 @@ const getFewPodsTabData = (): LogTabData => {
|
||||
describe("<LogResourceSelector />", () => {
|
||||
beforeEach(() => {
|
||||
mockFs({
|
||||
"tmp": {}
|
||||
"tmp": {},
|
||||
});
|
||||
UserStore.createInstance();
|
||||
ThemeStore.createInstance();
|
||||
|
||||
@@ -76,7 +76,7 @@ describe("log tab store", () => {
|
||||
|
||||
logTabStore.createPodTab({
|
||||
selectedPod,
|
||||
selectedContainer
|
||||
selectedContainer,
|
||||
});
|
||||
|
||||
expect(logTabStore.getData(dockStore.selectedTabId)).toEqual({
|
||||
@@ -84,7 +84,7 @@ describe("log tab store", () => {
|
||||
selectedPod,
|
||||
selectedContainer,
|
||||
showTimestamps: false,
|
||||
previous: false
|
||||
previous: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -95,7 +95,7 @@ describe("log tab store", () => {
|
||||
|
||||
logTabStore.createPodTab({
|
||||
selectedPod,
|
||||
selectedContainer
|
||||
selectedContainer,
|
||||
});
|
||||
|
||||
expect(logTabStore.getData(dockStore.selectedTabId)).toEqual({
|
||||
@@ -103,7 +103,7 @@ describe("log tab store", () => {
|
||||
selectedPod,
|
||||
selectedContainer,
|
||||
showTimestamps: false,
|
||||
previous: false
|
||||
previous: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -113,7 +113,7 @@ describe("log tab store", () => {
|
||||
|
||||
logTabStore.createPodTab({
|
||||
selectedPod,
|
||||
selectedContainer
|
||||
selectedContainer,
|
||||
});
|
||||
|
||||
podsStore.items.pop();
|
||||
@@ -123,7 +123,7 @@ describe("log tab store", () => {
|
||||
selectedPod,
|
||||
selectedContainer,
|
||||
showTimestamps: false,
|
||||
previous: false
|
||||
previous: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -133,7 +133,7 @@ describe("log tab store", () => {
|
||||
|
||||
logTabStore.createPodTab({
|
||||
selectedPod,
|
||||
selectedContainer
|
||||
selectedContainer,
|
||||
});
|
||||
|
||||
podsStore.items.push(new Pod(deploymentPod3));
|
||||
@@ -143,7 +143,7 @@ describe("log tab store", () => {
|
||||
selectedPod,
|
||||
selectedContainer,
|
||||
showTimestamps: false,
|
||||
previous: false
|
||||
previous: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -154,7 +154,7 @@ describe("log tab store", () => {
|
||||
|
||||
const id = logTabStore.createPodTab({
|
||||
selectedPod,
|
||||
selectedContainer
|
||||
selectedContainer,
|
||||
});
|
||||
|
||||
podsStore.items.clear();
|
||||
|
||||
@@ -27,7 +27,7 @@ export const dockerPod = {
|
||||
name: "dockerExporter",
|
||||
creationTimestamp: "dummy",
|
||||
resourceVersion: "dummy",
|
||||
namespace: "default"
|
||||
namespace: "default",
|
||||
},
|
||||
spec: {
|
||||
initContainers: [] as any,
|
||||
@@ -35,8 +35,8 @@ export const dockerPod = {
|
||||
{
|
||||
name: "docker-exporter",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
}
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
],
|
||||
serviceAccountName: "dummy",
|
||||
serviceAccount: "dummy",
|
||||
@@ -52,7 +52,7 @@ export const dockerPod = {
|
||||
hostIP: "dummy",
|
||||
podIP: "dummy",
|
||||
startTime: "dummy",
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const deploymentPod1 = {
|
||||
@@ -71,32 +71,32 @@ export const deploymentPod1 = {
|
||||
uid: "uuid",
|
||||
controller: true,
|
||||
blockOwnerDeletion: true,
|
||||
}]
|
||||
}],
|
||||
},
|
||||
spec: {
|
||||
initContainers: [
|
||||
{
|
||||
name: "init-node-exporter",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
{
|
||||
name: "init-node-exporter-1",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
}
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
],
|
||||
containers: [
|
||||
{
|
||||
name: "node-exporter",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
{
|
||||
name: "node-exporter-1",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
}
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
],
|
||||
serviceAccountName: "dummy",
|
||||
serviceAccount: "dummy",
|
||||
@@ -112,7 +112,7 @@ export const deploymentPod1 = {
|
||||
hostIP: "dummy",
|
||||
podIP: "dummy",
|
||||
startTime: "dummy",
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const deploymentPod2 = {
|
||||
@@ -131,32 +131,32 @@ export const deploymentPod2 = {
|
||||
uid: "uuid",
|
||||
controller: true,
|
||||
blockOwnerDeletion: true,
|
||||
}]
|
||||
}],
|
||||
},
|
||||
spec: {
|
||||
initContainers: [
|
||||
{
|
||||
name: "init-node-exporter",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
{
|
||||
name: "init-node-exporter-1",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
}
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
],
|
||||
containers: [
|
||||
{
|
||||
name: "node-exporter",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
{
|
||||
name: "node-exporter-1",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
}
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
],
|
||||
serviceAccountName: "dummy",
|
||||
serviceAccount: "dummy",
|
||||
@@ -172,7 +172,7 @@ export const deploymentPod2 = {
|
||||
hostIP: "dummy",
|
||||
podIP: "dummy",
|
||||
startTime: "dummy",
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const deploymentPod3 = {
|
||||
@@ -191,20 +191,20 @@ export const deploymentPod3 = {
|
||||
uid: "uuid",
|
||||
controller: true,
|
||||
blockOwnerDeletion: true,
|
||||
}]
|
||||
}],
|
||||
},
|
||||
spec: {
|
||||
containers: [
|
||||
{
|
||||
name: "node-exporter",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
{
|
||||
name: "node-exporter-1",
|
||||
image: "docker.io/prom/node-exporter:v1.0.0-rc.0",
|
||||
imagePullPolicy: "pull"
|
||||
}
|
||||
imagePullPolicy: "pull",
|
||||
},
|
||||
],
|
||||
serviceAccountName: "dummy",
|
||||
serviceAccount: "dummy",
|
||||
@@ -220,5 +220,5 @@ export const deploymentPod3 = {
|
||||
hostIP: "dummy",
|
||||
podIP: "dummy",
|
||||
startTime: "dummy",
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -32,7 +32,7 @@ import { dockStore, DockTabCreateSpecific, TabKind } from "./dock.store";
|
||||
export class CreateResourceStore extends DockTabStore<string> {
|
||||
constructor() {
|
||||
super({
|
||||
storageKey: "create_resource"
|
||||
storageKey: "create_resource",
|
||||
});
|
||||
autoBind(this);
|
||||
fs.ensureDirSync(this.userTemplatesFolder);
|
||||
@@ -53,9 +53,9 @@ export class CreateResourceStore extends DockTabStore<string> {
|
||||
}
|
||||
|
||||
groupTemplates(templates: string[], templatesPath: string, defaultGroup: string) {
|
||||
return groupBy(templates,(v:string) =>
|
||||
path.relative(templatesPath,v).split(path.sep).length>1
|
||||
? path.parse(path.relative(templatesPath,v)).dir
|
||||
return groupBy(templates, (v:string) =>
|
||||
path.relative(templatesPath, v).split(path.sep).length>1
|
||||
? path.parse(path.relative(templatesPath, v)).dir
|
||||
: defaultGroup);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export class CreateResourceStore extends DockTabStore<string> {
|
||||
const userTemplates = await this.getTemplates(this.userTemplatesFolder, "ungrouped");
|
||||
const lensTemplates = await this.getTemplates(this.lensTemplatesFolder, "lens");
|
||||
|
||||
return { ...userTemplates,...lensTemplates };
|
||||
return { ...userTemplates, ...lensTemplates };
|
||||
}
|
||||
|
||||
async watchUserTemplates(callback: ()=> void){
|
||||
@@ -71,8 +71,8 @@ export class CreateResourceStore extends DockTabStore<string> {
|
||||
depth: 1,
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish: {
|
||||
stabilityThreshold: 500
|
||||
}
|
||||
stabilityThreshold: 500,
|
||||
},
|
||||
}).on("all", () => {
|
||||
callback();
|
||||
});
|
||||
|
||||
@@ -45,7 +45,7 @@ interface Props {
|
||||
|
||||
@observer
|
||||
export class CreateResource extends React.Component<Props> {
|
||||
@observable currentTemplates:Map<string,SelectOption> = new Map();
|
||||
@observable currentTemplates:Map<string, SelectOption> = new Map();
|
||||
@observable error = "";
|
||||
@observable templates:GroupSelectOption<SelectOption>[] = [];
|
||||
|
||||
@@ -89,8 +89,8 @@ export class CreateResource extends React.Component<Props> {
|
||||
|
||||
onSelectTemplate = (item: SelectOption) => {
|
||||
this.currentTemplates.set(this.tabId, item);
|
||||
fs.readFile(item.value,"utf8").then(v => {
|
||||
createResourceStore.setData(this.tabId,v);
|
||||
fs.readFile(item.value, "utf8").then(v => {
|
||||
createResourceStore.setData(this.tabId, v);
|
||||
monacoModelsManager.getModel(this.tabId).setValue(v ?? "");
|
||||
});
|
||||
};
|
||||
|
||||
@@ -271,7 +271,7 @@ export class DockStore implements DockStorageState {
|
||||
id,
|
||||
kind,
|
||||
pinned,
|
||||
title
|
||||
title,
|
||||
};
|
||||
|
||||
// add monaco model
|
||||
|
||||
@@ -71,7 +71,7 @@ export class EditResourceStore extends DockTabStore<EditingResource> {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
delay: 100 // make sure all kube-object stores are initialized
|
||||
delay: 100, // make sure all kube-object stores are initialized
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -74,7 +74,7 @@ export class InfoPanel extends Component<Props> {
|
||||
disposeOnUnmount(this, [
|
||||
reaction(() => this.props.tabId, () => {
|
||||
this.waiting = false;
|
||||
})
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export class InstallChartStore extends DockTabStore<IChartInstallData> {
|
||||
|
||||
constructor() {
|
||||
super({
|
||||
storageKey: "install_charts"
|
||||
storageKey: "install_charts",
|
||||
});
|
||||
makeObservable(this);
|
||||
autorun(() => {
|
||||
|
||||
@@ -82,8 +82,8 @@ export class InstallChart extends Component<Props> {
|
||||
navigate(releaseURL({
|
||||
params: {
|
||||
name: release.name,
|
||||
namespace: release.namespace
|
||||
}
|
||||
namespace: release.namespace,
|
||||
},
|
||||
}));
|
||||
dockStore.closeTab(this.tabId);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export class LogList extends React.Component<Props> {
|
||||
disposeOnUnmount(this, [
|
||||
reaction(() => this.props.logs, this.onLogsInitialLoad),
|
||||
reaction(() => this.props.logs, this.onLogsUpdate),
|
||||
reaction(() => this.props.logs, this.onUserScrolledUp)
|
||||
reaction(() => this.props.logs, this.onUserScrolledUp),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ export class LogList extends React.Component<Props> {
|
||||
<React.Fragment key={piece + index}>
|
||||
<span dangerouslySetInnerHTML={{ __html: ansiToHtml(piece) }} />
|
||||
{overlay}
|
||||
</React.Fragment>
|
||||
</React.Fragment>,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export const LogResourceSelector = observer((props: Props) => {
|
||||
save({
|
||||
selectedContainer: containers
|
||||
.concat(initContainers)
|
||||
.find(container => container.name === option.value)
|
||||
.find(container => container.name === option.value),
|
||||
});
|
||||
reload();
|
||||
};
|
||||
@@ -65,7 +65,7 @@ export const LogResourceSelector = observer((props: Props) => {
|
||||
return items.map(item => {
|
||||
return {
|
||||
value: item,
|
||||
label: item
|
||||
label: item,
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -73,19 +73,19 @@ export const LogResourceSelector = observer((props: Props) => {
|
||||
const containerSelectOptions = [
|
||||
{
|
||||
label: `Containers`,
|
||||
options: getSelectOptions(containers.map(container => container.name))
|
||||
options: getSelectOptions(containers.map(container => container.name)),
|
||||
},
|
||||
{
|
||||
label: `Init Containers`,
|
||||
options: getSelectOptions(initContainers.map(container => container.name)),
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
const podSelectOptions = [
|
||||
{
|
||||
label: pod.getOwnerRefs()[0]?.name,
|
||||
options: getSelectOptions(pods.map(pod => pod.metadata.name))
|
||||
}
|
||||
options: getSelectOptions(pods.map(pod => pod.metadata.name)),
|
||||
},
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -49,7 +49,7 @@ interface WorkloadLogsTabData {
|
||||
export class LogTabStore extends DockTabStore<LogTabData> {
|
||||
constructor() {
|
||||
super({
|
||||
storageKey: "pod_logs"
|
||||
storageKey: "pod_logs",
|
||||
});
|
||||
|
||||
reaction(() => podsStore.items.length, () => this.updateTabsData());
|
||||
@@ -63,7 +63,7 @@ export class LogTabStore extends DockTabStore<LogTabData> {
|
||||
return this.createLogsTab(title, {
|
||||
pods: pods.length ? pods : [selectedPod],
|
||||
selectedPod,
|
||||
selectedContainer
|
||||
selectedContainer,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export class LogTabStore extends DockTabStore<LogTabData> {
|
||||
this.createLogsTab(title, {
|
||||
pods,
|
||||
selectedPod,
|
||||
selectedContainer
|
||||
selectedContainer,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ export class LogTabStore extends DockTabStore<LogTabData> {
|
||||
this.setData(id, {
|
||||
...data,
|
||||
showTimestamps: false,
|
||||
previous: false
|
||||
previous: false,
|
||||
});
|
||||
|
||||
return id;
|
||||
@@ -127,7 +127,7 @@ export class LogTabStore extends DockTabStore<LogTabData> {
|
||||
...tabData,
|
||||
selectedPod,
|
||||
selectedContainer,
|
||||
pods
|
||||
pods,
|
||||
});
|
||||
|
||||
this.renameTab(tabId);
|
||||
@@ -135,7 +135,7 @@ export class LogTabStore extends DockTabStore<LogTabData> {
|
||||
this.closeTab(tabId);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error(`[LOG-TAB-STORE]: failed to set data for tabId=${tabId} deleting`, error,);
|
||||
logger.error(`[LOG-TAB-STORE]: failed to set data for tabId=${tabId} deleting`, error);
|
||||
this.data.delete(tabId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export class LogStore {
|
||||
|
||||
const message = [
|
||||
`Failed to load logs: ${error.message}`,
|
||||
`Reason: ${error.reason} (${error.code})`
|
||||
`Reason: ${error.reason} (${error.code})`,
|
||||
];
|
||||
|
||||
this.refresher.stop();
|
||||
@@ -79,7 +79,7 @@ export class LogStore {
|
||||
load = async (tabId: TabId) => {
|
||||
try {
|
||||
const logs = await this.loadLogs(tabId, {
|
||||
tailLines: this.lines + logLinesToLoad
|
||||
tailLines: this.lines + logLinesToLoad,
|
||||
});
|
||||
|
||||
this.refresher.start();
|
||||
@@ -103,7 +103,7 @@ export class LogStore {
|
||||
try {
|
||||
const oldLogs = this.podLogs.get(tabId);
|
||||
const logs = await this.loadLogs(tabId, {
|
||||
sinceTime: this.getLastSinceTime(tabId)
|
||||
sinceTime: this.getLastSinceTime(tabId),
|
||||
});
|
||||
|
||||
// Add newly received logs to bottom
|
||||
@@ -131,7 +131,7 @@ export class LogStore {
|
||||
...params,
|
||||
timestamps: true, // Always setting timestamp to separate old logs from new ones
|
||||
container: selectedContainer.name,
|
||||
previous
|
||||
previous,
|
||||
});
|
||||
|
||||
return result.trimEnd().split("\n");
|
||||
|
||||
@@ -43,8 +43,8 @@ export class TerminalWindow extends React.Component<Props> {
|
||||
componentDidMount() {
|
||||
disposeOnUnmount(this, [
|
||||
reaction(() => this.props.tab.id, tabId => this.activate(tabId), {
|
||||
fireImmediately: true
|
||||
})
|
||||
fireImmediately: true,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ export class Terminal {
|
||||
cursorBlink: true,
|
||||
cursorStyle: "bar",
|
||||
fontSize: 13,
|
||||
fontFamily: "RobotoMono"
|
||||
fontFamily: "RobotoMono",
|
||||
});
|
||||
|
||||
// enable terminal addons
|
||||
@@ -130,7 +130,7 @@ export class Terminal {
|
||||
|
||||
this.disposers.push(
|
||||
reaction(() => ThemeStore.getInstance().activeTheme.colors, this.setTheme, {
|
||||
fireImmediately: true
|
||||
fireImmediately: true,
|
||||
}),
|
||||
dockStore.onResize(this.onResize),
|
||||
() => onDataHandler.dispose(),
|
||||
|
||||
@@ -43,7 +43,7 @@ export class UpgradeChartStore extends DockTabStore<IChartUpgradeData> {
|
||||
|
||||
constructor() {
|
||||
super({
|
||||
storageKey: "chart_releases"
|
||||
storageKey: "chart_releases",
|
||||
});
|
||||
|
||||
makeObservable(this);
|
||||
@@ -108,7 +108,7 @@ export class UpgradeChartStore extends DockTabStore<IChartUpgradeData> {
|
||||
|
||||
await Promise.all([
|
||||
!releaseStore.isLoaded && releaseStore.loadFromContextNamespaces(),
|
||||
!values && this.loadValues(tabId)
|
||||
!values && this.loadValues(tabId),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ export function createUpgradeChartTab(release: HelmRelease, tabParams: DockTabCr
|
||||
|
||||
upgradeChartStore.setData(tab.id, {
|
||||
releaseName: release.getName(),
|
||||
releaseNamespace: release.getNs()
|
||||
releaseNamespace: release.getNs(),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export class UpgradeChart extends React.Component<Props> {
|
||||
this.loadVersions();
|
||||
|
||||
disposeOnUnmount(this, [
|
||||
reaction(() => this.release, () => this.loadVersions())
|
||||
reaction(() => this.release, () => this.loadVersions()),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user