1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

preferences page -- part 1

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-07-22 19:21:46 +03:00
parent a4bcfc1e52
commit 24f754697b
13 changed files with 381 additions and 60 deletions

View File

@ -186,6 +186,14 @@ msgstr "Allocatable"
msgid "Allow Privilege Escalation" msgid "Allow Privilege Escalation"
msgstr "Allow Privilege Escalation" msgstr "Allow Privilege Escalation"
#: src/renderer/components/+preferences/preferences.tsx:76
msgid "Allow telemetry & usage tracking"
msgstr "Allow telemetry & usage tracking"
#: src/renderer/components/+preferences/preferences.tsx:68
msgid "Allow untrusted Certificate Authorities"
msgstr "Allow untrusted Certificate Authorities"
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:51 #: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:51
msgid "Allowed CSI Drivers" msgid "Allowed CSI Drivers"
msgstr "Allowed CSI Drivers" msgstr "Allowed CSI Drivers"
@ -377,6 +385,10 @@ msgstr "Cancel"
msgid "Capacity" msgid "Capacity"
msgstr "Capacity" msgstr "Capacity"
#: src/renderer/components/+preferences/preferences.tsx:67
msgid "Certificate Trust"
msgstr "Certificate Trust"
#: src/renderer/components/+custom-resources/certmanager.k8s.io/certificates.tsx:59 #: src/renderer/components/+custom-resources/certmanager.k8s.io/certificates.tsx:59
msgid "Certificates" msgid "Certificates"
msgstr "Certificates" msgstr "Certificates"
@ -440,6 +452,10 @@ msgstr "Cluster IP"
msgid "Cluster Issuers" msgid "Cluster Issuers"
msgstr "Cluster Issuers" msgstr "Cluster Issuers"
#: src/renderer/components/+preferences/preferences.tsx:50
msgid "Color Theme"
msgstr "Color Theme"
#: src/renderer/components/+workloads-pods/pod-details-container.tsx:81 #: src/renderer/components/+workloads-pods/pod-details-container.tsx:81
msgid "Command" msgid "Command"
msgstr "Command" msgstr "Command"
@ -685,6 +701,10 @@ msgstr "Daemon Sets"
msgid "DaemonSets" msgid "DaemonSets"
msgstr "DaemonSets" msgstr "DaemonSets"
#: src/renderer/components/+preferences/preferences.tsx:22
msgid "Dark"
msgstr "Dark"
#: src/renderer/components/+config-maps/config-map-details.tsx:69 #: src/renderer/components/+config-maps/config-map-details.tsx:69
#: src/renderer/components/+config-secrets/secret-details.tsx:78 #: src/renderer/components/+config-secrets/secret-details.tsx:78
msgid "Data" msgid "Data"
@ -744,14 +764,26 @@ msgstr "Disk"
msgid "Disk:" msgid "Disk:"
msgstr "Disk:" msgstr "Disk:"
#: src/renderer/components/+preferences/preferences.tsx:72
msgid "Does not affect cluster communications!"
msgstr "Does not affect cluster communications!"
#: src/renderer/components/+custom-resources/certmanager.k8s.io/certificate-details.tsx:89 #: src/renderer/components/+custom-resources/certmanager.k8s.io/certificate-details.tsx:89
msgid "Domains" msgid "Domains"
msgstr "Domains" msgstr "Domains"
#: src/renderer/components/+preferences/preferences.tsx:53
msgid "Download Mirror"
msgstr "Download Mirror"
#: src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx:91 #: src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx:91
msgid "Download file" msgid "Download file"
msgstr "Download file" msgstr "Download file"
#: src/renderer/components/+preferences/preferences.tsx:54
msgid "Download mirror for kubectl"
msgstr "Download mirror for kubectl"
#: src/renderer/components/+nodes/node-menu.tsx:59 #: src/renderer/components/+nodes/node-menu.tsx:59
#: src/renderer/components/+nodes/node-menu.tsx:60 #: src/renderer/components/+nodes/node-menu.tsx:60
msgid "Drain" msgid "Drain"
@ -901,6 +933,10 @@ msgstr "Fs Group"
msgid "Get started by associating one or more clusters to Lens." msgid "Get started by associating one or more clusters to Lens."
msgstr "Get started by associating one or more clusters to Lens." msgstr "Get started by associating one or more clusters to Lens."
#: src/renderer/components/+preferences/preferences.tsx:39
#~ msgid "Global Lens Settings page"
#~ msgstr "Global Lens Settings page"
#: src/renderer/components/+custom-resources/crd-details.tsx:32 #: src/renderer/components/+custom-resources/crd-details.tsx:32
#: src/renderer/components/+custom-resources/crd-list.tsx:58 #: src/renderer/components/+custom-resources/crd-list.tsx:58
#: src/renderer/components/+custom-resources/crd-list.tsx:74 #: src/renderer/components/+custom-resources/crd-list.tsx:74
@ -915,10 +951,18 @@ msgstr "Groups"
msgid "HPA" msgid "HPA"
msgstr "HPA" msgstr "HPA"
#: src/renderer/components/+preferences/preferences.tsx:61
msgid "HTTP Proxy"
msgstr "HTTP Proxy"
#: src/renderer/components/+add-cluster/add-cluster.tsx:178 #: src/renderer/components/+add-cluster/add-cluster.tsx:178
msgid "HTTP Proxy server. Used for communicating with Kubernetes API." msgid "HTTP Proxy server. Used for communicating with Kubernetes API."
msgstr "HTTP Proxy server. Used for communicating with Kubernetes API." msgstr "HTTP Proxy server. Used for communicating with Kubernetes API."
#: src/renderer/components/+preferences/preferences.tsx:56
msgid "Helm"
msgstr "Helm"
#: src/renderer/components/dock/install-chart.tsx:113 #: src/renderer/components/dock/install-chart.tsx:113
msgid "Helm Chart Install" msgid "Helm Chart Install"
msgstr "Helm Chart Install" msgstr "Helm Chart Install"
@ -1141,10 +1185,18 @@ msgstr "Last seen"
msgid "Last transition time: {lastTransitionTime}" msgid "Last transition time: {lastTransitionTime}"
msgstr "Last transition time: {lastTransitionTime}" msgstr "Last transition time: {lastTransitionTime}"
#: src/renderer/components/+preferences/preferences.tsx:42
msgid "Lens Global Settings"
msgstr "Lens Global Settings"
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:146 #: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:146
msgid "Level" msgid "Level"
msgstr "Level" msgstr "Level"
#: src/renderer/components/+preferences/preferences.tsx:23
msgid "Light"
msgstr "Light"
#: src/renderer/components/+events/events.tsx:59 #: src/renderer/components/+events/events.tsx:59
msgid "Limited to {0}" msgid "Limited to {0}"
msgstr "Limited to {0}" msgstr "Limited to {0}"
@ -1409,6 +1461,10 @@ msgstr "Namespaces"
msgid "Namespaces: {0}" msgid "Namespaces: {0}"
msgstr "Namespaces: {0}" msgstr "Namespaces: {0}"
#: src/renderer/components/+preferences/preferences.tsx:71
msgid "Needed with some corporate proxies that do certificate re-writing."
msgstr "Needed with some corporate proxies that do certificate re-writing."
#: src/renderer/components/+network-ingresses/ingress-details.tsx:66 #: src/renderer/components/+network-ingresses/ingress-details.tsx:66
#: src/renderer/components/+workloads-pods/pod-charts.tsx:13 #: src/renderer/components/+workloads-pods/pod-charts.tsx:13
#: src/renderer/components/layout/sidebar.tsx:89 #: src/renderer/components/layout/sidebar.tsx:89
@ -1675,6 +1731,10 @@ msgstr "Port"
msgid "Ports" msgid "Ports"
msgstr "Ports" msgstr "Ports"
#: src/renderer/components/+preferences/preferences.tsx:37
msgid "Preferences"
msgstr "Preferences"
#: src/renderer/components/+workloads-pods/pod-details.tsx:93 #: src/renderer/components/+workloads-pods/pod-details.tsx:93
msgid "Priority Class" msgid "Priority Class"
msgstr "Priority Class" msgstr "Priority Class"
@ -1693,6 +1753,10 @@ msgstr "Privileged"
msgid "Provisioner" msgid "Provisioner"
msgstr "Provisioner" msgstr "Provisioner"
#: src/renderer/components/+preferences/preferences.tsx:64
msgid "Proxy is used only for non-cluster communication."
msgstr "Proxy is used only for non-cluster communication."
#: src/renderer/components/+add-cluster/add-cluster.tsx:172 #: src/renderer/components/+add-cluster/add-cluster.tsx:172
msgid "Proxy settings" msgid "Proxy settings"
msgstr "Proxy settings" msgstr "Proxy settings"
@ -2273,6 +2337,14 @@ msgstr "TLS"
msgid "Taints" msgid "Taints"
msgstr "Taints" msgstr "Taints"
#: src/renderer/components/+preferences/preferences.tsx:75
msgid "Telemetry & Usage Tracking"
msgstr "Telemetry & Usage Tracking"
#: src/renderer/components/+preferences/preferences.tsx:78
msgid "Telemetry & usage data is collected to continuously improve the Lens experience."
msgstr "Telemetry & usage data is collected to continuously improve the Lens experience."
#: src/renderer/components/dock/terminal.store.ts:29 #: src/renderer/components/dock/terminal.store.ts:29
msgid "Terminal" msgid "Terminal"
msgstr "Terminal" msgstr "Terminal"
@ -2301,6 +2373,10 @@ msgstr "This field must contain only lowercase latin characters, numbers and das
msgid "This is the quick launch menu." msgid "This is the quick launch menu."
msgstr "This is the quick launch menu." msgstr "This is the quick launch menu."
#: src/renderer/components/+preferences/preferences.tsx:70
msgid "This will make Lens to trust ANY certificate authority without any validations."
msgstr "This will make Lens to trust ANY certificate authority without any validations."
#: src/renderer/components/+network-policies/network-policy-details.tsx:59 #: src/renderer/components/+network-policies/network-policy-details.tsx:59
msgid "To" msgid "To"
msgstr "To" msgstr "To"
@ -2340,6 +2416,10 @@ msgstr "Transmit"
msgid "Type" msgid "Type"
msgstr "Type" msgstr "Type"
#: src/renderer/components/+preferences/preferences.tsx:62
msgid "Type HTTP proxy url (example: http://proxy.acme.org:8080)"
msgstr "Type HTTP proxy url (example: http://proxy.acme.org:8080)"
#: src/renderer/components/kube-object/kube-object-meta.tsx:26 #: src/renderer/components/kube-object/kube-object-meta.tsx:26
msgid "UID" msgid "UID"
msgstr "UID" msgstr "UID"
@ -2529,6 +2609,10 @@ msgstr "ago"
msgid "and <0>{tailCount}</0> more" msgid "and <0>{tailCount}</0> more"
msgstr "and <0>{tailCount}</0> more" msgstr "and <0>{tailCount}</0> more"
#: src/renderer/components/+preferences/preferences.tsx:42
msgid "applicable to all clusters"
msgstr "applicable to all clusters"
#: src/renderer/components/+nodes/nodes.tsx:55 #: src/renderer/components/+nodes/nodes.tsx:55
msgid "cores:" msgid "cores:"
msgstr "cores:" msgstr "cores:"

View File

@ -186,6 +186,14 @@ msgstr ""
msgid "Allow Privilege Escalation" msgid "Allow Privilege Escalation"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:76
msgid "Allow telemetry & usage tracking"
msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:68
msgid "Allow untrusted Certificate Authorities"
msgstr ""
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:51 #: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:51
msgid "Allowed CSI Drivers" msgid "Allowed CSI Drivers"
msgstr "" msgstr ""
@ -377,6 +385,10 @@ msgstr ""
msgid "Capacity" msgid "Capacity"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:67
msgid "Certificate Trust"
msgstr ""
#: src/renderer/components/+custom-resources/certmanager.k8s.io/certificates.tsx:59 #: src/renderer/components/+custom-resources/certmanager.k8s.io/certificates.tsx:59
msgid "Certificates" msgid "Certificates"
msgstr "" msgstr ""
@ -436,6 +448,10 @@ msgstr ""
msgid "Cluster Issuers" msgid "Cluster Issuers"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:50
msgid "Color Theme"
msgstr ""
#: src/renderer/components/+workloads-pods/pod-details-container.tsx:81 #: src/renderer/components/+workloads-pods/pod-details-container.tsx:81
msgid "Command" msgid "Command"
msgstr "" msgstr ""
@ -681,6 +697,10 @@ msgstr ""
msgid "DaemonSets" msgid "DaemonSets"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:22
msgid "Dark"
msgstr ""
#: src/renderer/components/+config-maps/config-map-details.tsx:69 #: src/renderer/components/+config-maps/config-map-details.tsx:69
#: src/renderer/components/+config-secrets/secret-details.tsx:78 #: src/renderer/components/+config-secrets/secret-details.tsx:78
msgid "Data" msgid "Data"
@ -740,14 +760,26 @@ msgstr ""
msgid "Disk:" msgid "Disk:"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:72
msgid "Does not affect cluster communications!"
msgstr ""
#: src/renderer/components/+custom-resources/certmanager.k8s.io/certificate-details.tsx:89 #: src/renderer/components/+custom-resources/certmanager.k8s.io/certificate-details.tsx:89
msgid "Domains" msgid "Domains"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:53
msgid "Download Mirror"
msgstr ""
#: src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx:91 #: src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx:91
msgid "Download file" msgid "Download file"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:54
msgid "Download mirror for kubectl"
msgstr ""
#: src/renderer/components/+nodes/node-menu.tsx:59 #: src/renderer/components/+nodes/node-menu.tsx:59
#: src/renderer/components/+nodes/node-menu.tsx:60 #: src/renderer/components/+nodes/node-menu.tsx:60
msgid "Drain" msgid "Drain"
@ -892,6 +924,10 @@ msgstr ""
msgid "Get started by associating one or more clusters to Lens." msgid "Get started by associating one or more clusters to Lens."
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:39
#~ msgid "Global Lens Settings page"
#~ msgstr ""
#: src/renderer/components/+custom-resources/crd-details.tsx:32 #: src/renderer/components/+custom-resources/crd-details.tsx:32
#: src/renderer/components/+custom-resources/crd-list.tsx:58 #: src/renderer/components/+custom-resources/crd-list.tsx:58
#: src/renderer/components/+custom-resources/crd-list.tsx:74 #: src/renderer/components/+custom-resources/crd-list.tsx:74
@ -906,10 +942,18 @@ msgstr ""
msgid "HPA" msgid "HPA"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:61
msgid "HTTP Proxy"
msgstr ""
#: src/renderer/components/+add-cluster/add-cluster.tsx:178 #: src/renderer/components/+add-cluster/add-cluster.tsx:178
msgid "HTTP Proxy server. Used for communicating with Kubernetes API." msgid "HTTP Proxy server. Used for communicating with Kubernetes API."
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:56
msgid "Helm"
msgstr ""
#: src/renderer/components/dock/install-chart.tsx:113 #: src/renderer/components/dock/install-chart.tsx:113
msgid "Helm Chart Install" msgid "Helm Chart Install"
msgstr "" msgstr ""
@ -1132,10 +1176,18 @@ msgstr ""
msgid "Last transition time: {lastTransitionTime}" msgid "Last transition time: {lastTransitionTime}"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:42
msgid "Lens Global Settings"
msgstr ""
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:146 #: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:146
msgid "Level" msgid "Level"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:23
msgid "Light"
msgstr ""
#: src/renderer/components/+events/events.tsx:59 #: src/renderer/components/+events/events.tsx:59
msgid "Limited to {0}" msgid "Limited to {0}"
msgstr "" msgstr ""
@ -1400,6 +1452,10 @@ msgstr ""
msgid "Namespaces: {0}" msgid "Namespaces: {0}"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:71
msgid "Needed with some corporate proxies that do certificate re-writing."
msgstr ""
#: src/renderer/components/+network-ingresses/ingress-details.tsx:66 #: src/renderer/components/+network-ingresses/ingress-details.tsx:66
#: src/renderer/components/+workloads-pods/pod-charts.tsx:13 #: src/renderer/components/+workloads-pods/pod-charts.tsx:13
#: src/renderer/components/layout/sidebar.tsx:89 #: src/renderer/components/layout/sidebar.tsx:89
@ -1658,6 +1714,10 @@ msgstr ""
msgid "Ports" msgid "Ports"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:37
msgid "Preferences"
msgstr ""
#: src/renderer/components/+workloads-pods/pod-details.tsx:93 #: src/renderer/components/+workloads-pods/pod-details.tsx:93
msgid "Priority Class" msgid "Priority Class"
msgstr "" msgstr ""
@ -1676,6 +1736,10 @@ msgstr ""
msgid "Provisioner" msgid "Provisioner"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:64
msgid "Proxy is used only for non-cluster communication."
msgstr ""
#: src/renderer/components/+add-cluster/add-cluster.tsx:172 #: src/renderer/components/+add-cluster/add-cluster.tsx:172
msgid "Proxy settings" msgid "Proxy settings"
msgstr "" msgstr ""
@ -2256,6 +2320,14 @@ msgstr ""
msgid "Taints" msgid "Taints"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:75
msgid "Telemetry & Usage Tracking"
msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:78
msgid "Telemetry & usage data is collected to continuously improve the Lens experience."
msgstr ""
#: src/renderer/components/dock/terminal.store.ts:29 #: src/renderer/components/dock/terminal.store.ts:29
msgid "Terminal" msgid "Terminal"
msgstr "" msgstr ""
@ -2284,6 +2356,10 @@ msgstr ""
msgid "This is the quick launch menu." msgid "This is the quick launch menu."
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:70
msgid "This will make Lens to trust ANY certificate authority without any validations."
msgstr ""
#: src/renderer/components/+network-policies/network-policy-details.tsx:59 #: src/renderer/components/+network-policies/network-policy-details.tsx:59
msgid "To" msgid "To"
msgstr "" msgstr ""
@ -2323,6 +2399,10 @@ msgstr ""
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:62
msgid "Type HTTP proxy url (example: http://proxy.acme.org:8080)"
msgstr ""
#: src/renderer/components/kube-object/kube-object-meta.tsx:26 #: src/renderer/components/kube-object/kube-object-meta.tsx:26
msgid "UID" msgid "UID"
msgstr "" msgstr ""
@ -2512,6 +2592,10 @@ msgstr ""
msgid "and <0>{tailCount}</0> more" msgid "and <0>{tailCount}</0> more"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:42
msgid "applicable to all clusters"
msgstr ""
#: src/renderer/components/+nodes/nodes.tsx:55 #: src/renderer/components/+nodes/nodes.tsx:55
msgid "cores:" msgid "cores:"
msgstr "" msgstr ""

View File

@ -187,6 +187,14 @@ msgstr ""
msgid "Allow Privilege Escalation" msgid "Allow Privilege Escalation"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:76
msgid "Allow telemetry & usage tracking"
msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:68
msgid "Allow untrusted Certificate Authorities"
msgstr ""
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:51 #: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:51
msgid "Allowed CSI Drivers" msgid "Allowed CSI Drivers"
msgstr "" msgstr ""
@ -378,6 +386,10 @@ msgstr "Отмена"
msgid "Capacity" msgid "Capacity"
msgstr "Емкость" msgstr "Емкость"
#: src/renderer/components/+preferences/preferences.tsx:67
msgid "Certificate Trust"
msgstr ""
#: src/renderer/components/+custom-resources/certmanager.k8s.io/certificates.tsx:59 #: src/renderer/components/+custom-resources/certmanager.k8s.io/certificates.tsx:59
msgid "Certificates" msgid "Certificates"
msgstr "Сертификаты" msgstr "Сертификаты"
@ -441,6 +453,10 @@ msgstr "IP-адрес кластера"
msgid "Cluster Issuers" msgid "Cluster Issuers"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:50
msgid "Color Theme"
msgstr ""
#: src/renderer/components/+workloads-pods/pod-details-container.tsx:81 #: src/renderer/components/+workloads-pods/pod-details-container.tsx:81
msgid "Command" msgid "Command"
msgstr "Команда" msgstr "Команда"
@ -686,6 +702,10 @@ msgstr ""
msgid "DaemonSets" msgid "DaemonSets"
msgstr "DaemonSets" msgstr "DaemonSets"
#: src/renderer/components/+preferences/preferences.tsx:22
msgid "Dark"
msgstr ""
#: src/renderer/components/+config-maps/config-map-details.tsx:69 #: src/renderer/components/+config-maps/config-map-details.tsx:69
#: src/renderer/components/+config-secrets/secret-details.tsx:78 #: src/renderer/components/+config-secrets/secret-details.tsx:78
msgid "Data" msgid "Data"
@ -745,14 +765,26 @@ msgstr "Диск"
msgid "Disk:" msgid "Disk:"
msgstr "Диск:" msgstr "Диск:"
#: src/renderer/components/+preferences/preferences.tsx:72
msgid "Does not affect cluster communications!"
msgstr ""
#: src/renderer/components/+custom-resources/certmanager.k8s.io/certificate-details.tsx:89 #: src/renderer/components/+custom-resources/certmanager.k8s.io/certificate-details.tsx:89
msgid "Domains" msgid "Domains"
msgstr "Домены" msgstr "Домены"
#: src/renderer/components/+preferences/preferences.tsx:53
msgid "Download Mirror"
msgstr ""
#: src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx:91 #: src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx:91
msgid "Download file" msgid "Download file"
msgstr "Скачать файл" msgstr "Скачать файл"
#: src/renderer/components/+preferences/preferences.tsx:54
msgid "Download mirror for kubectl"
msgstr ""
#: src/renderer/components/+nodes/node-menu.tsx:59 #: src/renderer/components/+nodes/node-menu.tsx:59
#: src/renderer/components/+nodes/node-menu.tsx:60 #: src/renderer/components/+nodes/node-menu.tsx:60
msgid "Drain" msgid "Drain"
@ -902,6 +934,10 @@ msgstr ""
msgid "Get started by associating one or more clusters to Lens." msgid "Get started by associating one or more clusters to Lens."
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:39
#~ msgid "Global Lens Settings page"
#~ msgstr ""
#: src/renderer/components/+custom-resources/crd-details.tsx:32 #: src/renderer/components/+custom-resources/crd-details.tsx:32
#: src/renderer/components/+custom-resources/crd-list.tsx:58 #: src/renderer/components/+custom-resources/crd-list.tsx:58
#: src/renderer/components/+custom-resources/crd-list.tsx:74 #: src/renderer/components/+custom-resources/crd-list.tsx:74
@ -916,10 +952,18 @@ msgstr "Группы"
msgid "HPA" msgid "HPA"
msgstr "HPA" msgstr "HPA"
#: src/renderer/components/+preferences/preferences.tsx:61
msgid "HTTP Proxy"
msgstr ""
#: src/renderer/components/+add-cluster/add-cluster.tsx:178 #: src/renderer/components/+add-cluster/add-cluster.tsx:178
msgid "HTTP Proxy server. Used for communicating with Kubernetes API." msgid "HTTP Proxy server. Used for communicating with Kubernetes API."
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:56
msgid "Helm"
msgstr ""
#: src/renderer/components/dock/install-chart.tsx:113 #: src/renderer/components/dock/install-chart.tsx:113
msgid "Helm Chart Install" msgid "Helm Chart Install"
msgstr "Установка Helm чарта" msgstr "Установка Helm чарта"
@ -1142,10 +1186,18 @@ msgstr "Увиденно в последний раз"
msgid "Last transition time: {lastTransitionTime}" msgid "Last transition time: {lastTransitionTime}"
msgstr "Последнее изменение: {lastTransitionTime}" msgstr "Последнее изменение: {lastTransitionTime}"
#: src/renderer/components/+preferences/preferences.tsx:42
msgid "Lens Global Settings"
msgstr ""
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:146 #: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:146
msgid "Level" msgid "Level"
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:23
msgid "Light"
msgstr ""
#: src/renderer/components/+events/events.tsx:59 #: src/renderer/components/+events/events.tsx:59
msgid "Limited to {0}" msgid "Limited to {0}"
msgstr "" msgstr ""
@ -1410,6 +1462,10 @@ msgstr "Namespaces"
msgid "Namespaces: {0}" msgid "Namespaces: {0}"
msgstr "Namespaces: {0}" msgstr "Namespaces: {0}"
#: src/renderer/components/+preferences/preferences.tsx:71
msgid "Needed with some corporate proxies that do certificate re-writing."
msgstr ""
#: src/renderer/components/+network-ingresses/ingress-details.tsx:66 #: src/renderer/components/+network-ingresses/ingress-details.tsx:66
#: src/renderer/components/+workloads-pods/pod-charts.tsx:13 #: src/renderer/components/+workloads-pods/pod-charts.tsx:13
#: src/renderer/components/layout/sidebar.tsx:89 #: src/renderer/components/layout/sidebar.tsx:89
@ -1676,6 +1732,10 @@ msgstr ""
msgid "Ports" msgid "Ports"
msgstr "Порты" msgstr "Порты"
#: src/renderer/components/+preferences/preferences.tsx:37
msgid "Preferences"
msgstr ""
#: src/renderer/components/+workloads-pods/pod-details.tsx:93 #: src/renderer/components/+workloads-pods/pod-details.tsx:93
msgid "Priority Class" msgid "Priority Class"
msgstr "Класс приоритета" msgstr "Класс приоритета"
@ -1694,6 +1754,10 @@ msgstr ""
msgid "Provisioner" msgid "Provisioner"
msgstr "Комиссия" msgstr "Комиссия"
#: src/renderer/components/+preferences/preferences.tsx:64
msgid "Proxy is used only for non-cluster communication."
msgstr ""
#: src/renderer/components/+add-cluster/add-cluster.tsx:172 #: src/renderer/components/+add-cluster/add-cluster.tsx:172
msgid "Proxy settings" msgid "Proxy settings"
msgstr "" msgstr ""
@ -2274,6 +2338,14 @@ msgstr "TLS"
msgid "Taints" msgid "Taints"
msgstr "Метки блокировки" msgstr "Метки блокировки"
#: src/renderer/components/+preferences/preferences.tsx:75
msgid "Telemetry & Usage Tracking"
msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:78
msgid "Telemetry & usage data is collected to continuously improve the Lens experience."
msgstr ""
#: src/renderer/components/dock/terminal.store.ts:29 #: src/renderer/components/dock/terminal.store.ts:29
msgid "Terminal" msgid "Terminal"
msgstr "Терминал" msgstr "Терминал"
@ -2302,6 +2374,10 @@ msgstr "Это поле может содержать только латинс
msgid "This is the quick launch menu." msgid "This is the quick launch menu."
msgstr "" msgstr ""
#: src/renderer/components/+preferences/preferences.tsx:70
msgid "This will make Lens to trust ANY certificate authority without any validations."
msgstr ""
#: src/renderer/components/+network-policies/network-policy-details.tsx:59 #: src/renderer/components/+network-policies/network-policy-details.tsx:59
msgid "To" msgid "To"
msgstr "Из" msgstr "Из"
@ -2341,6 +2417,10 @@ msgstr "Транзит"
msgid "Type" msgid "Type"
msgstr "Тип" msgstr "Тип"
#: src/renderer/components/+preferences/preferences.tsx:62
msgid "Type HTTP proxy url (example: http://proxy.acme.org:8080)"
msgstr ""
#: src/renderer/components/kube-object/kube-object-meta.tsx:26 #: src/renderer/components/kube-object/kube-object-meta.tsx:26
msgid "UID" msgid "UID"
msgstr "" msgstr ""
@ -2530,6 +2610,10 @@ msgstr "тому назад"
msgid "and <0>{tailCount}</0> more" msgid "and <0>{tailCount}</0> more"
msgstr "и <0>{tailCount}</0> ещё" msgstr "и <0>{tailCount}</0> ещё"
#: src/renderer/components/+preferences/preferences.tsx:42
msgid "applicable to all clusters"
msgstr ""
#: src/renderer/components/+nodes/nodes.tsx:55 #: src/renderer/components/+nodes/nodes.tsx:55
msgid "cores:" msgid "cores:"
msgstr "ядер:" msgstr "ядер:"

View File

@ -5,9 +5,14 @@ import migrations from "../migrations/user-store"
import { getAppVersion } from "./utils/app-version"; import { getAppVersion } from "./utils/app-version";
import { tracker } from "./tracker"; import { tracker } from "./tracker";
// todo: merge with common/user-store.ts // todo: merge with config.store.ts + theme.store.ts
// fixme: detect new contexts from .kube/config since last open // fixme: detect new contexts from .kube/config since last open
export enum ThemeType {
LIGHT = "light",
DARK = "dark",
}
export interface UserStoreModel { export interface UserStoreModel {
lastSeenAppVersion: string; lastSeenAppVersion: string;
seenContexts: string[]; seenContexts: string[];
@ -16,7 +21,7 @@ export interface UserStoreModel {
export interface UserPreferences { export interface UserPreferences {
httpsProxy?: string; httpsProxy?: string;
colorTheme?: string | "dark"; colorTheme?: string | "dark" | "light";
allowUntrustedCAs?: boolean; allowUntrustedCAs?: boolean;
allowTelemetry?: boolean; allowTelemetry?: boolean;
downloadMirror?: string | "default"; downloadMirror?: string | "default";
@ -41,8 +46,10 @@ export class UserStore extends BaseStore<UserStoreModel> {
@observable preferences: UserPreferences = { @observable preferences: UserPreferences = {
allowTelemetry: true, allowTelemetry: true,
allowUntrustedCAs: false,
colorTheme: "dark", colorTheme: "dark",
downloadMirror: "default", downloadMirror: "default",
httpsProxy: "",
}; };
get isNewVersion() { get isNewVersion() {

View File

@ -17,12 +17,13 @@ export type HelmRepo = {
} }
export class HelmRepoManager extends Singleton { export class HelmRepoManager extends Singleton {
public static cache = {} static cache = {}
protected helmEnv: HelmEnv protected helmEnv: HelmEnv
protected initialized: boolean protected initialized: boolean
public async init() { public async init() {
const helm = await helmCli.binaryPath() await helmCli.ensureBinary();
if (!this.initialized) { if (!this.initialized) {
this.helmEnv = await this.parseHelmEnv() this.helmEnv = await this.parseHelmEnv()
await this.update() await this.update()
@ -95,38 +96,6 @@ export class HelmRepoManager extends Singleton {
return stdout return stdout
} }
protected async addRepositories(repositories: HelmRepo[]) {
const currentRepositories = await this.repositories()
repositories.forEach(async (repo: HelmRepo) => {
try {
const repoExists = currentRepositories.find((currentRepo: HelmRepo) => {
return currentRepo.url == repo.url
})
if (!repoExists) {
await this.addRepo(repo)
}
} catch (error) {
logger.error(JSON.stringify(error))
}
});
}
protected async pruneRepositories(repositoriesToKeep: HelmRepo[]) {
const repositories = await this.repositories()
repositories.filter((repo: HelmRepo) => {
return repositoriesToKeep.find((repoToKeep: HelmRepo) => {
return repo.name == repoToKeep.name
}) === undefined
}).forEach(async (repo: HelmRepo) => {
try {
const output = await this.removeRepo(repo)
logger.debug(output)
} catch (error) {
logger.error(error)
}
})
}
public async addRepo(repository: HelmRepo) { public async addRepo(repository: HelmRepo) {
const helm = await helmCli.binaryPath() const helm = await helmCli.binaryPath()
logger.debug(`${helm} repo add ${repository.name} ${repository.url}`) logger.debug(`${helm} repo add ${repository.name} ${repository.url}`)
@ -136,16 +105,6 @@ export class HelmRepoManager extends Singleton {
}) })
return stdout return stdout
} }
public async removeRepo(repository: HelmRepo): Promise<string> {
const helm = await helmCli.binaryPath()
logger.debug(`${helm} repo remove ${repository.name} ${repository.url}`)
const { stdout, stderr } = await promiseExec(`"${helm}" repo remove ${repository.name}`).catch((error) => {
throw(error.stderr)
})
return stdout
}
} }
export const repoManager = HelmRepoManager.getInstance<HelmRepoManager>() export const repoManager = HelmRepoManager.getInstance<HelmRepoManager>()

View File

@ -94,7 +94,7 @@ class ConfigRoute extends LensApi {
const data: IConfigRoutePayload = { const data: IConfigRoutePayload = {
clusterName: cluster.contextName, clusterName: cluster.contextName,
lensVersion: app.getVersion(), lensVersion: app.getVersion(),
lensTheme: `kontena-${userStore.preferences.colorTheme}`, lensTheme: userStore.preferences.colorTheme,
kubeVersion: cluster.version, kubeVersion: cluster.version,
chartsEnabled: true, chartsEnabled: true,
isClusterAdmin: cluster.isAdmin, isClusterAdmin: cluster.isAdmin,

View File

@ -206,7 +206,10 @@ export default {
loadHubRepositories: async function() { loadHubRepositories: async function() {
const res = await this.request({ uri: "https://hub.helm.sh/assets/js/repos.json"}).catch((error) => { this.hubRepositories = [] }) const res = await this.request({ uri: "https://hub.helm.sh/assets/js/repos.json"}).catch((error) => { this.hubRepositories = [] })
this.hubRepositories = res.body.data.sort(this.repoCompare).map((repo) => { this.hubRepositories = res.body.data.sort(this.repoCompare).map((repo) => {
return { text: repo.name, value: repo.name+"|"+repo.url} return {
text: repo.name,
value: repo.name+"|"+repo.url
}
}) })
} }
}, },

View File

@ -1,3 +1,9 @@
.Preferences { .Preferences {
--flex-gap: #{$padding};
h2 {
&:not(:first-child) {
margin-top: $padding * 3;
}
}
} }

View File

@ -1,14 +1,106 @@
import "./preferences.scss" import "./preferences.scss"
import React from "react"; import React, { Fragment } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { t, Trans } from "@lingui/macro";
import { _i18n } from "../../i18n";
import { WizardLayout } from "../layout/wizard-layout";
import { Icon } from "../icon";
import { Select, SelectOption } from "../select";
import { ThemeType, userStore } from "../../../common/user-store";
import { Input } from "../input";
import { Checkbox } from "../checkbox";
type ThemeSelectOption = SelectOption & { type: ThemeType }
@observer @observer
export class Preferences extends React.Component { export class Preferences extends React.Component {
render() { themeOptions: ThemeSelectOption[] = [
{ value: "kontena-dark", label: <Trans>Dark</Trans>, type: ThemeType.DARK },
{ value: "kontena-light", label: <Trans>Light</Trans>, type: ThemeType.LIGHT },
]
downloadMirrorOptions: SelectOption[] = [
{ value: "default", label: "Default (Google)" },
{ value: "china", label: "China (Azure)" },
]
onThemeChange = ({ value }: ThemeSelectOption) => {
// themeStore.setTheme(value); // fixme: apply theme on the fly for current view
userStore.preferences.colorTheme = value;
}
renderInfo() {
return ( return (
<div className="Preferences"> <Fragment>
Preferences <h2>
</div> <Trans>Preferences</Trans>
</h2>
<div className="info-block flex gaps align-center">
<Icon small material="info"/>
<small>
<Trans>Lens Global Settings</Trans> (<Trans>applicable to all clusters</Trans>)
</small>
</div>
</Fragment>
)
}
render() {
const { preferences } = userStore;
return (
<WizardLayout className="Preferences" infoPanel={this.renderInfo()}>
<h2><Trans>Color Theme</Trans></h2>
<Select
options={this.themeOptions}
value={preferences.colorTheme}
onChange={this.onThemeChange}
/>
<h2><Trans>Download Mirror</Trans></h2>
<Select
placeholder={_i18n._(t`Download mirror for kubectl`)}
options={this.downloadMirrorOptions}
value={preferences.downloadMirror}
onChange={({ value }: SelectOption) => preferences.downloadMirror = value}
/>
<h2><Trans>Helm</Trans></h2>
<div className="helm">
// todo: added helm repos
</div>
<h2><Trans>HTTP Proxy</Trans></h2>
<Input
placeholder={_i18n._(t`Type HTTP proxy url (example: http://proxy.acme.org:8080)`)}
value={preferences.httpsProxy}
onChange={v => preferences.httpsProxy = v}
/>
<small className="hint">
<Trans>Proxy is used only for non-cluster communication.</Trans>
</small>
<h2><Trans>Certificate Trust</Trans></h2>
<Checkbox
label={<Trans>Allow untrusted Certificate Authorities</Trans>}
value={preferences.allowUntrustedCAs}
onChange={v => preferences.allowUntrustedCAs = v}
/>
<small className="hint">
<Trans>This will make Lens to trust ANY certificate authority without any validations.</Trans>{" "}
<Trans>Needed with some corporate proxies that do certificate re-writing.</Trans>{" "}
<Trans>Does not affect cluster communications!</Trans>
</small>
<h2><Trans>Telemetry & Usage Tracking</Trans></h2>
<Checkbox
label={<Trans>Allow telemetry & usage tracking</Trans>}
value={preferences.allowTelemetry}
onChange={v => preferences.allowTelemetry = v}
/>
<small className="hint">
<Trans>Telemetry & usage data is collected to continuously improve the Lens experience.</Trans>
</small>
</WizardLayout>
) )
} }
} }

View File

@ -37,6 +37,7 @@ import { clusterIpc } from "../../common/cluster-ipc";
import { clusterStore } from "../../common/cluster-store"; import { clusterStore } from "../../common/cluster-store";
import { ClusterStatus } from "./cluster-manager/cluster-status"; import { ClusterStatus } from "./cluster-manager/cluster-status";
import { clusterStatusRoute, clusterStatusURL } from "./cluster-manager/cluster-status.route"; import { clusterStatusRoute, clusterStatusURL } from "./cluster-manager/cluster-status.route";
import { Preferences, preferencesRoute } from "./+preferences";
import { navigation } from "../navigation"; import { navigation } from "../navigation";
import { CubeSpinner } from "./spinner"; import { CubeSpinner } from "./spinner";
@ -85,6 +86,7 @@ export class App extends React.Component {
<ErrorBoundary> <ErrorBoundary>
<Switch> <Switch>
<Route component={LandingPage} {...landingRoute}/> <Route component={LandingPage} {...landingRoute}/>
<Route component={Preferences} {...preferencesRoute}/>
<Route component={Workspaces} {...workspacesRoute}/> <Route component={Workspaces} {...workspacesRoute}/>
<Route component={AddCluster} {...addClusterRoute}/> <Route component={AddCluster} {...addClusterRoute}/>
<Route component={Cluster} {...clusterRoute}/> <Route component={Cluster} {...clusterRoute}/>

View File

@ -1,5 +1,5 @@
.WizardLayout { .WizardLayout {
--flex-gap: #{$padding * 2}; $spacing: $padding * 2;
position: relative; position: relative;
padding: $padding * 3; padding: $padding * 3;
@ -8,8 +8,9 @@
grid-template-columns: 1fr 40%; grid-template-columns: 1fr 40%;
> .content-col { > .content-col {
padding: var(--flex-gap); --flex-gap: #{$spacing};
margin-right: var(--flex-gap); padding: $spacing;
margin-right: $spacing;
background-color: var(--clusters-menu-bgc); background-color: var(--clusters-menu-bgc);
border-radius: $radius; border-radius: $radius;
@ -22,7 +23,8 @@
> .info-col { > .info-col {
@include hidden-scrollbar; @include hidden-scrollbar;
padding: var(--flex-gap); --flex-gap: #{$spacing};
padding: $spacing;
border-left: 1px solid #353a3e; border-left: 1px solid #353a3e;
} }

View File

@ -7,7 +7,7 @@ import { createPortal } from "react-dom"
import { autobind, cssNames } from "../../utils"; import { autobind, cssNames } from "../../utils";
import { Animate } from "../animate"; import { Animate } from "../animate";
// todo: refactor -- better positioning + remove "flying effect" // fixme: refactor -- better positioning + remove "flying effect"
// todo: always render outside of parent element ("overflow: auto" should not affect tooltip) // todo: always render outside of parent element ("overflow: auto" should not affect tooltip)
export interface TooltipProps { export interface TooltipProps {

View File

@ -13,7 +13,6 @@ import { _i18n } from "./i18n";
import { ClusterManager } from "./components/cluster-manager"; import { ClusterManager } from "./components/cluster-manager";
import { ErrorBoundary } from "./components/error-boundary"; import { ErrorBoundary } from "./components/error-boundary";
import { WhatsNew, whatsNewRoute } from "./components/+whats-new"; import { WhatsNew, whatsNewRoute } from "./components/+whats-new";
import { Preferences, preferencesRoute } from "./components/+preferences";
@observer @observer
class LensApp extends React.Component { class LensApp extends React.Component {
@ -37,7 +36,6 @@ class LensApp extends React.Component {
<Switch> <Switch>
{userStore.isNewVersion && <Route component={WhatsNew}/>} {userStore.isNewVersion && <Route component={WhatsNew}/>}
<Route component={WhatsNew} {...whatsNewRoute}/> <Route component={WhatsNew} {...whatsNewRoute}/>
<Route component={Preferences} {...preferencesRoute}/>
<Route component={ClusterManager}/> <Route component={ClusterManager}/>
</Switch> </Switch>
</ErrorBoundary> </ErrorBoundary>