mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enforce semicolons in eslint
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
1 parent
0f3f5611ba
commit
1477bb8274
531 files changed
+3979
-3975
No files matched your search
@@ -35,16 +35,16 @@ export class HelmChartDetails extends Component<Props> {
|
||||
}
|
||||
|
||||
chartUpdater = autorun(() => {
|
||||
this.selectedChart = null
|
||||
const { chart: { name, repo, version } } = this.props
|
||||
this.selectedChart = null;
|
||||
const { chart: { name, repo, version } } = this.props;
|
||||
helmChartsApi.get(repo, name, version).then(result => {
|
||||
this.readme = result.readme
|
||||
this.chartVersions = result.versions
|
||||
this.selectedChart = result.versions[0]
|
||||
this.readme = result.readme;
|
||||
this.chartVersions = result.versions;
|
||||
this.selectedChart = result.versions[0];
|
||||
},
|
||||
error => {
|
||||
this.error = error;
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
@autobind()
|
||||
@@ -55,7 +55,7 @@ export class HelmChartDetails extends Component<Props> {
|
||||
try {
|
||||
this.chartPromise?.cancel();
|
||||
const { chart: { name, repo } } = this.props;
|
||||
const { readme } = await (this.chartPromise = helmChartsApi.get(repo, name, version))
|
||||
const { readme } = await (this.chartPromise = helmChartsApi.get(repo, name, version));
|
||||
this.readme = readme;
|
||||
} catch (error) {
|
||||
this.error = error;
|
||||
@@ -65,7 +65,7 @@ export class HelmChartDetails extends Component<Props> {
|
||||
@autobind()
|
||||
install() {
|
||||
createInstallChartTab(this.selectedChart);
|
||||
this.props.hideDetails()
|
||||
this.props.hideDetails();
|
||||
}
|
||||
|
||||
renderIntroduction() {
|
||||
@@ -112,14 +112,14 @@ export class HelmChartDetails extends Component<Props> {
|
||||
|
||||
renderReadme() {
|
||||
if (this.readme === null) {
|
||||
return <Spinner center />
|
||||
return <Spinner center />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="chart-description">
|
||||
<MarkdownViewer markdown={this.readme} />
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
renderContent() {
|
||||
@@ -132,7 +132,7 @@ export class HelmChartDetails extends Component<Props> {
|
||||
<div className="box grow">
|
||||
<p className="error">{this.error}</p>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import semver from "semver"
|
||||
import semver from "semver";
|
||||
import { observable } from "mobx";
|
||||
import { autobind } from "../../utils";
|
||||
import { HelmChart, helmChartsApi } from "../../api/endpoints/helm-charts.api";
|
||||
import { ItemStore } from "../../item.store";
|
||||
import flatten from "lodash/flatten"
|
||||
import flatten from "lodash/flatten";
|
||||
|
||||
export interface IChartVersion {
|
||||
repo: string;
|
||||
@@ -24,7 +24,7 @@ export class HelmChartStore extends ItemStore<HelmChart> {
|
||||
|
||||
protected sortVersions = (versions: IChartVersion[]) => {
|
||||
return versions.sort((first, second) => {
|
||||
return semver.compare(second.version, first.version)
|
||||
return semver.compare(second.version, first.version);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -38,8 +38,8 @@ export class HelmChartStore extends ItemStore<HelmChart> {
|
||||
return versions.map(chart => ({
|
||||
repo: repo,
|
||||
version: chart.getVersion()
|
||||
}))
|
||||
})
|
||||
}));
|
||||
});
|
||||
};
|
||||
if (!this.isLoaded) {
|
||||
await this.loadAll();
|
||||
|
||||
@@ -4,11 +4,11 @@ import { appsRoute } from "../+apps/apps.route";
|
||||
|
||||
export const helmChartsRoute: RouteProps = {
|
||||
path: appsRoute.path + "/charts/:repo?/:chartName?"
|
||||
}
|
||||
};
|
||||
|
||||
export interface IHelmChartsRouteParams {
|
||||
chartName?: string;
|
||||
repo?: string;
|
||||
}
|
||||
|
||||
export const helmChartsURL = buildURL<IHelmChartsRouteParams>(helmChartsRoute.path)
|
||||
export const helmChartsURL = buildURL<IHelmChartsRouteParams>(helmChartsRoute.path);
|
||||
@@ -28,13 +28,13 @@ export class HelmCharts extends Component<Props> {
|
||||
}
|
||||
|
||||
get selectedChart() {
|
||||
const { match: { params: { chartName, repo } } } = this.props
|
||||
const { match: { params: { chartName, repo } } } = this.props;
|
||||
return helmChartStore.getByName(chartName, repo);
|
||||
}
|
||||
|
||||
showDetails = (chart: HelmChart) => {
|
||||
if (!chart) {
|
||||
navigation.merge(helmChartsURL())
|
||||
navigation.merge(helmChartsURL());
|
||||
}
|
||||
else {
|
||||
navigation.merge(helmChartsURL({
|
||||
@@ -42,7 +42,7 @@ export class HelmCharts extends Component<Props> {
|
||||
chartName: chart.getName(),
|
||||
repo: chart.getRepository(),
|
||||
}
|
||||
}))
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user