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
@@ -11,8 +11,11 @@ import { navigation } from "../../navigation";
|
||||
import { ItemListLayout } from "../item-object-list/item-list-layout";
|
||||
import { SearchInputUrl } from "../input";
|
||||
|
||||
enum sortBy {
|
||||
enum columnId {
|
||||
name = "name",
|
||||
description = "description",
|
||||
version = "version",
|
||||
appVersion = "app-version",
|
||||
repo = "repo",
|
||||
}
|
||||
|
||||
@@ -53,13 +56,15 @@ export class HelmCharts extends Component<Props> {
|
||||
return (
|
||||
<>
|
||||
<ItemListLayout
|
||||
isConfigurable
|
||||
tableId="helm_charts"
|
||||
className="HelmCharts"
|
||||
store={helmChartStore}
|
||||
isClusterScoped={true}
|
||||
isSelectable={false}
|
||||
sortingCallbacks={{
|
||||
[sortBy.name]: (chart: HelmChart) => chart.getName(),
|
||||
[sortBy.repo]: (chart: HelmChart) => chart.getRepository(),
|
||||
[columnId.name]: (chart: HelmChart) => chart.getName(),
|
||||
[columnId.repo]: (chart: HelmChart) => chart.getRepository(),
|
||||
}}
|
||||
searchFilters={[
|
||||
(chart: HelmChart) => chart.getName(),
|
||||
@@ -74,13 +79,12 @@ export class HelmCharts extends Component<Props> {
|
||||
<SearchInputUrl placeholder={`Search Helm Charts`} />
|
||||
)}
|
||||
renderTableHeader={[
|
||||
{ className: "icon" },
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
{ title: "Description", className: "description" },
|
||||
{ title: "Version", className: "version" },
|
||||
{ title: "App Version", className: "app-version" },
|
||||
{ title: "Repository", className: "repository", sortBy: sortBy.repo },
|
||||
|
||||
{ className: "icon", showWithColumn: columnId.name },
|
||||
{ title: "Name", className: "name", sortBy: columnId.name, id: columnId.name },
|
||||
{ title: "Description", className: "description", id: columnId.description },
|
||||
{ title: "Version", className: "version", id: columnId.version },
|
||||
{ title: "App Version", className: "app-version", id: columnId.appVersion },
|
||||
{ title: "Repository", className: "repository", sortBy: columnId.repo, id: columnId.repo },
|
||||
]}
|
||||
renderTableContents={(chart: HelmChart) => [
|
||||
<figure key="image">
|
||||
@@ -93,7 +97,8 @@ export class HelmCharts extends Component<Props> {
|
||||
chart.getDescription(),
|
||||
chart.getVersion(),
|
||||
chart.getAppVersion(),
|
||||
{ title: chart.getRepository(), className: chart.getRepository().toLowerCase() }
|
||||
{ title: chart.getRepository(), className: chart.getRepository().toLowerCase() },
|
||||
{ className: "menu" }
|
||||
]}
|
||||
detailsItem={this.selectedChart}
|
||||
onDetails={this.showDetails}
|
||||
|
||||
Reference in new issue
Block a user