problems: fix tag removal (list layout)
This commit is contained in:
@@ -13,7 +13,7 @@ import AlertIcon from './AlertIcon';
|
|||||||
interface AlertCardProps {
|
interface AlertCardProps {
|
||||||
problem: ZBXTrigger;
|
problem: ZBXTrigger;
|
||||||
panelOptions: ProblemsPanelOptions;
|
panelOptions: ProblemsPanelOptions;
|
||||||
onTagClick?: (tag: ZBXTag, datasource: string) => void;
|
onTagClick?: (tag: ZBXTag, datasource: string, ctrlKey?: boolean, shiftKey?: boolean) => void;
|
||||||
onProblemAck?: (problem: ZBXTrigger, data: AckProblemData) => Promise<any> | any;
|
onProblemAck?: (problem: ZBXTrigger, data: AckProblemData) => Promise<any> | any;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ export default class AlertCard extends PureComponent<AlertCardProps, AlertCardSt
|
|||||||
this.state = { showAckDialog: false };
|
this.state = { showAckDialog: false };
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTagClick = (tag: ZBXTag) => {
|
handleTagClick = (tag: ZBXTag, ctrlKey?: boolean, shiftKey?: boolean) => {
|
||||||
if (this.props.onTagClick) {
|
if (this.props.onTagClick) {
|
||||||
this.props.onTagClick(tag, this.props.problem.datasource);
|
this.props.onTagClick(tag, this.props.problem.datasource, ctrlKey, shiftKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export interface AlertListProps {
|
|||||||
pageSize?: number;
|
pageSize?: number;
|
||||||
fontSize?: number;
|
fontSize?: number;
|
||||||
onProblemAck?: (problem: ZBXTrigger, data: AckProblemData) => void;
|
onProblemAck?: (problem: ZBXTrigger, data: AckProblemData) => void;
|
||||||
onTagClick?: (tag: ZBXTag, datasource: string) => void;
|
onTagClick?: (tag: ZBXTag, datasource: string, ctrlKey?: boolean, shiftKey?: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AlertListState {
|
interface AlertListState {
|
||||||
@@ -45,9 +45,9 @@ export default class AlertList extends PureComponent<AlertListProps, AlertListSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
handleTagClick = (tag: ZBXTag, datasource: string) => {
|
handleTagClick = (tag: ZBXTag, datasource: string, ctrlKey?: boolean, shiftKey?: boolean) => {
|
||||||
if (this.props.onTagClick) {
|
if (this.props.onTagClick) {
|
||||||
this.props.onTagClick(tag, datasource);
|
this.props.onTagClick(tag, datasource, ctrlKey, shiftKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -260,13 +260,13 @@ function LastChangeCell(props: RTCell<ZBXTrigger>, customFormat?: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface TagCellProps extends RTCell<ZBXTrigger> {
|
interface TagCellProps extends RTCell<ZBXTrigger> {
|
||||||
onTagClick: (tag: ZBXTag, datasource: string) => void;
|
onTagClick: (tag: ZBXTag, datasource: string, ctrlKey?: boolean, shiftKey?: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
class TagCell extends PureComponent<TagCellProps> {
|
class TagCell extends PureComponent<TagCellProps> {
|
||||||
handleTagClick = (tag: ZBXTag) => {
|
handleTagClick = (tag: ZBXTag, ctrlKey?: boolean, shiftKey?: boolean) => {
|
||||||
if (this.props.onTagClick) {
|
if (this.props.onTagClick) {
|
||||||
this.props.onTagClick(tag, this.props.original.datasource);
|
this.props.onTagClick(tag, this.props.original.datasource, ctrlKey, shiftKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user