1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove redundant mixin and :global rules

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-12-16 11:36:05 +03:00
parent 23ebccc7ba
commit 6112cc9aaf
2 changed files with 55 additions and 46 deletions

View File

@ -1,56 +1,65 @@
.PodDetailsList { .PodDetailsList {
@mixin status-colors {
@each $status, $color in $pod-status-color-list {
&:global(.#{$status}) {
color: $color;
}
}
}
.table { .table {
margin: 0 (-$margin * 3);
&:global(.virtual) { &:global(.virtual) {
height: 500px; height: 500px;
} }
:global(.TableCell).warning { .warning {
@include table-cell-warning; display: flex;
} align-items: center;
flex-grow: 0.3;
:global(.TableCell).status { padding: 0;
@include status-colors;
} }
} }
}
.table { .name {
margin: 0 (-$margin * 3); flex-grow: 2;
} margin-left: $margin;
}
.name { .node {
flex-grow: 2; flex-grow: 2;
margin-left: $margin; }
}
.node { .namespace {
flex-grow: 2; flex-grow: 1.2;
} }
.namespace { .cpu {
flex-grow: 1.2; align-self: center;
}
.cpu { .LineProgress {
align-self: center; color: var(--blue);
}
}
.LineProgress { .memory {
color: var(--blue); align-self: center;
}
} :global(.LineProgress) {
color: var(--magenta);
.memory { }
align-self: center; }
:global(.LineProgress) { .status[data-status=running] {
color: var(--magenta); color: var(--colorOk);
}
.status[data-status=pending] {
color: var(--colorWarning);
}
.status[data-status=evicted] {
color: var(--colorError);;
}
.status[data-status=failed] {
color: var(--colorError);;
}
.status[data-status=succeeded] {
color: var(--colorOk);
} }
} }

View File

@ -150,7 +150,7 @@ export class NonInjectedPodDetailsList extends React.Component<PodDetailsListPro
</TableCell> </TableCell>
<TableCell className={styles.cpu}>{this.renderCpuUsage(`cpu-${pod.getId()}`, metrics.cpu)}</TableCell> <TableCell className={styles.cpu}>{this.renderCpuUsage(`cpu-${pod.getId()}`, metrics.cpu)}</TableCell>
<TableCell className={styles.memory}>{this.renderMemoryUsage(`memory-${pod.getId()}`, metrics.memory)}</TableCell> <TableCell className={styles.memory}>{this.renderMemoryUsage(`memory-${pod.getId()}`, metrics.memory)}</TableCell>
<TableCell className={cssNames(styles.status, kebabCase(pod.getStatusMessage()))}>{pod.getStatusMessage()}</TableCell> <TableCell className={cssNames(styles.status)} data-status={kebabCase(pod.getStatusMessage())}>{pod.getStatusMessage()}</TableCell>
</TableRow> </TableRow>
); );
} }