From becab462b16313a78ca05daa9fd5a8a26b9c04ef Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Fri, 29 Jan 2021 13:53:40 +0100 Subject: [PATCH] Improve theming options (#5763) * Update theme service Update local settings type Add utility style * Update text input component * Finish implementation * Lint files * Add theme configuration Add system theme option * Use document default view instead of window directly * Fix imports * Update translations * Fix lint issue --- i18n/de/messages.de.xlf | 44 +- i18n/fr/messages.fr.xlf | 44 +- i18n/ja/messages.ja.xlf | 44 +- i18n/ko/messages.ko.xlf | 46 +- i18n/messages.xlf | 3234 ++++++++--------- i18n/zh-Hans/messages.zh-Hans.xlf | 46 +- i18n/zh-Hant-HK/messages.zh-Hant-HK.xlf | 46 +- i18n/zh-Hant/messages.zh-Hant.xlf | 46 +- .../common/components/textinput/component.ts | 2 +- .../common/services/global/localsettings.ts | 10 +- .../frontend/common/services/global/module.ts | 5 +- .../frontend/common/services/global/theme.ts | 63 +- src/app/frontend/custom-themes.json | 2 + src/app/frontend/index.component.ts | 61 +- src/app/frontend/settings/local/component.ts | 27 +- src/app/frontend/settings/local/style.scss | 24 + src/app/frontend/settings/local/template.html | 27 +- src/app/frontend/typings/root.api.ts | 8 +- tsconfig.json | 1 + 19 files changed, 1931 insertions(+), 1849 deletions(-) create mode 100644 src/app/frontend/custom-themes.json create mode 100644 src/app/frontend/settings/local/style.scss diff --git a/i18n/de/messages.de.xlf b/i18n/de/messages.de.xlf index 463a8c1c4..bd2f71329 100644 --- a/i18n/de/messages.de.xlf +++ b/i18n/de/messages.de.xlf @@ -3310,7 +3310,7 @@ Kubernetes Dashboard src/app/frontend/login/component.ts - 53 + 54 @@ -3318,7 +3318,7 @@ Kubeconfig src/app/frontend/login/component.ts - 82 + 84 @@ -3326,7 +3326,7 @@ Basic src/app/frontend/login/component.ts - 106 + 104 @@ -3334,7 +3334,7 @@ Token src/app/frontend/login/component.ts - 132 + 130 @@ -3345,7 +3345,7 @@ src/app/frontend/login/component.ts - 166 + 163 @@ -3422,7 +3422,7 @@ src/app/frontend/login/component.ts - 69 + 70 @@ -5342,31 +5342,31 @@ Lokale Einstellungen src/app/frontend/settings/local/component.ts - 47 + 53 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - Lokale Einstellungen werden in Cookies im Browser abgelegt und somit nicht zwischen verschiedenen Geräten synchronisiert. Änderungen werden automatisch angewendet. + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. src/app/frontend/settings/local/component.ts - 59 + 74 - - Dark theme - Dunkles Thema + + Theme + Theme src/app/frontend/settings/local/component.ts - 59 + 74 - - Use dark theme in the whole app - In der gesamten App das dunkle Thema verwenden + + Choose color theme of the dashboard + Choose color theme of the dashboard src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5374,11 +5374,11 @@ Sprache src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5386,11 +5386,11 @@ Ändern Sie die Sprache des Dashboards src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 diff --git a/i18n/fr/messages.fr.xlf b/i18n/fr/messages.fr.xlf index f5395602f..695c5a5f5 100644 --- a/i18n/fr/messages.fr.xlf +++ b/i18n/fr/messages.fr.xlf @@ -3314,7 +3314,7 @@ Kubernetes Dashboard src/app/frontend/login/component.ts - 53 + 54 @@ -3322,7 +3322,7 @@ Kubeconfig src/app/frontend/login/component.ts - 82 + 84 @@ -3330,7 +3330,7 @@ Basic src/app/frontend/login/component.ts - 106 + 104 @@ -3338,7 +3338,7 @@ Jeton src/app/frontend/login/component.ts - 132 + 130 @@ -3350,7 +3350,7 @@ src/app/frontend/login/component.ts - 166 + 163 @@ -3432,7 +3432,7 @@ src/app/frontend/login/component.ts - 69 + 70 @@ -5356,31 +5356,31 @@ Paramètres locaux src/app/frontend/settings/local/component.ts - 47 + 53 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - Les paramètres locaux sont stockés dans les cookies du navigateur, et ne sont ainsi pas synchronisés entre plusieurs appareils. Les changements sont appliqués automatiquement à chaque changement. + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. src/app/frontend/settings/local/component.ts - 59 + 74 - - Dark theme - Thème sombre + + Theme + Theme src/app/frontend/settings/local/component.ts - 59 + 74 - - Use dark theme in the whole app - Utiliser le thème sombre dans la totalité de l'application + + Choose color theme of the dashboard + Choose color theme of the dashboard src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5388,11 +5388,11 @@ Langue src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5400,11 +5400,11 @@ Changer la langue du tableau de bord src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 diff --git a/i18n/ja/messages.ja.xlf b/i18n/ja/messages.ja.xlf index 2cbeaa215..1ccb26c5a 100644 --- a/i18n/ja/messages.ja.xlf +++ b/i18n/ja/messages.ja.xlf @@ -3053,7 +3053,7 @@ Kubernetes Dashboard src/app/frontend/login/component.ts - 53 + 54 @@ -3061,7 +3061,7 @@ Kubeconfig src/app/frontend/login/component.ts - 82 + 84 @@ -3069,7 +3069,7 @@ ベーシック src/app/frontend/login/component.ts - 106 + 104 @@ -3077,7 +3077,7 @@ トークン src/app/frontend/login/component.ts - 132 + 130 @@ -3087,7 +3087,7 @@ src/app/frontend/login/component.ts - 166 + 163 @@ -3162,7 +3162,7 @@ サインイン src/app/frontend/login/component.ts - 69 + 70 @@ -5304,31 +5304,31 @@ ローカル設定 src/app/frontend/settings/local/component.ts - 47 + 53 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - ローカル設定はブラウザーのクッキーに保存されます。複数のデバイス間で同期されません。変更は自動的に適用されます。 + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. src/app/frontend/settings/local/component.ts - 59 + 74 - - Dark theme - ダークテーマ + + Theme + Theme src/app/frontend/settings/local/component.ts - 59 + 74 - - Use dark theme in the whole app - ダークテーマをすべてのアプリケーションで使用する + + Choose color theme of the dashboard + Choose color theme of the dashboard src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5336,11 +5336,11 @@ 言語 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5348,11 +5348,11 @@ ダッシュボードの言語を変更する src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 diff --git a/i18n/ko/messages.ko.xlf b/i18n/ko/messages.ko.xlf index 01a377d6d..54dac3fcf 100644 --- a/i18n/ko/messages.ko.xlf +++ b/i18n/ko/messages.ko.xlf @@ -3090,7 +3090,7 @@ 쿠버네티스 대시보드 src/app/frontend/login/component.ts - 53 + 54 @@ -3098,7 +3098,7 @@ Kubeconfig src/app/frontend/login/component.ts - 82 + 84 @@ -3106,7 +3106,7 @@ 기본 src/app/frontend/login/component.ts - 106 + 104 @@ -3114,7 +3114,7 @@ 토큰 src/app/frontend/login/component.ts - 132 + 130 @@ -3124,7 +3124,7 @@ src/app/frontend/login/component.ts - 166 + 163 @@ -3201,7 +3201,7 @@ src/app/frontend/login/component.ts - 69 + 70 @@ -5414,33 +5414,31 @@ 로컬 설정 src/app/frontend/settings/local/component.ts - 47 + 53 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - - 로컬 설정은 브라우저의 쿠키에 저장되므로, 다중 장치 사이에 동기화가 되지 않습니다. 모든 변경 사항은 자동으로 적용됩니다. - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. src/app/frontend/settings/local/component.ts - 59 + 74 - - Dark theme - 어두운 테마 + + Theme + Theme src/app/frontend/settings/local/component.ts - 59 + 74 - - Use dark theme in the whole app - 전체 앱에 대해서 어두운 테마를 사용합니다. + + Choose color theme of the dashboard + Choose color theme of the dashboard src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5448,11 +5446,11 @@ 언어 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5460,11 +5458,11 @@ 대시 보드의 언어 변경 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 diff --git a/i18n/messages.xlf b/i18n/messages.xlf index bae62f44f..b60342a79 100644 --- a/i18n/messages.xlf +++ b/i18n/messages.xlf @@ -48,42 +48,42 @@ Kubernetes Dashboard src/app/frontend/login/component.ts - 53,59 + 54,60 Sign in src/app/frontend/login/component.ts - 69,73 + 70,74 Kubeconfig src/app/frontend/login/component.ts - 82,94 + 84,92 Basic src/app/frontend/login/component.ts - 106,116 + 104,112 Token src/app/frontend/login/component.ts - 132,139 + 130,136 Please select the kubeconfig file that you have created to configure access to the cluster. To find out more about how to configure and use kubeconfig file, please refer to the Configure Access to Multiple Clusters section. src/app/frontend/login/component.ts - 166 + 163 @@ -191,15 +191,15 @@ 60 - src/app/frontend/common/components/resourcelist/rolebinding/component.ts + src/app/frontend/common/components/resourcelist/serviceaccount/component.ts 67 - src/app/frontend/common/components/resourcelist/serviceaccount/component.ts + src/app/frontend/common/components/resourcelist/role/component.ts 67 - src/app/frontend/common/components/resourcelist/role/component.ts + src/app/frontend/common/components/resourcelist/rolebinding/component.ts 67 @@ -258,14 +258,14 @@ src/app/frontend/common/components/resourcelist/pod/component.ts 76,83 - - src/app/frontend/common/components/resourcelist/deployment/component.ts - 62,72 - src/app/frontend/common/components/resourcelist/job/component.ts 48,53 + + src/app/frontend/common/components/resourcelist/deployment/component.ts + 62,72 + src/app/frontend/common/components/resourcelist/daemonset/component.ts 63,72 @@ -275,25 +275,17 @@ 66,74 - src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts - 69,75 + src/app/frontend/common/components/resourcelist/plugin/component.ts + 66 - src/app/frontend/common/components/resourcelist/event/component.ts - 74,77 + src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts + 69,75 src/app/frontend/common/components/volumemount/component.ts 45,53 - - src/app/frontend/common/components/condition/component.ts - 61 - - - src/app/frontend/common/components/resourcelist/plugin/component.ts - 66 - src/app/frontend/common/components/ingressrulelist/component.ts 66 @@ -302,6 +294,10 @@ src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts 69 + + src/app/frontend/common/components/resourcelist/event/component.ts + 74,77 + src/app/frontend/common/components/resourcelist/crdversion/component.ts 42 @@ -330,6 +326,10 @@ src/app/frontend/common/components/endpoint/cardlist/component.ts 55 + + src/app/frontend/common/components/condition/component.ts + 61 + Name @@ -342,15 +342,15 @@ 60 - src/app/frontend/common/components/resourcelist/rolebinding/component.ts + src/app/frontend/common/components/resourcelist/serviceaccount/component.ts 67 - src/app/frontend/common/components/resourcelist/serviceaccount/component.ts + src/app/frontend/common/components/resourcelist/role/component.ts 67 - src/app/frontend/common/components/resourcelist/role/component.ts + src/app/frontend/common/components/resourcelist/rolebinding/component.ts 67 @@ -409,14 +409,14 @@ src/app/frontend/common/components/resourcelist/pod/component.ts 97,110 - - src/app/frontend/common/components/resourcelist/deployment/component.ts - 86,97 - src/app/frontend/common/components/resourcelist/job/component.ts 92,96 + + src/app/frontend/common/components/resourcelist/deployment/component.ts + 86,97 + src/app/frontend/common/components/resourcelist/daemonset/component.ts 88,95 @@ -426,25 +426,17 @@ 81 - src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts - 88,91 - - - src/app/frontend/common/components/creator/component.ts - 37 + src/app/frontend/common/components/resourcelist/plugin/component.ts + 66 - src/app/frontend/common/components/objectmeta/component.ts - 39 + src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts + 88,91 src/app/frontend/common/components/volumemount/component.ts 62,65 - - src/app/frontend/common/components/resourcelist/plugin/component.ts - 66 - src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts 69 @@ -465,6 +457,14 @@ src/app/frontend/common/components/quotas/component.ts 49 + + src/app/frontend/common/components/objectmeta/component.ts + 39 + + + src/app/frontend/common/components/creator/component.ts + 37 + src/app/frontend/resource/workloads/deployment/detail/component.ts 96 @@ -481,15 +481,15 @@ 50 - src/app/frontend/common/components/resourcelist/rolebinding/component.ts + src/app/frontend/common/components/resourcelist/serviceaccount/component.ts 67 - src/app/frontend/common/components/resourcelist/serviceaccount/component.ts + src/app/frontend/common/components/resourcelist/role/component.ts 67 - src/app/frontend/common/components/resourcelist/role/component.ts + src/app/frontend/common/components/resourcelist/rolebinding/component.ts 67 @@ -528,14 +528,14 @@ src/app/frontend/common/components/resourcelist/pod/component.ts 117 - - src/app/frontend/common/components/resourcelist/deployment/component.ts - 101 - src/app/frontend/common/components/resourcelist/job/component.ts 96 + + src/app/frontend/common/components/resourcelist/deployment/component.ts + 101 + src/app/frontend/common/components/resourcelist/daemonset/component.ts 95 @@ -544,18 +544,14 @@ src/app/frontend/common/components/resourcelist/cronjob/component.ts 81 - - src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts - 91 - - - src/app/frontend/common/components/objectmeta/component.ts - 39 - src/app/frontend/common/components/resourcelist/plugin/component.ts 66 + + src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts + 91 + src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts 69 @@ -564,6 +560,10 @@ src/app/frontend/common/components/resourcelist/crdobject/component.ts 71 + + src/app/frontend/common/components/objectmeta/component.ts + 39 + src/app/frontend/resource/workloads/deployment/detail/component.ts 96 @@ -722,104 +722,6 @@ 103 - - Download logs file - - - src/app/frontend/common/dialogs/download/dialog.ts - 49,56 - - - - Size: B - - src/app/frontend/common/dialogs/download/dialog.ts - 75 - - - - Preparing file to download... - - src/app/frontend/common/dialogs/download/template.html - 38,47 - - - - File is ready to download! - - src/app/frontend/common/dialogs/download/template.html - 61,66 - - - - Forbidden (403) - - src/app/frontend/common/dialogs/download/template.html - 66 - - - - You do not have required permissions to access this resource. - - src/app/frontend/common/dialogs/download/template.html - 66 - - - - Save - - src/app/frontend/common/dialogs/download/template.html - 66 - - - src/app/frontend/settings/global/saveanywaysdialog/dialog.ts - 29 - - - - Abort - - src/app/frontend/common/dialogs/download/template.html - 66 - - - - Close - - src/app/frontend/common/dialogs/download/template.html - 66 - - - src/app/frontend/common/components/chips/chipdialog/dialog.ts - 30 - - - - Delete a resource - - src/app/frontend/common/dialogs/deleteresource/dialog.ts - 33 - - - - Delete - - src/app/frontend/common/dialogs/deleteresource/dialog.ts - 33 - - - src/app/frontend/common/components/list/column/menu/component.ts - 92,101 - - - - Are you sure you want to delete  in namespace ? - - src/app/frontend/common/dialogs/deleteresource/dialog.ts - 33 - - @@ -841,15 +743,15 @@ 60 - src/app/frontend/common/components/resourcelist/rolebinding/component.ts + src/app/frontend/common/components/resourcelist/serviceaccount/component.ts 67 - src/app/frontend/common/components/resourcelist/serviceaccount/component.ts + src/app/frontend/common/components/resourcelist/role/component.ts 67 - src/app/frontend/common/components/resourcelist/role/component.ts + src/app/frontend/common/components/resourcelist/rolebinding/component.ts 67 @@ -908,14 +810,14 @@ src/app/frontend/common/components/resourcelist/pod/component.ts 117 - - src/app/frontend/common/components/resourcelist/deployment/component.ts - 101 - src/app/frontend/common/components/resourcelist/job/component.ts 96 + + src/app/frontend/common/components/resourcelist/deployment/component.ts + 101 + src/app/frontend/common/components/resourcelist/daemonset/component.ts 95 @@ -924,18 +826,14 @@ src/app/frontend/common/components/resourcelist/cronjob/component.ts 81 - - src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts - 91 - - - src/app/frontend/common/components/objectmeta/component.ts - 39 - src/app/frontend/common/components/resourcelist/plugin/component.ts 66 + + src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts + 91 + src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts 69 @@ -952,12 +850,9 @@ src/app/frontend/common/components/quotas/component.ts 49 - - - Role Bindings - src/app/frontend/common/components/resourcelist/rolebinding/component.ts - 48,55 + src/app/frontend/common/components/objectmeta/component.ts + 39 @@ -1225,19 +1120,117 @@ 60 - - There is nothing to display here + + Download logs file + - src/app/frontend/common/components/zerostate/component.ts - 23 + src/app/frontend/common/dialogs/download/dialog.ts + 49,56 + + + Size: B - src/app/frontend/common/components/list/zerostate/component.ts - 25 + src/app/frontend/common/dialogs/download/dialog.ts + 75 - - You can + Preparing file to download... + + src/app/frontend/common/dialogs/download/template.html + 38,47 + + + + File is ready to download! + + src/app/frontend/common/dialogs/download/template.html + 61,66 + + + + Forbidden (403) + + src/app/frontend/common/dialogs/download/template.html + 66 + + + + You do not have required permissions to access this resource. + + src/app/frontend/common/dialogs/download/template.html + 66 + + + + Save + + src/app/frontend/common/dialogs/download/template.html + 66 + + + src/app/frontend/settings/global/saveanywaysdialog/dialog.ts + 29 + + + + Abort + + src/app/frontend/common/dialogs/download/template.html + 66 + + + + Close + + src/app/frontend/common/dialogs/download/template.html + 66 + + + src/app/frontend/common/components/chips/chipdialog/dialog.ts + 30 + + + + Delete a resource + + src/app/frontend/common/dialogs/deleteresource/dialog.ts + 33 + + + + Delete + + src/app/frontend/common/dialogs/deleteresource/dialog.ts + 33 + + + src/app/frontend/common/components/list/column/menu/component.ts + 92,101 + + + + Are you sure you want to delete  in namespace ? + + src/app/frontend/common/dialogs/deleteresource/dialog.ts + 33 + + + + There is nothing to display here + + src/app/frontend/common/components/zerostate/component.ts + 23 + + + src/app/frontend/common/components/list/zerostate/component.ts + 25 + + + + You can deploy a containerized app, select other namespace or take the Dashboard Tour open_in_new to learn more. @@ -1302,14 +1295,14 @@ src/app/frontend/common/components/resourcelist/pod/component.ts 117 - - src/app/frontend/common/components/resourcelist/deployment/component.ts - 101 - src/app/frontend/common/components/resourcelist/job/component.ts 96 + + src/app/frontend/common/components/resourcelist/deployment/component.ts + 101 + src/app/frontend/common/components/resourcelist/daemonset/component.ts 95 @@ -1322,14 +1315,14 @@ src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts 91 - - src/app/frontend/common/components/creator/component.ts - 37 - src/app/frontend/common/components/objectmeta/component.ts 39 + + src/app/frontend/common/components/creator/component.ts + 37 + src/app/frontend/resource/workloads/deployment/detail/component.ts 96 @@ -1346,6 +1339,13 @@ 48,55 + + Role Bindings + + src/app/frontend/common/components/resourcelist/rolebinding/component.ts + 48,55 + + Nodes @@ -1414,14 +1414,14 @@ src/app/frontend/common/components/resourcelist/pod/component.ts 59,64 - - src/app/frontend/common/components/resourcelist/deployment/component.ts - 101 - src/app/frontend/common/components/resourcelist/job/component.ts 96 + + src/app/frontend/common/components/resourcelist/deployment/component.ts + 101 + src/app/frontend/common/components/resourcelist/daemonset/component.ts 95 @@ -1434,14 +1434,14 @@ src/app/frontend/common/components/creator/component.ts 37 - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - src/app/frontend/resource/workloads/deployment/detail/component.ts 96 + + src/app/frontend/resource/cluster/node/detail/component.ts + 146 + Network Policies @@ -1475,6 +1475,98 @@ 48,57 + + Show less + + src/app/frontend/common/components/chips/component.ts + 80,93 + + + + Show all + + src/app/frontend/common/components/chips/component.ts + 110,118 + + + + No resources found. + + src/app/frontend/common/components/list/zerostate/component.ts + 25 + + + + Filter + + src/app/frontend/common/components/list/filter/component.ts + 37,49 + + + src/app/frontend/common/components/list/filter/component.ts + 69 + + + + Filter objects by name + + src/app/frontend/common/components/list/filter/component.ts + 66,69 + + + src/app/frontend/common/components/list/filter/component.ts + 69 + + + + Edit + + src/app/frontend/common/components/list/column/menu/component.ts + 68,77 + + + + Logs + + src/app/frontend/common/components/list/column/menu/component.ts + 119,127 + + + + Exec + + src/app/frontend/common/components/list/column/menu/component.ts + 134 + + + + Trigger + + src/app/frontend/common/components/list/column/menu/component.ts + 134 + + + + Scale + + src/app/frontend/common/components/list/column/menu/component.ts + 134 + + + + Unpin + + src/app/frontend/common/components/list/column/menu/component.ts + 134 + + + + Pin + + src/app/frontend/common/components/list/column/menu/component.ts + 134 + + Storage Classes @@ -1583,14 +1675,14 @@ src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts 91 - - src/app/frontend/resource/cluster/persistentvolume/detail/component.ts - 66,76 - src/app/frontend/resource/config/persistentvolumeclaim/detail/component.ts 65 + + src/app/frontend/resource/cluster/persistentvolume/detail/component.ts + 66,76 + Access Modes @@ -1624,33 +1716,33 @@ src/app/frontend/common/components/resourcelist/pod/component.ts 117 - - src/app/frontend/resource/workloads/pod/detail/component.ts - 80 - src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts 91 + + src/app/frontend/common/components/quotas/component.ts + 49 + src/app/frontend/common/components/condition/component.ts 61 - src/app/frontend/common/components/quotas/component.ts - 49 + src/app/frontend/resource/workloads/pod/detail/component.ts + 80 - src/app/frontend/resource/cluster/namespace/detail/component.ts - 64,67 + src/app/frontend/resource/config/persistentvolumeclaim/detail/component.ts + 61,65 src/app/frontend/resource/cluster/persistentvolume/detail/component.ts 92,100 - src/app/frontend/resource/config/persistentvolumeclaim/detail/component.ts - 61,65 + src/app/frontend/resource/cluster/namespace/detail/component.ts + 64,67 @@ -1780,24 +1872,24 @@ src/app/frontend/common/components/resourcelist/replicaset/component.ts 105 - - src/app/frontend/common/components/resourcelist/deployment/component.ts - 101 - src/app/frontend/common/components/resourcelist/job/component.ts 96 + + src/app/frontend/common/components/resourcelist/deployment/component.ts + 101 + src/app/frontend/common/components/resourcelist/daemonset/component.ts 95 - src/app/frontend/resource/workloads/replicaset/detail/component.ts + src/app/frontend/resource/workloads/replicationcontroller/detail/component.ts 72 - src/app/frontend/resource/workloads/replicationcontroller/detail/component.ts + src/app/frontend/resource/workloads/replicaset/detail/component.ts 72 @@ -1808,6 +1900,10 @@ src/app/frontend/resource/workloads/statefulset/detail/component.ts 70 + + src/app/frontend/resource/workloads/job/detail/component.ts + 70 + src/app/frontend/resource/workloads/daemonset/detail/component.ts 72 @@ -1816,10 +1912,6 @@ src/app/frontend/resource/workloads/deployment/detail/component.ts 96 - - src/app/frontend/resource/workloads/job/detail/component.ts - 70 - Replication Controllers @@ -1849,14 +1941,14 @@ src/app/frontend/common/components/resourcelist/pod/component.ts 117 - - src/app/frontend/resource/workloads/pod/detail/component.ts - 80 - src/app/frontend/common/components/endpoint/cardlist/component.ts 55 + + src/app/frontend/resource/workloads/pod/detail/component.ts + 80 + Restarts @@ -1883,22 +1975,22 @@ 117 - - Deployments + + Jobs - src/app/frontend/common/components/resourcelist/deployment/component.ts - 46,51 + src/app/frontend/common/components/resourcelist/job/component.ts + 68,75 src/app/frontend/common/components/workloadstatus/component.ts 51 - - Jobs + + Deployments - src/app/frontend/common/components/resourcelist/job/component.ts - 68,75 + src/app/frontend/common/components/resourcelist/deployment/component.ts + 46,51 src/app/frontend/common/components/workloadstatus/component.ts @@ -1963,27 +2055,6 @@ 81 - - Show less - - src/app/frontend/common/components/chips/component.ts - 80,93 - - - - Show all - - src/app/frontend/common/components/chips/component.ts - 110,118 - - - - No resources found. - - src/app/frontend/common/components/list/zerostate/component.ts - 25 - - Workload Status @@ -1991,617 +2062,822 @@ 51 - - Filter + + Plugins - src/app/frontend/common/components/list/filter/component.ts - 37,49 + src/app/frontend/common/components/resourcelist/plugin/component.ts + 47,54 + + + Dependencies - src/app/frontend/common/components/list/filter/component.ts - 69 + src/app/frontend/common/components/resourcelist/plugin/component.ts + 66 - - Filter objects by name + + Persistent Volume Claims - src/app/frontend/common/components/list/filter/component.ts - 66,69 + src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts + 48,53 + + + Volume - src/app/frontend/common/components/list/filter/component.ts - 69 + src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts + 91 - - Edit + + Read Only - src/app/frontend/common/components/list/column/menu/component.ts - 68,77 + src/app/frontend/common/components/volumemount/component.ts + 65 - - Logs + + Mount Path - src/app/frontend/common/components/list/column/menu/component.ts - 119,127 + src/app/frontend/common/components/volumemount/component.ts + 65 - - Exec + + Sub Path - src/app/frontend/common/components/list/column/menu/component.ts - 134 + src/app/frontend/common/components/volumemount/component.ts + 65 - - Trigger + + Source Type - src/app/frontend/common/components/list/column/menu/component.ts - 134 + src/app/frontend/common/components/volumemount/component.ts + 65 - - Scale + + Source Name - src/app/frontend/common/components/list/column/menu/component.ts - 134 + src/app/frontend/common/components/volumemount/component.ts + 65 - - Unpin + + Rules - src/app/frontend/common/components/list/column/menu/component.ts - 134 + src/app/frontend/common/components/ingressrulelist/component.ts + 48,57 - - - Pin - src/app/frontend/common/components/list/column/menu/component.ts - 134 + src/app/frontend/common/components/policyrule/component.ts + 44,51 - - Resource information + + Host - src/app/frontend/resource/workloads/pod/detail/component.ts - 44,52 + src/app/frontend/common/components/ingressrulelist/component.ts + 66 - src/app/frontend/resource/workloads/replicaset/detail/component.ts - 43,51 + src/app/frontend/common/components/endpoint/cardlist/component.ts + 55 + + + Path - src/app/frontend/resource/workloads/replicationcontroller/detail/component.ts - 43,49 + src/app/frontend/common/components/ingressrulelist/component.ts + 66 - src/app/frontend/resource/workloads/statefulset/detail/component.ts - 43,50 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - src/app/frontend/resource/cluster/clusterrolebinding/detail/component.ts - 43,51 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - src/app/frontend/resource/discovery/service/detail/component.ts - 43,50 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 + + + Path Type - src/app/frontend/resource/cluster/networkpolicy/detail/component.ts - 45,50 + src/app/frontend/common/components/ingressrulelist/component.ts + 66 + + + Service Name - src/app/frontend/resource/cluster/node/detail/component.ts - 48,56 + src/app/frontend/common/components/ingressrulelist/component.ts + 66 + + + Service Port - src/app/frontend/resource/cluster/namespace/detail/component.ts - 43,52 + src/app/frontend/common/components/ingressrulelist/component.ts + 66 + + + Horizontal Pod Autoscalers - src/app/frontend/resource/cluster/persistentvolume/detail/component.ts - 45,54 + src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts + 47,54 + + + Min Replicas - src/app/frontend/resource/cluster/rolebinding/detail/component.ts - 42,50 + src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts + 69 + + + Max Replicas - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 43,51 + src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts + 69 + + + Reference - src/app/frontend/resource/workloads/daemonset/detail/component.ts - 43,51 + src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts + 69 + + + Events - src/app/frontend/resource/workloads/deployment/detail/component.ts - 44,49 + src/app/frontend/common/components/resourcelist/event/component.ts + 49,58 + + + Message - src/app/frontend/resource/workloads/job/detail/component.ts - 43,50 + src/app/frontend/common/components/resourcelist/event/component.ts + 77 - src/app/frontend/resource/config/persistentvolumeclaim/detail/component.ts - 41,49 + src/app/frontend/common/components/condition/component.ts + 61 - src/app/frontend/resource/config/storageclass/detail/component.ts - 44,52 + src/app/frontend/resource/cluster/persistentvolume/detail/component.ts + 106 - - Status:  + + Source - src/app/frontend/resource/workloads/pod/detail/component.ts - 60,68 + src/app/frontend/common/components/resourcelist/event/component.ts + 77 + + + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - IP:  + + Sub-object - src/app/frontend/resource/workloads/pod/detail/component.ts - 80 + src/app/frontend/common/components/resourcelist/event/component.ts + 77 - - IP + + Count - src/app/frontend/resource/workloads/pod/detail/component.ts - 80 + src/app/frontend/common/components/resourcelist/event/component.ts + 77 - - QoS Class + + First Seen - src/app/frontend/resource/workloads/pod/detail/component.ts - 80 + src/app/frontend/common/components/resourcelist/event/component.ts + 77 - - Containers + + Last Seen - src/app/frontend/resource/workloads/pod/detail/component.ts - 80 + src/app/frontend/common/components/resourcelist/event/component.ts + 77 + + + Versions - src/app/frontend/logs/component.ts - 72,79 + src/app/frontend/common/components/resourcelist/crdversion/component.ts + 42 + + + Served - src/app/frontend/logs/template.html - 154 + src/app/frontend/common/components/resourcelist/crdversion/component.ts + 42 - - Init containers + + Storage - src/app/frontend/resource/workloads/pod/detail/component.ts - 80 + src/app/frontend/common/components/resourcelist/crdversion/component.ts + 42 - - Pods:  + + Objects - src/app/frontend/resource/workloads/replicaset/detail/component.ts - 58,62 + src/app/frontend/common/components/resourcelist/crdobject/component.ts + 48,51 + + + + No resources found in the selected namespace. + + src/app/frontend/common/components/resourcelist/crdobject/component.ts + 71 + + + + Custom Resource Definitions + + src/app/frontend/common/components/resourcelist/crd/component.ts + 48,54 + + + + Group + + src/app/frontend/common/components/resourcelist/crd/component.ts + 85 + + + src/app/frontend/crd/detail/component.ts + 65 + + + + Full Name + + src/app/frontend/common/components/resourcelist/crd/component.ts + 85 + + + + Namespaced + + src/app/frontend/common/components/resourcelist/crd/component.ts + 85 + + + + Resource Quotas + + src/app/frontend/common/components/quotas/component.ts + 42,49 + + + + Resources + + src/app/frontend/common/components/policyrule/component.ts + 54 + + + + Non-resource URL + + src/app/frontend/common/components/policyrule/component.ts + 54 + + + + Resource Names + + src/app/frontend/common/components/policyrule/component.ts + 54 + + + + Verbs + + src/app/frontend/common/components/policyrule/component.ts + 54 + + + + API Groups + + src/app/frontend/common/components/policyrule/component.ts + 54 + + + + Pods status + + src/app/frontend/common/components/podstatus/component.ts + 26 src/app/frontend/resource/workloads/deployment/detail/component.ts - 96 + 76,85 - - Selector + + Desired:  - src/app/frontend/resource/workloads/replicaset/detail/component.ts - 72 + src/app/frontend/common/components/podstatus/component.ts + 26 + + + + Running:  + + src/app/frontend/common/components/podstatus/component.ts + 26 + + + Succeeded:  - src/app/frontend/resource/discovery/service/detail/component.ts - 70 + src/app/frontend/common/components/podstatus/component.ts + 26 + + + + Pending:  + + src/app/frontend/common/components/podstatus/component.ts + 26 + + + Failed:  - src/app/frontend/resource/workloads/daemonset/detail/component.ts - 58,62 + src/app/frontend/common/components/podstatus/component.ts + 26 + + + + Desired + + src/app/frontend/common/components/podstatus/component.ts + 26 + + + + Running + + src/app/frontend/common/components/podstatus/component.ts + 26 + + + + Succeeded + + src/app/frontend/common/components/podstatus/component.ts + 26 + + + + Pending + + src/app/frontend/common/components/podstatus/component.ts + 26 + + + + Failed + + src/app/frontend/common/components/podstatus/component.ts + 26 + + + + Metadata + + src/app/frontend/common/components/objectmeta/component.ts + 39 + + + + Name:  + + src/app/frontend/common/components/objectmeta/component.ts + 39 + + + src/app/frontend/common/components/creator/component.ts + 37 src/app/frontend/resource/workloads/deployment/detail/component.ts 96 - - Init images + + Age - src/app/frontend/resource/workloads/replicaset/detail/component.ts - 72 + src/app/frontend/common/components/objectmeta/component.ts + 39 + + + Namespace:  - src/app/frontend/resource/workloads/replicationcontroller/detail/component.ts - 72 + src/app/frontend/common/components/objectmeta/component.ts + 39 - src/app/frontend/resource/workloads/statefulset/detail/component.ts - 70 + src/app/frontend/resource/workloads/deployment/detail/component.ts + 96 + + + Age:  - src/app/frontend/resource/workloads/daemonset/detail/component.ts - 72 + src/app/frontend/common/components/objectmeta/component.ts + 39 + + + src/app/frontend/common/components/creator/component.ts + 37 src/app/frontend/resource/workloads/deployment/detail/component.ts 96 + + + UID - src/app/frontend/resource/workloads/job/detail/component.ts - 70 + src/app/frontend/common/components/objectmeta/component.ts + 39 - - Label Selector + + Annotations - src/app/frontend/resource/workloads/replicationcontroller/detail/component.ts - 57,61 + src/app/frontend/common/components/objectmeta/component.ts + 39 + + + Select namespace... - src/app/frontend/resource/workloads/statefulset/detail/component.ts - 59,67 + src/app/frontend/common/components/namespace/component.ts + 65,76 - - Image:  + + NAMESPACES - src/app/frontend/common/components/container/component.ts - 47,52 + src/app/frontend/common/components/namespace/component.ts + 88,94 - - - Image - src/app/frontend/common/components/container/component.ts - 59 + src/app/frontend/common/components/namespace/component.ts + 134,141 + + + All namespaces - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/common/components/namespace/component.ts + 107,118 - - Environment variable + + Namespace conflict - src/app/frontend/common/components/container/component.ts - 59 + src/app/frontend/common/components/namespace/changedialog/dialog.ts + 38 + + + Selected namespace is different than namespace of currently selected resource. - src/app/frontend/common/components/container/component.ts - 59 + src/app/frontend/common/components/namespace/changedialog/dialog.ts + 38 + + + Do you want to stay on current page and change namespace from to ? - src/app/frontend/common/components/container/template.html - 74,80 + src/app/frontend/common/components/namespace/changedialog/dialog.ts + 38 - - bytes + + Yes - src/app/frontend/common/components/container/component.ts - 59 + src/app/frontend/common/components/namespace/changedialog/template.html + 39 - - bytes + + No - src/app/frontend/common/components/container/template.html - 95,81 + src/app/frontend/common/components/namespace/changedialog/template.html + 39 - - Commands + + Resource Limits - src/app/frontend/common/components/container/template.html - 95,104 + src/app/frontend/common/components/limits/component.ts + 41 - - Arguments + + Resource name - src/app/frontend/common/components/container/template.html - 117,126 + src/app/frontend/common/components/limits/component.ts + 41 + + + src/app/frontend/resource/cluster/persistentvolume/detail/component.ts + 106 - - Mounts + + Resource type - src/app/frontend/common/components/container/template.html - 129 + src/app/frontend/common/components/limits/component.ts + 41 - - Persistent Volume Claims + + Default - src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts - 48,53 + src/app/frontend/common/components/limits/component.ts + 41 - - Volume + + Default request - src/app/frontend/common/components/resourcelist/persistentvolumeclaim/component.ts - 91 + src/app/frontend/common/components/limits/component.ts + 41 - - Controlled by + + Resource information - src/app/frontend/common/components/creator/component.ts - 37 + src/app/frontend/resource/workloads/replicationcontroller/detail/component.ts + 43,49 - - - Age - src/app/frontend/common/components/creator/component.ts - 37 + src/app/frontend/resource/workloads/replicaset/detail/component.ts + 43,51 - src/app/frontend/resource/workloads/deployment/detail/component.ts - 96 + src/app/frontend/resource/workloads/pod/detail/component.ts + 44,52 - - - Name:  - src/app/frontend/common/components/creator/component.ts - 37 + src/app/frontend/resource/workloads/statefulset/detail/component.ts + 43,50 - src/app/frontend/common/components/objectmeta/component.ts - 39 + src/app/frontend/resource/workloads/job/detail/component.ts + 43,50 - src/app/frontend/resource/workloads/deployment/detail/component.ts - 96 + src/app/frontend/resource/discovery/service/detail/component.ts + 43,50 - - - Kind:  - src/app/frontend/common/components/creator/component.ts - 37 + src/app/frontend/resource/config/persistentvolumeclaim/detail/component.ts + 41,49 - - - Age:  - src/app/frontend/common/components/creator/component.ts - 37 + src/app/frontend/resource/config/storageclass/detail/component.ts + 44,52 - src/app/frontend/common/components/objectmeta/component.ts - 39 + src/app/frontend/resource/workloads/daemonset/detail/component.ts + 43,51 src/app/frontend/resource/workloads/deployment/detail/component.ts - 96 + 44,49 - - - Events - src/app/frontend/common/components/resourcelist/event/component.ts - 49,58 + src/app/frontend/resource/cluster/rolebinding/detail/component.ts + 42,50 - - - Message - src/app/frontend/common/components/resourcelist/event/component.ts - 77 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 43,51 - src/app/frontend/common/components/condition/component.ts - 61 + src/app/frontend/resource/cluster/clusterrolebinding/detail/component.ts + 43,51 + + + src/app/frontend/resource/cluster/node/detail/component.ts + 48,56 src/app/frontend/resource/cluster/persistentvolume/detail/component.ts - 106 + 45,54 - - - Source - src/app/frontend/common/components/resourcelist/event/component.ts - 77 + src/app/frontend/resource/cluster/namespace/detail/component.ts + 43,52 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/resource/cluster/networkpolicy/detail/component.ts + 45,50 - - Sub-object + + Label Selector - src/app/frontend/common/components/resourcelist/event/component.ts - 77 + src/app/frontend/resource/workloads/replicationcontroller/detail/component.ts + 57,61 - - - Count - src/app/frontend/common/components/resourcelist/event/component.ts - 77 + src/app/frontend/resource/workloads/statefulset/detail/component.ts + 59,67 - - First Seen + + Init images - src/app/frontend/common/components/resourcelist/event/component.ts - 77 + src/app/frontend/resource/workloads/replicationcontroller/detail/component.ts + 72 - - - Last Seen - src/app/frontend/common/components/resourcelist/event/component.ts - 77 + src/app/frontend/resource/workloads/replicaset/detail/component.ts + 72 - - - Pods status - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/resource/workloads/statefulset/detail/component.ts + 70 + + + src/app/frontend/resource/workloads/job/detail/component.ts + 70 + + + src/app/frontend/resource/workloads/daemonset/detail/component.ts + 72 src/app/frontend/resource/workloads/deployment/detail/component.ts - 76,85 + 96 - - Desired:  + + Pods:  - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/resource/workloads/replicaset/detail/component.ts + 58,62 - - - Running:  - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/resource/workloads/deployment/detail/component.ts + 96 - - Succeeded:  + + Selector - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/resource/workloads/replicaset/detail/component.ts + 72 - - - Pending:  - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/resource/discovery/service/detail/component.ts + 70 - - - Failed:  - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/resource/workloads/daemonset/detail/component.ts + 58,62 - - - Desired - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/resource/workloads/deployment/detail/component.ts + 96 - - Running + + Ports (Name, Port, Protocol) - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/common/components/endpoint/cardlist/component.ts + 55 - - Succeeded + + unset - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/common/components/endpoint/cardlist/component.ts + 55 - - Pending + + Controlled by - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/common/components/creator/component.ts + 37 - - Failed + + Age - src/app/frontend/common/components/podstatus/component.ts - 26 + src/app/frontend/common/components/creator/component.ts + 37 + + + src/app/frontend/resource/workloads/deployment/detail/component.ts + 96 - - Metadata + + Kind:  - src/app/frontend/common/components/objectmeta/component.ts - 39 + src/app/frontend/common/components/creator/component.ts + 37 - - Age + + Image:  - src/app/frontend/common/components/objectmeta/component.ts - 39 + src/app/frontend/common/components/container/component.ts + 47,52 - - Namespace:  + + Image - src/app/frontend/common/components/objectmeta/component.ts - 39 + src/app/frontend/common/components/container/component.ts + 59 - src/app/frontend/resource/workloads/deployment/detail/component.ts - 96 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - UID + + Environment variable - src/app/frontend/common/components/objectmeta/component.ts - 39 + src/app/frontend/common/components/container/component.ts + 59 - - - Annotations - src/app/frontend/common/components/objectmeta/component.ts - 39 + src/app/frontend/common/components/container/component.ts + 59 + + + src/app/frontend/common/components/container/template.html + 74,80 - - Read Only + + bytes - src/app/frontend/common/components/volumemount/component.ts - 65 + src/app/frontend/common/components/container/component.ts + 59 - - Mount Path + + bytes - src/app/frontend/common/components/volumemount/component.ts - 65 + src/app/frontend/common/components/container/template.html + 95,81 - - Sub Path + + Commands - src/app/frontend/common/components/volumemount/component.ts - 65 + src/app/frontend/common/components/container/template.html + 95,104 - - Source Type + + Arguments - src/app/frontend/common/components/volumemount/component.ts - 65 + src/app/frontend/common/components/container/template.html + 117,126 - - Source Name + + Mounts - src/app/frontend/common/components/volumemount/component.ts - 65 + src/app/frontend/common/components/container/template.html + 129 @@ -2625,39 +2901,54 @@ 61 - - Delete resource + + Status:  - src/app/frontend/common/components/actionbar/detailactions/delete/component.ts - 47 + src/app/frontend/resource/workloads/pod/detail/component.ts + 60,68 - - Edit resource + + IP:  - src/app/frontend/common/components/actionbar/detailactions/edit/component.ts - 35 + src/app/frontend/resource/workloads/pod/detail/component.ts + 80 - - View logs + + IP - src/app/frontend/common/components/actionbar/detailactions/logs/component.ts - 38 + src/app/frontend/resource/workloads/pod/detail/component.ts + 80 - - Exec into pod + + QoS Class - src/app/frontend/common/components/actionbar/detailactions/exec/component.ts - 32 + src/app/frontend/resource/workloads/pod/detail/component.ts + 80 - - Scale resource + + Containers - src/app/frontend/common/components/actionbar/detailactions/scale/component.ts - 35 + src/app/frontend/resource/workloads/pod/detail/component.ts + 80 + + + src/app/frontend/logs/component.ts + 72,79 + + + src/app/frontend/logs/template.html + 154 + + + + Init containers + + src/app/frontend/resource/workloads/pod/detail/component.ts + 80 @@ -2667,356 +2958,364 @@ 35 - - Plugins + + Scale resource - src/app/frontend/common/components/resourcelist/plugin/component.ts - 47,54 + src/app/frontend/common/components/actionbar/detailactions/scale/component.ts + 35 - - Dependencies + + View logs - src/app/frontend/common/components/resourcelist/plugin/component.ts - 66 + src/app/frontend/common/components/actionbar/detailactions/logs/component.ts + 38 - - Rules - - src/app/frontend/common/components/ingressrulelist/component.ts - 48,57 - + + Exec into pod - src/app/frontend/common/components/policyrule/component.ts - 44,51 + src/app/frontend/common/components/actionbar/detailactions/exec/component.ts + 32 - - Host - - src/app/frontend/common/components/ingressrulelist/component.ts - 66 - + + Edit resource - src/app/frontend/common/components/endpoint/cardlist/component.ts - 55 + src/app/frontend/common/components/actionbar/detailactions/edit/component.ts + 35 - - Path + + Delete resource - src/app/frontend/common/components/ingressrulelist/component.ts - 66 + src/app/frontend/common/components/actionbar/detailactions/delete/component.ts + 47 + + + Data - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/crd/crdobject/component.ts + 54,58 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/resource/config/configmap/detail/component.ts + 44,49 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/resource/config/secret/detail/component.ts + 43,48 - - Path Type + + Completions:  - src/app/frontend/common/components/ingressrulelist/component.ts - 66 + src/app/frontend/resource/workloads/job/detail/component.ts + 59,70 - - Service Name + + Parallelism:  - src/app/frontend/common/components/ingressrulelist/component.ts - 66 + src/app/frontend/resource/workloads/job/detail/component.ts + 70 - - Service Port + + Completions - src/app/frontend/common/components/ingressrulelist/component.ts - 66 + src/app/frontend/resource/workloads/job/detail/component.ts + 70 - - Horizontal Pod Autoscalers + + Parallelism - src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts - 47,54 + src/app/frontend/resource/workloads/job/detail/component.ts + 70 - - Min Replicas + + Session Affinity - src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts - 69 + src/app/frontend/resource/discovery/service/detail/component.ts + 70 - - Max Replicas + + There is no data to display. - src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts - 69 + src/app/frontend/resource/config/configmap/detail/component.ts + 61,73 - - - Reference - src/app/frontend/common/components/resourcelist/horizontalpodautoscaler/component.ts - 69 + src/app/frontend/resource/config/secret/detail/component.ts + 62,75 - - Versions + + Parameter - src/app/frontend/common/components/resourcelist/crdversion/component.ts - 42 + src/app/frontend/resource/config/storageclass/detail/component.ts + 72 - - Served + + Resource Information - src/app/frontend/common/components/resourcelist/crdversion/component.ts - 42 + src/app/frontend/crd/detail/component.ts + 39,47 - - Storage + + Accepted Names - src/app/frontend/common/components/resourcelist/crdversion/component.ts - 42 + src/app/frontend/crd/detail/component.ts + 58,65 - - Objects + + Scope - src/app/frontend/common/components/resourcelist/crdobject/component.ts - 48,51 + src/app/frontend/crd/detail/component.ts + 65 - - No resources found in the selected namespace. + + Version - src/app/frontend/common/components/resourcelist/crdobject/component.ts - 71 + src/app/frontend/crd/detail/component.ts + 65 - - Custom Resource Definitions + + Subresources - src/app/frontend/common/components/resourcelist/crd/component.ts - 48,54 + src/app/frontend/crd/detail/component.ts + 65 - - Group + + Plural - src/app/frontend/common/components/resourcelist/crd/component.ts - 85 + src/app/frontend/crd/detail/component.ts + 65 + + + List Kind src/app/frontend/crd/detail/component.ts 65 - - Full Name + + Singular - src/app/frontend/common/components/resourcelist/crd/component.ts - 85 + src/app/frontend/crd/detail/component.ts + 65 - - Namespaced + + Short Names - src/app/frontend/common/components/resourcelist/crd/component.ts - 85 + src/app/frontend/crd/detail/component.ts + 65 - - Resource Quotas + + Categories - src/app/frontend/common/components/quotas/component.ts - 42,49 + src/app/frontend/crd/detail/component.ts + 65 - - Resources + + Local settings - src/app/frontend/common/components/policyrule/component.ts - 54 + src/app/frontend/settings/local/component.ts + 53,62 - - Non-resource URL + + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - src/app/frontend/common/components/policyrule/component.ts - 54 + src/app/frontend/settings/local/component.ts + 74 - - Resource Names + + Theme - src/app/frontend/common/components/policyrule/component.ts - 54 + src/app/frontend/settings/local/component.ts + 74 - - Verbs + + Choose color theme of the dashboard - src/app/frontend/common/components/policyrule/component.ts - 54 + src/app/frontend/settings/local/component.ts + 74 - - API Groups + + Language - src/app/frontend/common/components/policyrule/component.ts - 54 + src/app/frontend/settings/local/component.ts + 74 - - - Select namespace... - src/app/frontend/common/components/namespace/component.ts - 65,76 + src/app/frontend/settings/local/component.ts + 74 - - NAMESPACES + + Change the language of the dashboard - src/app/frontend/common/components/namespace/component.ts - 88,94 + src/app/frontend/settings/local/component.ts + 74 - src/app/frontend/common/components/namespace/component.ts - 134,141 + src/app/frontend/settings/local/component.ts + 74 - - All namespaces + + Global settings - src/app/frontend/common/components/namespace/component.ts - 107,118 + src/app/frontend/settings/global/component.ts + 42,58 - - Namespace conflict + + Global settings are stored in config map, so all of them are applied for every instance of the app. - src/app/frontend/common/components/namespace/changedialog/dialog.ts - 38 + src/app/frontend/settings/global/component.ts + 73,84 - - Selected namespace is different than namespace of currently selected resource. + + Cluster name - src/app/frontend/common/components/namespace/changedialog/dialog.ts - 38 + src/app/frontend/settings/global/component.ts + 96,105 + + + src/app/frontend/settings/global/component.ts + 114 - - Do you want to stay on current page and change namespace from to ? + + Cluster name appears in the browser window title if it is set. - src/app/frontend/common/components/namespace/changedialog/dialog.ts - 38 + src/app/frontend/settings/global/component.ts + 114 - - Yes + + Items per page - src/app/frontend/common/components/namespace/changedialog/template.html - 39 + src/app/frontend/settings/global/component.ts + 114 - - No + + Max number of items that can be displayed on every list view. - src/app/frontend/common/components/namespace/changedialog/template.html - 39 + src/app/frontend/settings/global/component.ts + 114 - - Resource Limits + + Labels limit - src/app/frontend/common/components/limits/component.ts - 41 + src/app/frontend/settings/global/component.ts + 114 - - Resource name + + Max number of labels that are displayed by default on most views. - src/app/frontend/common/components/limits/component.ts - 41 + src/app/frontend/settings/global/component.ts + 114 + + + Logs auto-refresh time interval - src/app/frontend/resource/cluster/persistentvolume/detail/component.ts - 106 + src/app/frontend/settings/global/component.ts + 114 - - Resource type + + Number of seconds between every auto-refresh of logs. - src/app/frontend/common/components/limits/component.ts - 41 + src/app/frontend/settings/global/component.ts + 114 - - Default + + Resource auto-refresh time interval - src/app/frontend/common/components/limits/component.ts - 41 + src/app/frontend/settings/global/component.ts + 114 - - Default request + + Number of seconds between every auto-refresh of every resource. Set 0 to disable. - src/app/frontend/common/components/limits/component.ts - 41 + src/app/frontend/settings/global/component.ts + 114 - - Ports (Name, Port, Protocol) + + Disable access denied notification - src/app/frontend/common/components/endpoint/cardlist/component.ts - 55 + src/app/frontend/settings/global/component.ts + 114 - - unset + + Hides all access denied warnings in the notification panel. - src/app/frontend/common/components/endpoint/cardlist/component.ts - 55 + src/app/frontend/settings/global/component.ts + 114 - - Data + + Save - src/app/frontend/crd/crdobject/component.ts - 54,58 + src/app/frontend/settings/global/component.ts + 114 + + + Reload - src/app/frontend/resource/config/configmap/detail/component.ts - 44,49 + src/app/frontend/settings/global/component.ts + 114 + + + Settings have changed since last reload - src/app/frontend/resource/config/secret/detail/component.ts - 43,48 + src/app/frontend/settings/global/saveanywaysdialog/dialog.ts + 29 - - Role Reference + + Do you want to save them anyways? - src/app/frontend/resource/cluster/clusterrolebinding/detail/component.ts - 64,72 + src/app/frontend/settings/global/saveanywaysdialog/dialog.ts + 29 + + + Refresh - src/app/frontend/resource/cluster/rolebinding/detail/component.ts - 63,74 + src/app/frontend/settings/global/saveanywaysdialog/dialog.ts + 29 @@ -3139,285 +3438,36 @@ About - src/app/frontend/about/component.ts - 34 - - - - General-purpose web UI for Kubernetes clusters - - src/app/frontend/about/component.ts - 34 - - - - Kubernetes Dashboard is made possible by the Dashboard community as an open source project. - - src/app/frontend/about/component.ts - 34 - - - - Session Affinity - - src/app/frontend/resource/discovery/service/detail/component.ts - 70 - - - - Pod Selector - - src/app/frontend/resource/cluster/networkpolicy/detail/component.ts - 63,70 - - - - Policy Types - - src/app/frontend/resource/cluster/networkpolicy/detail/component.ts - 70 - - - - Ingress Rules - - src/app/frontend/resource/cluster/networkpolicy/detail/component.ts - 70 - - - - Egress Rules - - src/app/frontend/resource/cluster/networkpolicy/detail/component.ts - 70 - - - - System information - - src/app/frontend/resource/cluster/node/detail/component.ts - 67,73 - - - - Allocation - - src/app/frontend/resource/cluster/node/detail/component.ts - 86,89 - - - - Pod CIDR - - src/app/frontend/resource/cluster/node/detail/component.ts - 114,120 - - - - Provider ID - - src/app/frontend/resource/cluster/node/detail/component.ts - 130,137 - - - - Unschedulable - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Addresses - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Taints - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Machine ID - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - System UUID - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Boot ID - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Kernel version - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - OS Image - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Container runtime version - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - kubelet version - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - kube-proxy version - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Operating system - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Architecture - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - CPU - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Memory - - src/app/frontend/resource/cluster/node/detail/component.ts - 146 - - - - Go to namespace overview - - src/app/frontend/resource/cluster/namespace/detail/actionbar/component.ts - 43,53 - - - - Reclaim policy - - src/app/frontend/resource/cluster/persistentvolume/detail/component.ts - 106 - - - - Storage class - - src/app/frontend/resource/cluster/persistentvolume/detail/component.ts - 106 - - - - Access modes - - src/app/frontend/resource/cluster/persistentvolume/detail/component.ts - 106 - - - - Quantity - - src/app/frontend/resource/cluster/persistentvolume/detail/component.ts - 106 - - - - Active Jobs - - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 58,66 - - - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 72 - - - - Inactive Jobs - - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 72 - - - - Schedule:  - - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 72 - - - - Active Jobs:  - - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 72 + src/app/frontend/about/component.ts + 34 - - Suspend:  + + General-purpose web UI for Kubernetes clusters - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 72 + src/app/frontend/about/component.ts + 34 - - Last schedule + + Kubernetes Dashboard is made possible by the Dashboard community as an open source project. - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 72 + src/app/frontend/about/component.ts + 34 - - Concurrency policy + + Read documentation - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 72 + src/app/frontend/about/actionbar/component.ts + 27 - - Starting deadline seconds + + Provide feedback - src/app/frontend/resource/workloads/cronjob/detail/component.ts - 72 + src/app/frontend/about/actionbar/component.ts + 27 @@ -3574,567 +3624,484 @@ 96 - - Completions:  - - src/app/frontend/resource/workloads/job/detail/component.ts - 59,70 - - - - Parallelism:  - - src/app/frontend/resource/workloads/job/detail/component.ts - 70 - - - - Completions + + Role Reference - src/app/frontend/resource/workloads/job/detail/component.ts - 70 + src/app/frontend/resource/cluster/rolebinding/detail/component.ts + 63,74 - - - Parallelism - src/app/frontend/resource/workloads/job/detail/component.ts - 70 + src/app/frontend/resource/cluster/clusterrolebinding/detail/component.ts + 64,72 - - There is no data to display. - - src/app/frontend/resource/config/configmap/detail/component.ts - 61,73 - + + Active Jobs - src/app/frontend/resource/config/secret/detail/component.ts - 62,75 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 58,66 - - - Parameter - src/app/frontend/resource/config/storageclass/detail/component.ts + src/app/frontend/resource/workloads/cronjob/detail/component.ts 72 - - Read documentation - - src/app/frontend/about/actionbar/component.ts - 27 - - - - Provide feedback - - src/app/frontend/about/actionbar/component.ts - 27 - - - - Local settings - - src/app/frontend/settings/local/component.ts - 47,55 - - - - Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - - src/app/frontend/settings/local/component.ts - 59 - - - - Dark theme - - src/app/frontend/settings/local/component.ts - 59 - - - - Use dark theme in the whole app + + Inactive Jobs - src/app/frontend/settings/local/component.ts - 59 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 72 - - Language - - src/app/frontend/settings/local/component.ts - 59 - + + Schedule:  - src/app/frontend/settings/local/component.ts - 59 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 72 - - Change the language of the dashboard - - src/app/frontend/settings/local/component.ts - 59 - + + Active Jobs:  - src/app/frontend/settings/local/component.ts - 59 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 72 - - Global settings + + Suspend:  - src/app/frontend/settings/global/component.ts - 42,58 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 72 - - Global settings are stored in config map, so all of them are applied for every instance of the app. + + Last schedule - src/app/frontend/settings/global/component.ts - 73,84 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 72 - - Cluster name - - src/app/frontend/settings/global/component.ts - 96,105 - + + Concurrency policy - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 72 - - Cluster name appears in the browser window title if it is set. + + Starting deadline seconds - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/workloads/cronjob/detail/component.ts + 72 - - Items per page + + System information - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 67,73 - - Max number of items that can be displayed on every list view. + + Allocation - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 86,89 - - Labels limit + + Pod CIDR - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 114,120 - - Max number of labels that are displayed by default on most views. + + Provider ID - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 130,137 - - Logs auto-refresh time interval + + Unschedulable - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Number of seconds between every auto-refresh of logs. + + Addresses - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Resource auto-refresh time interval + + Taints - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Number of seconds between every auto-refresh of every resource. Set 0 to disable. + + Machine ID - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Disable access denied notification + + System UUID - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Hides all access denied warnings in the notification panel. + + Boot ID - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Save + + Kernel version - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Reload + + OS Image - src/app/frontend/settings/global/component.ts - 114 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - App name + + Container runtime version - src/app/frontend/create/from/form/component.ts - 66,73 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - An 'app' label with this value will be added to the Deployment and Service that get deployed. + + kubelet version - src/app/frontend/create/from/form/component.ts - 80,91 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Learn more open_in_new + + kube-proxy version - src/app/frontend/create/from/form/component.ts - 101 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 + + + Operating system - src/app/frontend/create/from/form/template.html - 116,86 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 + + + Architecture - src/app/frontend/create/from/form/template.html - 141,122 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 + + + CPU - src/app/frontend/create/from/form/template.html - 166,142 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Container image + + Memory - src/app/frontend/create/from/form/template.html - 71,77 + src/app/frontend/resource/cluster/node/detail/component.ts + 146 - - Enter the URL of a public image on any registry, or a private image hosted on Docker Hub or Google Container Registry. + + Reclaim policy - src/app/frontend/create/from/form/template.html - 94,107 + src/app/frontend/resource/cluster/persistentvolume/detail/component.ts + 106 - - Number of pods + + Storage class - src/app/frontend/create/from/form/template.html - 102,109 + src/app/frontend/resource/cluster/persistentvolume/detail/component.ts + 106 - - A Deployment will be created to maintain the desired number of pods across your cluster. + + Access modes - src/app/frontend/create/from/form/template.html - 116,130 + src/app/frontend/resource/cluster/persistentvolume/detail/component.ts + 106 - - Optionally, an internal or external Service can be defined to map an incoming Port to a target Port seen by the container. + + Quantity - src/app/frontend/create/from/form/template.html - 136,152 + src/app/frontend/resource/cluster/persistentvolume/detail/component.ts + 106 - - Description + + Go to namespace overview - src/app/frontend/create/from/form/template.html - 157,163 + src/app/frontend/resource/cluster/namespace/detail/actionbar/component.ts + 43,53 - - The description will be added as an annotation to the Deployment and displayed in the application's details. + + Pod Selector - src/app/frontend/create/from/form/template.html - 172,187 + src/app/frontend/resource/cluster/networkpolicy/detail/component.ts + 63,70 - - The specified labels will be applied to the created Deployment, Service (if any) and Pods. Common labels include release, environment, tier, partition and track. + + Policy Types - src/app/frontend/create/from/form/template.html - 220,234 + src/app/frontend/resource/cluster/networkpolicy/detail/component.ts + 70 - - Learn more open_in_new + + Ingress Rules - src/app/frontend/create/from/form/template.html - 249,175 + src/app/frontend/resource/cluster/networkpolicy/detail/component.ts + 70 + + + Egress Rules - src/app/frontend/create/from/form/template.html - 251,204 + src/app/frontend/resource/cluster/networkpolicy/detail/component.ts + 70 + + + Filesystem type - src/app/frontend/create/from/form/template.html - 282,232 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - src/app/frontend/create/from/form/template.html - 304,282 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - src/app/frontend/create/from/form/template.html - 371,309 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - src/app/frontend/create/from/form/template.html - 373,327 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - src/app/frontend/create/from/form/template.html - 373,341 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - Create a new namespace... - src/app/frontend/create/from/form/template.html - 207,215 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Namespaces let you partition resources into logically named groups. + + Partition - src/app/frontend/create/from/form/template.html - 226,238 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - Image Pull Secret - src/app/frontend/create/from/form/template.html - 217,226 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Create a new secret... + + Read only - src/app/frontend/create/from/form/template.html - 235,244 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - The specified image could require a pull secret credential if it is private. You may choose an existing secret or create a new one. - src/app/frontend/create/from/form/template.html - 257,269 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - CPU requirement (cores) - src/app/frontend/create/from/form/template.html - 246,253 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - Memory requirement (MiB) - src/app/frontend/create/from/form/template.html - 264,269 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - You can specify minimum CPU and memory requirements for the container. - src/app/frontend/create/from/form/template.html - 281,294 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - Run command - src/app/frontend/create/from/form/template.html - 297,303 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - Run command arguments - src/app/frontend/create/from/form/template.html - 314,321 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - By default, your containers run the selected image's default entrypoint command. You can use the command options to override the default. - src/app/frontend/create/from/form/template.html - 334,345 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Run as privileged + + Volume ID - src/app/frontend/create/from/form/template.html - 321,327 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 + + + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - Processes in privileged containers are equivalent to processes running as root on the host. - src/app/frontend/create/from/form/template.html - 336,358 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Environment variables available for use in the container. Values can reference other variables using $(VAR_NAME) syntax. + + Target World Wide Names - src/app/frontend/create/from/form/template.html - 338,362 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Deploy - + + Dataset name - src/app/frontend/create/from/form/template.html - 366,373 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Cancel - + + Persistent disk name - src/app/frontend/create/from/form/template.html - 373 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 + + + iSCSI Qualified Name - src/app/frontend/create/from/input/template.html - 51 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - {VAR_SELECT, select, 1 {Hide advanced options} other {Show advanced options}} + + iSCSI target lun number - src/app/frontend/create/from/form/template.html - 373 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - - + + Target portal - src/app/frontend/create/from/form/template.html - 373,371 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Deployment or service with this name already exists within namespace. + + Server - src/app/frontend/create/from/form/template.html - 373 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Application name is required. + + Keyring - src/app/frontend/create/from/form/template.html - 373 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Application name must start with a lowercase letter and contain only lowercase letters, numbers, and '-' between words. + + Monitors - src/app/frontend/create/from/form/template.html - 373 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Container image is required + + Pool - src/app/frontend/create/from/form/template.html - 373 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Container image is invalid: + + Secret reference name - src/app/frontend/create/from/form/template.html - 373,75 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Number of pods is required + + User - src/app/frontend/create/from/form/template.html - 87,99 + src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts + 26 - - Number of pods must be a positive integer + + Learn more open_in_new - src/app/frontend/create/from/form/template.html - 109,116 + src/app/frontend/create/from/input/component.ts + 51 - - Setting high number of pods may cause performance issues of the cluster and Dashboard UI. + + Upload + - src/app/frontend/create/from/form/template.html - 129,136 + src/app/frontend/create/from/input/template.html + 51 - - CPU requirement must be given as a positive number. + + Cancel + - src/app/frontend/create/from/form/template.html - 152,162 + src/app/frontend/create/from/input/template.html + 51 - - - CPU requirement must be given as a valid number. src/app/frontend/create/from/form/template.html - 169,182 + 373 - - Memory requirement must be given as a positive number. + + Enter YAML or JSON content specifying the resources to create to the namespace specified in the file. - src/app/frontend/create/from/form/template.html - 192,201 + src/app/frontend/create/from/input/template.html + 51 - - Memory requirement must be given as a valid number. + + Enter YAML or JSON content specifying the resources to create to the currently selected namespace. - src/app/frontend/create/from/form/template.html - 215,226 + src/app/frontend/create/from/input/template.html + 51 @@ -4172,296 +4139,329 @@ 57 - - Learn more open_in_new + + App name - src/app/frontend/create/from/input/component.ts - 51 + src/app/frontend/create/from/form/component.ts + 66,73 - - Upload - + + An 'app' label with this value will be added to the Deployment and Service that get deployed. - src/app/frontend/create/from/input/template.html - 51 + src/app/frontend/create/from/form/component.ts + 80,91 - - Enter YAML or JSON content specifying the resources to create to the namespace specified in the file. + + Learn more open_in_new - src/app/frontend/create/from/input/template.html - 51 + src/app/frontend/create/from/form/component.ts + 101 - - - Enter YAML or JSON content specifying the resources to create to the currently selected namespace. - src/app/frontend/create/from/input/template.html - 51 + src/app/frontend/create/from/form/template.html + 116,86 + + + src/app/frontend/create/from/form/template.html + 141,122 + + + src/app/frontend/create/from/form/template.html + 166,142 - - Filesystem type + + Container image - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 71,77 + + + Enter the URL of a public image on any registry, or a private image hosted on Docker Hub or Google Container Registry. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 94,107 + + + Number of pods - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 102,109 + + + A Deployment will be created to maintain the desired number of pods across your cluster. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 116,130 + + + Optionally, an internal or external Service can be defined to map an incoming Port to a target Port seen by the container. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 136,152 + + + Description - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 157,163 - - Partition + + The description will be added as an annotation to the Deployment and displayed in the application's details. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 172,187 + + + The specified labels will be applied to the created Deployment, Service (if any) and Pods. Common labels include release, environment, tier, partition and track. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 220,234 - - Read only + + Learn more open_in_new - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 249,175 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 251,204 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 282,232 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 304,282 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 371,309 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 373,327 - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 373,341 + + + Create a new namespace... - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 207,215 - - Volume ID + + Namespaces let you partition resources into logically named groups. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 226,238 + + + Image Pull Secret - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 217,226 + + + Create a new secret... - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 235,244 - - Target World Wide Names + + The specified image could require a pull secret credential if it is private. You may choose an existing secret or create a new one. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 257,269 - - Dataset name + + CPU requirement (cores) - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 246,253 - - Persistent disk name + + Memory requirement (MiB) - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 264,269 - - iSCSI Qualified Name + + You can specify minimum CPU and memory requirements for the container. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 281,294 - - iSCSI target lun number + + Run command - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 297,303 - - Target portal + + Run command arguments - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 314,321 - - Server + + By default, your containers run the selected image's default entrypoint command. You can use the command options to override the default. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 334,345 - - Keyring + + Run as privileged - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 321,327 - - Monitors + + Processes in privileged containers are equivalent to processes running as root on the host. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 336,358 - - Pool + + Environment variables available for use in the container. Values can reference other variables using $(VAR_NAME) syntax. - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 338,362 - - Secret reference name + + Deploy + - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 366,373 - - User + + {VAR_SELECT, select, 1 {Hide advanced options} other {Show advanced options}} - src/app/frontend/resource/cluster/persistentvolume/detail/source/component.ts - 26 + src/app/frontend/create/from/form/template.html + 373 - - Resource Information + + + - src/app/frontend/crd/detail/component.ts - 39,47 + src/app/frontend/create/from/form/template.html + 373,371 - - Accepted Names + + Deployment or service with this name already exists within namespace. - src/app/frontend/crd/detail/component.ts - 58,65 + src/app/frontend/create/from/form/template.html + 373 - - Scope + + Application name is required. - src/app/frontend/crd/detail/component.ts - 65 + src/app/frontend/create/from/form/template.html + 373 - - Version + + Application name must start with a lowercase letter and contain only lowercase letters, numbers, and '-' between words. - src/app/frontend/crd/detail/component.ts - 65 + src/app/frontend/create/from/form/template.html + 373 - - Subresources + + Container image is required - src/app/frontend/crd/detail/component.ts - 65 + src/app/frontend/create/from/form/template.html + 373 - - Plural + + Container image is invalid: - src/app/frontend/crd/detail/component.ts - 65 + src/app/frontend/create/from/form/template.html + 373,75 - - List Kind + + Number of pods is required - src/app/frontend/crd/detail/component.ts - 65 + src/app/frontend/create/from/form/template.html + 87,99 - - Singular + + Number of pods must be a positive integer - src/app/frontend/crd/detail/component.ts - 65 + src/app/frontend/create/from/form/template.html + 109,116 - - Short Names + + Setting high number of pods may cause performance issues of the cluster and Dashboard UI. - src/app/frontend/crd/detail/component.ts - 65 + src/app/frontend/create/from/form/template.html + 129,136 - - Categories + + CPU requirement must be given as a positive number. - src/app/frontend/crd/detail/component.ts - 65 + src/app/frontend/create/from/form/template.html + 152,162 - - Settings have changed since last reload + + CPU requirement must be given as a valid number. - src/app/frontend/settings/global/saveanywaysdialog/dialog.ts - 29 + src/app/frontend/create/from/form/template.html + 169,182 - - Do you want to save them anyways? + + Memory requirement must be given as a positive number. - src/app/frontend/settings/global/saveanywaysdialog/dialog.ts - 29 + src/app/frontend/create/from/form/template.html + 192,201 - - Refresh + + Memory requirement must be given as a valid number. - src/app/frontend/settings/global/saveanywaysdialog/dialog.ts - 29 + src/app/frontend/create/from/form/template.html + 215,226 diff --git a/i18n/zh-Hans/messages.zh-Hans.xlf b/i18n/zh-Hans/messages.zh-Hans.xlf index 53018b84c..9c2eee368 100644 --- a/i18n/zh-Hans/messages.zh-Hans.xlf +++ b/i18n/zh-Hans/messages.zh-Hans.xlf @@ -3090,7 +3090,7 @@ Kubernetes Dashboard src/app/frontend/login/component.ts - 53 + 54 @@ -3098,7 +3098,7 @@ Kubeconfig src/app/frontend/login/component.ts - 82 + 84 @@ -3106,7 +3106,7 @@ 基本 src/app/frontend/login/component.ts - 106 + 104 @@ -3114,7 +3114,7 @@ Token src/app/frontend/login/component.ts - 132 + 130 @@ -3124,7 +3124,7 @@ src/app/frontend/login/component.ts - 166 + 163 @@ -3201,7 +3201,7 @@ src/app/frontend/login/component.ts - 69 + 70 @@ -5417,33 +5417,31 @@ 本地设置 src/app/frontend/settings/local/component.ts - 47 + 53 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - - 本地设置存储在浏览器cookie中,因此它们不会在多个设备之间同步。每次更改都会自动应用更改。 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. src/app/frontend/settings/local/component.ts - 59 + 74 - - Dark theme - 黑色主题 + + Theme + Theme src/app/frontend/settings/local/component.ts - 59 + 74 - - Use dark theme in the whole app - 在整个应用程序中使用黑色主题 + + Choose color theme of the dashboard + Choose color theme of the dashboard src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5451,11 +5449,11 @@ 语言 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5463,11 +5461,11 @@ 更改 dashboard 的语言 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 diff --git a/i18n/zh-Hant-HK/messages.zh-Hant-HK.xlf b/i18n/zh-Hant-HK/messages.zh-Hant-HK.xlf index 374a8ba7a..248014b30 100644 --- a/i18n/zh-Hant-HK/messages.zh-Hant-HK.xlf +++ b/i18n/zh-Hant-HK/messages.zh-Hant-HK.xlf @@ -3094,7 +3094,7 @@ Kubernetes 儀表盤 src/app/frontend/login/component.ts - 53 + 54 @@ -3102,7 +3102,7 @@ Kubeconfig src/app/frontend/login/component.ts - 82 + 84 @@ -3110,7 +3110,7 @@ 基本 src/app/frontend/login/component.ts - 106 + 104 @@ -3118,7 +3118,7 @@ Token src/app/frontend/login/component.ts - 132 + 130 @@ -3128,7 +3128,7 @@ src/app/frontend/login/component.ts - 166 + 163 @@ -3205,7 +3205,7 @@ src/app/frontend/login/component.ts - 69 + 70 @@ -5417,33 +5417,31 @@ 本地設置 src/app/frontend/settings/local/component.ts - 47 + 53 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - - 本地設置存儲在瀏覽器cookie中,因此它們不會在多個設備之間同步。每次更改都會自動應用改變。 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. src/app/frontend/settings/local/component.ts - 59 + 74 - - Dark theme - 黑色主題 + + Theme + Theme src/app/frontend/settings/local/component.ts - 59 + 74 - - Use dark theme in the whole app - 在整個應用程序中使用黑色主題 + + Choose color theme of the dashboard + Choose color theme of the dashboard src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5451,11 +5449,11 @@ 语言 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5463,11 +5461,11 @@ 更改 dashboard 的语言 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 diff --git a/i18n/zh-Hant/messages.zh-Hant.xlf b/i18n/zh-Hant/messages.zh-Hant.xlf index 8401d7049..9b3ddb11e 100644 --- a/i18n/zh-Hant/messages.zh-Hant.xlf +++ b/i18n/zh-Hant/messages.zh-Hant.xlf @@ -3090,7 +3090,7 @@ Kubernetes Dashboard src/app/frontend/login/component.ts - 53 + 54 @@ -3098,7 +3098,7 @@ Kubeconfig src/app/frontend/login/component.ts - 82 + 84 @@ -3106,7 +3106,7 @@ 基本 src/app/frontend/login/component.ts - 106 + 104 @@ -3114,7 +3114,7 @@ Token src/app/frontend/login/component.ts - 132 + 130 @@ -3124,7 +3124,7 @@ src/app/frontend/login/component.ts - 166 + 163 @@ -3201,7 +3201,7 @@ src/app/frontend/login/component.ts - 69 + 70 @@ -5417,33 +5417,31 @@ 本地設置 src/app/frontend/settings/local/component.ts - 47 + 53 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. - - 本地設置存儲在瀏覽器cookie中,因此它們不會在多個設備之間同步。每次更改都會自動應用改變。 - + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. src/app/frontend/settings/local/component.ts - 59 + 74 - - Dark theme - 黑色主題 + + Theme + Theme src/app/frontend/settings/local/component.ts - 59 + 74 - - Use dark theme in the whole app - 在整個應用程序中使用黑色主題 + + Choose color theme of the dashboard + Choose color theme of the dashboard src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5451,11 +5449,11 @@ 語言 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 @@ -5463,11 +5461,11 @@ 更改 dashboard 的語言 src/app/frontend/settings/local/component.ts - 59 + 74 src/app/frontend/settings/local/component.ts - 59 + 74 diff --git a/src/app/frontend/common/components/textinput/component.ts b/src/app/frontend/common/components/textinput/component.ts index cee3922af..a793665c8 100644 --- a/src/app/frontend/common/components/textinput/component.ts +++ b/src/app/frontend/common/components/textinput/component.ts @@ -68,7 +68,7 @@ export class TextInputComponent implements OnInit, AfterViewInit, OnChanges { constructor(private readonly themeService_: ThemeService) {} ngOnInit(): void { - this.theme = this.themeService_.isLightThemeEnabled() ? EditorTheme.light : EditorTheme.dark; + this.theme = this.themeService_.isThemeDark() ? EditorTheme.dark : EditorTheme.light; } ngAfterViewInit(): void { diff --git a/src/app/frontend/common/services/global/localsettings.ts b/src/app/frontend/common/services/global/localsettings.ts index a459c86a4..4a7feca38 100644 --- a/src/app/frontend/common/services/global/localsettings.ts +++ b/src/app/frontend/common/services/global/localsettings.ts @@ -13,15 +13,15 @@ // limitations under the License. import {Injectable} from '@angular/core'; -import {LocalSettings} from '@api/root.api'; import {ThemeService} from './theme'; +import {LocalSettings} from '@api/root.api'; @Injectable() export class LocalSettingsService { private readonly _settingsKey = 'localSettings'; private settings_: LocalSettings = { - isThemeDark: false, + theme: 'kd-light-theme', }; constructor(private readonly theme_: ThemeService) {} @@ -37,10 +37,10 @@ export class LocalSettingsService { return this.settings_; } - handleThemeChange(isThemeDark: boolean): void { - this.settings_.isThemeDark = isThemeDark; + handleThemeChange(theme: string): void { + this.settings_.theme = theme; + this.theme_.theme = theme; this.updateCookie_(); - this.theme_.switchTheme(!this.settings_.isThemeDark); } updateCookie_(): void { diff --git a/src/app/frontend/common/services/global/module.ts b/src/app/frontend/common/services/global/module.ts index 5148e76e2..e5621f2a4 100644 --- a/src/app/frontend/common/services/global/module.ts +++ b/src/app/frontend/common/services/global/module.ts @@ -69,6 +69,7 @@ import {PinnerService} from './pinner'; HistoryService, PluginsConfigService, PinnerService, + ThemeService, ], multi: true, }, @@ -93,7 +94,8 @@ export function init( pinner: PinnerService, config: ConfigService, history: HistoryService, - pluginsConfig: PluginsConfigService + pluginsConfig: PluginsConfigService, + theme: ThemeService ): Function { return () => { globalSettings.init(); @@ -102,5 +104,6 @@ export function init( pinner.init(); config.init(); history.init(); + theme.init(); }; } diff --git a/src/app/frontend/common/services/global/theme.ts b/src/app/frontend/common/services/global/theme.ts index 43f00313e..271107a44 100644 --- a/src/app/frontend/common/services/global/theme.ts +++ b/src/app/frontend/common/services/global/theme.ts @@ -12,24 +12,69 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {EventEmitter, Injectable} from '@angular/core'; +import {EventEmitter, Inject, Injectable, Injector} from '@angular/core'; +import * as customThemes from '../../../custom-themes.json'; +import {DOCUMENT} from '@angular/common'; +import {Theme} from '@api/root.api'; import {ThemeSwitchCallback} from '@api/root.ui'; @Injectable() export class ThemeService { - private isLightThemeEnabled_ = true; - private readonly onThemeSwitchEvent_ = new EventEmitter(); + readonly systemTheme = '__system_theme__'; + private readonly _customThemes: Theme[] = customThemes; + private readonly _defaultThemes: Theme[] = [ + {name: 'kd-light-theme', displayName: 'Light', isDark: false}, + {name: 'kd-dark-theme', displayName: 'Dark', isDark: true}, + ]; + private _theme = 'kd-light-theme'; + private readonly _onThemeSwitchEvent = new EventEmitter(); + private readonly _colorSchemeQuery = '(prefers-color-scheme: dark)'; - isLightThemeEnabled(): boolean { - return this.isLightThemeEnabled_; + constructor(@Inject(DOCUMENT) private readonly _document: Document) {} + + get themes(): Theme[] { + const defaultThemeNames = new Set(this._defaultThemes.map(theme => theme.name)); + const filteredCustomThemes = this._customThemes.filter(theme => !defaultThemeNames.has(theme.name)); + return [...this._defaultThemes, ...filteredCustomThemes]; + } + + get theme(): string { + return this._theme; + } + + set theme(theme: string) { + this._theme = theme; + + if (theme === this.systemTheme) { + theme = this._isSystemThemeDark() ? 'kd-dark-theme' : 'kd-light-theme'; + } + this._onThemeSwitchEvent.emit(theme); } - switchTheme(isLightTheme: boolean): void { - this.onThemeSwitchEvent_.emit(isLightTheme); - this.isLightThemeEnabled_ = isLightTheme; + init(): void { + this._document.defaultView.matchMedia(this._colorSchemeQuery).addEventListener('change', e => { + if (this.theme === this.systemTheme) { + this._onThemeSwitchEvent.emit(e.matches ? 'kd-dark-theme' : 'kd-light-theme'); + } + }); } subscribe(callback: ThemeSwitchCallback): void { - this.onThemeSwitchEvent_.subscribe(callback); + this._onThemeSwitchEvent.subscribe(callback); + } + + isThemeDark(): boolean { + if (this.theme === this.systemTheme) { + return this._isSystemThemeDark(); + } + + const theme = this.themes.find(theme => theme.name === this.theme); + return theme ? theme.isDark : false; + } + + private _isSystemThemeDark(): boolean { + return ( + this._document.defaultView.matchMedia && this._document.defaultView.matchMedia(this._colorSchemeQuery).matches + ); } } diff --git a/src/app/frontend/custom-themes.json b/src/app/frontend/custom-themes.json new file mode 100644 index 000000000..7dd438752 --- /dev/null +++ b/src/app/frontend/custom-themes.json @@ -0,0 +1,2 @@ +[] + diff --git a/src/app/frontend/index.component.ts b/src/app/frontend/index.component.ts index acb3e7901..ae0de9e95 100644 --- a/src/app/frontend/index.component.ts +++ b/src/app/frontend/index.component.ts @@ -19,58 +19,43 @@ import {LocalSettingsService} from './common/services/global/localsettings'; import {ThemeService} from './common/services/global/theme'; import {TitleService} from './common/services/global/title'; -enum Themes { - Light = 'kd-light-theme', - Dark = 'kd-dark-theme', -} - @Component({selector: 'kd-root', template: ''}) export class RootComponent implements OnInit { - private isLightThemeEnabled_: boolean; + private _theme = this._themeService.theme; constructor( - private readonly themeService_: ThemeService, - private readonly settings_: LocalSettingsService, - private readonly overlayContainer_: OverlayContainer, - private readonly kdRootRef: ElementRef, - private readonly titleService_: TitleService - ) { - this.isLightThemeEnabled_ = this.themeService_.isLightThemeEnabled(); - } + private readonly _themeService: ThemeService, + private readonly _localSettingService: LocalSettingsService, + private readonly _overlayContainer: OverlayContainer, + private readonly _kdRootRef: ElementRef, + private readonly _titleService: TitleService + ) {} ngOnInit(): void { - this.titleService_.update(); - this.themeService_.subscribe(this.onThemeChange_.bind(this)); + this._titleService.update(); + this._themeService.subscribe(this.onThemeChange_.bind(this)); - const localSettings = this.settings_.get(); - if (localSettings && localSettings.isThemeDark) { - this.themeService_.switchTheme(!localSettings.isThemeDark); - this.isLightThemeEnabled_ = !localSettings.isThemeDark; + const localSettings = this._localSettingService.get(); + if (localSettings && localSettings.theme) { + this._theme = localSettings.theme; + this._themeService.theme = localSettings.theme; } - this.applyOverlayContainerTheme_(); - } - - private applyOverlayContainerTheme_(): void { - const classToRemove = this.getTheme(!this.isLightThemeEnabled_); - const classToAdd = this.getTheme(this.isLightThemeEnabled_); - this.overlayContainer_.getContainerElement().classList.remove(classToRemove); - this.overlayContainer_.getContainerElement().classList.add(classToAdd); - - this.kdRootRef.nativeElement.classList.add(classToAdd); - this.kdRootRef.nativeElement.classList.remove(classToRemove); + this.applyOverlayContainerTheme_('', this._theme); } - private onThemeChange_(isLightThemeEnabled: boolean): void { - this.isLightThemeEnabled_ = isLightThemeEnabled; - this.applyOverlayContainerTheme_(); + private onThemeChange_(theme: string): void { + this.applyOverlayContainerTheme_(this._theme, theme); + this._theme = theme; } - getTheme(isLightThemeEnabled?: boolean): string { - if (isLightThemeEnabled === undefined) { - isLightThemeEnabled = this.isLightThemeEnabled_; + private applyOverlayContainerTheme_(oldTheme: string, newTheme: string): void { + if (!!oldTheme && oldTheme !== newTheme) { + this._overlayContainer.getContainerElement().classList.remove(oldTheme); + this._kdRootRef.nativeElement.classList.remove(oldTheme); } - return isLightThemeEnabled ? Themes.Light : Themes.Dark; + this._overlayContainer.getContainerElement().classList.add(newTheme); + this._kdRootRef.nativeElement.classList.add(newTheme); } } diff --git a/src/app/frontend/settings/local/component.ts b/src/app/frontend/settings/local/component.ts index 98748a776..4454b3192 100644 --- a/src/app/frontend/settings/local/component.ts +++ b/src/app/frontend/settings/local/component.ts @@ -15,36 +15,51 @@ import {DOCUMENT} from '@angular/common'; import {Component, Inject, OnInit, ViewChild} from '@angular/core'; import {MatSelect} from '@angular/material/select'; -import {LocalSettings} from '@api/root.api'; -import {LanguageConfig} from '@api/root.ui'; import {CookieService} from 'ngx-cookie-service'; import {LocalSettingsService} from '../../common/services/global/localsettings'; import {environment} from '../../environments/environment'; import {Config, CONFIG_DI_TOKEN} from '../../index.config'; +import {ThemeService} from '../../common/services/global/theme'; +import {LocalSettings, Theme} from '@api/root.api'; +import {LanguageConfig} from '@api/root.ui'; -@Component({selector: 'kd-local-settings', templateUrl: './template.html'}) +@Component({ + selector: 'kd-local-settings', + templateUrl: './template.html', + styleUrls: ['./style.scss'], +}) export class LocalSettingsComponent implements OnInit { settings: LocalSettings = {} as LocalSettings; languages: LanguageConfig[] = []; selectedLanguage: string; + themes: Theme[]; + selectedTheme: string; + systemTheme: string; @ViewChild(MatSelect, {static: true}) private readonly select_: MatSelect; constructor( private readonly settings_: LocalSettingsService, + private readonly theme_: ThemeService, private readonly cookies_: CookieService, @Inject(DOCUMENT) private readonly document_: Document, @Inject(CONFIG_DI_TOKEN) private readonly appConfig_: Config ) {} ngOnInit(): void { - this.languages = this.appConfig_.supportedLanguages; this.settings = this.settings_.get(); + + this.languages = this.appConfig_.supportedLanguages; this.selectedLanguage = this.cookies_.get(this.appConfig_.languageCookieName) || this.appConfig_.defaultLanguage; + + this.themes = this.theme_.themes; + this.selectedTheme = this.theme_.theme; + this.systemTheme = this.theme_.systemTheme; } - onThemeChange(): void { - this.settings_.handleThemeChange(this.settings.isThemeDark); + onThemeChange(theme: string): void { + this.settings.theme = theme; + this.settings_.handleThemeChange(this.settings.theme); } onLanguageSelected(selectedLanguage: string) { diff --git a/src/app/frontend/settings/local/style.scss b/src/app/frontend/settings/local/style.scss new file mode 100644 index 000000000..5ac1c4744 --- /dev/null +++ b/src/app/frontend/settings/local/style.scss @@ -0,0 +1,24 @@ +// Copyright 2017 The Kubernetes Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +@import '../../variables'; + +.mat-button-toggle-group { + border: 0; + + .mat-button-toggle { + border-radius: $baseline-grid / 2; + margin-right: $baseline-grid; + } +} diff --git a/src/app/frontend/settings/local/template.html b/src/app/frontend/settings/local/template.html index dd7f940a0..bbb5505aa 100644 --- a/src/app/frontend/settings/local/template.html +++ b/src/app/frontend/settings/local/template.html @@ -19,19 +19,28 @@ limitations under the License. i18n>Local settings

- Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. Changes are applied automatically on every change. + Local settings are stored in the browser cookies, so they are not synchronized between multiple devices. + Changes are applied automatically on every change.


- -
- -
+ + + System + + + {{theme.displayName}} + +