mirror of
https://github.com/SigNoz/signoz.git
synced 2026-02-27 02:32:53 +00:00
Compare commits
2 Commits
feat/authz
...
feat/disab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
745e4e7c0a | ||
|
|
3e6d105e81 |
@@ -453,6 +453,9 @@ function K8sClustersList({
|
||||
|
||||
const handleRowClick = (record: K8sClustersRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.clusterNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedRowData(null);
|
||||
setselectedClusterName(record.clusterUID);
|
||||
setSearchParams({
|
||||
@@ -517,9 +520,13 @@ function K8sClustersList({
|
||||
showHeader={false}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setselectedClusterName(record.clusterUID);
|
||||
if (record.clusterNameRaw) {
|
||||
setselectedClusterName(record.clusterUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.clusterNameRaw
|
||||
? 'expanded-clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -709,7 +716,10 @@ function K8sClustersList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.clusterNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -47,6 +47,7 @@ export const defaultAddedColumns: IEntityColumn[] = [
|
||||
export interface K8sClustersRowData {
|
||||
key: string;
|
||||
clusterUID: string;
|
||||
clusterNameRaw: string;
|
||||
clusterName: React.ReactNode;
|
||||
cpu: React.ReactNode;
|
||||
memory: React.ReactNode;
|
||||
@@ -175,6 +176,7 @@ export const formatDataForTable = (
|
||||
data.map((cluster, index) => ({
|
||||
key: index.toString(),
|
||||
clusterUID: cluster.meta.k8s_cluster_name,
|
||||
clusterNameRaw: cluster.meta.k8s_cluster_name || '',
|
||||
clusterName: (
|
||||
<Tooltip title={cluster.meta.k8s_cluster_name}>
|
||||
{cluster.meta.k8s_cluster_name}
|
||||
|
||||
@@ -459,6 +459,9 @@ function K8sDaemonSetsList({
|
||||
|
||||
const handleRowClick = (record: K8sDaemonSetsRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.daemonsetNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedRowData(null);
|
||||
setSelectedDaemonSetUID(record.daemonsetUID);
|
||||
setSearchParams({
|
||||
@@ -523,9 +526,13 @@ function K8sDaemonSetsList({
|
||||
showHeader={false}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setSelectedDaemonSetUID(record.daemonsetUID);
|
||||
if (record.daemonsetNameRaw) {
|
||||
setSelectedDaemonSetUID(record.daemonsetUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.daemonsetNameRaw
|
||||
? 'expanded-clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -717,7 +724,10 @@ function K8sDaemonSetsList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.daemonsetNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -82,6 +82,7 @@ export const defaultAddedColumns: IEntityColumn[] = [
|
||||
export interface K8sDaemonSetsRowData {
|
||||
key: string;
|
||||
daemonsetUID: string;
|
||||
daemonsetNameRaw: string;
|
||||
daemonsetName: React.ReactNode;
|
||||
cpu_request: React.ReactNode;
|
||||
cpu_limit: React.ReactNode;
|
||||
@@ -276,6 +277,7 @@ export const formatDataForTable = (
|
||||
data.map((daemonSet, index) => ({
|
||||
key: index.toString(),
|
||||
daemonsetUID: daemonSet.daemonSetName,
|
||||
daemonsetNameRaw: daemonSet.meta.k8s_daemonset_name || '',
|
||||
daemonsetName: (
|
||||
<Tooltip title={daemonSet.meta.k8s_daemonset_name}>
|
||||
{daemonSet.meta.k8s_daemonset_name || ''}
|
||||
|
||||
@@ -465,6 +465,9 @@ function K8sDeploymentsList({
|
||||
|
||||
const handleRowClick = (record: K8sDeploymentsRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.deploymentNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedRowData(null);
|
||||
setselectedDeploymentUID(record.deploymentUID);
|
||||
setSearchParams({
|
||||
@@ -529,9 +532,13 @@ function K8sDeploymentsList({
|
||||
showHeader={false}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setselectedDeploymentUID(record.deploymentUID);
|
||||
if (record.deploymentNameRaw) {
|
||||
setselectedDeploymentUID(record.deploymentUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.deploymentNameRaw
|
||||
? 'expanded-clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -724,7 +731,10 @@ function K8sDeploymentsList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.deploymentNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -81,6 +81,7 @@ export const defaultAddedColumns: IEntityColumn[] = [
|
||||
export interface K8sDeploymentsRowData {
|
||||
key: string;
|
||||
deploymentUID: string;
|
||||
deploymentNameRaw: string;
|
||||
deploymentName: React.ReactNode;
|
||||
available_pods: React.ReactNode;
|
||||
desired_pods: React.ReactNode;
|
||||
@@ -267,6 +268,7 @@ export const formatDataForTable = (
|
||||
data.map((deployment, index) => ({
|
||||
key: index.toString(),
|
||||
deploymentUID: deployment.meta.k8s_deployment_name,
|
||||
deploymentNameRaw: deployment.meta.k8s_deployment_name || '',
|
||||
deploymentName: (
|
||||
<Tooltip title={deployment.meta.k8s_deployment_name}>
|
||||
{deployment.meta.k8s_deployment_name}
|
||||
|
||||
@@ -337,6 +337,11 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.disabled-row {
|
||||
cursor: default;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.k8s-list-table {
|
||||
.ant-table {
|
||||
.ant-table-thead > tr > th {
|
||||
|
||||
@@ -430,6 +430,9 @@ function K8sJobsList({
|
||||
|
||||
const handleRowClick = (record: K8sJobsRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.jobNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedRowData(null);
|
||||
setselectedJobUID(record.jobUID);
|
||||
setSearchParams({
|
||||
@@ -494,9 +497,11 @@ function K8sJobsList({
|
||||
showHeader={false}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setselectedJobUID(record.jobUID);
|
||||
if (record.jobNameRaw) {
|
||||
setselectedJobUID(record.jobUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.jobNameRaw ? 'expanded-clickable-row' : 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -686,7 +691,10 @@ function K8sJobsList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.jobNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -94,6 +94,7 @@ export const defaultAddedColumns: IEntityColumn[] = [
|
||||
export interface K8sJobsRowData {
|
||||
key: string;
|
||||
jobUID: string;
|
||||
jobNameRaw: string;
|
||||
jobName: React.ReactNode;
|
||||
namespaceName: React.ReactNode;
|
||||
successful_pods: React.ReactNode;
|
||||
@@ -303,6 +304,7 @@ export const formatDataForTable = (
|
||||
data.map((job, index) => ({
|
||||
key: index.toString(),
|
||||
jobUID: job.jobName,
|
||||
jobNameRaw: job.meta.k8s_job_name || '',
|
||||
jobName: (
|
||||
<Tooltip title={job.meta.k8s_job_name}>
|
||||
{job.meta.k8s_job_name || ''}
|
||||
|
||||
@@ -461,6 +461,9 @@ function K8sNamespacesList({
|
||||
|
||||
const handleRowClick = (record: K8sNamespacesRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.namespaceNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedRowData(null);
|
||||
setselectedNamespaceUID(record.namespaceUID);
|
||||
setSearchParams({
|
||||
@@ -525,9 +528,13 @@ function K8sNamespacesList({
|
||||
showHeader={false}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setselectedNamespaceUID(record.namespaceUID);
|
||||
if (record.namespaceNameRaw) {
|
||||
setselectedNamespaceUID(record.namespaceUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.namespaceNameRaw
|
||||
? 'expanded-clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -718,7 +725,10 @@ function K8sNamespacesList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.namespaceNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -41,6 +41,7 @@ export const defaultAddedColumns: IEntityColumn[] = [
|
||||
export interface K8sNamespacesRowData {
|
||||
key: string;
|
||||
namespaceUID: string;
|
||||
namespaceNameRaw: string;
|
||||
namespaceName: string;
|
||||
clusterName: string;
|
||||
cpu: React.ReactNode;
|
||||
@@ -161,6 +162,7 @@ export const formatDataForTable = (
|
||||
data.map((namespace, index) => ({
|
||||
key: index.toString(),
|
||||
namespaceUID: namespace.namespaceName,
|
||||
namespaceNameRaw: namespace.namespaceName || '',
|
||||
namespaceName: namespace.namespaceName,
|
||||
clusterName: namespace.meta.k8s_cluster_name,
|
||||
cpu: (
|
||||
|
||||
@@ -440,6 +440,9 @@ function K8sNodesList({
|
||||
|
||||
const handleRowClick = (record: K8sNodesRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.nodeNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedRowData(null);
|
||||
setSelectedNodeUID(record.nodeUID);
|
||||
setSearchParams({
|
||||
@@ -505,9 +508,13 @@ function K8sNodesList({
|
||||
showHeader={false}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setSelectedNodeUID(record.nodeUID);
|
||||
if (record.nodeNameRaw) {
|
||||
setSelectedNodeUID(record.nodeUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.nodeNameRaw
|
||||
? 'expanded-clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -697,7 +704,10 @@ function K8sNodesList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.nodeNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -53,6 +53,7 @@ export const defaultAddedColumns: IEntityColumn[] = [
|
||||
export interface K8sNodesRowData {
|
||||
key: string;
|
||||
nodeUID: string;
|
||||
nodeNameRaw: string;
|
||||
nodeName: React.ReactNode;
|
||||
clusterName: string;
|
||||
cpu: React.ReactNode;
|
||||
@@ -193,6 +194,7 @@ export const formatDataForTable = (
|
||||
data.map((node, index) => ({
|
||||
key: `${node.nodeUID}-${index}`,
|
||||
nodeUID: node.nodeUID || '',
|
||||
nodeNameRaw: node.meta.k8s_node_name || '',
|
||||
nodeName: (
|
||||
<Tooltip title={node.meta.k8s_node_name}>
|
||||
{node.meta.k8s_node_name || ''}
|
||||
|
||||
@@ -497,6 +497,9 @@ function K8sPodsList({
|
||||
|
||||
const handleRowClick = (record: K8sPodsRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.podNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedPodUID(record.podUID);
|
||||
setSearchParams({
|
||||
...Object.fromEntries(searchParams.entries()),
|
||||
@@ -617,9 +620,11 @@ function K8sPodsList({
|
||||
}}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setSelectedPodUID(record.podUID);
|
||||
if (record.podNameRaw) {
|
||||
setSelectedPodUID(record.podUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.podNameRaw ? 'expanded-clickable-row' : 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -754,7 +759,10 @@ function K8sPodsList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.podNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -462,6 +462,9 @@ function K8sStatefulSetsList({
|
||||
|
||||
const handleRowClick = (record: K8sStatefulSetsRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.statefulsetNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedRowData(null);
|
||||
setselectedStatefulSetUID(record.statefulsetUID);
|
||||
setSearchParams({
|
||||
@@ -526,9 +529,13 @@ function K8sStatefulSetsList({
|
||||
showHeader={false}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setselectedStatefulSetUID(record.statefulsetUID);
|
||||
if (record.statefulsetNameRaw) {
|
||||
setselectedStatefulSetUID(record.statefulsetUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.statefulsetNameRaw
|
||||
? 'expanded-clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -720,7 +727,10 @@ function K8sStatefulSetsList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.statefulsetNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -82,6 +82,7 @@ export const defaultAddedColumns: IEntityColumn[] = [
|
||||
export interface K8sStatefulSetsRowData {
|
||||
key: string;
|
||||
statefulsetUID: string;
|
||||
statefulsetNameRaw: string;
|
||||
statefulsetName: React.ReactNode;
|
||||
cpu_request: React.ReactNode;
|
||||
cpu_limit: React.ReactNode;
|
||||
@@ -276,6 +277,7 @@ export const formatDataForTable = (
|
||||
data.map((statefulSet, index) => ({
|
||||
key: index.toString(),
|
||||
statefulsetUID: statefulSet.statefulSetName,
|
||||
statefulsetNameRaw: statefulSet.meta.k8s_statefulset_name || '',
|
||||
statefulsetName: (
|
||||
<Tooltip title={statefulSet.meta.k8s_statefulset_name}>
|
||||
{statefulSet.meta.k8s_statefulset_name || ''}
|
||||
|
||||
@@ -392,6 +392,9 @@ function K8sVolumesList({
|
||||
|
||||
const handleRowClick = (record: K8sVolumesRowData): void => {
|
||||
if (groupBy.length === 0) {
|
||||
if (!record.volumeNameRaw) {
|
||||
return;
|
||||
}
|
||||
setSelectedRowData(null);
|
||||
setselectedVolumeUID(record.volumeUID);
|
||||
setSearchParams({
|
||||
@@ -456,9 +459,13 @@ function K8sVolumesList({
|
||||
showHeader={false}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => {
|
||||
setselectedVolumeUID(record.volumeUID);
|
||||
if (record.volumeNameRaw) {
|
||||
setselectedVolumeUID(record.volumeUID);
|
||||
}
|
||||
},
|
||||
className: 'expanded-clickable-row',
|
||||
className: record.volumeNameRaw
|
||||
? 'expanded-clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -643,7 +650,10 @@ function K8sVolumesList({
|
||||
onChange={handleTableChange}
|
||||
onRow={(record): { onClick: () => void; className: string } => ({
|
||||
onClick: (): void => handleRowClick(record),
|
||||
className: 'clickable-row',
|
||||
className:
|
||||
groupBy.length > 0 || record.volumeNameRaw
|
||||
? 'clickable-row'
|
||||
: 'disabled-row',
|
||||
})}
|
||||
expandable={{
|
||||
expandedRowRender: isGroupedByAttribute ? expandedRowRender : undefined,
|
||||
|
||||
@@ -47,6 +47,7 @@ export const defaultAddedColumns: IEntityColumn[] = [
|
||||
export interface K8sVolumesRowData {
|
||||
key: string;
|
||||
volumeUID: string;
|
||||
volumeNameRaw: string;
|
||||
pvcName: React.ReactNode;
|
||||
namespaceName: React.ReactNode;
|
||||
capacity: React.ReactNode;
|
||||
@@ -186,6 +187,7 @@ export const formatDataForTable = (
|
||||
data.map((volume, index) => ({
|
||||
key: index.toString(),
|
||||
volumeUID: volume.persistentVolumeClaimName,
|
||||
volumeNameRaw: volume.persistentVolumeClaimName || '',
|
||||
pvcName: (
|
||||
<Tooltip title={volume.persistentVolumeClaimName}>
|
||||
{volume.persistentVolumeClaimName || ''}
|
||||
|
||||
@@ -107,6 +107,7 @@ export const defaultAvailableColumns = [
|
||||
export interface K8sPodsRowData {
|
||||
key: string;
|
||||
podName: React.ReactNode;
|
||||
podNameRaw: string;
|
||||
podUID: string;
|
||||
cpu_request: React.ReactNode;
|
||||
cpu_limit: React.ReactNode;
|
||||
@@ -350,6 +351,7 @@ export const formatDataForTable = (
|
||||
{pod.meta.k8s_pod_name || ''}
|
||||
</Tooltip>
|
||||
),
|
||||
podNameRaw: pod.meta.k8s_pod_name || '',
|
||||
podUID: pod.podUID || '',
|
||||
cpu_request: (
|
||||
<ValidateColumnValueWrapper
|
||||
|
||||
Reference in New Issue
Block a user