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,11 +14,13 @@ import { ItemListLayout } from "../item-object-list/item-list-layout";
|
||||
import { HelmReleaseMenu } from "./release-menu";
|
||||
import { secretsStore } from "../+config-secrets/secrets.store";
|
||||
|
||||
enum sortBy {
|
||||
enum columnId {
|
||||
name = "name",
|
||||
namespace = "namespace",
|
||||
revision = "revision",
|
||||
chart = "chart",
|
||||
version = "version",
|
||||
appVersion = "app-version",
|
||||
status = "status",
|
||||
updated = "update"
|
||||
}
|
||||
@@ -81,16 +83,18 @@ export class HelmReleases extends Component<Props> {
|
||||
return (
|
||||
<>
|
||||
<ItemListLayout
|
||||
isConfigurable
|
||||
tableId="helm_releases"
|
||||
className="HelmReleases"
|
||||
store={releaseStore}
|
||||
dependentStores={[secretsStore]}
|
||||
sortingCallbacks={{
|
||||
[sortBy.name]: (release: HelmRelease) => release.getName(),
|
||||
[sortBy.namespace]: (release: HelmRelease) => release.getNs(),
|
||||
[sortBy.revision]: (release: HelmRelease) => release.getRevision(),
|
||||
[sortBy.chart]: (release: HelmRelease) => release.getChart(),
|
||||
[sortBy.status]: (release: HelmRelease) => release.getStatus(),
|
||||
[sortBy.updated]: (release: HelmRelease) => release.getUpdated(false, false),
|
||||
[columnId.name]: (release: HelmRelease) => release.getName(),
|
||||
[columnId.namespace]: (release: HelmRelease) => release.getNs(),
|
||||
[columnId.revision]: (release: HelmRelease) => release.getRevision(),
|
||||
[columnId.chart]: (release: HelmRelease) => release.getChart(),
|
||||
[columnId.status]: (release: HelmRelease) => release.getStatus(),
|
||||
[columnId.updated]: (release: HelmRelease) => release.getUpdated(false, false),
|
||||
}}
|
||||
searchFilters={[
|
||||
(release: HelmRelease) => release.getName(),
|
||||
@@ -101,14 +105,14 @@ export class HelmReleases extends Component<Props> {
|
||||
]}
|
||||
renderHeaderTitle="Releases"
|
||||
renderTableHeader={[
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
{ title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: "Chart", className: "chart", sortBy: sortBy.chart },
|
||||
{ title: "Revision", className: "revision", sortBy: sortBy.revision },
|
||||
{ title: "Version", className: "version" },
|
||||
{ title: "App Version", className: "app-version" },
|
||||
{ title: "Status", className: "status", sortBy: sortBy.status },
|
||||
{ title: "Updated", className: "updated", sortBy: sortBy.updated },
|
||||
{ title: "Name", className: "name", sortBy: columnId.name, id: columnId.name },
|
||||
{ title: "Namespace", className: "namespace", sortBy: columnId.namespace, id: columnId.namespace },
|
||||
{ title: "Chart", className: "chart", sortBy: columnId.chart, id: columnId.chart },
|
||||
{ title: "Revision", className: "revision", sortBy: columnId.revision, id: columnId.revision },
|
||||
{ title: "Version", className: "version", id: columnId.version },
|
||||
{ title: "App Version", className: "app-version", id: columnId.appVersion },
|
||||
{ title: "Status", className: "status", sortBy: columnId.status, id: columnId.status },
|
||||
{ title: "Updated", className: "updated", sortBy: columnId.updated, id: columnId.updated },
|
||||
]}
|
||||
renderTableContents={(release: HelmRelease) => {
|
||||
const version = release.getVersion();
|
||||
|
||||
Reference in new issue
Block a user