Skip to content

Commit f85dc33

Browse files
saving change
1 parent 613a85e commit f85dc33

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/ResourceManager/Automation/Commands.Automation/Common/AutomationPSClientDSC.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ public Model.NodeConfiguration GetNodeConfiguration(string resourceGroupName, st
968968
{
969969
var nodeConfiguration = this.automationManagementClient.DscNodeConfiguration.Get(resourceGroupName, automationAccountName, nodeConfigurationName);
970970

971-
string computedRollupStatus = GetRollupStatus(resourceGroupName, automationAccountName, nodeConfigurationName);
971+
string computedRollupStatus = GetRollupStatus(resourceGroupName, automationAccountName, null);
972972

973973
if (string.IsNullOrEmpty(rollupStatus) || (rollupStatus != null && computedRollupStatus.Equals(rollupStatus)))
974974
{
@@ -1444,7 +1444,7 @@ public Model.DscNodeReport GetLatestDscNodeReport(string resourceGroupName, stri
14441444
resourceGroupName,
14451445
automationAccountName,
14461446
nodeId.ToString(),
1447-
this.GetNodeReportListFilterString(nodeId, startTime, endTime));
1447+
this.GetNodeReportListFilterString(null, startTime, endTime, null));
14481448
}
14491449
else
14501450
{
@@ -1711,7 +1711,7 @@ private string GetNodeListFilterString(string status, string nodeName)
17111711
return filter;
17121712
}
17131713

1714-
private string GetNodeReportListFilterString(Guid nodeId, DateTimeOffset? startTime, DateTimeOffset? endTime)
1714+
private string GetNodeReportListFilterString(string type, DateTimeOffset? startTime, DateTimeOffset? endTime, DateTimeOffset? lastModifiedTime)
17151715
{
17161716
string filter = null;
17171717
List<string> odataFilter = new List<string>();
@@ -1723,9 +1723,13 @@ private string GetNodeReportListFilterString(Guid nodeId, DateTimeOffset? startT
17231723
{
17241724
odataFilter.Add("properties/endTime le " + this.FormatDateTime(endTime.Value));
17251725
}
1726-
if (nodeId != null)
1726+
if (string.IsNullOrWhiteSpace(type))
17271727
{
1728-
odataFilter.Add("properties/nodeId eq '" + Uri.EscapeDataString(nodeId.ToString()) + "'");
1728+
odataFilter.Add("properties/type eq '" + Uri.EscapeDataString(type) + "'");
1729+
}
1730+
if (lastModifiedTime.HasValue)
1731+
{
1732+
odataFilter.Add("properties/lastModifiedTime ge " + this.FormatDateTime(startTime.Value));
17291733
}
17301734
if (odataFilter.Count > 0)
17311735
{

0 commit comments

Comments
 (0)