mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove lingui (#1874)
* remove lingui Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * babelless Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * tweak ts-loader options Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * tweak renderer webpack config Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
050603a7b3
commit
a03da3c572
163 files changed
+1140
-12003
No files matched your search
@@ -3,7 +3,6 @@ import "./cronjob-details.scss";
|
||||
import React from "react";
|
||||
import kebabCase from "lodash/kebabCase";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||
import { Badge } from "../badge/badge";
|
||||
import { jobStore } from "../+workloads-jobs/job.store";
|
||||
@@ -35,25 +34,25 @@ export class CronJobDetails extends React.Component<Props> {
|
||||
return (
|
||||
<div className="CronJobDetails">
|
||||
<KubeObjectMeta object={cronJob}/>
|
||||
<DrawerItem name={<Trans>Schedule</Trans>}>
|
||||
<DrawerItem name="Schedule">
|
||||
{cronJob.isNeverRun() ? (
|
||||
<>
|
||||
<Trans>never</Trans> ({cronJob.getSchedule()})
|
||||
never ({cronJob.getSchedule()})
|
||||
</>
|
||||
) : cronJob.getSchedule()}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Active</Trans>}>
|
||||
<DrawerItem name="Active">
|
||||
{cronJobStore.getActiveJobsNum(cronJob)}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Suspend</Trans>}>
|
||||
<DrawerItem name="Suspend">
|
||||
{cronJob.getSuspendFlag()}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Last schedule</Trans>}>
|
||||
<DrawerItem name="Last schedule">
|
||||
{cronJob.getLastScheduleTime()}
|
||||
</DrawerItem>
|
||||
{childJobs.length > 0 &&
|
||||
<>
|
||||
<DrawerTitle title={<Trans>Jobs</Trans>}/>
|
||||
<DrawerTitle title="Jobs"/>
|
||||
{childJobs.map((job: Job) => {
|
||||
const selectors = job.getSelectors();
|
||||
const condition = job.getCondition();
|
||||
@@ -65,7 +64,7 @@ export class CronJobDetails extends React.Component<Props> {
|
||||
{job.getName()}
|
||||
</Link>
|
||||
</div>
|
||||
<DrawerItem name={<Trans>Condition</Trans>} className="conditions" labelsOnly>
|
||||
<DrawerItem name="Condition" className="conditions" labelsOnly>
|
||||
{condition && (
|
||||
<Badge
|
||||
label={condition.type}
|
||||
@@ -73,7 +72,7 @@ export class CronJobDetails extends React.Component<Props> {
|
||||
/>
|
||||
)}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Selector</Trans>} labelsOnly>
|
||||
<DrawerItem name="Selector" labelsOnly>
|
||||
{
|
||||
selectors.map(label => <Badge key={label} label={label}/>)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import "./cronjob-trigger-dialog.scss";
|
||||
import React, { Component } from "react";
|
||||
import { observable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { Dialog, DialogProps } from "../dialog";
|
||||
import { Wizard, WizardStep } from "../wizard";
|
||||
import { CronJob, cronJobApi, jobApi } from "../../api/endpoints";
|
||||
@@ -80,7 +79,7 @@ export class CronJobTriggerDialog extends Component<Props> {
|
||||
return (
|
||||
<>
|
||||
<div className="flex gaps">
|
||||
<Trans>Job name</Trans>:
|
||||
Job name:
|
||||
</div>
|
||||
<div className="flex gaps">
|
||||
<Input
|
||||
@@ -101,7 +100,7 @@ export class CronJobTriggerDialog extends Component<Props> {
|
||||
const cronjobName = this.cronjob ? this.cronjob.getName() : "";
|
||||
const header = (
|
||||
<h5>
|
||||
<Trans>Trigger CronJob <span>{cronjobName}</span></Trans>
|
||||
Trigger CronJob <span>{cronjobName}</span>
|
||||
</h5>
|
||||
);
|
||||
|
||||
@@ -118,7 +117,7 @@ export class CronJobTriggerDialog extends Component<Props> {
|
||||
<WizardStep
|
||||
contentClass="flex gaps column"
|
||||
next={this.trigger}
|
||||
nextLabel={<Trans>Trigger</Trans>}
|
||||
nextLabel="Trigger"
|
||||
disabledNext={!this.ready}
|
||||
>
|
||||
{this.renderContents()}
|
||||
@@ -127,4 +126,4 @@ export class CronJobTriggerDialog extends Component<Props> {
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ import "./cronjobs.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
import { t, Trans } from "@lingui/macro";
|
||||
import { CronJob } from "../../api/endpoints/cron-job.api";
|
||||
import { MenuItem } from "../menu";
|
||||
import { Icon } from "../icon";
|
||||
@@ -13,7 +12,6 @@ import { eventStore } from "../+events/event.store";
|
||||
import { KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
||||
import { ICronJobsRouteParams } from "../+workloads";
|
||||
import { KubeObjectListLayout } from "../kube-object";
|
||||
import { _i18n } from "../../i18n";
|
||||
import { CronJobTriggerDialog } from "./cronjob-trigger-dialog";
|
||||
import { kubeObjectMenuRegistry } from "../../../extensions/registries/kube-object-menu-registry";
|
||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||
@@ -49,22 +47,22 @@ export class CronJobs extends React.Component<Props> {
|
||||
(cronJob: CronJob) => cronJob.getSearchFields(),
|
||||
(cronJob: CronJob) => cronJob.getSchedule(),
|
||||
]}
|
||||
renderHeaderTitle={<Trans>Cron Jobs</Trans>}
|
||||
renderHeaderTitle="Cron Jobs"
|
||||
renderTableHeader={[
|
||||
{ title: <Trans>Name</Trans>, className: "name", sortBy: sortBy.name },
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
{ className: "warning" },
|
||||
{ title: <Trans>Namespace</Trans>, className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: <Trans>Schedule</Trans>, className: "schedule" },
|
||||
{ title: <Trans>Suspend</Trans>, className: "suspend", sortBy: sortBy.suspend },
|
||||
{ title: <Trans>Active</Trans>, className: "active", sortBy: sortBy.active },
|
||||
{ title: <Trans>Last schedule</Trans>, className: "last-schedule", sortBy: sortBy.lastSchedule },
|
||||
{ title: <Trans>Age</Trans>, className: "age", sortBy: sortBy.age },
|
||||
{ title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: "Schedule", className: "schedule" },
|
||||
{ title: "Suspend", className: "suspend", sortBy: sortBy.suspend },
|
||||
{ title: "Active", className: "active", sortBy: sortBy.active },
|
||||
{ title: "Last schedule", className: "last-schedule", sortBy: sortBy.lastSchedule },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
]}
|
||||
renderTableContents={(cronJob: CronJob) => [
|
||||
cronJob.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={cronJob} />,
|
||||
cronJob.getNs(),
|
||||
cronJob.isNeverRun() ? <Trans>never</Trans> : cronJob.getSchedule(),
|
||||
cronJob.isNeverRun() ? "never" : cronJob.getSchedule(),
|
||||
cronJob.getSuspendFlag(),
|
||||
cronJobStore.getActiveJobsNum(cronJob),
|
||||
cronJob.getLastScheduleTime(),
|
||||
@@ -83,8 +81,8 @@ export function CronJobMenu(props: KubeObjectMenuProps<CronJob>) {
|
||||
|
||||
return (
|
||||
<MenuItem onClick={() => CronJobTriggerDialog.open(object)}>
|
||||
<Icon material="play_circle_filled" title={_i18n._(t`Trigger`)} interactive={toolbar}/>
|
||||
<span className="title"><Trans>Trigger</Trans></span>
|
||||
<Icon material="play_circle_filled" title={`Trigger`} interactive={toolbar}/>
|
||||
<span className="title">Trigger</span>
|
||||
</MenuItem>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user