Add error message info for entities

This commit is contained in:
2016-04-09 22:20:55 -04:00
parent 2c3aa9c989
commit b317f0c65a
3 changed files with 6 additions and 1 deletions
+3
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace LeafWeb.Core.Entities
{
@@ -10,6 +11,8 @@ namespace LeafWeb.Core.Entities
public virtual ICollection<LeafInputFile> InputFiles { 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 virtual ICollection<LeafInputStatus> StatusHistory { get; set; }
+2
View File
@@ -13,5 +13,7 @@ namespace LeafWeb.Core.Entities
// convention for the filename which LeafCharter uses
public bool IsLeafChartFile => Filename?.StartsWith("cntrlcomparison") ?? false;
public bool IsErrorMessage => Filename?.Contains("errormessage") ?? false;
public bool IsWarningMessage => Filename?.Contains("warningmessage") ?? false;
}
}
+1 -1
View File
@@ -76,7 +76,7 @@ namespace LeafWeb.Core.Remote
if (command.ExitStatus != 0)
throw new PiscalClientException(command.Result);
_logger.Debug(command.Result);
_logger.Debug("RunLeafInput result: " + command.Result);
}
}