mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Show group interval in Rules display (#12943)
* Show group interval in Rules display Signed-off-by: Danny Kopping <danny.kopping@grafana.com> * Humanise interval Signed-off-by: Danny Kopping <danny.kopping@grafana.com> --------- Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
This commit is contained in:
parent
a5a4eab679
commit
d3554d8421
|
@ -13,6 +13,7 @@ interface RulesContentProps {
|
||||||
interface RuleGroup {
|
interface RuleGroup {
|
||||||
name: string;
|
name: string;
|
||||||
file: string;
|
file: string;
|
||||||
|
interval: string;
|
||||||
rules: Rule[];
|
rules: Rule[];
|
||||||
evaluationTime: string;
|
evaluationTime: string;
|
||||||
lastEvaluation: string;
|
lastEvaluation: string;
|
||||||
|
@ -58,13 +59,16 @@ export const RulesContent: FC<RulesContentProps> = ({ response }) => {
|
||||||
<Table bordered key={i}>
|
<Table bordered key={i}>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td colSpan={3}>
|
<td>
|
||||||
<a href={'#' + g.name}>
|
<a href={'#' + g.name}>
|
||||||
<h4 id={g.name} className="text-break">
|
<h4 id={g.name} className="text-break">
|
||||||
{g.name}
|
{g.name}
|
||||||
</h4>
|
</h4>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td colSpan={2}>
|
||||||
|
<h4>Interval: {humanizeDuration(parseFloat(g.interval) * 1000)}</h4>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<h4>{formatRelative(g.lastEvaluation, now())}</h4>
|
<h4>{formatRelative(g.lastEvaluation, now())}</h4>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in a new issue