Skip to content

Commit

Permalink
Show group interval in Rules display (prometheus#12943)
Browse files Browse the repository at this point in the history
* Show group interval in Rules display

Signed-off-by: Danny Kopping <[email protected]>

* Humanise interval

Signed-off-by: Danny Kopping <[email protected]>

---------

Signed-off-by: Danny Kopping <[email protected]>
  • Loading branch information
Danny Kopping authored Oct 8, 2023
1 parent a5a4eab commit d3554d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/ui/react-app/src/pages/rules/RulesContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface RulesContentProps {
interface RuleGroup {
name: string;
file: string;
interval: string;
rules: Rule[];
evaluationTime: string;
lastEvaluation: string;
Expand Down Expand Up @@ -58,13 +59,16 @@ export const RulesContent: FC<RulesContentProps> = ({ response }) => {
<Table bordered key={i}>
<thead>
<tr>
<td colSpan={3}>
<td>
<a href={'#' + g.name}>
<h4 id={g.name} className="text-break">
{g.name}
</h4>
</a>
</td>
<td colSpan={2}>
<h4>Interval: {humanizeDuration(parseFloat(g.interval) * 1000)}</h4>
</td>
<td>
<h4>{formatRelative(g.lastEvaluation, now())}</h4>
</td>
Expand Down

0 comments on commit d3554d8

Please sign in to comment.