1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components
Sebastian Malton 76066c5ebf
Making apiBase injectable (#6022)
* Making apiBase injectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Convert all of Helm functions to be DI

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Make PortForward's use of apiBase fully injectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Convert all metric requests to be injectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Replace resource applier with injectables

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Switch KubeJsonApi.forCluster to be injectable but do not use

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Convert the rest of shell sessions to be DI-ed

- This is a prerequesit for using the new
  createKubeJsonApiForClusterInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Use new createKubeJsonApiForClusterInjectable for openNodeShellSession

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Make KubeconfigDialog injectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove jest-fetch-mock and make fetch injectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix tests with new global override

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add new injectable for create KubeJsonApi and JsonApi instances

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix showing-details-for-helm-release behavioural tests

- Remove HelmChartStore in favour of all injectables

- Create a model for UpgradeChartDockTab

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix show details and updating helm releases tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix residual typing issues related to metrics

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix crash on load due to circular dependency

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix create resource tab not working

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove legacy apiBase global

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Introduce and use isDebuggingInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Introduce and use windowLocationInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove global legacy apiKube

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Improve injectable filenames compared to the injectables inside

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove modifying input in requestActivePortForwardInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Introduce and use get(Milli)SecondsFromUnixEpochInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Switch to non-reactive way of gettting possible helm release versions

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix typo

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix bug in KubeApi constructor

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Convert all KubeApi related tests to use asyncFn

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix unit tests after introducing new injectables that have side effects

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix bad rebase causing tests to fail

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Improve expects for multiple field values

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix crash will looking up api refs

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix breaking change on KubeApi.list

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Better fix for formatting urls

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove injectable for time since we should just use useMockTime

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add happy path behavioural tests for upgrade chart tab

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove debug message

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshots

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* fix showing-details-for-helm-release tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix installing-helm-chart-from-new-tab tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix tests relating to hosted cluster id

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshots to recent changes in master

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Reupdated upgrade chart new tab test snapshots

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix flakiness in unit test when using <Animated>

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix flakiness and improve tests for DeleteClusterDialog

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix kubeconfig-sync tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix <Extensions> tests by removing mockFs and making everything injectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix build issues

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix getElectronAppPathInjectable override not returning absolute paths

- Also fixes the listing-active-helm-repos-in-prefs tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Replace all uses of getAbsolutePath with joinPaths as it is more correct and less confusing

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix opening application window tests by making override properly absolute

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshots relating no longer using getAbsolutePath

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix and add behavioural tests for RenderDelay

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix extension discovery tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix test flakiness because of path side effects, propagate uses to as many places

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix extension-discovery tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add global override to fix some tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Rewrite and fix implementation of KubeconfigManager and its tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix tests by global override pathExists

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix unit tests failing on windows by using injectable verions of path functions

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Attempt to fix test timeout by using runInAction

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshots after rebase

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshots after rebase

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix tests after rebase

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix setupIpcMainHandlers usage

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshots

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
Co-authored-by: Iku-turso <mikko.aspiala@gmail.com>
2022-10-05 08:10:36 -04:00
..
__tests__ Fix envFrom.prefix not being applied in container's env view (#5434) 2022-09-02 13:49:53 -04:00
+add-cluster Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+catalog Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+cluster Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+config Enable consistent-type-imports eslint rule (#5205) 2022-04-06 10:34:16 -04:00
+config-autoscalers Fix HorizontalPodAutoscaler metrics not displaying current values (#5956) 2022-08-04 12:34:52 -04:00
+config-limit-ranges Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+config-maps Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+config-pod-disruption-budgets Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+config-priority-classes feat: New view for PriorityClasses under Config menu (#5816) 2022-07-19 08:41:07 +03:00
+config-resource-quotas Fix ResourceQuotaDetails quotas display bugs (#5909) 2022-08-05 14:02:35 -04:00
+config-secrets Replace jest.mock's with overriding dependencies (#6014) 2022-08-23 13:04:00 +03:00
+custom-resources Fix breaking changes in extension API types (#5797) 2022-07-06 15:00:31 -04:00
+entity-settings Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+events Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+extensions Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+helm Enable consistent-type-imports eslint rule (#5205) 2022-04-06 10:34:16 -04:00
+helm-charts Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+helm-releases Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+namespaces Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+network Enable consistent-type-imports eslint rule (#5205) 2022-04-06 10:34:16 -04:00
+network-endpoints Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+network-ingresses Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+network-policies Replace jest.mock's with overriding dependencies (#6014) 2022-08-23 13:04:00 +03:00
+network-port-forwards Remove usage of deprecated xtermjs's registerLinkMatcher API (#5996) 2022-08-09 19:25:11 -07:00
+network-services Remove usage of deprecated xtermjs's registerLinkMatcher API (#5996) 2022-08-09 19:25:11 -07:00
+nodes Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+pod-security-policies Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+preferences Clean up versioning and packageJson uses (#6196) 2022-09-15 17:20:58 -04:00
+storage Enable consistent-type-imports eslint rule (#5205) 2022-04-06 10:34:16 -04:00
+storage-classes Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+storage-volume-claims Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+storage-volumes Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
+user-management Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+welcome Clean up versioning and packageJson uses (#6196) 2022-09-15 17:20:58 -04:00
+workloads Enable consistent-type-imports eslint rule (#5205) 2022-04-06 10:34:16 -04:00
+workloads-cronjobs Split root and cluster frames in smaller pieces (#5737) 2022-07-04 09:38:29 -07:00
+workloads-daemonsets Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+workloads-deployments Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+workloads-jobs Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+workloads-overview Fix doughnut graphs on workload overview sometimes not showing (#5727) 2022-08-30 07:54:18 -04:00
+workloads-pods Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+workloads-replicasets Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
+workloads-statefulsets Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
activate-entity-command Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
add-remove-buttons Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
animate Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
avatar Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
badge Fix badge not expanding on click when appropriate (#6029) 2022-08-25 09:19:35 -04:00
button Add data-warning prop on button for better snapshot testing (#6040) 2022-08-30 08:28:20 -04:00
catalog-entities Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
chart Fix doughnut graphs on workload overview sometimes not showing (#5727) 2022-08-30 07:54:18 -04:00
checkbox Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
cluster-manager Fix overflow on main layout not being scrolled (#6258) 2022-09-15 15:56:41 -04:00
cluster-settings Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
command-palette feat: New view for PriorityClasses under Config menu (#5816) 2022-07-19 08:41:07 +03:00
confirm-dialog Split root and cluster frames in smaller pieces (#5737) 2022-07-04 09:38:29 -07:00
countdown Force update after thirty days since update was downloaded (#5776) 2022-07-06 09:48:00 -04:00
delete-cluster-dialog Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
dialog Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
dock Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
drawer Fix CPU spike when opening PodDetails from MonacoEditor (#5642) 2022-08-02 12:41:23 -04:00
dropdown Add option to download all logs from the container (#5970) 2022-08-30 16:00:11 +03:00
duration Fix stuff happening based on timers not being run correctly in unit tests (#5764) 2022-07-01 19:40:34 +03:00
editable-list Bump typescript from 4.6.4 to 4.7.3 (#5571) 2022-06-13 14:30:24 -04:00
error-boundary Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
file-picker Bump typescript from 4.6.4 to 4.7.3 (#5571) 2022-06-13 14:30:24 -04:00
hotbar Fix kubeconfig-sync sometimes producing multiple identical entities (#5855) 2022-10-03 10:38:41 -04:00
icon Replace status bar item application update with different tray icon based on status of the update (#5769) 2022-07-05 15:44:03 -07:00
input Fix type errors using raw InputValidator (#5704) 2022-07-05 14:56:41 -04:00
item-object-list Add missing space in "Remove x items" (#6290) 2022-10-03 09:53:06 -04:00
kube-detail-params Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
kube-object Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
kube-object-details Fix KubeObjectDetails drawer not working for Cluster scoped resources (#5954) 2022-08-01 13:25:29 +03:00
kube-object-list-layout Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
kube-object-menu Introduce a centralised way to emit telemetry from calls of injectable functions (#6164) 2022-09-02 09:33:22 -04:00
kube-object-meta Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
kube-object-status-icon Resolve kube object status texts again on re-render to make it look like it's reactive (#5875) 2022-07-27 09:21:38 +03:00
kubeconfig-dialog Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
layout Fix kubeconfig-sync sometimes producing multiple identical entities (#5855) 2022-10-03 10:38:41 -04:00
line-progress Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
list Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
locale-date Enforce some naming conventions (#4813) 2022-03-01 13:06:53 -05:00
markdown-viewer Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
menu Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
monaco-editor Fix doughnut graphs on workload overview sometimes not showing (#5727) 2022-08-30 07:54:18 -04:00
no-items Enable consistent-type-imports eslint rule (#5205) 2022-04-06 10:34:16 -04:00
notifications Fix crash in HelmChartDetails (#5667) 2022-07-04 16:17:44 -04:00
path-picker Upgrade to Electron 14.2.4 (#4625) 2022-01-27 10:23:36 -05:00
radio Fix not being able to switch metrics if none are available (#5430) 2022-08-02 10:05:15 -04:00
render-delay Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
resizing-anchor Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
resource-metrics Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
scroll-spy Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
select Fix doughnut graphs on workload overview sometimes not showing (#5727) 2022-08-30 07:54:18 -04:00
slider Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
spinner Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
status-bar Allow extensions to control status bar item visibility (#6178) 2022-09-07 08:41:50 -04:00
status-brick Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
stepper Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
switch Replace deprecated <FormSwitcher/> in metrics-cluster-feature extension (#6060) 2022-08-25 16:18:58 +03:00
table Fix Pod Container sorting not correlating to visuals (#5175) 2022-08-02 12:44:32 -04:00
tabs Remove Tabs hover line width transition (#6020) 2022-08-11 15:39:23 +03:00
test-utils Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
tooltip Replace individual mocks for withTooltip with global mock (#5962) 2022-08-02 10:06:37 -04:00
tree-view Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
update-button Fix stuff happening based on timers not being run correctly in unit tests (#5764) 2022-07-01 19:40:34 +03:00
virtual-list Fix ingress list line heights (#5949) 2022-08-02 15:24:53 +03:00
wizard Stop using HelmCli from Renderer (#4861) 2022-06-13 11:42:53 +03:00
app.scss Make cluster #app component transparent (#6076) 2022-08-25 16:16:39 +03:00
colors.scss Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
fonts.scss Custom terminal fonts support (#5414) 2022-06-06 18:03:12 +03:00
media.scss Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
mixins.scss Custom terminal fonts support (#5414) 2022-06-06 18:03:12 +03:00
vars.scss Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00