@k8slens/extensions 5.3.0-git.7ba359be03.0 → 5.3.0-git.7c5a0a9a6d.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/__mocks__/electron.ts +2 -2
  2. package/dist/src/common/__tests__/system-ca.test.d.ts +1 -0
  3. package/dist/src/common/base-store.d.ts +1 -0
  4. package/dist/src/common/cluster-store.d.ts +2 -3
  5. package/dist/src/common/cluster-types.d.ts +7 -1
  6. package/dist/src/common/hotbar-store.d.ts +1 -0
  7. package/dist/src/common/k8s-api/endpoints/cluster-role-binding.api.d.ts +1 -1
  8. package/dist/src/common/k8s-api/endpoints/cluster-role.api.d.ts +1 -1
  9. package/dist/src/common/k8s-api/endpoints/cluster.api.d.ts +1 -1
  10. package/dist/src/common/k8s-api/endpoints/configmap.api.d.ts +1 -1
  11. package/dist/src/common/k8s-api/endpoints/crd.api.d.ts +1 -1
  12. package/dist/src/common/k8s-api/endpoints/cron-job.api.d.ts +1 -1
  13. package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +1 -1
  14. package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +1 -1
  15. package/dist/src/common/k8s-api/endpoints/endpoint.api.d.ts +1 -1
  16. package/dist/src/common/k8s-api/endpoints/events.api.d.ts +1 -1
  17. package/dist/src/common/k8s-api/endpoints/hpa.api.d.ts +1 -1
  18. package/dist/src/common/k8s-api/endpoints/ingress.api.d.ts +11 -8
  19. package/dist/src/common/k8s-api/endpoints/job.api.d.ts +1 -2
  20. package/dist/src/common/k8s-api/endpoints/limit-range.api.d.ts +1 -1
  21. package/dist/src/common/k8s-api/endpoints/namespaces.api.d.ts +1 -1
  22. package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +1 -1
  23. package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +1 -1
  24. package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +1 -1
  25. package/dist/src/common/k8s-api/endpoints/persistent-volume.api.d.ts +1 -1
  26. package/dist/src/common/k8s-api/endpoints/pod-metrics.api.d.ts +1 -1
  27. package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +1 -1
  28. package/dist/src/common/k8s-api/endpoints/pods.api.d.ts +29 -33
  29. package/dist/src/common/k8s-api/endpoints/podsecuritypolicy.api.d.ts +1 -1
  30. package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +1 -1
  31. package/dist/src/common/k8s-api/endpoints/resource-quota.api.d.ts +1 -1
  32. package/dist/src/common/k8s-api/endpoints/role-binding.api.d.ts +1 -1
  33. package/dist/src/common/k8s-api/endpoints/role.api.d.ts +1 -1
  34. package/dist/src/common/k8s-api/endpoints/secret.api.d.ts +1 -1
  35. package/dist/src/common/k8s-api/endpoints/selfsubjectrulesreviews.api.d.ts +1 -1
  36. package/dist/src/common/k8s-api/endpoints/service-accounts.api.d.ts +1 -1
  37. package/dist/src/common/k8s-api/endpoints/service.api.d.ts +1 -1
  38. package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +1 -1
  39. package/dist/src/common/k8s-api/endpoints/storage-class.api.d.ts +1 -1
  40. package/dist/src/common/k8s-api/index.d.ts +1 -1
  41. package/dist/src/common/k8s-api/kube-api.d.ts +12 -3
  42. package/dist/src/common/k8s-api/kube-json-api.d.ts +2 -0
  43. package/dist/src/common/k8s-api/kube-object.d.ts +9 -1
  44. package/dist/src/common/k8s-api/kube-object.store.d.ts +25 -7
  45. package/dist/src/common/k8s-api/kube-watch-api.d.ts +29 -8
  46. package/dist/src/common/system-ca.d.ts +20 -1
  47. package/dist/src/common/user-store/preferences-helpers.d.ts +2 -6
  48. package/dist/src/common/user-store/user-store.d.ts +2 -6
  49. package/dist/src/common/utils/base64.d.ts +12 -4
  50. package/dist/src/common/utils/index.d.ts +2 -2
  51. package/dist/src/common/utils/paths.d.ts +1 -0
  52. package/dist/src/{main → common/utils}/promise-exec.d.ts +0 -0
  53. package/dist/src/common/weblink-store.d.ts +1 -0
  54. package/dist/src/extensions/0.extension-api.js +15 -0
  55. package/dist/src/extensions/1.extension-api.js +15 -0
  56. package/dist/src/extensions/10.extension-api.js +15 -0
  57. package/dist/src/extensions/11.extension-api.js +15 -0
  58. package/dist/src/extensions/12.extension-api.js +15 -0
  59. package/dist/src/extensions/13.extension-api.js +15 -0
  60. package/dist/src/extensions/14.extension-api.js +15 -0
  61. package/dist/src/extensions/15.extension-api.js +15 -0
  62. package/dist/src/extensions/16.extension-api.js +15 -0
  63. package/dist/src/extensions/17.extension-api.js +15 -0
  64. package/dist/src/extensions/18.extension-api.js +15 -0
  65. package/dist/src/extensions/19.extension-api.js +15 -0
  66. package/dist/src/extensions/2.extension-api.js +543 -0
  67. package/dist/src/extensions/20.extension-api.js +15 -0
  68. package/dist/src/extensions/21.extension-api.js +15 -0
  69. package/dist/src/extensions/22.extension-api.js +15 -0
  70. package/dist/src/extensions/23.extension-api.js +15 -0
  71. package/dist/src/extensions/24.extension-api.js +15 -0
  72. package/dist/src/extensions/25.extension-api.js +15 -0
  73. package/dist/src/extensions/26.extension-api.js +15 -0
  74. package/dist/src/extensions/27.extension-api.js +15 -0
  75. package/dist/src/extensions/28.extension-api.js +15 -0
  76. package/dist/src/extensions/29.extension-api.js +15 -0
  77. package/dist/src/extensions/3.extension-api.js +423 -0
  78. package/dist/src/extensions/30.extension-api.js +15 -0
  79. package/dist/src/extensions/31.extension-api.js +15 -0
  80. package/dist/src/extensions/32.extension-api.js +15 -0
  81. package/dist/src/extensions/33.extension-api.js +15 -0
  82. package/dist/src/extensions/34.extension-api.js +15 -0
  83. package/dist/src/extensions/35.extension-api.js +15 -0
  84. package/dist/src/extensions/36.extension-api.js +15 -0
  85. package/dist/src/extensions/37.extension-api.js +15 -0
  86. package/dist/src/extensions/38.extension-api.js +15 -0
  87. package/dist/src/extensions/39.extension-api.js +15 -0
  88. package/dist/src/extensions/4.extension-api.js +363 -0
  89. package/dist/src/extensions/40.extension-api.js +15 -0
  90. package/dist/src/extensions/41.extension-api.js +15 -0
  91. package/dist/src/extensions/42.extension-api.js +15 -0
  92. package/dist/src/extensions/43.extension-api.js +15 -0
  93. package/dist/src/extensions/44.extension-api.js +15 -0
  94. package/dist/src/extensions/45.extension-api.js +15 -0
  95. package/dist/src/extensions/46.extension-api.js +15 -0
  96. package/dist/src/extensions/47.extension-api.js +15 -0
  97. package/dist/src/extensions/48.extension-api.js +15 -0
  98. package/dist/src/extensions/49.extension-api.js +15 -0
  99. package/dist/src/extensions/5.extension-api.js +51 -0
  100. package/dist/src/extensions/50.extension-api.js +15 -0
  101. package/dist/src/extensions/51.extension-api.js +15 -0
  102. package/dist/src/extensions/52.extension-api.js +15 -0
  103. package/dist/src/extensions/53.extension-api.js +15 -0
  104. package/dist/src/extensions/54.extension-api.js +15 -0
  105. package/dist/src/extensions/55.extension-api.js +15 -0
  106. package/dist/src/extensions/56.extension-api.js +15 -0
  107. package/dist/src/extensions/57.extension-api.js +15 -0
  108. package/dist/src/extensions/58.extension-api.js +15 -0
  109. package/dist/src/extensions/59.extension-api.js +15 -0
  110. package/dist/src/extensions/6.extension-api.js +27 -0
  111. package/dist/src/extensions/60.extension-api.js +15 -0
  112. package/dist/src/extensions/61.extension-api.js +15 -0
  113. package/dist/src/extensions/62.extension-api.js +15 -0
  114. package/dist/src/extensions/63.extension-api.js +15 -0
  115. package/dist/src/extensions/64.extension-api.js +15 -0
  116. package/dist/src/extensions/65.extension-api.js +15 -0
  117. package/dist/src/extensions/66.extension-api.js +15 -0
  118. package/dist/src/extensions/67.extension-api.js +15 -0
  119. package/dist/src/extensions/68.extension-api.js +15 -0
  120. package/dist/src/extensions/69.extension-api.js +15 -0
  121. package/dist/src/extensions/7.extension-api.js +15 -0
  122. package/dist/src/extensions/70.extension-api.js +15 -0
  123. package/dist/src/extensions/71.extension-api.js +15 -0
  124. package/dist/src/extensions/72.extension-api.js +15 -0
  125. package/dist/src/extensions/73.extension-api.js +15 -0
  126. package/dist/src/extensions/74.extension-api.js +15 -0
  127. package/dist/src/extensions/75.extension-api.js +15 -0
  128. package/dist/src/extensions/76.extension-api.js +15 -0
  129. package/dist/src/extensions/77.extension-api.js +15 -0
  130. package/dist/src/extensions/78.extension-api.js +15 -0
  131. package/dist/src/extensions/79.extension-api.js +15 -0
  132. package/dist/src/extensions/8.extension-api.js +15 -0
  133. package/dist/src/extensions/9.extension-api.js +15 -0
  134. package/dist/src/extensions/extension-api.js +5853 -1673
  135. package/dist/src/extensions/extension-store.d.ts +1 -0
  136. package/dist/src/extensions/extensions-store.d.ts +1 -0
  137. package/dist/src/extensions/main-api/k8s-api.d.ts +1 -1
  138. package/dist/src/extensions/registries/workloads-overview-detail-registry.d.ts +6 -3
  139. package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -1
  140. package/dist/src/main/catalog/catalog-entity-registry.d.ts +2 -2
  141. package/dist/src/main/cluster-manager.d.ts +2 -0
  142. package/dist/src/main/cluster.d.ts +5 -10
  143. package/dist/src/main/context-handler.d.ts +0 -1
  144. package/dist/src/main/extension-filesystem.d.ts +1 -0
  145. package/dist/src/main/index.d.ts +0 -1
  146. package/dist/src/main/kube-auth-proxy.d.ts +1 -8
  147. package/dist/src/main/kubectl.d.ts +1 -1
  148. package/dist/src/main/lens-proxy.d.ts +1 -1
  149. package/dist/src/main/proxy-functions/kube-api-request.d.ts +1 -1
  150. package/dist/src/main/proxy-functions/shell-api-request.d.ts +14 -0
  151. package/dist/src/main/proxy-functions/types.d.ts +2 -0
  152. package/dist/src/main/shell-session/node-shell-session.d.ts +4 -4
  153. package/dist/src/main/shell-session/shell-session.d.ts +95 -8
  154. package/dist/src/main/utils/shell-env.d.ts +1 -3
  155. package/dist/src/migrations/user-store/index.d.ts +1 -1
  156. package/dist/src/preload.d.ts +1 -1
  157. package/dist/src/renderer/api/terminal-api.d.ts +33 -20
  158. package/dist/src/renderer/api/websocket-api.d.ts +55 -32
  159. package/dist/src/renderer/bootstrap.d.ts +1 -1
  160. package/dist/src/renderer/{components/app.d.ts → cluster-frame.d.ts} +6 -4
  161. package/dist/src/renderer/components/+add-cluster/add-cluster.d.ts +0 -1
  162. package/dist/src/renderer/components/+apps-helm-charts/helm-chart-details.d.ts +3 -3
  163. package/dist/src/renderer/components/+catalog/catalog.d.ts +0 -1
  164. package/dist/src/{common/utils/makeCss.d.ts → renderer/components/+user-management/+cluster-role-bindings/__tests__/dialog.test.d.ts} +1 -9
  165. package/dist/src/renderer/components/+user-management/+cluster-role-bindings/dialog.d.ts +2 -3
  166. package/dist/src/renderer/components/+user-management/{select-options.d.ts → +role-bindings/__tests__/dialog.test.d.ts} +1 -7
  167. package/dist/src/renderer/components/+user-management/+role-bindings/dialog.d.ts +2 -3
  168. package/dist/src/renderer/components/+workloads-daemonsets/daemonsets.d.ts +0 -1
  169. package/dist/src/renderer/components/+workloads-overview/overview.d.ts +3 -0
  170. package/dist/src/renderer/components/+workloads-pods/pod-details-affinities.d.ts +1 -2
  171. package/dist/src/renderer/components/badge/badge.d.ts +1 -0
  172. package/dist/src/renderer/components/cluster-manager/cluster-status.d.ts +6 -7
  173. package/dist/src/renderer/components/cluster-manager/lens-views.d.ts +12 -8
  174. package/dist/src/renderer/components/cluster-settings/components/__tests__/cluster-local-terminal-settings.test.d.ts +21 -0
  175. package/dist/src/renderer/components/cluster-settings/components/{cluster-home-dir-setting.d.ts → cluster-local-terminal-settings.d.ts} +1 -12
  176. package/dist/src/renderer/components/cluster-settings/components/index.d.ts +1 -1
  177. package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
  178. package/dist/src/renderer/components/dock/create-resource.d.ts +2 -2
  179. package/dist/src/renderer/components/dock/dock.store.d.ts +20 -2
  180. package/dist/src/renderer/components/dock/edit-resource.d.ts +3 -3
  181. package/dist/src/renderer/components/dock/editor-panel.d.ts +11 -17
  182. package/dist/src/renderer/components/dock/install-chart.d.ts +6 -5
  183. package/dist/src/renderer/components/dock/terminal-window.d.ts +2 -3
  184. package/dist/src/renderer/components/dock/terminal.d.ts +7 -11
  185. package/dist/src/renderer/components/dock/upgrade-chart.d.ts +2 -1
  186. package/dist/src/renderer/components/drawer/drawer.d.ts +1 -0
  187. package/dist/src/renderer/components/item-object-list/item-list-layout.d.ts +6 -0
  188. package/dist/src/renderer/components/kube-object-list-layout/kube-object-list-layout.d.ts +4 -0
  189. package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
  190. package/dist/src/renderer/components/layout/__tests__/sidebar-cluster.test.d.ts +21 -0
  191. package/dist/src/renderer/components/layout/sidebar-cluster.d.ts +24 -0
  192. package/dist/src/renderer/components/layout/sidebar.d.ts +2 -5
  193. package/dist/src/renderer/components/list/list.d.ts +1 -1
  194. package/dist/src/renderer/components/monaco-editor/index.d.ts +23 -0
  195. package/dist/src/renderer/components/monaco-editor/monaco-editor.d.ts +93 -0
  196. package/dist/src/renderer/components/monaco-editor/monaco-themes.d.ts +29 -0
  197. package/dist/src/renderer/components/monaco-editor/monaco-validators.d.ts +9 -0
  198. package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
  199. package/dist/src/renderer/components/table/table-cell.d.ts +1 -0
  200. package/dist/src/renderer/initializers/kube-object-detail-registry.d.ts +1 -1
  201. package/dist/src/renderer/port-forward/index.d.ts +1 -0
  202. package/dist/src/renderer/port-forward/port-forward-notify.d.ts +21 -0
  203. package/dist/src/renderer/{lens-app.d.ts → root-frame.d.ts} +4 -2
  204. package/dist/src/renderer/theme.store.d.ts +4 -15
  205. package/package.json +1 -1
  206. package/dist/src/renderer/components/dock/monaco-model-manager.d.ts +0 -42
@@ -48,7 +48,6 @@ export declare class Catalog extends React.Component<Props> {
48
48
  renderNavigation(): JSX.Element;
49
49
  renderItemMenu: (item: CatalogEntityItem<CatalogEntity>) => JSX.Element;
50
50
  renderName(item: CatalogEntityItem<CatalogEntity>): JSX.Element;
51
- renderIcon(item: CatalogEntityItem<CatalogEntity>): JSX.Element;
52
51
  renderList(): JSX.Element;
53
52
  render(): JSX.Element;
54
53
  }
@@ -18,12 +18,4 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- /**
22
- * Function expands generic CSS Modules literal types and adds dictionary with arbitrary
23
- * indexes.
24
- * @param styles Styles imported from CSS Module having only literal types
25
- * @returns Passed style list with expanded typescript types
26
- */
27
- export declare function makeCss<T>(styles: T): T & {
28
- [key: string]: string;
29
- };
21
+ export {};
@@ -23,7 +23,6 @@ import React from "react";
23
23
  import { ClusterRole, ClusterRoleBinding, ClusterRoleBindingSubject, ServiceAccount } from "../../../../common/k8s-api/endpoints";
24
24
  import { DialogProps } from "../../dialog";
25
25
  import { SelectOption } from "../../select";
26
- import { ServiceAccountOption } from "../select-options";
27
26
  import { ObservableHashSet } from "../../../utils";
28
27
  interface Props extends Partial<DialogProps> {
29
28
  }
@@ -46,8 +45,8 @@ export declare class ClusterRoleBindingDialog extends React.Component<Props> {
46
45
  selectedGroups: import("mobx").ObservableSet<string>;
47
46
  get selectedBindings(): ClusterRoleBindingSubject[];
48
47
  get clusterRoleRefoptions(): SelectOption<ClusterRole>[];
49
- get serviceAccountOptions(): ServiceAccountOption[];
50
- get selectedServiceAccountOptions(): ServiceAccountOption[];
48
+ get serviceAccountOptions(): SelectOption<ServiceAccount>[];
49
+ get selectedServiceAccountOptions(): SelectOption<ServiceAccount>[];
51
50
  onOpen: () => void;
52
51
  reset: () => void;
53
52
  createBindings: () => Promise<void>;
@@ -18,10 +18,4 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import type { ServiceAccount } from "../../../common/k8s-api/endpoints";
22
- import type { KubeObject } from "../../../common/k8s-api/kube-object";
23
- import type { SelectOption } from "../select";
24
- export declare type ServiceAccountOption = SelectOption<string> & {
25
- account: ServiceAccount;
26
- };
27
- export declare function getRoleRefSelectOption<T extends KubeObject>(item: T): SelectOption<T>;
21
+ export {};
@@ -23,7 +23,6 @@ import React from "react";
23
23
  import { ClusterRole, Role, RoleBinding, RoleBindingSubject, ServiceAccount } from "../../../../common/k8s-api/endpoints";
24
24
  import { DialogProps } from "../../dialog";
25
25
  import { SelectOption } from "../../select";
26
- import { ServiceAccountOption } from "../select-options";
27
26
  import { ObservableHashSet } from "../../../utils";
28
27
  interface Props extends Partial<DialogProps> {
29
28
  }
@@ -46,8 +45,8 @@ export declare class RoleBindingDialog extends React.Component<Props> {
46
45
  selectedGroups: import("mobx").ObservableSet<string>;
47
46
  get selectedBindings(): RoleBindingSubject[];
48
47
  get roleRefOptions(): SelectOption<Role | ClusterRole>[];
49
- get serviceAccountOptions(): ServiceAccountOption[];
50
- get selectedServiceAccountOptions(): ServiceAccountOption[];
48
+ get serviceAccountOptions(): SelectOption<ServiceAccount>[];
49
+ get selectedServiceAccountOptions(): SelectOption<ServiceAccount>[];
51
50
  onOpen: () => void;
52
51
  reset: () => void;
53
52
  createBindings: () => Promise<void>;
@@ -27,7 +27,6 @@ interface Props extends RouteComponentProps<DaemonSetsRouteParams> {
27
27
  }
28
28
  export declare class DaemonSets extends React.Component<Props> {
29
29
  getPodsLength(daemonSet: DaemonSet): number;
30
- renderNodeSelector(daemonSet: DaemonSet): JSX.Element[];
31
30
  render(): JSX.Element;
32
31
  }
33
32
  export {};
@@ -25,7 +25,10 @@ import type { WorkloadsOverviewRouteParams } from "../../../common/routes";
25
25
  interface Props extends RouteComponentProps<WorkloadsOverviewRouteParams> {
26
26
  }
27
27
  export declare class WorkloadsOverview extends React.Component<Props> {
28
+ loadErrors: string[];
29
+ constructor(props: Props);
28
30
  componentDidMount(): void;
31
+ renderLoadErrors(): JSX.Element;
29
32
  render(): JSX.Element;
30
33
  }
31
34
  export {};
@@ -18,9 +18,8 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import "./pod-details-affinities.scss";
22
21
  import React from "react";
23
- import type { Pod, Deployment, DaemonSet, StatefulSet, ReplicaSet, Job } from "../../../common/k8s-api/endpoints";
22
+ import type { DaemonSet, Deployment, Job, Pod, ReplicaSet, StatefulSet } from "../../../common/k8s-api/endpoints";
24
23
  interface Props {
25
24
  workload: Pod | Deployment | DaemonSet | StatefulSet | ReplicaSet | Job;
26
25
  }
@@ -26,6 +26,7 @@ export interface BadgeProps extends React.HTMLAttributes<any>, TooltipDecoratorP
26
26
  label?: React.ReactNode;
27
27
  expandable?: boolean;
28
28
  disabled?: boolean;
29
+ scrollable?: boolean;
29
30
  }
30
31
  export declare class Badge extends React.Component<BadgeProps> {
31
32
  static defaultProps: Partial<BadgeProps>;
@@ -21,24 +21,23 @@
21
21
  import React from "react";
22
22
  import type { Cluster } from "../../../main/cluster";
23
23
  import { IClassName } from "../../utils";
24
- import type { KubeAuthProxyLog } from "../../../main/kube-auth-proxy";
25
- import type { ClusterId } from "../../../common/cluster-types";
24
+ import type { ClusterId, KubeAuthUpdate } from "../../../common/cluster-types";
26
25
  interface Props {
27
26
  className?: IClassName;
28
27
  clusterId: ClusterId;
29
28
  }
30
29
  export declare class ClusterStatus extends React.Component<Props> {
31
- authOutput: KubeAuthProxyLog[];
30
+ authOutput: KubeAuthUpdate[];
32
31
  isReconnecting: boolean;
33
32
  constructor(props: Props);
34
33
  get cluster(): Cluster;
35
34
  get hasErrors(): boolean;
36
- componentDidMount(): Promise<void>;
37
- componentWillUnmount(): void;
38
- activateCluster: (force?: boolean) => Promise<void>;
35
+ componentDidMount(): void;
39
36
  reconnect: () => Promise<void>;
40
37
  manageProxySettings: () => void;
41
- renderContent(): JSX.Element;
38
+ renderAuthenticationOutput(): JSX.Element;
39
+ renderStatusIcon(): JSX.Element;
40
+ renderReconnectionHelp(): JSX.Element;
42
41
  render(): JSX.Element;
43
42
  }
44
43
  export {};
@@ -19,13 +19,17 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  import type { ClusterId } from "../../../common/cluster-types";
22
+ import { Singleton } from "../../utils";
22
23
  export interface LensView {
23
- isLoaded?: boolean;
24
- clusterId: ClusterId;
25
- view: HTMLIFrameElement;
24
+ isLoaded: boolean;
25
+ frame: HTMLIFrameElement;
26
+ }
27
+ export declare class ClusterFrameHandler extends Singleton {
28
+ private views;
29
+ constructor();
30
+ hasLoadedView(clusterId: string): boolean;
31
+ initView(clusterId: ClusterId): void;
32
+ private prevVisibleClusterChange?;
33
+ setVisibleCluster(clusterId: ClusterId | null): void;
34
+ clearVisibleCluster(): void;
26
35
  }
27
- export declare const lensViews: import("mobx").ObservableMap<string, LensView>;
28
- export declare function hasLoadedView(clusterId: ClusterId): boolean;
29
- export declare function initView(clusterId: ClusterId): Promise<void>;
30
- export declare function autoCleanOnRemove(clusterId: ClusterId, iframe: HTMLIFrameElement): Promise<void>;
31
- export declare function refreshViews(visibleClusterId?: string): void;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ export {};
@@ -18,20 +18,9 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import React from "react";
22
21
  import type { Cluster } from "../../../../main/cluster";
23
22
  interface Props {
24
23
  cluster: Cluster;
25
24
  }
26
- export declare class ClusterHomeDirSetting extends React.Component<Props> {
27
- directory: string;
28
- defaultNamespace: string;
29
- constructor(props: Props);
30
- componentDidMount(): Promise<void>;
31
- saveCWD: () => void;
32
- onChangeTerminalCWD: (value: string) => void;
33
- saveDefaultNamespace: () => void;
34
- onChangeDefaultNamespace: (value: string) => void;
35
- render(): JSX.Element;
36
- }
25
+ export declare const ClusterLocalTerminalSetting: ({ cluster }: Props) => JSX.Element;
37
26
  export {};
@@ -19,7 +19,7 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  export * from "./cluster-accessible-namespaces";
22
- export * from "./cluster-home-dir-setting";
22
+ export * from "./cluster-local-terminal-settings";
23
23
  export * from "./cluster-kubeconfig";
24
24
  export * from "./cluster-metrics-setting";
25
25
  export * from "./cluster-name-setting";
@@ -36,6 +36,7 @@ interface DialogState {
36
36
  }
37
37
  export declare class Dialog extends React.PureComponent<DialogProps, DialogState> {
38
38
  private contentElem;
39
+ ref: React.RefObject<HTMLDivElement>;
39
40
  static defaultProps: DialogProps;
40
41
  closeOnNavigate: import("mobx").IReactionDisposer;
41
42
  state: DialogState;
@@ -23,7 +23,6 @@ import React from "react";
23
23
  import { GroupSelectOption, SelectOption } from "../select";
24
24
  import type { DockTab } from "./dock.store";
25
25
  interface Props {
26
- className?: string;
27
26
  tab: DockTab;
28
27
  }
29
28
  export declare class CreateResource extends React.Component<Props> {
@@ -37,7 +36,8 @@ export declare class CreateResource extends React.Component<Props> {
37
36
  get tabId(): string;
38
37
  get data(): string;
39
38
  get currentTemplate(): SelectOption<any>;
40
- onChange: (value: string, error?: string) => void;
39
+ onChange: (value: string) => void;
40
+ onError: (error: Error | string) => void;
41
41
  onSelectTemplate: (item: SelectOption) => void;
42
42
  create: () => Promise<undefined>;
43
43
  renderControls(): JSX.Element;
@@ -73,6 +73,24 @@ export interface DockStorageState {
73
73
  selectedTabId?: TabId;
74
74
  isOpen?: boolean;
75
75
  }
76
+ export interface DockTabChangeEvent {
77
+ tab: DockTab;
78
+ tabId: TabId;
79
+ prevTab?: DockTab;
80
+ }
81
+ export interface DockTabChangeEventOptions extends IReactionOptions {
82
+ /**
83
+ * filter: by dockStore.selectedTab.kind == tabKind
84
+ */
85
+ tabKind?: TabKind;
86
+ /**
87
+ * filter: dock and selected tab should be visible (default: true)
88
+ */
89
+ dockIsVisible?: boolean;
90
+ }
91
+ export interface DockTabCloseEvent {
92
+ tabId: TabId;
93
+ }
76
94
  export declare class DockStore implements DockStorageState {
77
95
  constructor();
78
96
  readonly minHeight = 100;
@@ -94,9 +112,9 @@ export declare class DockStore implements DockStorageState {
94
112
  get maxHeight(): number;
95
113
  protected adjustHeight(): void;
96
114
  onResize(callback: () => void, options?: IReactionOptions): import("mobx").IReactionDisposer;
97
- onTabChange(callback: (tabId: TabId) => void, options?: IReactionOptions): import("mobx").IReactionDisposer;
115
+ onTabClose(callback: (evt: DockTabCloseEvent) => void, options?: IReactionOptions): import("mobx").IReactionDisposer;
116
+ onTabChange(callback: (evt: DockTabChangeEvent) => void, options?: DockTabChangeEventOptions): import("mobx").IReactionDisposer;
98
117
  hasTabs(): boolean;
99
- usesMonacoEditor(tab: DockTab): boolean;
100
118
  open(fullSize?: boolean): void;
101
119
  close(): void;
102
120
  toggle(): void;
@@ -23,7 +23,6 @@ import React from "react";
23
23
  import type { DockTab } from "./dock.store";
24
24
  import type { KubeObject } from "../../../common/k8s-api/kube-object";
25
25
  interface Props {
26
- className?: string;
27
26
  tab: DockTab;
28
27
  }
29
28
  export declare class EditResource extends React.Component<Props> {
@@ -33,8 +32,9 @@ export declare class EditResource extends React.Component<Props> {
33
32
  get isReadyForEditing(): boolean;
34
33
  get resource(): KubeObject | undefined;
35
34
  get draft(): string;
36
- saveDraft(draft: string | object): void;
37
- onChange: (draft: string, error?: string) => void;
35
+ saveDraft(draft: string): void;
36
+ onChange: (draft: string) => void;
37
+ onError: (error?: Error | string) => void;
38
38
  save: () => Promise<JSX.Element>;
39
39
  render(): JSX.Element;
40
40
  }
@@ -18,27 +18,21 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import { monaco } from "react-monaco-editor";
22
21
  import React from "react";
23
22
  import { TabId } from "./dock.store";
24
- import "monaco-editor";
25
- interface Props {
26
- className?: string;
23
+ import { MonacoEditor, MonacoEditorProps } from "../monaco-editor";
24
+ export interface EditorPanelProps {
27
25
  tabId: TabId;
28
- value?: string;
29
- onChange(value: string, error?: string): void;
26
+ value: string;
27
+ className?: string;
28
+ autoFocus?: boolean;
29
+ onChange: MonacoEditorProps["onChange"];
30
+ onError?: MonacoEditorProps["onError"];
30
31
  }
31
- export declare class EditorPanel extends React.Component<Props> {
32
- model: monaco.editor.ITextModel;
33
- editor: monaco.editor.IStandaloneCodeEditor;
34
- yamlError: string;
35
- constructor(props: Props);
32
+ export declare class EditorPanel extends React.Component<EditorPanelProps> {
33
+ static defaultProps: object;
34
+ editor?: MonacoEditor;
35
+ constructor(props: EditorPanelProps);
36
36
  componentDidMount(): void;
37
- editorDidMount: (editor: monaco.editor.IStandaloneCodeEditor) => void;
38
- validate(value: string): void;
39
- onTabChange: () => void;
40
- onResize: () => void;
41
- onChange: (value: string) => void;
42
37
  render(): JSX.Element;
43
38
  }
44
- export {};
@@ -35,12 +35,13 @@ export declare class InstallChart extends Component<Props> {
35
35
  get tabId(): string;
36
36
  get versions(): string[];
37
37
  get releaseDetails(): import("../../../common/k8s-api/endpoints/helm-releases.api").IReleaseUpdateDetails;
38
- viewRelease(): void;
38
+ viewRelease: () => void;
39
39
  save(data: Partial<IChartInstallData>): void;
40
- onVersionChange(option: SelectOption): void;
41
- onValuesChange(values: string, error?: string): void;
42
- onNamespaceChange(opt: SelectOption): void;
43
- onReleaseNameChange(name: string): void;
40
+ onVersionChange: (option: SelectOption) => void;
41
+ onChange: (values: string) => void;
42
+ onError: (error: Error | string) => void;
43
+ onNamespaceChange: (opt: SelectOption) => void;
44
+ onReleaseNameChange: (name: string) => void;
44
45
  install: () => Promise<JSX.Element>;
45
46
  render(): JSX.Element;
46
47
  }
@@ -20,17 +20,16 @@
20
20
  */
21
21
  import "./terminal-window.scss";
22
22
  import React from "react";
23
- import type { DockTab } from "./dock.store";
24
23
  import type { Terminal } from "./terminal";
24
+ import { DockTab, TabId } from "./dock.store";
25
25
  interface Props {
26
- className?: string;
27
26
  tab: DockTab;
28
27
  }
29
28
  export declare class TerminalWindow extends React.Component<Props> {
30
29
  elem: HTMLElement;
31
30
  terminal: Terminal;
32
31
  componentDidMount(): void;
33
- activate(tabId?: string): void;
32
+ activate(tabId: TabId): void;
34
33
  render(): JSX.Element;
35
34
  }
36
35
  export {};
@@ -19,28 +19,24 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  /// <reference types="lodash" />
22
- import { Terminal as XTerm } from "xterm";
23
- import { FitAddon } from "xterm-addon-fit";
24
22
  import { TabId } from "./dock.store";
25
- import type { TerminalApi } from "../../api/terminal-api";
23
+ import { TerminalApi } from "../../api/terminal-api";
26
24
  export declare class Terminal {
27
25
  tabId: TabId;
28
26
  protected api: TerminalApi;
29
- static spawningPool: HTMLElement;
30
- static init(): void;
27
+ static readonly spawningPool: HTMLDivElement;
31
28
  static preloadFonts(): Promise<void>;
32
- xterm: XTerm;
33
- fitAddon: FitAddon;
34
- scrollPos: number;
35
- disposers: Function[];
29
+ private xterm;
30
+ private readonly fitAddon;
31
+ private scrollPos;
32
+ private disposer;
36
33
  protected setTheme(colors: Record<string, string>): void;
37
34
  get elem(): HTMLElement;
38
35
  get viewport(): Element;
39
- constructor(tabId: TabId, api: TerminalApi);
40
36
  get isActive(): boolean;
41
37
  attachTo(parentElem: HTMLElement): void;
42
38
  detach(): void;
43
- init(): Promise<void>;
39
+ constructor(tabId: TabId, api: TerminalApi);
44
40
  destroy(): void;
45
41
  fit: () => void;
46
42
  fitLazy: import("lodash").DebouncedFunc<() => void>;
@@ -38,7 +38,8 @@ export declare class UpgradeChart extends React.Component<Props> {
38
38
  get release(): HelmRelease;
39
39
  get value(): string;
40
40
  loadVersions(): Promise<void>;
41
- onChange: (value: string, error?: string) => void;
41
+ onChange: (value: string) => void;
42
+ onError: (error: Error | string) => void;
42
43
  upgrade: () => Promise<JSX.Element>;
43
44
  formatVersionLabel: ({ value }: SelectOption<IChartVersion>) => string;
44
45
  render(): JSX.Element;
@@ -46,6 +46,7 @@ export declare class Drawer extends React.Component<DrawerProps> {
46
46
  state: State;
47
47
  componentDidMount(): void;
48
48
  componentWillUnmount(): void;
49
+ fixUpTripleClick: (ev: MouseEvent) => void;
49
50
  saveScrollPos: () => void;
50
51
  restoreScrollPos: () => void;
51
52
  onEscapeKey: (evt: KeyboardEvent) => void;
@@ -70,6 +70,12 @@ export interface ItemListLayoutProps<I extends ItemObject> {
70
70
  onDetails?: (item: I) => void;
71
71
  customizeRemoveDialog?: (selectedItems: I[]) => Partial<ConfirmDialogParams>;
72
72
  renderFooter?: (parent: ItemListLayout<I>) => React.ReactNode;
73
+ /**
74
+ * Message to display when a store failed to load
75
+ *
76
+ * @default "Failed to load items"
77
+ */
78
+ failedToLoadMessage?: React.ReactNode;
73
79
  filterCallbacks?: ItemsFilters<I>;
74
80
  }
75
81
  export declare class ItemListLayout<I extends ItemObject> extends React.Component<ItemListLayoutProps<I>> {
@@ -18,6 +18,7 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
+ import "./kube-object-list-layout.scss";
21
22
  import React from "react";
22
23
  import type { KubeObject } from "../../../common/k8s-api/kube-object";
23
24
  import { ItemListLayoutProps } from "../item-object-list/item-list-layout";
@@ -25,11 +26,14 @@ import type { KubeObjectStore } from "../../../common/k8s-api/kube-object.store"
25
26
  export interface KubeObjectListLayoutProps<K extends KubeObject> extends ItemListLayoutProps<K> {
26
27
  store: KubeObjectStore<K>;
27
28
  dependentStores?: KubeObjectStore<KubeObject>[];
29
+ subscribeStores?: boolean;
28
30
  }
29
31
  export declare class KubeObjectListLayout<K extends KubeObject> extends React.Component<KubeObjectListLayoutProps<K>> {
30
32
  static defaultProps: object;
31
33
  constructor(props: KubeObjectListLayoutProps<K>);
34
+ loadErrors: string[];
32
35
  get selectedItem(): K;
33
36
  componentDidMount(): void;
37
+ renderLoadErrors(): JSX.Element;
34
38
  render(): JSX.Element;
35
39
  }
@@ -18,7 +18,6 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import "./kubeconfig-dialog.scss";
22
21
  import React from "react";
23
22
  import type { ServiceAccount } from "../../../common/k8s-api/endpoints";
24
23
  import { DialogProps } from "../dialog";
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import "@testing-library/jest-dom/extend-expect";
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import type { CatalogEntity } from "../../api/catalog-entity";
22
+ export declare function SidebarCluster({ clusterEntity }: {
23
+ clusterEntity: CatalogEntity;
24
+ }): JSX.Element;
@@ -26,15 +26,12 @@ interface Props {
26
26
  }
27
27
  export declare class Sidebar extends React.Component<Props> {
28
28
  static displayName: string;
29
- private contextMenu;
30
- constructor(props: Props);
31
- componentDidMount(): Promise<void>;
29
+ componentDidMount(): void;
32
30
  renderCustomResources(): JSX.Element | JSX.Element[];
33
31
  renderTreeFromTabRoutes(tabRoutes?: TabLayoutRoute[]): React.ReactNode;
34
32
  getTabLayoutRoutes(menu: ClusterPageMenuRegistration): TabLayoutRoute[];
35
33
  renderRegisteredMenus(): JSX.Element[];
36
- renderCluster(): JSX.Element;
37
- get clusterEntity(): import("../../../common/catalog").CatalogEntity<import("../../../common/catalog").CatalogEntityMetadata, import("../../../common/catalog").CatalogEntityStatus, import("../../../common/catalog").CatalogEntitySpec>;
34
+ get clusterEntity(): import("../../api/catalog-entity").CatalogEntity<import("../../../common/catalog").CatalogEntityMetadata, import("../../../common/catalog").CatalogEntityStatus, import("../../../common/catalog").CatalogEntitySpec>;
38
35
  render(): JSX.Element;
39
36
  }
40
37
  export {};
@@ -26,5 +26,5 @@ interface Props extends UseTableOptions<any> {
26
26
  filters: SearchFilter[];
27
27
  title?: React.ReactNode;
28
28
  }
29
- export declare function List({ columns, data, title, items, filters, }: Props): JSX.Element;
29
+ export declare function List({ columns, data, title, items, filters }: Props): JSX.Element;
30
30
  export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ export * from "./monaco-editor";
22
+ export * from "./monaco-validators";
23
+ export * from "./monaco-themes";