aktueller stand

This commit is contained in:
Meik
2026-02-13 09:07:04 +01:00
parent 55459bdcf3
commit 23471e5062
10 changed files with 320 additions and 88 deletions

View File

@@ -762,16 +762,6 @@
<Table-Column Name="Description" Type="string" Cardinal="300" />
</Table-Columns>
</Table>
<Table Name="M42Wpm-Ticket-CloseCase-Categories" Type="Selection" Key="id">
<Matrix42-DataQueryItems-Template EntityClassName="SPSScCategoryClassBase" EntityTypeNames="SPSScCategoryType" OrderBy="" WhereExpression="Hidden = 0" />
<Table-Columns>
<Table-Column Name="id" SourceName="Id" Type="guid" />
<Table-Column Name="SysObjectId" SourceName="Sys-ObjectId" Type="guid" />
<Table-Column Name="SysName" SourceName="Sys-Name" Type="string" Cardinal="50" />
<Table-Column Name="Name" Type="string" Cardinal="300" />
<Table-Column Name="parent" SourceName="Parent_Value" Type="guid" />
</Table-Columns>
</Table>
<Table Name="M42Wpm-Ticket-Roles" Type="Selection" Key="id">
<Matrix42-DataQueryItems-Template EntityClassName="SPSScRoleClassBase" EntityTypeNames="SPSSecurityTypeRole" OrderBy="" WhereExpression="T(SPSSecurityClassRole).ShowInForwardAction = 1 AND T(SPSSecurityClassRole).Queue.ID IS NULL" />
<Table-Columns>

View File

@@ -61,9 +61,86 @@ namespace C4IT.DataHistoryProvider
private cConfigHelperParameterList LoadParameters (XmlElement XRoot, cXmlParser Parser)
{
MethodBase CM = null; if (cLogManager.DefaultLogger.IsDebug) { CM = MethodBase.GetCurrentMethod(); LogMethodBegin(CM); }
var _result = new cConfigHelperParameterList();
try
{
return cF4sdGlobalConfigParameterParser.Parse(XRoot, Parser);
var Items = XRoot.ChildNodes;
foreach (var _node in Items)
{
if (!(_node is XmlElement _item)) continue;
Parser.EnterElement(_item.Name);
try
{
var _attPolicy = _item.GetAttribute("Policy");
var _attValue = _item.GetAttribute("Value");
var _ElementCount = 0;
foreach (XmlNode _subNode in _item.ChildNodes)
{
if (_subNode is XmlElement)
_ElementCount++;
}
// check for special parameters
switch (_item.Name)
{
case "InformationClassSearchPriority":
var _val = getInformationClassSearchPriority(_item, Parser);
if (_val != null)
_result.Items[_val.Name] = _val;
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)
{
// we have a simple parameter
var _policy = cXmlParser.GetEnumFromAttribute<enumConfigPolicy>(_item, "Policy", enumConfigPolicy.Default);
var _value = cXmlParser.GetStringFromXmlAttribute(_item, "Value", String.Empty);
_result.Items[_item.Name] = new cConfigHelperParameterEntry()
{
Name = _item.Name,
Value = _value,
Policy = _policy.ToString(),
};
}
else if (string.IsNullOrEmpty(_attPolicy) && string.IsNullOrEmpty(_attValue) && _ElementCount > 0)
{
// we have a sublist
if (_result.SubItems == null)
_result.SubItems = new Dictionary<string, cConfigHelperParameterList>();
_result.SubItems[_item.Name] = LoadParameters(_item, Parser);
}
else
{
// we have an invalid entry
var _msg = $"Invalid entry in F4SD-Global-Configuration.xml: {_item.Name}";
Parser.AddMessage(_item, _msg, LogLevels.Warning);
LogEntry(_msg, LogLevels.Warning);
}
}
catch (Exception E)
{
LogException(E);
}
finally
{
Parser.LeaveElement(_item.Name);
}
}
}
catch (Exception E)
{
@@ -74,7 +151,198 @@ namespace C4IT.DataHistoryProvider
if (CM != null) LogMethodEnd(CM);
}
return new cConfigHelperParameterList();
return _result;
}
private cConfigHelperParameterEntry getInformationClassSearchPriority(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 != "InformationClass")
{
// we have an invalid entry
var _msg = $"Invalid entry in F4SD-Global-Configuration.xml: {_item.Name}, should be <InformationClass/>";
Parser.AddMessage(_item, _msg, LogLevels.Warning);
LogEntry(_msg, LogLevels.Warning);
continue;
}
var _InfoClass = cXmlParser.GetEnumFromAttribute<enumFasdInformationClass>(_item, "Type", enumFasdInformationClass.Unknown);
if (_InfoClass == enumFasdInformationClass.Unknown)
{
// we have an invalid type attribute
var _strType = cXmlParser.GetStringFromXmlAttribute(_item, "Type", String.Empty);
var _msg = $"Invalid type attribute value ({_strType}) in entry {_item.Name}";
Parser.AddMessage(_item, _msg, LogLevels.Warning);
LogEntry(_msg, LogLevels.Warning);
continue;
}
var _strInfoClass = _InfoClass.ToString();
if (!_result.Contains(_strInfoClass))
_result.Add(_strInfoClass);
}
catch (Exception E)
{
LogException(E);
}
finally
{
Parser.LeaveElement(_item.Name);
}
}
return new cConfigHelperParameterEntry()
{
Name = XNode.Name,
ValueList = _result,
Policy = _policy.ToString()
};
}
catch (Exception E)
{
LogException(E);
}
finally
{
if (CM != null) LogMethodEnd(CM);
}
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)

View File

@@ -762,16 +762,6 @@
<Table-Column Name="Description" Type="string" Cardinal="300" />
</Table-Columns>
</Table>
<Table Name="M42Wpm-Ticket-CloseCase-Categories" Type="Selection" Key="id">
<Matrix42-DataQueryItems-Template EntityClassName="SPSScCategoryClassBase" EntityTypeNames="SPSScCategoryType" OrderBy="" WhereExpression="Hidden = 0" />
<Table-Columns>
<Table-Column Name="id" SourceName="Id" Type="guid" />
<Table-Column Name="SysObjectId" SourceName="Sys-ObjectId" Type="guid" />
<Table-Column Name="SysName" SourceName="Sys-Name" Type="string" Cardinal="50" />
<Table-Column Name="Name" Type="string" Cardinal="300" />
<Table-Column Name="parent" SourceName="Parent_Value" Type="guid" />
</Table-Columns>
</Table>
<Table Name="M42Wpm-Ticket-Roles" Type="Selection" Key="id">
<Matrix42-DataQueryItems-Template EntityClassName="SPSScRoleClassBase" EntityTypeNames="SPSSecurityTypeRole" OrderBy="" WhereExpression="T(SPSSecurityClassRole).ShowInForwardAction = 1 AND T(SPSSecurityClassRole).Queue.ID IS NULL" />
<Table-Columns>

View File

@@ -551,6 +551,13 @@
<Content Include="Scripts\umd\popper-utils.min.js" />
<Content Include="Scripts\umd\popper.js" />
<Content Include="Scripts\umd\popper.min.js" />
<Content Include="Web.config" />
<Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Areas\HelpPage\Views\_ViewStart.cshtml" />
<Content Include="Content\Site.css" />
<Content Include="Views\Web.config" />
@@ -568,19 +575,6 @@
<Content Include="Scripts\popper.js.map" />
<Content Include="Scripts\popper-utils.min.js.map" />
<Content Include="Scripts\popper-utils.js.map" />
<Content Include="Web.config" />
<None Include="Web.Debug-Demo.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release-Demo.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />

View File

@@ -762,16 +762,6 @@
<Table-Column Name="Description" Type="string" Cardinal="300" />
</Table-Columns>
</Table>
<Table Name="M42Wpm-Ticket-CloseCase-Categories" Type="Selection" Key="id">
<Matrix42-DataQueryItems-Template EntityClassName="SPSScCategoryClassBase" EntityTypeNames="SPSScCategoryType" OrderBy="" WhereExpression="Hidden = 0" />
<Table-Columns>
<Table-Column Name="id" SourceName="Id" Type="guid" />
<Table-Column Name="SysObjectId" SourceName="Sys-ObjectId" Type="guid" />
<Table-Column Name="SysName" SourceName="Sys-Name" Type="string" Cardinal="50" />
<Table-Column Name="Name" Type="string" Cardinal="300" />
<Table-Column Name="parent" SourceName="Parent_Value" Type="guid" />
</Table-Columns>
</Table>
<Table Name="M42Wpm-Ticket-Roles" Type="Selection" Key="id">
<Matrix42-DataQueryItems-Template EntityClassName="SPSScRoleClassBase" EntityTypeNames="SPSSecurityTypeRole" OrderBy="" WhereExpression="T(SPSSecurityClassRole).ShowInForwardAction = 1 AND T(SPSSecurityClassRole).Queue.ID IS NULL" />
<Table-Columns>

View File

@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using Web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=301874 -->
<!-- Weitere Informationen zur Verwendung der web.config-Transformation finden Sie unter https://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
Im folgenden Beispiel wird durch die Transformation "SetAttributes" der Wert von
"connectionString" geändert, sodass "ReleaseSQLServer" nur verwendet wird, wenn
vom Locator "Match" ein Attribut vom Typ "name" mit dem Wert "MyDB" gefunden wird.
<connectionStrings>
<add name="MyDB"
@@ -16,10 +16,10 @@
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your Web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
Im folgenden Beispiel ersetzt die Transformation "Replace" den gesamten
Abschnitt "<customErrors>" der Datei "web.config".
Da unter dem Knoten "<system.web>" nur ein Abschnitt vom Typ
"customErrors" vorhanden ist, muss das Attribut "xdt:Locator" nicht verwendet werden.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">

View File

@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using Web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=301874 -->
<!-- Weitere Informationen zur Verwendung der web.config-Transformation finden Sie unter https://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
Im folgenden Beispiel wird durch die Transformation "SetAttributes" der Wert von
"connectionString" geändert, sodass "ReleaseSQLServer" nur verwendet wird, wenn
vom Locator "Match" ein Attribut vom Typ "name" mit dem Wert "MyDB" gefunden wird.
<connectionStrings>
<add name="MyDB"
@@ -17,10 +17,10 @@
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your Web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
Im folgenden Beispiel ersetzt die Transformation "Replace" den gesamten
Abschnitt "<customErrors>" der Datei "web.config".
Da unter dem Knoten "<system.web>" nur ein Abschnitt vom Typ
"customErrors" vorhanden ist, muss das Attribut "xdt:Locator" nicht verwendet werden.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">