Add error message info for entities
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace LeafWeb.Core.Entities
|
namespace LeafWeb.Core.Entities
|
||||||
{
|
{
|
||||||
@@ -10,6 +11,8 @@ namespace LeafWeb.Core.Entities
|
|||||||
|
|
||||||
public virtual ICollection<LeafInputFile> InputFiles { get; set; }
|
public virtual ICollection<LeafInputFile> InputFiles { get; set; }
|
||||||
public virtual ICollection<LeafOutputFile> OutputFiles { get; set; }
|
public virtual ICollection<LeafOutputFile> OutputFiles { get; set; }
|
||||||
|
public LeafOutputFile OutputErrorMessage => OutputFiles?.FirstOrDefault(f => f.IsErrorMessage);
|
||||||
|
public LeafOutputFile OutputWarningMessage => OutputFiles?.FirstOrDefault(f => f.IsWarningMessage);
|
||||||
|
|
||||||
public LeafInputStatusType CurrentStatus { get; set; }
|
public LeafInputStatusType CurrentStatus { get; set; }
|
||||||
public virtual ICollection<LeafInputStatus> StatusHistory { get; set; }
|
public virtual ICollection<LeafInputStatus> StatusHistory { get; set; }
|
||||||
|
|||||||
@@ -13,5 +13,7 @@ namespace LeafWeb.Core.Entities
|
|||||||
|
|
||||||
// convention for the filename which LeafCharter uses
|
// convention for the filename which LeafCharter uses
|
||||||
public bool IsLeafChartFile => Filename?.StartsWith("cntrlcomparison") ?? false;
|
public bool IsLeafChartFile => Filename?.StartsWith("cntrlcomparison") ?? false;
|
||||||
|
public bool IsErrorMessage => Filename?.Contains("errormessage") ?? false;
|
||||||
|
public bool IsWarningMessage => Filename?.Contains("warningmessage") ?? false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ namespace LeafWeb.Core.Remote
|
|||||||
if (command.ExitStatus != 0)
|
if (command.ExitStatus != 0)
|
||||||
throw new PiscalClientException(command.Result);
|
throw new PiscalClientException(command.Result);
|
||||||
|
|
||||||
_logger.Debug(command.Result);
|
_logger.Debug("RunLeafInput result: " + command.Result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user