mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fixes
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
bec50de6a6
commit
56d1806619
@ -87,8 +87,8 @@ msgstr "Account Name"
|
||||
msgid "Active"
|
||||
msgstr "Active"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:248
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:116
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:303
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:118
|
||||
msgid "Add Cluster"
|
||||
msgstr "Add Cluster"
|
||||
|
||||
@ -112,7 +112,7 @@ msgstr "Add bindings to {name}"
|
||||
#~ msgid "Add cluster"
|
||||
#~ msgstr "Add cluster"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:266
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:320
|
||||
msgid "Add cluster(s)"
|
||||
msgstr "Add cluster(s)"
|
||||
|
||||
@ -132,6 +132,10 @@ msgstr "Add field"
|
||||
#~ msgid "Added repos:"
|
||||
#~ msgstr "Added repos:"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Adding clusters: <0>{0}</0>"
|
||||
#~ msgstr "Adding clusters: <0>{0}</0>"
|
||||
|
||||
#: src/renderer/components/+preferences/preferences.tsx:103
|
||||
msgid "Adding helm branch <0>{0}</0> has failed: {1}"
|
||||
msgstr "Adding helm branch <0>{0}</0> has failed: {1}"
|
||||
@ -289,7 +293,7 @@ msgstr "Are you sure you want to drain <0>{nodeName}</0>?"
|
||||
msgid "Arguments"
|
||||
msgstr "Arguments"
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:106
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:108
|
||||
msgid "Associate clusters and choose the ones you want to access via quick launch menu by clicking the + button."
|
||||
msgstr "Associate clusters and choose the ones you want to access via quick launch menu by clicking the + button."
|
||||
|
||||
@ -319,7 +323,7 @@ msgstr "Binding targets"
|
||||
msgid "Bindings"
|
||||
msgstr "Bindings"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:227
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:251
|
||||
msgid "Browse"
|
||||
msgstr "Browse"
|
||||
|
||||
@ -600,6 +604,14 @@ msgstr "Containers"
|
||||
msgid "Context"
|
||||
msgstr "Context"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Contexts: <0>{0}</0>"
|
||||
#~ msgstr "Contexts: <0>{0}</0>"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:249
|
||||
#~ msgid "Contexts: {0}"
|
||||
#~ msgstr "Contexts: {0}"
|
||||
|
||||
#: src/renderer/components/+workloads-pods/pods.tsx:79
|
||||
#: src/renderer/components/kube-object/kube-object-meta.tsx:39
|
||||
msgid "Controlled By"
|
||||
@ -903,6 +915,10 @@ msgstr "Environment"
|
||||
msgid "Error stack"
|
||||
msgstr "Error stack"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:129
|
||||
msgid "Error while adding cluster(s): {0}"
|
||||
msgstr "Error while adding cluster(s): {0}"
|
||||
|
||||
#: src/renderer/components/+events/events.tsx:56
|
||||
#: src/renderer/components/+events/kube-event-details.tsx:34
|
||||
#: src/renderer/components/+events/kube-event-details.tsx:39
|
||||
@ -1730,7 +1746,7 @@ msgstr "Parallelism"
|
||||
msgid "Parameters"
|
||||
msgstr "Parameters"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:222
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:245
|
||||
msgid "Paste as text"
|
||||
msgstr "Paste as text"
|
||||
|
||||
@ -1754,9 +1770,17 @@ msgstr "Persistent Volume Claims"
|
||||
msgid "Persistent Volumes"
|
||||
msgstr "Persistent Volumes"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:95
|
||||
msgid "Please select at least one cluster context"
|
||||
msgstr "Please select at least one cluster context"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:146
|
||||
#~ msgid "Please select at least one context to add a cluster"
|
||||
#~ msgstr "Please select at least one context to add a cluster"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:106
|
||||
msgid "Please select kube-config's context"
|
||||
msgstr "Please select kube-config's context"
|
||||
#~ msgid "Please select kube-config's context"
|
||||
#~ msgstr "Please select kube-config's context"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:63
|
||||
#~ msgid "Please select kubeconfig"
|
||||
@ -1766,6 +1790,10 @@ msgstr "Please select kube-config's context"
|
||||
#~ msgid "Please select kubeconfig context"
|
||||
#~ msgstr "Please select kubeconfig context"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:106
|
||||
#~ msgid "Please select kubeconfig's context"
|
||||
#~ msgstr "Please select kubeconfig's context"
|
||||
|
||||
#: src/renderer/components/+workloads-pods/pod-menu.tsx:50
|
||||
msgid "Pod"
|
||||
msgstr "Pod"
|
||||
@ -1851,13 +1879,33 @@ msgstr "Private Key Secret"
|
||||
msgid "Privileged"
|
||||
msgstr "Privileged"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig (text/yaml) to get available contexts"
|
||||
#~ msgstr "Pro-Tip: paste kubeconfig (text/yaml) to get available contexts"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig to collect available contexts"
|
||||
#~ msgstr "Pro-Tip: paste kubeconfig to collect available contexts"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:263
|
||||
msgid "Pro-Tip: paste kubeconfig to get available contexts"
|
||||
msgstr "Pro-Tip: paste kubeconfig to get available contexts"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig to parse available contexts"
|
||||
#~ msgstr "Pro-Tip: paste kubeconfig to parse available contexts"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:254
|
||||
msgid "Pro-Tip: you can also drag-n-drop kubeconfig file to this area"
|
||||
msgstr "Pro-Tip: you can also drag-n-drop kubeconfig file to this area"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:225
|
||||
#~ msgid "Pro-tip: you can also drag-n-drop kube-config file in the left-side area"
|
||||
#~ msgstr "Pro-tip: you can also drag-n-drop kube-config file in the left-side area"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:229
|
||||
msgid "Pro-tip: you can also drag-n-drop kube-config file to this area"
|
||||
msgstr "Pro-tip: you can also drag-n-drop kube-config file to this area"
|
||||
#~ msgid "Pro-tip: you can also drag-n-drop kube-config file to this area"
|
||||
#~ msgstr "Pro-tip: you can also drag-n-drop kube-config file to this area"
|
||||
|
||||
#: src/renderer/components/+storage-classes/storage-class-details.tsx:28
|
||||
#: src/renderer/components/+storage-classes/storage-classes.tsx:35
|
||||
@ -1868,7 +1916,7 @@ msgstr "Provisioner"
|
||||
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:254
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:308
|
||||
msgid "Proxy settings"
|
||||
msgstr "Proxy settings"
|
||||
|
||||
@ -2049,7 +2097,7 @@ msgstr "Required Drop Capabilities"
|
||||
msgid "Required field"
|
||||
msgstr "Required field"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:226
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:250
|
||||
#: src/renderer/components/item-object-list/page-filters-list.tsx:31
|
||||
msgid "Reset"
|
||||
msgstr "Reset"
|
||||
@ -2059,8 +2107,8 @@ msgid "Reset filters?"
|
||||
msgstr "Reset filters?"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:65
|
||||
msgid "Resetting config to {0}"
|
||||
msgstr "Resetting config to {0}"
|
||||
#~ msgid "Resetting config to {0}"
|
||||
#~ msgstr "Resetting config to {0}"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:68
|
||||
#~ msgid "Resetting kube-config to current {0}"
|
||||
@ -2265,9 +2313,9 @@ msgstr "Secret type"
|
||||
msgid "Secrets"
|
||||
msgstr "Secrets"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:251
|
||||
msgid "Select a context"
|
||||
msgstr "Select a context"
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:253
|
||||
#~ msgid "Select a context"
|
||||
#~ msgstr "Select a context"
|
||||
|
||||
#: src/renderer/components/+config-resource-quotas/add-quota-dialog.tsx:134
|
||||
msgid "Select a quota.."
|
||||
@ -2277,23 +2325,40 @@ msgstr "Select a quota.."
|
||||
#~ msgid "Select context"
|
||||
#~ msgstr "Select context"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:245
|
||||
#~ msgid "Select context(s)"
|
||||
#~ msgstr "Select context(s)"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:272
|
||||
msgid "Select contexts"
|
||||
msgstr "Select contexts"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:76
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:76
|
||||
msgid "Select custom kube-config file"
|
||||
msgstr "Select custom kube-config file"
|
||||
#~ msgid "Select custom kube-config file"
|
||||
#~ msgstr "Select custom kube-config file"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:85
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:85
|
||||
msgid "Select custom kubeconfig file"
|
||||
msgstr "Select custom kubeconfig file"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:212
|
||||
#~ msgid "Select file"
|
||||
#~ msgstr "Select file"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:221
|
||||
msgid "Select kube-config file"
|
||||
msgstr "Select kube-config file"
|
||||
#~ msgid "Select kube-config file"
|
||||
#~ msgstr "Select kube-config file"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:173
|
||||
#~ msgid "Select kubeconfig"
|
||||
#~ msgstr "Select kubeconfig"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
msgid "Select kubeconfig file"
|
||||
msgstr "Select kubeconfig file"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:224
|
||||
#~ msgid "Select or drop file"
|
||||
#~ msgstr "Select or drop file"
|
||||
@ -2310,6 +2375,22 @@ msgstr "Select role.."
|
||||
msgid "Select service accounts"
|
||||
msgstr "Select service accounts"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Selected clusters: <0>{0}</0>"
|
||||
#~ msgstr "Selected clusters: <0>{0}</0>"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Selected contexts ({0}): <0>{1}</0>"
|
||||
#~ msgstr "Selected contexts ({0}): <0>{1}</0>"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:271
|
||||
msgid "Selected contexts: <0>{0}</0>"
|
||||
msgstr "Selected contexts: <0>{0}</0>"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:246
|
||||
#~ msgid "Selected contexts: {0}"
|
||||
#~ msgstr "Selected contexts: {0}"
|
||||
|
||||
#: src/renderer/components/+config-pod-disruption-budgets/pod-disruption-budgets-details.tsx:27
|
||||
#: src/renderer/components/+network-services/service-details.tsx:37
|
||||
#: src/renderer/components/+network-services/services.tsx:50
|
||||
@ -2486,6 +2567,10 @@ msgstr "Submitting.."
|
||||
msgid "Subsets"
|
||||
msgstr "Subsets"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:122
|
||||
msgid "Successfully imported <0>{0}</0> cluster(s)"
|
||||
msgstr "Successfully imported <0>{0}</0> cluster(s)"
|
||||
|
||||
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:128
|
||||
msgid "Supplemental Groups"
|
||||
msgstr "Supplemental Groups"
|
||||
@ -2532,7 +2617,7 @@ msgstr "There are no logs available."
|
||||
msgid "This field is required"
|
||||
msgstr "This field is required"
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:104
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:106
|
||||
msgid "This is the quick launch menu."
|
||||
msgstr "This is the quick launch menu."
|
||||
|
||||
@ -2636,8 +2721,8 @@ msgstr "Upgrade version"
|
||||
msgid "Usage"
|
||||
msgstr "Usage"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:77
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:77
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:86
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:86
|
||||
msgid "Use configuration"
|
||||
msgstr "Use configuration"
|
||||
|
||||
@ -2804,7 +2889,7 @@ msgstr "listKind"
|
||||
msgid "never"
|
||||
msgstr "never"
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:119
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:121
|
||||
msgid "new"
|
||||
msgstr "new"
|
||||
|
||||
|
||||
@ -87,8 +87,8 @@ msgstr ""
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:248
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:116
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:303
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:118
|
||||
msgid "Add Cluster"
|
||||
msgstr ""
|
||||
|
||||
@ -112,7 +112,7 @@ msgstr ""
|
||||
#~ msgid "Add cluster"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:266
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:320
|
||||
msgid "Add cluster(s)"
|
||||
msgstr ""
|
||||
|
||||
@ -132,6 +132,10 @@ msgstr ""
|
||||
#~ msgid "Added repos:"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Adding clusters: <0>{0}</0>"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+preferences/preferences.tsx:103
|
||||
msgid "Adding helm branch <0>{0}</0> has failed: {1}"
|
||||
msgstr ""
|
||||
@ -289,7 +293,7 @@ msgstr ""
|
||||
msgid "Arguments"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:106
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:108
|
||||
msgid "Associate clusters and choose the ones you want to access via quick launch menu by clicking the + button."
|
||||
msgstr ""
|
||||
|
||||
@ -319,7 +323,7 @@ msgstr ""
|
||||
msgid "Bindings"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:227
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:251
|
||||
msgid "Browse"
|
||||
msgstr ""
|
||||
|
||||
@ -596,6 +600,14 @@ msgstr ""
|
||||
msgid "Context"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Contexts: <0>{0}</0>"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:249
|
||||
#~ msgid "Contexts: {0}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+workloads-pods/pods.tsx:79
|
||||
#: src/renderer/components/kube-object/kube-object-meta.tsx:39
|
||||
msgid "Controlled By"
|
||||
@ -899,6 +911,10 @@ msgstr ""
|
||||
msgid "Error stack"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:129
|
||||
msgid "Error while adding cluster(s): {0}"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+events/events.tsx:56
|
||||
#: src/renderer/components/+events/kube-event-details.tsx:34
|
||||
#: src/renderer/components/+events/kube-event-details.tsx:39
|
||||
@ -1713,7 +1729,7 @@ msgstr ""
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:222
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:245
|
||||
msgid "Paste as text"
|
||||
msgstr ""
|
||||
|
||||
@ -1737,10 +1753,18 @@ msgstr ""
|
||||
msgid "Persistent Volumes"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:106
|
||||
msgid "Please select kube-config's context"
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:95
|
||||
msgid "Please select at least one cluster context"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:146
|
||||
#~ msgid "Please select at least one context to add a cluster"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:106
|
||||
#~ msgid "Please select kube-config's context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:63
|
||||
#~ msgid "Please select kubeconfig"
|
||||
#~ msgstr ""
|
||||
@ -1749,6 +1773,10 @@ msgstr ""
|
||||
#~ msgid "Please select kubeconfig context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:106
|
||||
#~ msgid "Please select kubeconfig's context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+workloads-pods/pod-menu.tsx:50
|
||||
msgid "Pod"
|
||||
msgstr ""
|
||||
@ -1834,13 +1862,33 @@ msgstr ""
|
||||
msgid "Privileged"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig (text/yaml) to get available contexts"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig to collect available contexts"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:263
|
||||
msgid "Pro-Tip: paste kubeconfig to get available contexts"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig to parse available contexts"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:254
|
||||
msgid "Pro-Tip: you can also drag-n-drop kubeconfig file to this area"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:225
|
||||
#~ msgid "Pro-tip: you can also drag-n-drop kube-config file in the left-side area"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:229
|
||||
msgid "Pro-tip: you can also drag-n-drop kube-config file to this area"
|
||||
msgstr ""
|
||||
#~ msgid "Pro-tip: you can also drag-n-drop kube-config file to this area"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+storage-classes/storage-class-details.tsx:28
|
||||
#: src/renderer/components/+storage-classes/storage-classes.tsx:35
|
||||
@ -1851,7 +1899,7 @@ msgstr ""
|
||||
msgid "Proxy is used only for non-cluster communication."
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:254
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:308
|
||||
msgid "Proxy settings"
|
||||
msgstr ""
|
||||
|
||||
@ -2032,7 +2080,7 @@ msgstr ""
|
||||
msgid "Required field"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:226
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:250
|
||||
#: src/renderer/components/item-object-list/page-filters-list.tsx:31
|
||||
msgid "Reset"
|
||||
msgstr ""
|
||||
@ -2042,8 +2090,8 @@ msgid "Reset filters?"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:65
|
||||
msgid "Resetting config to {0}"
|
||||
msgstr ""
|
||||
#~ msgid "Resetting config to {0}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:68
|
||||
#~ msgid "Resetting kube-config to current {0}"
|
||||
@ -2248,9 +2296,9 @@ msgstr ""
|
||||
msgid "Secrets"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:251
|
||||
msgid "Select a context"
|
||||
msgstr ""
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:253
|
||||
#~ msgid "Select a context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+config-resource-quotas/add-quota-dialog.tsx:134
|
||||
msgid "Select a quota.."
|
||||
@ -2260,9 +2308,22 @@ msgstr ""
|
||||
#~ msgid "Select context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:245
|
||||
#~ msgid "Select context(s)"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:272
|
||||
msgid "Select contexts"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:76
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:76
|
||||
msgid "Select custom kube-config file"
|
||||
#~ msgid "Select custom kube-config file"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:85
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:85
|
||||
msgid "Select custom kubeconfig file"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:212
|
||||
@ -2270,13 +2331,17 @@ msgstr ""
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:221
|
||||
msgid "Select kube-config file"
|
||||
msgstr ""
|
||||
#~ msgid "Select kube-config file"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:173
|
||||
#~ msgid "Select kubeconfig"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
msgid "Select kubeconfig file"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:224
|
||||
#~ msgid "Select or drop file"
|
||||
#~ msgstr ""
|
||||
@ -2293,6 +2358,22 @@ msgstr ""
|
||||
msgid "Select service accounts"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Selected clusters: <0>{0}</0>"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Selected contexts ({0}): <0>{1}</0>"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:271
|
||||
msgid "Selected contexts: <0>{0}</0>"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:246
|
||||
#~ msgid "Selected contexts: {0}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+config-pod-disruption-budgets/pod-disruption-budgets-details.tsx:27
|
||||
#: src/renderer/components/+network-services/service-details.tsx:37
|
||||
#: src/renderer/components/+network-services/services.tsx:50
|
||||
@ -2469,6 +2550,10 @@ msgstr ""
|
||||
msgid "Subsets"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:122
|
||||
msgid "Successfully imported <0>{0}</0> cluster(s)"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:128
|
||||
msgid "Supplemental Groups"
|
||||
msgstr ""
|
||||
@ -2515,7 +2600,7 @@ msgstr ""
|
||||
msgid "This field is required"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:104
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:106
|
||||
msgid "This is the quick launch menu."
|
||||
msgstr ""
|
||||
|
||||
@ -2619,8 +2704,8 @@ msgstr ""
|
||||
msgid "Usage"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:77
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:77
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:86
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:86
|
||||
msgid "Use configuration"
|
||||
msgstr ""
|
||||
|
||||
@ -2787,7 +2872,7 @@ msgstr ""
|
||||
msgid "never"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:119
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:121
|
||||
msgid "new"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@ -88,8 +88,8 @@ msgstr "Название аккаунта"
|
||||
msgid "Active"
|
||||
msgstr "Активный"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:248
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:116
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:303
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:118
|
||||
msgid "Add Cluster"
|
||||
msgstr ""
|
||||
|
||||
@ -113,7 +113,7 @@ msgstr "Добавить привязки к {name}"
|
||||
#~ msgid "Add cluster"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:266
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:320
|
||||
msgid "Add cluster(s)"
|
||||
msgstr ""
|
||||
|
||||
@ -133,6 +133,10 @@ msgstr "Добавить поле"
|
||||
#~ msgid "Added repos:"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Adding clusters: <0>{0}</0>"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+preferences/preferences.tsx:103
|
||||
msgid "Adding helm branch <0>{0}</0> has failed: {1}"
|
||||
msgstr ""
|
||||
@ -290,7 +294,7 @@ msgstr "Выполнить команду drain для ноды <0>{nodeName}</0
|
||||
msgid "Arguments"
|
||||
msgstr "Аргументы"
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:106
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:108
|
||||
msgid "Associate clusters and choose the ones you want to access via quick launch menu by clicking the + button."
|
||||
msgstr ""
|
||||
|
||||
@ -320,7 +324,7 @@ msgstr "Цели привязки"
|
||||
msgid "Bindings"
|
||||
msgstr "Привязки"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:227
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:251
|
||||
msgid "Browse"
|
||||
msgstr ""
|
||||
|
||||
@ -601,6 +605,14 @@ msgstr "Контейнеры"
|
||||
msgid "Context"
|
||||
msgstr "Контекст"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Contexts: <0>{0}</0>"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:249
|
||||
#~ msgid "Contexts: {0}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+workloads-pods/pods.tsx:79
|
||||
#: src/renderer/components/kube-object/kube-object-meta.tsx:39
|
||||
msgid "Controlled By"
|
||||
@ -904,6 +916,10 @@ msgstr "Среда"
|
||||
msgid "Error stack"
|
||||
msgstr "Стэк ошибки"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:129
|
||||
msgid "Error while adding cluster(s): {0}"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+events/events.tsx:56
|
||||
#: src/renderer/components/+events/kube-event-details.tsx:34
|
||||
#: src/renderer/components/+events/kube-event-details.tsx:39
|
||||
@ -1731,7 +1747,7 @@ msgstr "Параллелизм"
|
||||
msgid "Parameters"
|
||||
msgstr "Параметры"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:222
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:245
|
||||
msgid "Paste as text"
|
||||
msgstr ""
|
||||
|
||||
@ -1755,10 +1771,18 @@ msgstr "Persistent Volume Claims"
|
||||
msgid "Persistent Volumes"
|
||||
msgstr "Persistent Volumes"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:106
|
||||
msgid "Please select kube-config's context"
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:95
|
||||
msgid "Please select at least one cluster context"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:146
|
||||
#~ msgid "Please select at least one context to add a cluster"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:106
|
||||
#~ msgid "Please select kube-config's context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:63
|
||||
#~ msgid "Please select kubeconfig"
|
||||
#~ msgstr ""
|
||||
@ -1767,6 +1791,10 @@ msgstr ""
|
||||
#~ msgid "Please select kubeconfig context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:106
|
||||
#~ msgid "Please select kubeconfig's context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+workloads-pods/pod-menu.tsx:50
|
||||
msgid "Pod"
|
||||
msgstr ""
|
||||
@ -1852,13 +1880,33 @@ msgstr "Секрет приватного ключа"
|
||||
msgid "Privileged"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig (text/yaml) to get available contexts"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig to collect available contexts"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:263
|
||||
msgid "Pro-Tip: paste kubeconfig to get available contexts"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:264
|
||||
#~ msgid "Pro-Tip: paste kubeconfig to parse available contexts"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:254
|
||||
msgid "Pro-Tip: you can also drag-n-drop kubeconfig file to this area"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:225
|
||||
#~ msgid "Pro-tip: you can also drag-n-drop kube-config file in the left-side area"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:229
|
||||
msgid "Pro-tip: you can also drag-n-drop kube-config file to this area"
|
||||
msgstr ""
|
||||
#~ msgid "Pro-tip: you can also drag-n-drop kube-config file to this area"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+storage-classes/storage-class-details.tsx:28
|
||||
#: src/renderer/components/+storage-classes/storage-classes.tsx:35
|
||||
@ -1869,7 +1917,7 @@ msgstr "Комиссия"
|
||||
msgid "Proxy is used only for non-cluster communication."
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:254
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:308
|
||||
msgid "Proxy settings"
|
||||
msgstr ""
|
||||
|
||||
@ -2050,7 +2098,7 @@ msgstr ""
|
||||
msgid "Required field"
|
||||
msgstr "Обязательное поле"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:226
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:250
|
||||
#: src/renderer/components/item-object-list/page-filters-list.tsx:31
|
||||
msgid "Reset"
|
||||
msgstr "Сбросить"
|
||||
@ -2060,8 +2108,8 @@ msgid "Reset filters?"
|
||||
msgstr "Сбросить фильтры?"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:65
|
||||
msgid "Resetting config to {0}"
|
||||
msgstr ""
|
||||
#~ msgid "Resetting config to {0}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:68
|
||||
#~ msgid "Resetting kube-config to current {0}"
|
||||
@ -2266,9 +2314,9 @@ msgstr "Тип секрета"
|
||||
msgid "Secrets"
|
||||
msgstr "Secrets"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:251
|
||||
msgid "Select a context"
|
||||
msgstr ""
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:253
|
||||
#~ msgid "Select a context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+config-resource-quotas/add-quota-dialog.tsx:134
|
||||
msgid "Select a quota.."
|
||||
@ -2278,9 +2326,22 @@ msgstr "Выберите квоту..."
|
||||
#~ msgid "Select context"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:245
|
||||
#~ msgid "Select context(s)"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:272
|
||||
msgid "Select contexts"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:76
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:76
|
||||
msgid "Select custom kube-config file"
|
||||
#~ msgid "Select custom kube-config file"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:85
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:85
|
||||
msgid "Select custom kubeconfig file"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:212
|
||||
@ -2288,13 +2349,17 @@ msgstr ""
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:221
|
||||
msgid "Select kube-config file"
|
||||
msgstr ""
|
||||
#~ msgid "Select kube-config file"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:173
|
||||
#~ msgid "Select kubeconfig"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
msgid "Select kubeconfig file"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:224
|
||||
#~ msgid "Select or drop file"
|
||||
#~ msgstr ""
|
||||
@ -2311,6 +2376,22 @@ msgstr "Выбрать роль.."
|
||||
msgid "Select service accounts"
|
||||
msgstr "Выбрать сервисные аккаунты"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Selected clusters: <0>{0}</0>"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:244
|
||||
#~ msgid "Selected contexts ({0}): <0>{1}</0>"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:271
|
||||
msgid "Selected contexts: <0>{0}</0>"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:246
|
||||
#~ msgid "Selected contexts: {0}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/renderer/components/+config-pod-disruption-budgets/pod-disruption-budgets-details.tsx:27
|
||||
#: src/renderer/components/+network-services/service-details.tsx:37
|
||||
#: src/renderer/components/+network-services/services.tsx:50
|
||||
@ -2487,6 +2568,10 @@ msgstr "Применение.."
|
||||
msgid "Subsets"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:122
|
||||
msgid "Successfully imported <0>{0}</0> cluster(s)"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/+pod-security-policies/pod-security-policy-details.tsx:128
|
||||
msgid "Supplemental Groups"
|
||||
msgstr ""
|
||||
@ -2533,7 +2618,7 @@ msgstr "Логи отсутствуют."
|
||||
msgid "This field is required"
|
||||
msgstr "Это обязательное поле"
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:104
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:106
|
||||
msgid "This is the quick launch menu."
|
||||
msgstr ""
|
||||
|
||||
@ -2637,8 +2722,8 @@ msgstr "Обновить версию"
|
||||
msgid "Usage"
|
||||
msgstr "Использование"
|
||||
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:77
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:77
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:86
|
||||
#: src/renderer/components/+add-cluster/add-cluster.tsx:86
|
||||
msgid "Use configuration"
|
||||
msgstr ""
|
||||
|
||||
@ -2805,7 +2890,7 @@ msgstr ""
|
||||
msgid "never"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:119
|
||||
#: src/renderer/components/cluster-manager/clusters-menu.tsx:121
|
||||
msgid "new"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@ -87,6 +87,7 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
||||
return this.activeClusterId === id;
|
||||
}
|
||||
|
||||
@action
|
||||
setActive(id: ClusterId) {
|
||||
this.activeClusterId = id;
|
||||
}
|
||||
@ -108,14 +109,18 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
||||
}
|
||||
|
||||
@action
|
||||
async addCluster(model: ClusterModel, activate = true): Promise<Cluster> {
|
||||
addCluster(model: ClusterModel): Cluster {
|
||||
tracker.event("cluster", "add");
|
||||
const cluster = new Cluster(model);
|
||||
this.clusters.set(model.id, cluster);
|
||||
if (activate) this.activeClusterId = model.id;
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@action
|
||||
addClusters(models: ClusterModel[]) {
|
||||
models.forEach(model => this.addCluster(model));
|
||||
}
|
||||
|
||||
@action
|
||||
async removeById(clusterId: ClusterId) {
|
||||
tracker.event("cluster", "remove");
|
||||
|
||||
@ -9,6 +9,16 @@
|
||||
|
||||
.hint {
|
||||
margin-top: -$padding;
|
||||
color: $textColorSecondary;
|
||||
|
||||
> * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.AceEditor {
|
||||
min-height: 200px;
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
.Select {
|
||||
@ -16,6 +26,14 @@
|
||||
--flex-gap: #{$padding};
|
||||
}
|
||||
|
||||
// todo: extract to component, merge with namespace-select.scss
|
||||
&__placeholder {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__control {
|
||||
box-shadow: 0 0 0 1px $borderFaintColor;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ import "./add-cluster.scss"
|
||||
import os from "os";
|
||||
import React, { Fragment } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { computed, observable } from "mobx";
|
||||
import { action, observable, runInAction } from "mobx";
|
||||
import { remote } from "electron";
|
||||
import { KubeConfig } from "@kubernetes/client-node";
|
||||
import { _i18n } from "../../i18n";
|
||||
@ -14,7 +14,7 @@ import { Button } from "../button";
|
||||
import { Icon } from "../icon";
|
||||
import { WizardLayout } from "../layout/wizard-layout";
|
||||
import { kubeConfigDefaultPath, loadConfig, saveConfigToAppFiles, splitConfig, validateConfig } from "../../../common/kube-helpers";
|
||||
import { clusterStore } from "../../../common/cluster-store";
|
||||
import { ClusterModel, clusterStore } from "../../../common/cluster-store";
|
||||
import { workspaceStore } from "../../../common/workspace-store";
|
||||
import { v4 as uuid } from "uuid"
|
||||
import { navigate } from "../../navigation";
|
||||
@ -31,17 +31,18 @@ enum KubeConfigSourceTab {
|
||||
|
||||
@observer
|
||||
export class AddCluster extends React.Component {
|
||||
@observable.ref localKubeConfig: KubeConfig;
|
||||
@observable.ref newClusterConfig: KubeConfig;
|
||||
@observable.ref kubeConfigLocal: KubeConfig;
|
||||
@observable.ref error: React.ReactNode;
|
||||
|
||||
@observable kubeConfigPath = "";
|
||||
@observable kubeContexts = observable.map<string, KubeConfig>(); // available contexts from kubeconfig-file or user-input
|
||||
@observable selectedContexts = observable.array<string>();
|
||||
@observable sourceTab = KubeConfigSourceTab.FILE;
|
||||
@observable kubeConfigPath = "";
|
||||
@observable customConfig = ""
|
||||
@observable proxyServer = ""
|
||||
@observable isWaiting = false
|
||||
@observable showSettings = false
|
||||
@observable dropAreaActive = false;
|
||||
@observable proxyServer = ""
|
||||
@observable customConfig = ""
|
||||
|
||||
componentDidMount() {
|
||||
this.setKubeConfig(userStore.kubeConfigPath);
|
||||
@ -51,19 +52,17 @@ export class AddCluster extends React.Component {
|
||||
userStore.markNewContextsAsSeen();
|
||||
}
|
||||
|
||||
protected setKubeConfig(filePath: string, { saveGlobal = true, throwError = false } = {}) {
|
||||
@action
|
||||
protected setKubeConfig(filePath: string, { throwError = false } = {}) {
|
||||
try {
|
||||
const kubeConfig = loadConfig(filePath);
|
||||
validateConfig(kubeConfig);
|
||||
this.kubeConfigLocal = loadConfig(filePath);
|
||||
validateConfig(this.kubeConfigLocal);
|
||||
this.refreshContexts();
|
||||
this.kubeConfigPath = filePath;
|
||||
this.localKubeConfig = kubeConfig;
|
||||
this.newClusterConfig = null; // reset previously selected
|
||||
if (saveGlobal) {
|
||||
userStore.kubeConfigPath = filePath; // save to store
|
||||
}
|
||||
userStore.kubeConfigPath = filePath; // save to store
|
||||
} catch (err) {
|
||||
Notifications.error(
|
||||
<p>Can't read config file in <em>{filePath}</em>: {String(err)}</p>
|
||||
<div>Can't setup <code>{filePath}</code> as kubeconfig: {String(err)}</div>
|
||||
);
|
||||
if (throwError) {
|
||||
throw err;
|
||||
@ -71,27 +70,48 @@ export class AddCluster extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
onKubeConfigInputBlur = () => {
|
||||
const isChanged = this.kubeConfigPath !== userStore.kubeConfigPath;
|
||||
if (isChanged) {
|
||||
this.kubeConfigPath = this.kubeConfigPath.replace("~", os.homedir());
|
||||
refreshContexts = (autoSelect = true) => {
|
||||
this.selectedContexts.clear();
|
||||
|
||||
switch (this.sourceTab) {
|
||||
case KubeConfigSourceTab.FILE:
|
||||
const contexts = this.getContexts(this.kubeConfigLocal);
|
||||
this.kubeContexts.replace(contexts);
|
||||
break;
|
||||
|
||||
case KubeConfigSourceTab.TEXT:
|
||||
try {
|
||||
this.setKubeConfig(this.kubeConfigPath, { throwError: true })
|
||||
this.error = ""
|
||||
const contexts = this.getContexts(loadConfig(this.customConfig || "{}"));
|
||||
this.kubeContexts.replace(contexts);
|
||||
} catch (err) {
|
||||
Notifications.info(<p>
|
||||
<Trans>Resetting config to {userStore.kubeConfigPath}</Trans>
|
||||
</p>, { timeout: 2500 });
|
||||
this.setKubeConfig(userStore.kubeConfigPath);
|
||||
this.error = String(err);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (autoSelect) {
|
||||
const allContexts = Array.from(this.kubeContexts.keys());
|
||||
this.selectedContexts.replace(allContexts);
|
||||
}
|
||||
}
|
||||
|
||||
selectKubeConfig = async () => {
|
||||
protected getContexts(config: KubeConfig): Map<string, KubeConfig> {
|
||||
const contexts = new Map();
|
||||
splitConfig(config).forEach(config => {
|
||||
const isExists = clusterStore.hasContext(config.currentContext);
|
||||
if (!isExists) {
|
||||
contexts.set(config.currentContext, config);
|
||||
}
|
||||
})
|
||||
return contexts
|
||||
}
|
||||
|
||||
selectKubeConfigDialog = async () => {
|
||||
const { dialog, BrowserWindow } = remote;
|
||||
const { canceled, filePaths } = await dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), {
|
||||
defaultPath: this.kubeConfigPath,
|
||||
properties: ["openFile", "showHiddenFiles"],
|
||||
message: _i18n._(t`Select custom kube-config file`),
|
||||
message: _i18n._(t`Select custom kubeconfig file`),
|
||||
buttonLabel: _i18n._(t`Use configuration`),
|
||||
});
|
||||
if (!canceled && filePaths.length) {
|
||||
@ -99,67 +119,44 @@ export class AddCluster extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
resetKubeConfig = () => {
|
||||
this.setKubeConfig(kubeConfigDefaultPath);
|
||||
}
|
||||
|
||||
@computed get clusterOptions() {
|
||||
const options: SelectOption<KubeConfig>[] = [];
|
||||
if (this.localKubeConfig) {
|
||||
splitConfig(this.localKubeConfig).forEach(kubeConfig => {
|
||||
const context = kubeConfig.currentContext;
|
||||
const hasContext = clusterStore.hasContext(context);
|
||||
if (!hasContext) {
|
||||
options.push({
|
||||
value: kubeConfig,
|
||||
label: context,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
protected formatClusterContextLabel = ({ value, label }: SelectOption<KubeConfig>) => {
|
||||
if (value instanceof KubeConfig) {
|
||||
const context = value.currentContext;
|
||||
const isNew = userStore.newContexts.has(context);
|
||||
return (
|
||||
<div className={cssNames("kube-context flex gaps align-center", context)}>
|
||||
<span>{context}</span>
|
||||
{isNew && <Icon material="fiber_new"/>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return label;
|
||||
};
|
||||
|
||||
// fixme: allow to create multiple clusters at once (multi-select)
|
||||
addCluster = async () => {
|
||||
const { newClusterConfig, customConfig, proxyServer } = this;
|
||||
const clusterId = uuid();
|
||||
this.isWaiting = true
|
||||
this.error = ""
|
||||
addClusters = () => {
|
||||
try {
|
||||
const config = this.sourceTab == KubeConfigSourceTab.TEXT ? loadConfig(customConfig) : newClusterConfig;
|
||||
if (!config) {
|
||||
this.error = <Trans>Please select kube-config's context</Trans>
|
||||
if (!this.selectedContexts.length) {
|
||||
this.error = <Trans>Please select at least one cluster context</Trans>
|
||||
return;
|
||||
}
|
||||
validateConfig(config);
|
||||
await clusterStore.addCluster({
|
||||
id: clusterId,
|
||||
kubeConfigPath: saveConfigToAppFiles(clusterId, config),
|
||||
workspace: workspaceStore.currentWorkspaceId,
|
||||
contextName: config.currentContext,
|
||||
preferences: {
|
||||
clusterName: config.currentContext,
|
||||
httpsProxy: proxyServer || undefined,
|
||||
},
|
||||
this.error = ""
|
||||
this.isWaiting = true
|
||||
const newClusters: ClusterModel[] = this.selectedContexts.map(context => {
|
||||
const clusterId = uuid();
|
||||
const kubeConfig = this.kubeContexts.get(context);
|
||||
return {
|
||||
id: clusterId,
|
||||
kubeConfigPath: saveConfigToAppFiles(clusterId, kubeConfig),
|
||||
workspace: workspaceStore.currentWorkspaceId,
|
||||
contextName: kubeConfig.currentContext,
|
||||
preferences: {
|
||||
clusterName: kubeConfig.currentContext,
|
||||
httpsProxy: this.proxyServer || undefined,
|
||||
},
|
||||
}
|
||||
});
|
||||
navigate(clusterViewURL({ params: { clusterId } }))
|
||||
runInAction(() => {
|
||||
clusterStore.addClusters(newClusters);
|
||||
if (newClusters.length === 1) {
|
||||
const clusterId = newClusters[0].id;
|
||||
clusterStore.setActive(clusterId);
|
||||
navigate(clusterViewURL({ params: { clusterId } }));
|
||||
} else {
|
||||
Notifications.ok(
|
||||
<Trans>Successfully imported <b>{newClusters.length}</b> cluster(s)</Trans>
|
||||
);
|
||||
}
|
||||
})
|
||||
this.refreshContexts();
|
||||
} catch (err) {
|
||||
this.error = String(err);
|
||||
Notifications.error(<Trans>Error while adding cluster(s): {this.error}</Trans>);
|
||||
} finally {
|
||||
this.isWaiting = false;
|
||||
}
|
||||
@ -219,10 +216,10 @@ export class AddCluster extends React.Component {
|
||||
renderKubeConfigSource() {
|
||||
return (
|
||||
<>
|
||||
<Tabs withBorder onChange={v => this.sourceTab = v}>
|
||||
<Tabs withBorder onChange={this.onKubeConfigTabChange}>
|
||||
<Tab
|
||||
value={KubeConfigSourceTab.FILE}
|
||||
label={<Trans>Select kube-config file</Trans>}
|
||||
label={<Trans>Select kubeconfig file</Trans>}
|
||||
active={this.sourceTab == KubeConfigSourceTab.FILE}/>
|
||||
<Tab
|
||||
value={KubeConfigSourceTab.TEXT}
|
||||
@ -243,34 +240,105 @@ export class AddCluster extends React.Component {
|
||||
{this.kubeConfigPath !== kubeConfigDefaultPath && (
|
||||
<Icon
|
||||
material="settings_backup_restore"
|
||||
onClick={this.resetKubeConfig}
|
||||
onClick={() => this.setKubeConfig(kubeConfigDefaultPath)}
|
||||
tooltip={<Trans>Reset</Trans>}
|
||||
/>
|
||||
)}
|
||||
<Icon
|
||||
material="folder"
|
||||
onClick={this.selectKubeConfig}
|
||||
onClick={this.selectKubeConfigDialog}
|
||||
tooltip={<Trans>Browse</Trans>}
|
||||
/>
|
||||
</div>
|
||||
<small className="hint">
|
||||
<Trans>Pro-tip: you can also drag-n-drop kube-config file to this area</Trans>
|
||||
<Trans>Pro-Tip: you can also drag-n-drop kubeconfig file to this area</Trans>
|
||||
</small>
|
||||
</>
|
||||
)}
|
||||
{this.sourceTab === KubeConfigSourceTab.TEXT && (
|
||||
<AceEditor
|
||||
autoFocus
|
||||
showGutter={false}
|
||||
mode="yaml"
|
||||
value={this.customConfig}
|
||||
onChange={value => this.customConfig = value}
|
||||
/>
|
||||
<>
|
||||
<AceEditor
|
||||
autoFocus
|
||||
showGutter={false}
|
||||
mode="yaml"
|
||||
value={this.customConfig}
|
||||
onChange={value => {
|
||||
this.customConfig = value;
|
||||
this.refreshContexts();
|
||||
}}
|
||||
/>
|
||||
<small className="hint">
|
||||
<Trans>Pro-Tip: paste kubeconfig to get available contexts</Trans>
|
||||
</small>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
renderContextSelector() {
|
||||
const allContexts = Array.from(this.kubeContexts.keys());
|
||||
const placeholder = this.selectedContexts.length > 0
|
||||
? <Trans>Selected contexts: <b>{this.selectedContexts.length}</b></Trans>
|
||||
: <Trans>Select contexts</Trans>;
|
||||
return (
|
||||
<>
|
||||
<Select
|
||||
id="kubecontext-select" // todo: provide better mapping for integration tests (e.g. data-test-id="..")
|
||||
placeholder={placeholder}
|
||||
controlShouldRenderValue={false}
|
||||
closeMenuOnSelect={false}
|
||||
isOptionSelected={() => false}
|
||||
options={allContexts}
|
||||
formatOptionLabel={this.formatContextLabel}
|
||||
onChange={({ value: ctx }: SelectOption<string>) => {
|
||||
if (this.selectedContexts.includes(ctx)) {
|
||||
this.selectedContexts.remove(ctx)
|
||||
} else {
|
||||
this.selectedContexts.push(ctx);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{this.selectedContexts.length > 0 && (
|
||||
<small className="hint">
|
||||
<span>Applying contexts:</span>{" "}
|
||||
<code>{this.selectedContexts.join(", ")}</code>
|
||||
</small>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
onKubeConfigInputBlur = (evt: React.FocusEvent<HTMLInputElement>) => {
|
||||
const isChanged = this.kubeConfigPath !== userStore.kubeConfigPath;
|
||||
if (isChanged) {
|
||||
this.kubeConfigPath = this.kubeConfigPath.replace("~", os.homedir());
|
||||
try {
|
||||
this.setKubeConfig(this.kubeConfigPath, { throwError: true });
|
||||
} catch (err) {
|
||||
this.setKubeConfig(userStore.kubeConfigPath); // revert to previous valid path
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onKubeConfigTabChange = (tabId: KubeConfigSourceTab) => {
|
||||
this.sourceTab = tabId;
|
||||
this.error = "";
|
||||
this.refreshContexts();
|
||||
}
|
||||
|
||||
protected formatContextLabel = ({ value: context }: SelectOption<string>) => {
|
||||
const isNew = userStore.newContexts.has(context);
|
||||
const isSelected = this.selectedContexts.includes(context);
|
||||
return (
|
||||
<div className={cssNames("kube-context flex gaps align-center", context)}>
|
||||
<span>{context}</span>
|
||||
{isNew && <Icon small material="fiber_new"/>}
|
||||
{isSelected && <Icon small material="check" className="box right"/>}
|
||||
</div>
|
||||
)
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<WizardLayout
|
||||
@ -285,6 +353,7 @@ export class AddCluster extends React.Component {
|
||||
event.dataTransfer.dropEffect = "move"
|
||||
},
|
||||
onDrop: event => {
|
||||
this.sourceTab = KubeConfigSourceTab.FILE;
|
||||
this.dropAreaActive = false
|
||||
this.setKubeConfig(event.dataTransfer.files[0].path)
|
||||
}
|
||||
@ -292,14 +361,7 @@ export class AddCluster extends React.Component {
|
||||
>
|
||||
<h2><Trans>Add Cluster</Trans></h2>
|
||||
{this.renderKubeConfigSource()}
|
||||
<Select
|
||||
id="kubecontext-select" // todo: provide better mapping for integration tests (e.g. data-test-id="..")
|
||||
placeholder={<Trans>Select a context</Trans>}
|
||||
value={this.newClusterConfig}
|
||||
options={this.clusterOptions}
|
||||
onChange={({ value }: SelectOption) => this.newClusterConfig = value}
|
||||
formatOptionLabel={this.formatClusterContextLabel}
|
||||
/>
|
||||
{this.renderContextSelector()}
|
||||
<div className="cluster-settings">
|
||||
<a href="#" onClick={() => this.showSettings = !this.showSettings}>
|
||||
<Trans>Proxy settings</Trans>
|
||||
@ -326,7 +388,7 @@ export class AddCluster extends React.Component {
|
||||
<Button
|
||||
primary
|
||||
label={<Trans>Add cluster(s)</Trans>}
|
||||
onClick={this.addCluster}
|
||||
onClick={this.addClusters}
|
||||
waiting={this.isWaiting}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -3,17 +3,19 @@
|
||||
import "./ace-editor.scss"
|
||||
|
||||
import React from "react"
|
||||
import { observer, disposeOnUnmount } from "mobx-react";
|
||||
import AceBuild, { Ace } from "ace-builds"
|
||||
import { autobind, cssNames } from "../../utils";
|
||||
import { themeStore } from "../../theme.store";
|
||||
import { reaction } from "mobx";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import AceBuild, { Ace } from "ace-builds"
|
||||
import { autobind, cssNames, noop } from "../../utils";
|
||||
import { themeStore } from "../../theme.store";
|
||||
|
||||
interface Props extends Partial<Ace.EditorOptions> {
|
||||
className?: string;
|
||||
autoFocus?: boolean;
|
||||
hidden?: boolean;
|
||||
cursorPos?: Ace.Point;
|
||||
onFocus?(evt: FocusEvent, value: string): void;
|
||||
onBlur?(evt: FocusEvent, value: string): void;
|
||||
onChange?(value: string, delta: Ace.Delta): void;
|
||||
onCursorPosChange?(point: Ace.Point): void;
|
||||
}
|
||||
@ -30,6 +32,8 @@ const defaultProps: Partial<Props> = {
|
||||
foldStyle: "markbegin",
|
||||
printMargin: false,
|
||||
useWorker: false,
|
||||
onBlur: noop,
|
||||
onFocus: noop,
|
||||
};
|
||||
|
||||
@observer
|
||||
@ -64,7 +68,7 @@ export class AceEditor extends React.Component<Props, State> {
|
||||
async componentDidMount() {
|
||||
const {
|
||||
mode, autoFocus, className, hidden, cursorPos,
|
||||
onChange, onCursorPosChange, children,
|
||||
onBlur, onFocus, onChange, onCursorPosChange, children,
|
||||
...options
|
||||
} = this.props;
|
||||
|
||||
@ -75,6 +79,8 @@ export class AceEditor extends React.Component<Props, State> {
|
||||
this.setCursorPos(cursorPos);
|
||||
|
||||
// bind events
|
||||
this.editor.on("blur", (evt: any) => onBlur(evt, this.getValue()));
|
||||
this.editor.on("focus", (evt: any) => onFocus(evt, this.getValue()));
|
||||
this.editor.on("change", this.onChange);
|
||||
this.editor.selection.on("changeCursor", this.onCursorPosChange);
|
||||
|
||||
|
||||
@ -76,8 +76,10 @@ export class ClustersMenu extends React.Component<Props> {
|
||||
label: _i18n._(t`Remove`),
|
||||
},
|
||||
ok: () => {
|
||||
if (clusterStore.activeClusterId === cluster.id) {
|
||||
navigate(landingURL());
|
||||
}
|
||||
clusterStore.removeById(cluster.id);
|
||||
navigate(landingURL());
|
||||
},
|
||||
message: <p>Are you sure want to remove cluster <b title={cluster.id}>{cluster.contextName}</b>?</p>,
|
||||
})
|
||||
|
||||
@ -24,8 +24,12 @@
|
||||
&:not(.isOpen) {
|
||||
height: auto !important;
|
||||
|
||||
.Tab:not(:focus):after {
|
||||
display: none;
|
||||
.Tab {
|
||||
--color-active: inherit;
|
||||
|
||||
&:not(:focus):after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ export class Input extends React.Component<InputProps, State> {
|
||||
render() {
|
||||
const {
|
||||
multiLine, showValidationLine, validators, theme, maxRows, children,
|
||||
maxLength, rows, disabled, autoSelectOnFocus,
|
||||
maxLength, rows, disabled, autoSelectOnFocus, iconLeft, iconRight,
|
||||
...inputProps
|
||||
} = this.props;
|
||||
const { focused, dirty, valid, validating, errors } = this.state;
|
||||
@ -273,11 +273,6 @@ export class Input extends React.Component<InputProps, State> {
|
||||
validatingLine: validating && showValidationLine,
|
||||
});
|
||||
|
||||
// normalize icons
|
||||
let { iconLeft, iconRight } = this.props;
|
||||
if (isString(iconLeft)) iconLeft = <Icon material={iconLeft}/>
|
||||
if (isString(iconRight)) iconRight = <Icon material={iconRight}/>
|
||||
|
||||
// prepare input props
|
||||
Object.assign(inputProps, {
|
||||
className: "input box grow",
|
||||
@ -294,9 +289,9 @@ export class Input extends React.Component<InputProps, State> {
|
||||
return (
|
||||
<div className={className}>
|
||||
<label className="input-area flex gaps align-center">
|
||||
{iconLeft}
|
||||
{isString(iconLeft) ? <Icon material={iconLeft}/> : iconLeft}
|
||||
{multiLine ? <textarea {...inputProps as any}/> : <input {...inputProps as any}/>}
|
||||
{iconRight}
|
||||
{isString(iconRight) ? <Icon material={iconRight}/> : iconRight}
|
||||
</label>
|
||||
<div className="input-info flex gaps">
|
||||
{!valid && dirty && (
|
||||
|
||||
@ -36,6 +36,7 @@ export class Select extends React.Component<SelectProps> {
|
||||
static defaultProps: SelectProps = {
|
||||
autoConvertOptions: true,
|
||||
menuPortalTarget: document.body,
|
||||
menuPlacement: "auto",
|
||||
}
|
||||
|
||||
@computed get theme() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user