Fix 817 (#851)
* problems: update panel schema * update packages (build with node 12) * problems: use datasource from target * problems: fix query editor after schema update * problems: fix list layout * update circleci node image to 12 * fix tests
This commit is contained in:
@@ -56,6 +56,7 @@ export default class AlertCard extends PureComponent<AlertCardProps, AlertCardSt
|
||||
|
||||
render() {
|
||||
const { problem, panelOptions } = this.props;
|
||||
const showDatasourceName = panelOptions.targets && panelOptions.targets.length > 1;
|
||||
const cardClass = classNames('alert-rule-item', 'zbx-trigger-card', { 'zbx-trigger-highlighted': panelOptions.highlightBackground });
|
||||
const descriptionClass = classNames('alert-rule-item__text', { 'zbx-description--newline': panelOptions.descriptionAtNewLine });
|
||||
const severityDesc = _.find(panelOptions.triggerSeverity, s => s.priority === Number(problem.priority));
|
||||
@@ -134,7 +135,7 @@ export default class AlertCard extends PureComponent<AlertCardProps, AlertCardSt
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{panelOptions.datasources.length > 1 && (
|
||||
{showDatasourceName && (
|
||||
<div className="alert-rule-item__time zabbix-trigger-source">
|
||||
<span>
|
||||
<i className="fa fa-database"></i>
|
||||
|
||||
@@ -68,7 +68,7 @@ export default class AlertList extends PureComponent<AlertListProps, AlertListSt
|
||||
<ol className={alertListClass}>
|
||||
{currentProblems.map(problem =>
|
||||
<AlertCard
|
||||
key={problem.triggerid}
|
||||
key={`${problem.triggerid}-${problem.datasource}`}
|
||||
problem={problem}
|
||||
panelOptions={panelOptions}
|
||||
onTagClick={this.handleTagClick}
|
||||
|
||||
Reference in New Issue
Block a user