Skip to content

Commit

Permalink
Add buttons to quicky filter the current view by a specific namespace (
Browse files Browse the repository at this point in the history
…lensapp#6677)

* Add quick namespace filtering in pods view

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

* Add quick namespace filtering to HorizontalPodAutoscalers view

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

* Add quick namespace filtering to Leases view

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

* Add quick namespace filtering to LimitRanges view

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

* Add quick namespace filtering to ConfigMaps view

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

* Remove last usage of legacy global

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

* Add quick namespace filtering to PodDisruptionBudgets view

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

* Add quick namespace filtering to ResourceQuotas view

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

* Add quick namespace filtering to Secrets view

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

* Remove last usage of legacy global secretsStore

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

* Add quick namespace filtering to CustomResources view

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

* Add quick namespace filtering to Events view

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

* Add quick namespace filtering to HelmReleases view

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

* Add quick namespace filtering to Endpoints view

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

* Remove last usage of legacy global endpointsStore

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

* Add quick namespace filtering to Ingresses view

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

* Add quick namespace filtering to NetworkPolicies view

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

* Add quick namespace filtering to PortForwards view

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

* Add quick namespace filtering to Services view

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

* Add quick namespace filtering to PersistentVolumeClaims view

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

* Add quick namespace filtering to RoleBindings view

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

* Add quick namespace filtering to Roles view

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

* Add quick namespace filtering to ServiceAccounts view

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

* Add quick namespace filtering to CronJobs view

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

* Add quick namespace filtering to DaemonSets view

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

* Add quick namespace filtering to Deployments view

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

* Add quick namespace filtering to Jobs view

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

* Add quick namespace filtering to StatefulSets view

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

* Add quick namespace filtering to ReplicaSets view

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

* Remove last usage of legacy global replicaSetStore

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

* Fix up missing styles

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

* Fix tests

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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
  • Loading branch information
Nokel81 authored Dec 1, 2022
1 parent ab4a99b commit a546f3b
Show file tree
Hide file tree
Showing 79 changed files with 1,184 additions and 433 deletions.
6 changes: 3 additions & 3 deletions src/common/k8s-api/endpoints/events.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import moment from "moment";
import type { KubeObjectMetadata, ObjectReference } from "../kube-object";
import type { KubeObjectMetadata, KubeObjectScope, ObjectReference } from "../kube-object";
import { KubeObject } from "../kube-object";
import { formatDuration } from "../../utils/formatDuration";
import type { DerivedKubeApiOptions } from "../kube-api";
Expand All @@ -21,7 +21,7 @@ export interface EventSource {
host?: string;
}

export interface KubeEventData extends KubeJsonApiData<KubeObjectMetadata, void, void> {
export interface KubeEventData extends KubeJsonApiData<KubeObjectMetadata<KubeObjectScope.Namespace>, void, void> {
action?: string;
count?: number;
eventTime?: string;
Expand All @@ -38,7 +38,7 @@ export interface KubeEventData extends KubeJsonApiData<KubeObjectMetadata, void,
type?: string;
}

export class KubeEvent extends KubeObject {
export class KubeEvent extends KubeObject<KubeObjectMetadata<KubeObjectScope.Namespace>, void, void> {
static kind = "Event";
static namespaced = true;
static apiBase = "/api/v1/events";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,11 @@ exports[`New Upgrade Helm Chart Dock Tab given a namespace is selected when navi
<div
class="TableCell namespace"
>
my-second-namespace
<a
class="filterNamespace"
>
my-second-namespace
</a>
</div>
<div
class="TableCell chart"
Expand Down Expand Up @@ -2048,7 +2052,11 @@ exports[`New Upgrade Helm Chart Dock Tab given a namespace is selected when navi
<div
class="TableCell namespace"
>
my-second-namespace
<a
class="filterNamespace"
>
my-second-namespace
</a>
</div>
<div
class="TableCell chart"
Expand Down Expand Up @@ -2855,7 +2863,11 @@ exports[`New Upgrade Helm Chart Dock Tab given a namespace is selected when navi
<div
class="TableCell namespace"
>
my-second-namespace
<a
class="filterNamespace"
>
my-second-namespace
</a>
</div>
<div
class="TableCell chart"
Expand Down Expand Up @@ -3698,7 +3710,11 @@ exports[`New Upgrade Helm Chart Dock Tab given a namespace is selected when navi
<div
class="TableCell namespace"
>
my-second-namespace
<a
class="filterNamespace"
>
my-second-namespace
</a>
</div>
<div
class="TableCell chart"
Expand Down Expand Up @@ -4681,7 +4697,11 @@ exports[`New Upgrade Helm Chart Dock Tab given a namespace is selected when navi
<div
class="TableCell namespace"
>
my-second-namespace
<a
class="filterNamespace"
>
my-second-namespace
</a>
</div>
<div
class="TableCell chart"
Expand Down Expand Up @@ -5666,7 +5686,11 @@ exports[`New Upgrade Helm Chart Dock Tab given a namespace is selected when navi
<div
class="TableCell namespace"
>
my-second-namespace
<a
class="filterNamespace"
>
my-second-namespace
</a>
</div>
<div
class="TableCell chart"
Expand Down
Loading

0 comments on commit a546f3b

Please sign in to comment.