aktueller stand
This commit is contained in:
Binary file not shown.
@@ -17,8 +17,7 @@
|
|||||||
<CompletitionPolicy Policy="Mandatory" Value="IfRequired" />
|
<CompletitionPolicy Policy="Mandatory" Value="IfRequired" />
|
||||||
<NotesMandatory Policy="Mandatory" Value="true" />
|
<NotesMandatory Policy="Mandatory" Value="true" />
|
||||||
<ShowOverview Policy="Mandatory" Value="false" />
|
<ShowOverview Policy="Mandatory" Value="false" />
|
||||||
<OpenTicketsExternally Policy="Mandatory" Value="false" />
|
<OpenActivitiesExternally Policy="Mandatory" Value="false" />
|
||||||
<OpenIncidentsExternally Policy="Mandatory" Value="false" />
|
|
||||||
<OverviewPollingPersonal Policy="Mandatory" Value="10" />
|
<OverviewPollingPersonal Policy="Mandatory" Value="10" />
|
||||||
<OverviewPollingRole Policy="Mandatory" Value="5" />
|
<OverviewPollingRole Policy="Mandatory" Value="5" />
|
||||||
</TicketConfiguration>
|
</TicketConfiguration>
|
||||||
|
|||||||
@@ -131,18 +131,18 @@
|
|||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="OpenTicketsExternally" minOccurs="0" maxOccurs="1">
|
<xs:element name="OpenActivitiesExternally" minOccurs="0" maxOccurs="1">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:complexContent>
|
<xs:sequence>
|
||||||
<xs:extension base="BoolNode"></xs:extension>
|
<xs:element name="OpenActivityOverride" minOccurs="0" maxOccurs="unbounded">
|
||||||
</xs:complexContent>
|
<xs:complexType>
|
||||||
</xs:complexType>
|
<xs:attribute name="ActivityType" type="xs:string" use="required"/>
|
||||||
</xs:element>
|
<xs:attribute name="Value" type="xs:boolean" use="required"/>
|
||||||
<xs:element name="OpenIncidentsExternally" minOccurs="0" maxOccurs="1">
|
</xs:complexType>
|
||||||
<xs:complexType>
|
</xs:element>
|
||||||
<xs:complexContent>
|
</xs:sequence>
|
||||||
<xs:extension base="BoolNode"></xs:extension>
|
<xs:attribute name="Policy" type="PolicyEnum" use="required"/>
|
||||||
</xs:complexContent>
|
<xs:attribute name="Value" type="xs:boolean" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="OverviewPollingPersonal" minOccurs="0" maxOccurs="1">
|
<xs:element name="OverviewPollingPersonal" minOccurs="0" maxOccurs="1">
|
||||||
|
|||||||
@@ -87,14 +87,23 @@ namespace C4IT.DataHistoryProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for special parameters
|
// check for special parameters
|
||||||
switch (_item.Name)
|
switch (_item.Name)
|
||||||
{
|
{
|
||||||
case "InformationClassSearchPriority":
|
case "InformationClassSearchPriority":
|
||||||
var _val = getInformationClassSearchPriority(_item, Parser);
|
var _val = getInformationClassSearchPriority(_item, Parser);
|
||||||
if (_val != null)
|
if (_val != null)
|
||||||
_result.Items[_val.Name] = _val;
|
_result.Items[_val.Name] = _val;
|
||||||
continue;
|
continue;
|
||||||
}
|
case "OpenActivitiesExternally":
|
||||||
|
var _openActivitiesEntry = getOpenActivitiesExternallyEntry(_item);
|
||||||
|
if (_openActivitiesEntry != null)
|
||||||
|
_result.Items[_openActivitiesEntry.Name] = _openActivitiesEntry;
|
||||||
|
|
||||||
|
var _overrideValues = getOpenActivitiesExternallyOverrides(_item, Parser);
|
||||||
|
if (_overrideValues != null && _overrideValues.ValueList != null && _overrideValues.ValueList.Count > 0)
|
||||||
|
_result.Items[_overrideValues.Name] = _overrideValues;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (_attPolicy != null && _attValue != null && _ElementCount == 0)
|
if (_attPolicy != null && _attValue != null && _ElementCount == 0)
|
||||||
{
|
{
|
||||||
@@ -148,8 +157,8 @@ namespace C4IT.DataHistoryProvider
|
|||||||
return _result;
|
return _result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private cConfigHelperParameterEntry getInformationClassSearchPriority(XmlElement XNode, cXmlParser Parser)
|
private cConfigHelperParameterEntry getInformationClassSearchPriority(XmlElement XNode, cXmlParser Parser)
|
||||||
{
|
{
|
||||||
|
|
||||||
MethodBase CM = null; if (cLogManager.DefaultLogger.IsDebug) { CM = MethodBase.GetCurrentMethod(); LogMethodBegin(CM); }
|
MethodBase CM = null; if (cLogManager.DefaultLogger.IsDebug) { CM = MethodBase.GetCurrentMethod(); LogMethodBegin(CM); }
|
||||||
|
|
||||||
@@ -222,7 +231,124 @@ namespace C4IT.DataHistoryProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static cConfigHelperParameterEntry getOpenActivitiesExternallyEntry(XmlElement XNode)
|
||||||
|
{
|
||||||
|
var _policy = cXmlParser.GetEnumFromAttribute<enumConfigPolicy>(XNode, "Policy", enumConfigPolicy.Default);
|
||||||
|
var _value = cXmlParser.GetStringFromXmlAttribute(XNode, "Value", String.Empty);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(_value))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return new cConfigHelperParameterEntry()
|
||||||
|
{
|
||||||
|
Name = "OpenActivitiesExternally",
|
||||||
|
Value = _value,
|
||||||
|
Policy = _policy.ToString(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private cConfigHelperParameterEntry getOpenActivitiesExternallyOverrides(XmlElement XNode, cXmlParser Parser)
|
||||||
|
{
|
||||||
|
|
||||||
|
MethodBase CM = null; if (cLogManager.DefaultLogger.IsDebug) { CM = MethodBase.GetCurrentMethod(); LogMethodBegin(CM); }
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var _xNodes = XNode.ChildNodes;
|
||||||
|
var _policy = cXmlParser.GetEnumFromAttribute<enumConfigPolicy>(XNode, "Policy", enumConfigPolicy.Default);
|
||||||
|
var _result = new List<string>();
|
||||||
|
|
||||||
|
foreach (var _xNode in _xNodes)
|
||||||
|
{
|
||||||
|
if (!(_xNode is XmlElement _item))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Parser.EnterElement(_item.Name);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_item.Name != "OpenActivityOverride")
|
||||||
|
{
|
||||||
|
var _msg = $"Invalid entry in F4SD-Global-Configuration.xml: {_item.Name}, should be <OpenActivityOverride/>";
|
||||||
|
Parser.AddMessage(_item, _msg, LogLevels.Warning);
|
||||||
|
LogEntry(_msg, LogLevels.Warning);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var activityType = cXmlParser.GetStringFromXmlAttribute(_item, "ActivityType", String.Empty)?.Trim();
|
||||||
|
if (string.IsNullOrWhiteSpace(activityType))
|
||||||
|
{
|
||||||
|
var _msg = $"Missing ActivityType attribute value in entry {_item.Name}";
|
||||||
|
Parser.AddMessage(_item, _msg, LogLevels.Warning);
|
||||||
|
LogEntry(_msg, LogLevels.Warning);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var valueText = cXmlParser.GetStringFromXmlAttribute(_item, "Value", String.Empty)?.Trim();
|
||||||
|
if (string.IsNullOrWhiteSpace(valueText))
|
||||||
|
{
|
||||||
|
var _msg = $"Missing Value attribute value in entry {_item.Name} ({activityType})";
|
||||||
|
Parser.AddMessage(_item, _msg, LogLevels.Warning);
|
||||||
|
LogEntry(_msg, LogLevels.Warning);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var normalizedValue = valueText.ToLowerInvariant();
|
||||||
|
bool? parsedValue = null;
|
||||||
|
switch (normalizedValue)
|
||||||
|
{
|
||||||
|
case "true":
|
||||||
|
case "1":
|
||||||
|
case "yes":
|
||||||
|
parsedValue = true;
|
||||||
|
break;
|
||||||
|
case "false":
|
||||||
|
case "0":
|
||||||
|
case "no":
|
||||||
|
parsedValue = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!parsedValue.HasValue)
|
||||||
|
{
|
||||||
|
var _msg = $"Invalid Value attribute value ({valueText}) in entry {_item.Name} ({activityType})";
|
||||||
|
Parser.AddMessage(_item, _msg, LogLevels.Warning);
|
||||||
|
LogEntry(_msg, LogLevels.Warning);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
_result.Add($"{activityType}={(parsedValue.Value ? "true" : "false")}");
|
||||||
|
}
|
||||||
|
catch (Exception E)
|
||||||
|
{
|
||||||
|
LogException(E);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Parser.LeaveElement(_item.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new cConfigHelperParameterEntry()
|
||||||
|
{
|
||||||
|
Name = "OpenActivitiesExternallyOverrides",
|
||||||
|
ValueList = _result,
|
||||||
|
Policy = _policy.ToString()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (Exception E)
|
||||||
|
{
|
||||||
|
LogException(E);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (CM != null) LogMethodEnd(CM);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public override bool DoXmlUpdates(XmlElement XmlRoot, bool withM42Config = false, bool withIntuneConfig = false, bool withMobileDeviceConfig = false, bool withCitrixConfig = false)
|
public override bool DoXmlUpdates(XmlElement XmlRoot, bool withM42Config = false, bool withIntuneConfig = false, bool withMobileDeviceConfig = false, bool withCitrixConfig = false)
|
||||||
{
|
{
|
||||||
@@ -295,13 +421,8 @@ namespace C4IT.DataHistoryProvider
|
|||||||
);
|
);
|
||||||
RetVal |= DoXmlInsertElement(XmlRoot
|
RetVal |= DoXmlInsertElement(XmlRoot
|
||||||
, "TicketConfiguration"
|
, "TicketConfiguration"
|
||||||
, "OpenTicketsExternally"
|
, "OpenActivitiesExternally"
|
||||||
, "<OpenTicketsExternally Policy=\"Hidden\" Value=\"false\" />"
|
, "<OpenActivitiesExternally Policy=\"Hidden\" Value=\"false\" />"
|
||||||
);
|
|
||||||
RetVal |= DoXmlInsertElement(XmlRoot
|
|
||||||
, "TicketConfiguration"
|
|
||||||
, "OpenIncidentsExternally"
|
|
||||||
, "<OpenIncidentsExternally Policy=\"Hidden\" Value=\"false\" />"
|
|
||||||
);
|
);
|
||||||
RetVal |= DoXmlInsertElement(XmlRoot
|
RetVal |= DoXmlInsertElement(XmlRoot
|
||||||
, "TicketConfiguration"
|
, "TicketConfiguration"
|
||||||
|
|||||||
@@ -17,8 +17,7 @@
|
|||||||
<CompletitionPolicy Policy="Mandatory" Value="IfRequired" />
|
<CompletitionPolicy Policy="Mandatory" Value="IfRequired" />
|
||||||
<NotesMandatory Policy="Mandatory" Value="true" />
|
<NotesMandatory Policy="Mandatory" Value="true" />
|
||||||
<ShowOverview Policy="Mandatory" Value="false" />
|
<ShowOverview Policy="Mandatory" Value="false" />
|
||||||
<OpenTicketsExternally Policy="Mandatory" Value="false" />
|
<OpenActivitiesExternally Policy="Mandatory" Value="false" />
|
||||||
<OpenIncidentsExternally Policy="Mandatory" Value="false" />
|
|
||||||
<OverviewPollingPersonal Policy="Mandatory" Value="10" />
|
<OverviewPollingPersonal Policy="Mandatory" Value="10" />
|
||||||
<OverviewPollingRole Policy="Mandatory" Value="5" />
|
<OverviewPollingRole Policy="Mandatory" Value="5" />
|
||||||
</TicketConfiguration>
|
</TicketConfiguration>
|
||||||
|
|||||||
@@ -17,8 +17,7 @@
|
|||||||
<CompletitionPolicy Policy="Mandatory" Value="IfRequired" />
|
<CompletitionPolicy Policy="Mandatory" Value="IfRequired" />
|
||||||
<NotesMandatory Policy="Mandatory" Value="true" />
|
<NotesMandatory Policy="Mandatory" Value="true" />
|
||||||
<ShowOverview Policy="Mandatory" Value="false" />
|
<ShowOverview Policy="Mandatory" Value="false" />
|
||||||
<OpenTicketsExternally Policy="Mandatory" Value="false" />
|
<OpenActivitiesExternally Policy="Mandatory" Value="false" />
|
||||||
<OpenIncidentsExternally Policy="Mandatory" Value="false" />
|
|
||||||
<OverviewPollingPersonal Policy="Mandatory" Value="10" />
|
<OverviewPollingPersonal Policy="Mandatory" Value="10" />
|
||||||
<OverviewPollingRole Policy="Mandatory" Value="5" />
|
<OverviewPollingRole Policy="Mandatory" Value="5" />
|
||||||
</TicketConfiguration>
|
</TicketConfiguration>
|
||||||
|
|||||||
@@ -131,18 +131,18 @@
|
|||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="OpenTicketsExternally" minOccurs="0" maxOccurs="1">
|
<xs:element name="OpenActivitiesExternally" minOccurs="0" maxOccurs="1">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:complexContent>
|
<xs:sequence>
|
||||||
<xs:extension base="BoolNode"></xs:extension>
|
<xs:element name="OpenActivityOverride" minOccurs="0" maxOccurs="unbounded">
|
||||||
</xs:complexContent>
|
<xs:complexType>
|
||||||
</xs:complexType>
|
<xs:attribute name="ActivityType" type="xs:string" use="required"/>
|
||||||
</xs:element>
|
<xs:attribute name="Value" type="xs:boolean" use="required"/>
|
||||||
<xs:element name="OpenIncidentsExternally" minOccurs="0" maxOccurs="1">
|
</xs:complexType>
|
||||||
<xs:complexType>
|
</xs:element>
|
||||||
<xs:complexContent>
|
</xs:sequence>
|
||||||
<xs:extension base="BoolNode"></xs:extension>
|
<xs:attribute name="Policy" type="PolicyEnum" use="required"/>
|
||||||
</xs:complexContent>
|
<xs:attribute name="Value" type="xs:boolean" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="OverviewPollingPersonal" minOccurs="0" maxOccurs="1">
|
<xs:element name="OverviewPollingPersonal" minOccurs="0" maxOccurs="1">
|
||||||
|
|||||||
Reference in New Issue
Block a user