From 0f91b04ed7b6895751b77c9bdecc230a1f087308 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 27 Dec 2018 15:49:32 +0300 Subject: [PATCH] problems: able to change font size --- src/panel-triggers/components/Problems.tsx | 6 ++++- src/panel-triggers/triggers_panel_ctrl.js | 4 +++ src/sass/_panel-problems.scss | 30 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/panel-triggers/components/Problems.tsx b/src/panel-triggers/components/Problems.tsx index ae262cd..acfe604 100644 --- a/src/panel-triggers/components/Problems.tsx +++ b/src/panel-triggers/components/Problems.tsx @@ -1,5 +1,6 @@ import React, { PureComponent } from 'react'; import ReactTable from 'react-table'; +import classNames from 'classnames'; import * as utils from '../../datasource-zabbix/utils'; import { ProblemsPanelOptions, Trigger, ZBXEvent, GFTimeRange, RTCell, ZBXTag } from '../types'; import EventTag from './EventTag'; @@ -11,6 +12,7 @@ export interface ProblemListProps { panelOptions: ProblemsPanelOptions; loading?: boolean; timeRange?: GFTimeRange; + fontSize?: number; getProblemEvents: (ids: string[]) => ZBXEvent[]; onProblemAck?: (problem: Trigger, data: AckProblemData) => void; onTagClick?: (tag: ZBXTag, datasource: string) => void; @@ -99,9 +101,11 @@ export class ProblemList extends PureComponent +
{ const message = data.message; diff --git a/src/sass/_panel-problems.scss b/src/sass/_panel-problems.scss index 0e42528..719b68a 100644 --- a/src/sass/_panel-problems.scss +++ b/src/sass/_panel-problems.scss @@ -508,6 +508,36 @@ // animation: all 1s ease; // } } + + @for $i from 8 through 9 { + .item-#{$i} { width: 2em * $i; } + &.font-size--#{$i * 10} .rt-table { + font-size: 1% * $i * 10; + + & .rt-tr .rt-td.custom-expander i { + font-size: 1.2rem * $i / 10; + } + + .problem-details-container.show { + font-size: 13px; + } + } + } + + @for $i from 11 through 25 { + .item-#{$i} { width: 2em * $i; } + &.font-size--#{$i * 10} .rt-table { + font-size: 1% * $i * 10; + + & .rt-tr .rt-td.custom-expander i { + font-size: 1.2rem * $i / 10; + } + + .problem-details-container.show { + font-size: 13px; + } + } + } } .zbx-ack-modal {