Fix host maintenance label
This commit is contained in:
@@ -99,6 +99,7 @@ export function joinTriggersWithEvents(
|
|||||||
|
|
||||||
export function setMaintenanceStatus(triggers) {
|
export function setMaintenanceStatus(triggers) {
|
||||||
_.each(triggers, (trigger) => {
|
_.each(triggers, (trigger) => {
|
||||||
|
trigger.hostInMaintenance = _.some(trigger.hosts, (host) => host.maintenance_status === '1');
|
||||||
trigger.maintenance = false;
|
trigger.maintenance = false;
|
||||||
if (trigger.suppressed === '1') {
|
if (trigger.suppressed === '1') {
|
||||||
trigger.maintenance = true;
|
trigger.maintenance = true;
|
||||||
|
|||||||
@@ -135,9 +135,11 @@ export default class ProblemList extends PureComponent<ProblemListProps, Problem
|
|||||||
const highlightNewerThan = options.highlightNewEvents && options.highlightNewerThan;
|
const highlightNewerThan = options.highlightNewEvents && options.highlightNewerThan;
|
||||||
const statusCell = (props) => StatusCell(props, highlightNewerThan);
|
const statusCell = (props) => StatusCell(props, highlightNewerThan);
|
||||||
const statusIconCell = (props) => StatusIconCell(props, highlightNewerThan);
|
const statusIconCell = (props) => StatusIconCell(props, highlightNewerThan);
|
||||||
const hostNameCell = (props) => <HostCell name={props.original.host} maintenance={props.original.maintenance} />;
|
const hostNameCell = (props) => (
|
||||||
|
<HostCell name={props.original.host} maintenance={props.original.hostInMaintenance} />
|
||||||
|
);
|
||||||
const hostTechNameCell = (props) => (
|
const hostTechNameCell = (props) => (
|
||||||
<HostCell name={props.original.hostTechName} maintenance={props.original.maintenance} />
|
<HostCell name={props.original.hostTechName} maintenance={props.original.hostInMaintenance} />
|
||||||
);
|
);
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
|||||||
Reference in New Issue
Block a user