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 { observer } from "mobx-react";
|
||||
import React from "react";
|
||||
import { Table, TableHead, TableCell, TableRow } from "../table";
|
||||
import { prevDefault } from "../../utils";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { endpointStore } from "../+network-endpoints/endpoints.store";
|
||||
import { Spinner } from "../spinner";
|
||||
import { showDetails } from "../kube-object";
|
||||
@@ -34,8 +33,8 @@ export class ServiceDetailsEndpoint extends React.Component<Props> {
|
||||
className="box grow"
|
||||
>
|
||||
<TableHead>
|
||||
<TableCell className="name" ><Trans>Name</Trans></TableCell>
|
||||
<TableCell className="endpoints"><Trans>Endpoints</Trans></TableCell>
|
||||
<TableCell className="name" >Name</TableCell>
|
||||
<TableCell className="endpoints">Endpoints</TableCell>
|
||||
</TableHead>
|
||||
<TableRow
|
||||
key={endpoint.getId()}
|
||||
|
||||
@@ -2,13 +2,11 @@ import "./service-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { t, Trans } from "@lingui/macro";
|
||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||
import { Badge } from "../badge";
|
||||
import { KubeEventDetails } from "../+events/kube-event-details";
|
||||
import { KubeObjectDetailsProps } from "../kube-object";
|
||||
import { Service, endpointApi } from "../../api/endpoints";
|
||||
import { _i18n } from "../../i18n";
|
||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
||||
import { ServicePortComponent } from "./service-port-component";
|
||||
import { endpointStore } from "../+network-endpoints/endpoints.store";
|
||||
@@ -38,31 +36,31 @@ export class ServiceDetails extends React.Component<Props> {
|
||||
<div className="ServicesDetails">
|
||||
<KubeObjectMeta object={service}/>
|
||||
|
||||
<DrawerItem name={<Trans>Selector</Trans>} labelsOnly>
|
||||
<DrawerItem name="Selector" labelsOnly>
|
||||
{service.getSelector().map(selector => <Badge key={selector} label={selector}/>)}
|
||||
</DrawerItem>
|
||||
|
||||
<DrawerItem name={<Trans>Type</Trans>}>
|
||||
<DrawerItem name="Type">
|
||||
{spec.type}
|
||||
</DrawerItem>
|
||||
|
||||
<DrawerItem name={<Trans>Session Affinity</Trans>}>
|
||||
<DrawerItem name="Session Affinity">
|
||||
{spec.sessionAffinity}
|
||||
</DrawerItem>
|
||||
|
||||
<DrawerTitle title={_i18n._(t`Connection`)}/>
|
||||
<DrawerTitle title={`Connection`}/>
|
||||
|
||||
<DrawerItem name={<Trans>Cluster IP</Trans>}>
|
||||
<DrawerItem name="Cluster IP">
|
||||
{spec.clusterIP}
|
||||
</DrawerItem>
|
||||
|
||||
{service.getExternalIps().length > 0 && (
|
||||
<DrawerItem name={<Trans>External IPs</Trans>}>
|
||||
<DrawerItem name="External IPs">
|
||||
{service.getExternalIps().map(ip => <div key={ip}>{ip}</div>)}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
<DrawerItem name={<Trans>Ports</Trans>}>
|
||||
<DrawerItem name="Ports">
|
||||
<div>
|
||||
{
|
||||
service.getPorts().map((port) => (
|
||||
@@ -73,11 +71,11 @@ export class ServiceDetails extends React.Component<Props> {
|
||||
</DrawerItem>
|
||||
|
||||
{spec.type === "LoadBalancer" && spec.loadBalancerIP && (
|
||||
<DrawerItem name={<Trans>Load Balancer IP</Trans>}>
|
||||
<DrawerItem name="Load Balancer IP">
|
||||
{spec.loadBalancerIP}
|
||||
</DrawerItem>
|
||||
)}
|
||||
<DrawerTitle title={_i18n._(t`Endpoint`)}/>
|
||||
<DrawerTitle title={`Endpoint`}/>
|
||||
|
||||
<ServiceDetailsEndpoint endpoint={endpoint} />
|
||||
</div>
|
||||
|
||||
@@ -2,9 +2,7 @@ import "./service-port-component.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { t } from "@lingui/macro";
|
||||
import { Service, ServicePort } from "../../api/endpoints";
|
||||
import { _i18n } from "../../i18n";
|
||||
import { apiBase } from "../../api";
|
||||
import { observable } from "mobx";
|
||||
import { cssNames } from "../../utils";
|
||||
@@ -39,7 +37,7 @@ export class ServicePortComponent extends React.Component<Props> {
|
||||
|
||||
return (
|
||||
<div className={cssNames("ServicePortComponent", { waiting: this.waiting })}>
|
||||
<span title={_i18n._(t`Open in a browser`)} onClick={() => this.portForward() }>
|
||||
<span title={`Open in a browser`} onClick={() => this.portForward() }>
|
||||
{port.toString()}
|
||||
{this.waiting && (
|
||||
<Spinner />
|
||||
|
||||
@@ -2,7 +2,6 @@ import "./services.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
import { IServicesRouteParams } from "./services.route";
|
||||
import { Service } from "../../api/endpoints/service.api";
|
||||
@@ -46,18 +45,18 @@ export class Services extends React.Component<Props> {
|
||||
(service: Service) => service.getSelector().join(" "),
|
||||
(service: Service) => service.getPorts().join(" "),
|
||||
]}
|
||||
renderHeaderTitle={<Trans>Services</Trans>}
|
||||
renderHeaderTitle="Services"
|
||||
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>Type</Trans>, className: "type", sortBy: sortBy.type },
|
||||
{ title: <Trans>Cluster IP</Trans>, className: "clusterIp", sortBy: sortBy.clusterIp, },
|
||||
{ title: <Trans>Ports</Trans>, className: "ports", sortBy: sortBy.ports },
|
||||
{ title: <Trans>External IP</Trans>, className: "externalIp" },
|
||||
{ title: <Trans>Selector</Trans>, className: "selector", sortBy: sortBy.selector },
|
||||
{ title: <Trans>Age</Trans>, className: "age", sortBy: sortBy.age },
|
||||
{ title: <Trans>Status</Trans>, className: "status", sortBy: sortBy.status },
|
||||
{ title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: "Type", className: "type", sortBy: sortBy.type },
|
||||
{ title: "Cluster IP", className: "clusterIp", sortBy: sortBy.clusterIp, },
|
||||
{ title: "Ports", className: "ports", sortBy: sortBy.ports },
|
||||
{ title: "External IP", className: "externalIp" },
|
||||
{ title: "Selector", className: "selector", sortBy: sortBy.selector },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
{ title: "Status", className: "status", sortBy: sortBy.status },
|
||||
]}
|
||||
renderTableContents={(service: Service) => [
|
||||
service.getName(),
|
||||
|
||||
Reference in new issue
Block a user