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

@@ -23,9 +23,10 @@ import { kubeObjectMenuRegistry } from "../../../extensions/registries/kube-obje
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
import { Notifications } from "../notifications";
enum sortBy {
enum columnId {
name = "name",
namespace = "namespace",
pods = "pods",
replicas = "replicas",
age = "age",
condition = "condition",
@@ -55,14 +56,16 @@ export class Deployments extends React.Component<Props> {
render() {
return (
<KubeObjectListLayout
isConfigurable
tableId="workload_deployments"
className="Deployments" store={deploymentStore}
dependentStores={[replicaSetStore, podsStore, nodesStore, eventStore]}
sortingCallbacks={{
[sortBy.name]: (deployment: Deployment) => deployment.getName(),
[sortBy.namespace]: (deployment: Deployment) => deployment.getNs(),
[sortBy.replicas]: (deployment: Deployment) => deployment.getReplicas(),
[sortBy.age]: (deployment: Deployment) => deployment.metadata.creationTimestamp,
[sortBy.condition]: (deployment: Deployment) => deployment.getConditionsText(),
[columnId.name]: (deployment: Deployment) => deployment.getName(),
[columnId.namespace]: (deployment: Deployment) => deployment.getNs(),
[columnId.replicas]: (deployment: Deployment) => deployment.getReplicas(),
[columnId.age]: (deployment: Deployment) => deployment.metadata.creationTimestamp,
[columnId.condition]: (deployment: Deployment) => deployment.getConditionsText(),
}}
searchFilters={[
(deployment: Deployment) => deployment.getSearchFields(),
@@ -70,13 +73,13 @@ export class Deployments extends React.Component<Props> {
]}
renderHeaderTitle="Deployments"
renderTableHeader={[
{ title: "Name", className: "name", sortBy: sortBy.name },
{ className: "warning" },
{ title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
{ title: "Pods", className: "pods" },
{ title: "Replicas", className: "replicas", sortBy: sortBy.replicas },
{ title: "Age", className: "age", sortBy: sortBy.age },
{ title: "Conditions", className: "conditions", sortBy: sortBy.condition },
{ title: "Name", className: "name", sortBy: columnId.name, id: columnId.name },
{ className: "warning", showWithColumn: columnId.name },
{ title: "Namespace", className: "namespace", sortBy: columnId.namespace, id: columnId.namespace },
{ title: "Pods", className: "pods", id: columnId.pods },
{ title: "Replicas", className: "replicas", sortBy: columnId.replicas, id: columnId.replicas },
{ title: "Age", className: "age", sortBy: columnId.age, id: columnId.age },
{ title: "Conditions", className: "conditions", sortBy: columnId.condition, id: columnId.condition },
]}
renderTableContents={(deployment: Deployment) => [
deployment.getName(),