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 "./statefulset-details.scss";
|
||||
import React from "react";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import { reaction } from "mobx";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { Badge } from "../badge";
|
||||
import { DrawerItem } from "../drawer";
|
||||
import { PodDetailsStatuses } from "../+workloads-pods/pod-details-statuses";
|
||||
@@ -62,14 +61,14 @@ export class StatefulSetDetails extends React.Component<Props> {
|
||||
)}
|
||||
<KubeObjectMeta object={statefulSet}/>
|
||||
{selectors.length &&
|
||||
<DrawerItem name={<Trans>Selector</Trans>} labelsOnly>
|
||||
<DrawerItem name="Selector" labelsOnly>
|
||||
{
|
||||
selectors.map(label => <Badge key={label} label={label}/>)
|
||||
}
|
||||
</DrawerItem>
|
||||
}
|
||||
{nodeSelector.length > 0 &&
|
||||
<DrawerItem name={<Trans>Node Selector</Trans>} labelsOnly>
|
||||
<DrawerItem name="Node Selector" labelsOnly>
|
||||
{
|
||||
nodeSelector.map(label => (
|
||||
<Badge key={label} label={label}/>
|
||||
@@ -78,7 +77,7 @@ export class StatefulSetDetails extends React.Component<Props> {
|
||||
</DrawerItem>
|
||||
}
|
||||
{images.length > 0 &&
|
||||
<DrawerItem name={<Trans>Images</Trans>}>
|
||||
<DrawerItem name="Images">
|
||||
{
|
||||
images.map(image => <p key={image}>{image}</p>)
|
||||
}
|
||||
@@ -86,7 +85,7 @@ export class StatefulSetDetails extends React.Component<Props> {
|
||||
}
|
||||
<PodDetailsTolerations workload={statefulSet}/>
|
||||
<PodDetailsAffinities workload={statefulSet}/>
|
||||
<DrawerItem name={<Trans>Pod Status</Trans>} className="pod-status">
|
||||
<DrawerItem name="Pod Status" className="pod-status">
|
||||
<PodDetailsStatuses pods={childPods}/>
|
||||
</DrawerItem>
|
||||
<ResourceMetricsText metrics={metrics}/>
|
||||
|
||||
@@ -4,7 +4,6 @@ import { StatefulSet, statefulSetApi } from "../../api/endpoints";
|
||||
import React, { Component } from "react";
|
||||
import { computed, observable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { Dialog, DialogProps } from "../dialog";
|
||||
import { Wizard, WizardStep } from "../wizard";
|
||||
import { Icon } from "../icon";
|
||||
@@ -101,11 +100,11 @@ export class StatefulSetScaleDialog extends Component<Props> {
|
||||
return (
|
||||
<>
|
||||
<div className="current-scale" data-testid="current-scale">
|
||||
<Trans>Current replica scale: {currentReplicas}</Trans>
|
||||
Current replica scale: {currentReplicas}
|
||||
</div>
|
||||
<div className="flex gaps align-center">
|
||||
<div className="desired-scale" data-testid="desired-scale">
|
||||
<Trans>Desired number of replicas</Trans>: {desiredReplicas}
|
||||
Desired number of replicas: {desiredReplicas}
|
||||
</div>
|
||||
<div className="slider-container flex align-center" data-testid="slider">
|
||||
<Slider value={desiredReplicas} max={scaleMax}
|
||||
@@ -128,7 +127,7 @@ export class StatefulSetScaleDialog extends Component<Props> {
|
||||
{warning &&
|
||||
<div className="warning" data-testid="warning">
|
||||
<Icon material="warning"/>
|
||||
<Trans>High number of replicas may cause cluster performance issues</Trans>
|
||||
High number of replicas may cause cluster performance issues
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
@@ -140,7 +139,7 @@ export class StatefulSetScaleDialog extends Component<Props> {
|
||||
const statefulSetName = this.statefulSet ? this.statefulSet.getName() : "";
|
||||
const header = (
|
||||
<h5>
|
||||
<Trans>Scale Stateful Set <span>{statefulSetName}</span></Trans>
|
||||
Scale Stateful Set <span>{statefulSetName}</span>
|
||||
</h5>
|
||||
);
|
||||
|
||||
@@ -157,7 +156,7 @@ export class StatefulSetScaleDialog extends Component<Props> {
|
||||
<WizardStep
|
||||
contentClass="flex gaps column"
|
||||
next={this.scale}
|
||||
nextLabel={<Trans>Scale</Trans>}
|
||||
nextLabel="Scale"
|
||||
disabledNext={!this.ready}
|
||||
>
|
||||
{this.renderContents()}
|
||||
|
||||
@@ -3,7 +3,6 @@ import "./statefulsets.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
import { t, Trans } from "@lingui/macro";
|
||||
import { StatefulSet } from "../../api/endpoints";
|
||||
import { podsStore } from "../+workloads-pods/pods.store";
|
||||
import { statefulSetStore } from "./statefulset.store";
|
||||
@@ -15,7 +14,6 @@ import { IStatefulSetsRouteParams } from "../+workloads";
|
||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||
import { StatefulSetScaleDialog } from "./statefulset-scale-dialog";
|
||||
import { MenuItem } from "../menu/menu";
|
||||
import { _i18n } from "../../i18n";
|
||||
import { Icon } from "../icon/icon";
|
||||
import { kubeObjectMenuRegistry } from "../../../extensions/registries/kube-object-menu-registry";
|
||||
|
||||
@@ -51,14 +49,14 @@ export class StatefulSets extends React.Component<Props> {
|
||||
searchFilters={[
|
||||
(statefulSet: StatefulSet) => statefulSet.getSearchFields(),
|
||||
]}
|
||||
renderHeaderTitle={<Trans>Stateful Sets</Trans>}
|
||||
renderHeaderTitle="Stateful Sets"
|
||||
renderTableHeader={[
|
||||
{ title: <Trans>Name</Trans>, className: "name", sortBy: sortBy.name },
|
||||
{ title: <Trans>Namespace</Trans>, className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: <Trans>Pods</Trans>, className: "pods" },
|
||||
{ title: <Trans>Replicas</Trans>, className: "replicas", sortBy: sortBy.replicas },
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
{ title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: "Pods", className: "pods" },
|
||||
{ title: "Replicas", className: "replicas", sortBy: sortBy.replicas },
|
||||
{ className: "warning" },
|
||||
{ title: <Trans>Age</Trans>, className: "age", sortBy: sortBy.age },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
]}
|
||||
renderTableContents={(statefulSet: StatefulSet) => [
|
||||
statefulSet.getName(),
|
||||
@@ -82,8 +80,8 @@ export function StatefulSetMenu(props: KubeObjectMenuProps<StatefulSet>) {
|
||||
return (
|
||||
<>
|
||||
<MenuItem onClick={() => StatefulSetScaleDialog.open(object)}>
|
||||
<Icon material="open_with" title={_i18n._(t`Scale`)} interactive={toolbar}/>
|
||||
<span className="title"><Trans>Scale</Trans></span>
|
||||
<Icon material="open_with" title={`Scale`} interactive={toolbar}/>
|
||||
<span className="title">Scale</span>
|
||||
</MenuItem>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user