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
@@ -2,7 +2,6 @@ import "./pod-security-policies.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { KubeObjectListLayout } from "../kube-object";
|
||||
import { podSecurityPoliciesStore } from "./pod-security-policies.store";
|
||||
import { PodSecurityPolicy } from "../../api/endpoints";
|
||||
@@ -34,19 +33,19 @@ export class PodSecurityPolicies extends React.Component {
|
||||
(item: PodSecurityPolicy) => item.getVolumes(),
|
||||
(item: PodSecurityPolicy) => Object.values(item.getRules()),
|
||||
]}
|
||||
renderHeaderTitle={<Trans>Pod Security Policies</Trans>}
|
||||
renderHeaderTitle="Pod Security Policies"
|
||||
renderTableHeader={[
|
||||
{ title: <Trans>Name</Trans>, className: "name", sortBy: sortBy.name },
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
{ className: "warning" },
|
||||
{ title: <Trans>Privileged</Trans>, className: "privileged", sortBy: sortBy.privileged },
|
||||
{ title: <Trans>Volumes</Trans>, className: "volumes", sortBy: sortBy.volumes },
|
||||
{ title: <Trans>Age</Trans>, className: "age", sortBy: sortBy.age },
|
||||
{ title: "Privileged", className: "privileged", sortBy: sortBy.privileged },
|
||||
{ title: "Volumes", className: "volumes", sortBy: sortBy.volumes },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
]}
|
||||
renderTableContents={(item: PodSecurityPolicy) => {
|
||||
return [
|
||||
item.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={item} />,
|
||||
item.isPrivileged() ? <Trans>Yes</Trans> : <Trans>No</Trans>,
|
||||
item.isPrivileged() ? "Yes" : "No",
|
||||
item.getVolumes().join(", "),
|
||||
item.getAge(),
|
||||
];
|
||||
|
||||
@@ -2,7 +2,6 @@ import "./pod-security-policy-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||
import { KubeObjectDetailsProps } from "../kube-object";
|
||||
import { PodSecurityPolicy } from "../../api/endpoints";
|
||||
@@ -28,11 +27,11 @@ export class PodSecurityPolicyDetails extends React.Component<Props> {
|
||||
return (
|
||||
<>
|
||||
<DrawerTitle title={title}/>
|
||||
<DrawerItem name={<Trans>Rule</Trans>}>
|
||||
<DrawerItem name="Rule">
|
||||
{rule}
|
||||
</DrawerItem>
|
||||
{ranges && (
|
||||
<DrawerItem name={<Trans>Ranges (Min-Max)</Trans>} labelsOnly>
|
||||
<DrawerItem name="Ranges (Min-Max)" labelsOnly>
|
||||
{ranges.map(({ min, max }, index) => {
|
||||
return <Badge key={index} label={`${min} - ${max}`}/>;
|
||||
})}
|
||||
@@ -60,85 +59,85 @@ export class PodSecurityPolicyDetails extends React.Component<Props> {
|
||||
<KubeObjectMeta object={psp}/>
|
||||
|
||||
{allowedCapabilities && (
|
||||
<DrawerItem name={<Trans>Allowed Capabilities</Trans>}>
|
||||
<DrawerItem name="Allowed Capabilities">
|
||||
{allowedCapabilities.join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
{volumes && (
|
||||
<DrawerItem name={<Trans>Volumes</Trans>}>
|
||||
<DrawerItem name="Volumes">
|
||||
{volumes.join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
{allowedCSIDrivers && (
|
||||
<DrawerItem name={<Trans>Allowed CSI Drivers</Trans>}>
|
||||
<DrawerItem name="Allowed CSI Drivers">
|
||||
{allowedCSIDrivers.map(({ name }) => name).join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
{allowedFlexVolumes && (
|
||||
<DrawerItem name={<Trans>Allowed Flex Volumes</Trans>}>
|
||||
<DrawerItem name="Allowed Flex Volumes">
|
||||
{allowedFlexVolumes.map(({ driver }) => driver).join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
{allowedProcMountTypes && (
|
||||
<DrawerItem name={<Trans>Allowed Proc Mount Types</Trans>}>
|
||||
<DrawerItem name="Allowed Proc Mount Types">
|
||||
{allowedProcMountTypes.join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
{allowedUnsafeSysctls && (
|
||||
<DrawerItem name={<Trans>Allowed Unsafe Sysctls</Trans>}>
|
||||
<DrawerItem name="Allowed Unsafe Sysctls">
|
||||
{allowedUnsafeSysctls.join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
{forbiddenSysctls && (
|
||||
<DrawerItem name={<Trans>Forbidden Sysctls</Trans>}>
|
||||
<DrawerItem name="Forbidden Sysctls">
|
||||
{forbiddenSysctls.join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
<DrawerItem name={<Trans>Allow Privilege Escalation</Trans>}>
|
||||
{allowPrivilegeEscalation ? <Trans>Yes</Trans> : <Trans>No</Trans>}
|
||||
<DrawerItem name="Allow Privilege Escalation">
|
||||
{allowPrivilegeEscalation ? "Yes" : "No"}
|
||||
</DrawerItem>
|
||||
|
||||
<DrawerItem name={<Trans>Privileged</Trans>}>
|
||||
{privileged ? <Trans>Yes</Trans> : <Trans>No</Trans>}
|
||||
<DrawerItem name="Privileged">
|
||||
{privileged ? "Yes" : "No"}
|
||||
</DrawerItem>
|
||||
|
||||
<DrawerItem name={<Trans>Read-only Root Filesystem</Trans>}>
|
||||
{readOnlyRootFilesystem ? <Trans>Yes</Trans> : <Trans>No</Trans>}
|
||||
<DrawerItem name="Read-only Root Filesystem">
|
||||
{readOnlyRootFilesystem ? "Yes" : "No"}
|
||||
</DrawerItem>
|
||||
|
||||
{defaultAddCapabilities && (
|
||||
<DrawerItem name={<Trans>Default Add Capabilities</Trans>}>
|
||||
<DrawerItem name="Default Add Capabilities">
|
||||
{defaultAddCapabilities.join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
{requiredDropCapabilities && (
|
||||
<DrawerItem name={<Trans>Required Drop Capabilities</Trans>}>
|
||||
<DrawerItem name="Required Drop Capabilities">
|
||||
{requiredDropCapabilities.join(", ")}
|
||||
</DrawerItem>
|
||||
)}
|
||||
|
||||
<DrawerItem name={<Trans>Host IPC</Trans>}>
|
||||
{hostIPC ? <Trans>Yes</Trans> : <Trans>No</Trans>}
|
||||
<DrawerItem name="Host IPC">
|
||||
{hostIPC ? "Yes" : "No"}
|
||||
</DrawerItem>
|
||||
|
||||
<DrawerItem name={<Trans>Host Network</Trans>}>
|
||||
{hostNetwork ? <Trans>Yes</Trans> : <Trans>No</Trans>}
|
||||
<DrawerItem name="Host Network">
|
||||
{hostNetwork ? "Yes" : "No"}
|
||||
</DrawerItem>
|
||||
|
||||
<DrawerItem name={<Trans>Host PID</Trans>}>
|
||||
{hostPID ? <Trans>Yes</Trans> : <Trans>No</Trans>}
|
||||
<DrawerItem name="Host PID">
|
||||
{hostPID ? "Yes" : "No"}
|
||||
</DrawerItem>
|
||||
|
||||
{hostPorts && (
|
||||
<DrawerItem name={<Trans>Host Ports (Min-Max)</Trans>} labelsOnly>
|
||||
<DrawerItem name="Host Ports (Min-Max)" labelsOnly>
|
||||
{hostPorts.map(({ min, max }, index) => {
|
||||
return <Badge key={index} label={`${min} - ${max}`}/>;
|
||||
})}
|
||||
@@ -147,17 +146,17 @@ export class PodSecurityPolicyDetails extends React.Component<Props> {
|
||||
|
||||
{allowedHostPaths && (
|
||||
<>
|
||||
<DrawerTitle title={<Trans>Allowed Host Paths</Trans>}/>
|
||||
<DrawerTitle title="Allowed Host Paths"/>
|
||||
<Table>
|
||||
<TableHead>
|
||||
<TableCell><Trans>Path Prefix</Trans></TableCell>
|
||||
<TableCell><Trans>Read-only</Trans></TableCell>
|
||||
<TableCell>Path Prefix</TableCell>
|
||||
<TableCell>Read-only</TableCell>
|
||||
</TableHead>
|
||||
{allowedHostPaths.map(({ pathPrefix, readOnly }, index) => {
|
||||
return (
|
||||
<TableRow key={index}>
|
||||
<TableCell>{pathPrefix}</TableCell>
|
||||
<TableCell>{readOnly ? <Trans>Yes</Trans> : <Trans>No</Trans>}</TableCell>
|
||||
<TableCell>{readOnly ? "Yes" : "No"}</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
})}
|
||||
@@ -165,18 +164,18 @@ export class PodSecurityPolicyDetails extends React.Component<Props> {
|
||||
</>
|
||||
)}
|
||||
|
||||
{this.renderRuleGroup(<Trans>Fs Group</Trans>, fsGroup)}
|
||||
{this.renderRuleGroup(<Trans>Run As Group</Trans>, runAsGroup)}
|
||||
{this.renderRuleGroup(<Trans>Run As User</Trans>, runAsUser)}
|
||||
{this.renderRuleGroup(<Trans>Supplemental Groups</Trans>, supplementalGroups)}
|
||||
{this.renderRuleGroup("Fs Group", fsGroup)}
|
||||
{this.renderRuleGroup("Run As Group", runAsGroup)}
|
||||
{this.renderRuleGroup("Run As User", runAsUser)}
|
||||
{this.renderRuleGroup("Supplemental Groups", supplementalGroups)}
|
||||
|
||||
{runtimeClass && (
|
||||
<>
|
||||
<DrawerTitle title={<Trans>Runtime Class</Trans>}/>
|
||||
<DrawerItem name={<Trans>Allowed Runtime Class Names</Trans>}>
|
||||
<DrawerTitle title="Runtime Class"/>
|
||||
<DrawerItem name="Allowed Runtime Class Names">
|
||||
{(runtimeClass.allowedRuntimeClassNames || []).join(", ") || "-"}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Default Runtime Class Name</Trans>}>
|
||||
<DrawerItem name="Default Runtime Class Name">
|
||||
{runtimeClass.defaultRuntimeClassName || "-"}
|
||||
</DrawerItem>
|
||||
</>
|
||||
@@ -184,22 +183,22 @@ export class PodSecurityPolicyDetails extends React.Component<Props> {
|
||||
|
||||
{seLinux && (
|
||||
<>
|
||||
<DrawerTitle title={<Trans>Se Linux</Trans>}/>
|
||||
<DrawerItem name={<Trans>Rule</Trans>}>
|
||||
<DrawerTitle title="Se Linux"/>
|
||||
<DrawerItem name="Rule">
|
||||
{seLinux.rule}
|
||||
</DrawerItem>
|
||||
{seLinux.seLinuxOptions && (
|
||||
<>
|
||||
<DrawerItem name={<Trans>Level</Trans>}>
|
||||
<DrawerItem name="Level">
|
||||
{seLinux.seLinuxOptions.level}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Role</Trans>}>
|
||||
<DrawerItem name="Role">
|
||||
{seLinux.seLinuxOptions.role}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Type</Trans>}>
|
||||
<DrawerItem name="Type">
|
||||
{seLinux.seLinuxOptions.type}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>User</Trans>}>
|
||||
<DrawerItem name="User">
|
||||
{seLinux.seLinuxOptions.user}
|
||||
</DrawerItem>
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user