Enabling configurable columns for all major tables (#2029)

* Configurable columns in Deployments table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in DaemonSets table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in StatefulSets table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in ReplicaSets table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Jobs table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in CronJobs table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Nodes table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in ConfigMaps table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Secrets table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in ResourceQuota table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in LimitRanges table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in HPAs table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in PodDistributionBudget table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Services table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Endpoints table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Ingresses table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in NetworkPolicies table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Storage section

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Namespaces table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Events table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Apps section

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in Access Control section

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Configurable columns in CRDs tables

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev authored and GitHub committed 2021-01-28 12:18:45 +03:00
1 parent a102ebad62
commit 3640f313b3
30 files changed
+439 -357

No files matched your search

@@ -13,10 +13,11 @@ import { IDaemonSetsRouteParams } from "../+workloads";
import { Badge } from "../badge";
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
enum sortBy {
enum columnId {
name = "name",
namespace = "namespace",
pods = "pods",
labels = "labels",
age = "age",
}
@@ -38,13 +39,15 @@ export class DaemonSets extends React.Component<Props> {
render() {
return (
<KubeObjectListLayout
isConfigurable
tableId="workload_daemonsets"
className="DaemonSets" store={daemonSetStore}
dependentStores={[podsStore, nodesStore, eventStore]}
sortingCallbacks={{
[sortBy.name]: (daemonSet: DaemonSet) => daemonSet.getName(),
[sortBy.namespace]: (daemonSet: DaemonSet) => daemonSet.getNs(),
[sortBy.pods]: (daemonSet: DaemonSet) => this.getPodsLength(daemonSet),
[sortBy.age]: (daemonSet: DaemonSet) => daemonSet.metadata.creationTimestamp,
[columnId.name]: (daemonSet: DaemonSet) => daemonSet.getName(),
[columnId.namespace]: (daemonSet: DaemonSet) => daemonSet.getNs(),
[columnId.pods]: (daemonSet: DaemonSet) => this.getPodsLength(daemonSet),
[columnId.age]: (daemonSet: DaemonSet) => daemonSet.metadata.creationTimestamp,
}}
searchFilters={[
(daemonSet: DaemonSet) => daemonSet.getSearchFields(),
@@ -52,12 +55,12 @@ export class DaemonSets extends React.Component<Props> {
]}
renderHeaderTitle="Daemon Sets"
renderTableHeader={[
{ title: "Name", className: "name", sortBy: sortBy.name },
{ title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
{ title: "Pods", className: "pods", sortBy: sortBy.pods },
{ className: "warning" },
{ title: "Node Selector", className: "labels" },
{ title: "Age", className: "age", sortBy: sortBy.age },
{ title: "Name", className: "name", sortBy: columnId.name, id: columnId.name },
{ title: "Namespace", className: "namespace", sortBy: columnId.namespace, id: columnId.namespace },
{ title: "Pods", className: "pods", sortBy: columnId.pods, id: columnId.pods },
{ className: "warning", showWithColumn: columnId.pods },
{ title: "Node Selector", className: "labels", id: columnId.labels },
{ title: "Age", className: "age", sortBy: columnId.age, id: columnId.age },
]}
renderTableContents={(daemonSet: DaemonSet) => [
daemonSet.getName(),