Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
dont expand first family in "all" tab of alarms modal, lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekkolasa committed Oct 26, 2020
1 parent 14ae7f9 commit fe48f6d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/domains/chart/components/chart-legend-bottom.styled.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "styled-components"
import { getSizeBy, getColor } from "@netdata/netdata-ui"
import { getSizeBy } from "@netdata/netdata-ui"

export const LegendContainer = styled.div`
margin-bottom: ${getSizeBy(3)};
Expand Down
20 changes: 14 additions & 6 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2340,15 +2340,23 @@ function alarmsUpdateModal() {
while (len--) {
family = families_sorted[i++].name;
var active_family_added = false;
var expanded = 'true';
var collapsed = '';
var cin = 'in';

var expanded = 'false';
var collapsed = 'class="collapsed"';
var cin = '';

// uncomment if first family needs to be expanded by default
// var expanded = 'true';
// var collapsed = '';
// var cin = 'in';

if (fc !== 0) {
all += "</table></div></div></div>";
expanded = 'false';
collapsed = 'class="collapsed"';
cin = '';

// uncomment if first family needs to be expanded by default
// expanded = 'false';
// collapsed = 'class="collapsed"';
// cin = '';
}

all += '<div class="panel panel-default"><div class="panel-heading" role="tab" id="alarm_all_heading_' + fc.toString() + '"><h4 class="panel-title"><a ' + collapsed + ' role="button" data-toggle="collapse" data-parent="#alarms_all_accordion" href="#alarm_all_' + fc.toString() + '" aria-expanded="' + expanded + '" aria-controls="alarm_all_' + fc.toString() + '">' + family.toString() + '</a></h4></div><div id="alarm_all_' + fc.toString() + '" class="panel-collapse collapse ' + cin + '" role="tabpanel" aria-labelledby="alarm_all_heading_' + fc.toString() + '" data-alarm-id="' + fc.toString() + '"><div class="panel-body" id="alarm_all_body_' + fc.toString() + '">';
Expand Down

0 comments on commit fe48f6d

Please sign in to comment.