mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
1 parent
a102ebad62
commit
3640f313b3
30 files changed
+439
-357
No files matched your search
@@ -14,7 +14,7 @@ import { Icon } from "../icon/icon";
|
||||
import { kubeObjectMenuRegistry } from "../../../extensions/registries/kube-object-menu-registry";
|
||||
import { ReplicaSetScaleDialog } from "./replicaset-scale-dialog";
|
||||
|
||||
enum sortBy {
|
||||
enum columnId {
|
||||
name = "name",
|
||||
namespace = "namespace",
|
||||
desired = "desired",
|
||||
@@ -31,27 +31,29 @@ export class ReplicaSets extends React.Component<Props> {
|
||||
render() {
|
||||
return (
|
||||
<KubeObjectListLayout
|
||||
isConfigurable
|
||||
tableId="workload_replicasets"
|
||||
className="ReplicaSets" store={replicaSetStore}
|
||||
sortingCallbacks={{
|
||||
[sortBy.name]: (replicaSet: ReplicaSet) => replicaSet.getName(),
|
||||
[sortBy.namespace]: (replicaSet: ReplicaSet) => replicaSet.getNs(),
|
||||
[sortBy.desired]: (replicaSet: ReplicaSet) => replicaSet.getDesired(),
|
||||
[sortBy.current]: (replicaSet: ReplicaSet) => replicaSet.getCurrent(),
|
||||
[sortBy.ready]: (replicaSet: ReplicaSet) => replicaSet.getReady(),
|
||||
[sortBy.age]: (replicaSet: ReplicaSet) => replicaSet.metadata.creationTimestamp,
|
||||
[columnId.name]: (replicaSet: ReplicaSet) => replicaSet.getName(),
|
||||
[columnId.namespace]: (replicaSet: ReplicaSet) => replicaSet.getNs(),
|
||||
[columnId.desired]: (replicaSet: ReplicaSet) => replicaSet.getDesired(),
|
||||
[columnId.current]: (replicaSet: ReplicaSet) => replicaSet.getCurrent(),
|
||||
[columnId.ready]: (replicaSet: ReplicaSet) => replicaSet.getReady(),
|
||||
[columnId.age]: (replicaSet: ReplicaSet) => replicaSet.metadata.creationTimestamp,
|
||||
}}
|
||||
searchFilters={[
|
||||
(replicaSet: ReplicaSet) => replicaSet.getSearchFields(),
|
||||
]}
|
||||
renderHeaderTitle="Replica Sets"
|
||||
renderTableHeader={[
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
{ className: "warning" },
|
||||
{ title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: "Desired", className: "desired", sortBy: sortBy.desired },
|
||||
{ title: "Current", className: "current", sortBy: sortBy.current },
|
||||
{ title: "Ready", className: "ready", sortBy: sortBy.ready },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
{ 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: "Desired", className: "desired", sortBy: columnId.desired, id: columnId.desired },
|
||||
{ title: "Current", className: "current", sortBy: columnId.current, id: columnId.current },
|
||||
{ title: "Ready", className: "ready", sortBy: columnId.ready, id: columnId.ready },
|
||||
{ title: "Age", className: "age", sortBy: columnId.age, id: columnId.age },
|
||||
]}
|
||||
renderTableContents={(replicaSet: ReplicaSet) => [
|
||||
replicaSet.getName(),
|
||||
|
||||
Reference in new issue
Block a user