Skip to content

Commit

Permalink
format (squash)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Jan 18, 2025
1 parent 9dac496 commit cf1e2ee
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 21 deletions.
15 changes: 13 additions & 2 deletions ui/components/BucketDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ function BucketDetail({ className, bucket, customActions }: Props) {
: [];

const clusterInfo: InfoField[] = isFlagEnabled("WEAVE_GITOPS_FEATURE_CLUSTER")
? [["Cluster", <ClusterDashboardLink key={bucket.uid} clusterName={bucket?.clusterName} />]]
? [
[
"Cluster",
<ClusterDashboardLink
key={bucket.uid}
clusterName={bucket?.clusterName}
/>,
],
]
: [];

return (
Expand All @@ -37,7 +45,10 @@ function BucketDetail({ className, bucket, customActions }: Props) {
["Kind", Kind.Bucket],
["Endpoint", bucket.endpoint],
["Bucket Name", bucket.name],
["Last Updated", <Timestamp key={bucket.uid} time={bucket.lastUpdatedAt} />],
[
"Last Updated",
<Timestamp key={bucket.uid} time={bucket.lastUpdatedAt} />,
],
["Interval", <Interval key={bucket.uid} interval={bucket.interval} />],
...clusterInfo,
["Namespace", bucket.namespace],
Expand Down
19 changes: 16 additions & 3 deletions ui/components/GitRepositoryDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ function GitRepositoryDetail({
? [
[
"Cluster",
<ClusterDashboardLink key={gitRepository.uid} clusterName={gitRepository?.clusterName} />,
<ClusterDashboardLink
key={gitRepository.uid}
clusterName={gitRepository?.clusterName}
/>,
],
]
: [];
Expand All @@ -46,12 +49,22 @@ function GitRepositoryDetail({
["Kind", Kind.GitRepository],
[
"URL",
<Link key={gitRepository.uid} newTab href={convertGitURLToGitProvider(gitRepository.url)}>
<Link
key={gitRepository.uid}
newTab
href={convertGitURLToGitProvider(gitRepository.url)}
>
{gitRepository.url}
</Link>,
],
["Ref", gitRepository.reference?.branch],
["Last Updated", <Timestamp key={gitRepository.uid} time={gitRepository.lastUpdatedAt} />],
[
"Last Updated",
<Timestamp
key={gitRepository.uid}
time={gitRepository.lastUpdatedAt}
/>,
],
...clusterInfo,
["Namespace", gitRepository.namespace],
...tenancyInfo,
Expand Down
15 changes: 12 additions & 3 deletions ui/components/HelmChartDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ function HelmChartDetail({ className, helmChart, customActions }: Props) {
? [
[
"Cluster",
<ClusterDashboardLink key={helmChart.uid} clusterName={helmChart?.clusterName} />,
<ClusterDashboardLink
key={helmChart.uid}
clusterName={helmChart?.clusterName}
/>,
],
]
: [];
Expand All @@ -43,8 +46,14 @@ function HelmChartDetail({ className, helmChart, customActions }: Props) {
["Version", helmChart.version],
["Current Revision", helmChart.revision],
["Ref", helmChart.sourceRef?.name],
["Last Updated", <Timestamp key={helmChart.uid} time={helmChart.lastUpdatedAt} />],
["Interval", <Interval key={helmChart.uid} interval={helmChart.interval} />],
[
"Last Updated",
<Timestamp key={helmChart.uid} time={helmChart.lastUpdatedAt} />,
],
[
"Interval",
<Interval key={helmChart.uid} interval={helmChart.interval} />,
],
...clusterInfo,
["Namespace", helmChart.namespace],
...tenancyInfo,
Expand Down
10 changes: 8 additions & 2 deletions ui/components/HelmReleaseDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ function HelmReleaseDetail({
? [
[
"Cluster",
<ClusterDashboardLink key={helmRelease.uid} clusterName={helmRelease?.clusterName} />,
<ClusterDashboardLink
key={helmRelease.uid}
clusterName={helmRelease?.clusterName}
/>,
],
]
: [];
Expand All @@ -84,7 +87,10 @@ function HelmReleaseDetail({
["Last Attempted Revision", helmRelease.lastAttemptedRevision],
...clusterInfo,
...tenancyInfo,
["Interval", <Interval key={helmRelease.uid} interval={helmRelease?.interval} />],
[
"Interval",
<Interval key={helmRelease.uid} interval={helmRelease?.interval} />,
],
["Namespace", helmRelease?.namespace],
]}
/>
Expand Down
20 changes: 17 additions & 3 deletions ui/components/HelmRepositoryDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ function HelmRepositoryDetail({
? [
[
"Cluster",
<ClusterDashboardLink key={helmRepository.uid} clusterName={helmRepository?.clusterName} />,
<ClusterDashboardLink
key={helmRepository.uid}
clusterName={helmRepository?.clusterName}
/>,
],
]
: [];
Expand All @@ -45,7 +48,12 @@ function HelmRepositoryDetail({
info={[
["Kind", Kind.HelmRepository],
["Repository Type", helmRepository.repositoryType.toLowerCase()],
["URL", <Link key={helmRepository.uid} href={helmRepository.url}>{helmRepository.url}</Link>],
[
"URL",
<Link key={helmRepository.uid} href={helmRepository.url}>
{helmRepository.url}
</Link>,
],
[
"Last Updated",
helmRepository.lastUpdatedAt ? (
Expand All @@ -54,7 +62,13 @@ function HelmRepositoryDetail({
"-"
),
],
["Interval", <Interval key={helmRepository.uid} interval={helmRepository.interval} />],
[
"Interval",
<Interval
key={helmRepository.uid}
interval={helmRepository.interval}
/>,
],
...clusterInfo,
["Namespace", helmRepository.namespace],
...tenancyInfo,
Expand Down
13 changes: 11 additions & 2 deletions ui/components/KustomizationDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ function KustomizationDetail({
? [
[
"Cluster",
<ClusterDashboardLink key={kustomization.uid} clusterName={kustomization?.clusterName} />,
<ClusterDashboardLink
key={kustomization.uid}
clusterName={kustomization?.clusterName}
/>,
],
]
: [];
Expand All @@ -65,7 +68,13 @@ function KustomizationDetail({
...clusterInfo,
...tenancyInfo,
["Path", kustomization?.path],
["Interval", <Interval key={kustomization.uid} interval={kustomization?.interval} />],
[
"Interval",
<Interval
key={kustomization.uid}
interval={kustomization?.interval}
/>,
],
["Namespace", kustomization?.namespace],
]}
/>
Expand Down
20 changes: 17 additions & 3 deletions ui/components/OCIRepositoryDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ function OCIRepositoryDetail({
? [
[
"Cluster",
<ClusterDashboardLink key={ociRepository.uid} clusterName={ociRepository.clusterName} />,
<ClusterDashboardLink
key={ociRepository.uid}
clusterName={ociRepository.clusterName}
/>,
],
]
: [];
Expand All @@ -44,7 +47,12 @@ function OCIRepositoryDetail({
customActions={customActions}
info={[
["Kind", Kind.OCIRepository],
["URL", <Link key={ociRepository.uid} href={ociRepository.url}>{ociRepository.url}</Link>],
[
"URL",
<Link key={ociRepository.uid} href={ociRepository.url}>
{ociRepository.url}
</Link>,
],
[
"Last Updated",
ociRepository.lastUpdatedAt ? (
Expand All @@ -53,7 +61,13 @@ function OCIRepositoryDetail({
"-"
),
],
["Interval", <Interval key={ociRepository.uid} interval={ociRepository.interval} />],
[
"Interval",
<Interval
key={ociRepository.uid}
interval={ociRepository.interval}
/>,
],
...clusterInfo,
["Namespace", ociRepository.namespace],
...tenancyInfo,
Expand Down
21 changes: 18 additions & 3 deletions ui/components/PodDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ const Detail = ({ pod }) => {
items={[
["Namespace", pod.namespace],
["Pod IP", pod.podIP],
["Pod IPs", <ArrayToList key={pod.id} array={pod.podIPs} display={(p) => p.ip} />],
[
"Pod IPs",
<ArrayToList
key={pod.id}
array={pod.podIPs}
display={(p) => p.ip}
/>,
],
["Priority Class", pod.priorityClass],
["QoS Class", pod.qosClass],
]}
Expand Down Expand Up @@ -109,11 +116,19 @@ const Detail = ({ pod }) => {
],
[
"Env Vars",
<ArrayToList key={container.name} array={container.enVar} display={(v) => v} />,
<ArrayToList
key={container.name}
array={container.enVar}
display={(v) => v}
/>,
],
[
"Arguments",
<ArrayToList key={container.name} array={container.args} display={(arg) => arg} />,
<ArrayToList
key={container.name}
array={container.args}
display={(arg) => arg}
/>,
],
]}
/>
Expand Down

0 comments on commit cf1e2ee

Please sign in to comment.