Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet (UIPageSet)

Element properties:

Type DefinitionMicrosoft.Unix.ShellCommand.AlertRule.Template

Source Code:

<UIPageSet ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet" TypeDefinitionID="Microsoft.Unix.ShellCommand.AlertRule.Template">
<UIPageReferences>
<UIPageReference ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference1" PageID="RuleTemplates!Microsoft.SystemCenter.RuleTemplates.RuleGeneralPage" Usage="CreationOnly">
<InputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="Category">
<xsl:copy>Alert</xsl:copy>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</InputTransform>
</UIPageReference>
<UIPageReference ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference2" PageID="System!System.SimpleSchedulerPage" Usage="CreationOnly">
<InputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="SimpleReccuringSchedule">
<xsl:element name="Interval"><xsl:attribute name="Unit">Minutes</xsl:attribute>15
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</InputTransform>
</UIPageReference>
<UIPageReference ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference3" PageID="Microsoft.Unix.ShellCommandDetailsPage" Usage="CreationOnly">
<InputParameters/>
<InputTransform/>
<Title ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference3.Title"/>
<SubTitle ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference3.SubTitle"/>
</UIPageReference>
<UIPageReference ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference4" PageID="System!System.ExpressionBuilderPage" Usage="CreationOnly">
<InputParameters>
<DataType>WSM!Microsoft.SystemCenter.WSManagement.WSManData</DataType>
</InputParameters>
<!-- this InputTransform constructs an ExpressionFilter for initial display in the ExpressionBuilderPage with WSMan data syntax -->
<InputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="Expression">
<xsl:element name="And">
<xsl:element name="Expression">
<xsl:element name="RegExExpression">
<xsl:element name="ValueExpression">
<xsl:element name="XPathQuery"><xsl:attribute name="Type">String</xsl:attribute>//*[local-name()="StdOut"]
</xsl:element>
</xsl:element>
<xsl:element name="Operator">ContainsSubstring</xsl:element>
<xsl:element name="Pattern">Error</xsl:element>
</xsl:element>
</xsl:element>
<xsl:element name="Expression">
<xsl:element name="SimpleExpression">
<xsl:element name="ValueExpression">
<xsl:element name="XPathQuery"><xsl:attribute name="Type">Integer</xsl:attribute>//*[local-name()="ReturnCode"]
</xsl:element>
</xsl:element>
<xsl:element name="Operator">Equal</xsl:element>
<xsl:element name="ValueExpression">
<xsl:element name="Value"><xsl:attribute name="Type">Integer</xsl:attribute>0
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</InputTransform>
<Title ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference4.Title"/>
<SubTitle ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference4.SubTitle"/>
<TabName ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference4.TabName"/>
</UIPageReference>
<UIPageReference ID="Microsoft.Unix.ShellCommand.AlertRule.Template.PageSet.Reference5" PageID="SystemHealth!System.Health.GenerateAlertModuleConfigPage" Usage="CreationOnly">
<InputParameters>
<DataType>WSM!Microsoft.SystemCenter.WSManagement.WSManData</DataType>
</InputParameters>
<InputTransform/>
</UIPageReference>
</UIPageReferences>
<OutputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="Configuration">
<xsl:copy-of select="/ID"/>
<xsl:copy-of select="/Name"/>
<xsl:copy-of select="/Description[1]"/>
<xsl:copy-of select="/Target"/>
<!--
Concatenate the MP Alias for the Unix Library MP (returned from UI) with the ID of Microsoft Unix Computer to construct the NetworkName reference
Targets must be Microsoft.Unix.Computer or based on Microsoft.Unix.Computer, or hosted directly by a class based on Microsoft.Unix.Computer.
-->
<xsl:element name="TargetSystem">
<xsl:variable name="MPAlias" select="/UnixLibraryAlias"/>
<xsl:choose>
<xsl:when test="/TargetHosted='true'">
<xsl:value-of select="concat('$Target/Host/Property[Type=','&quot;',$MPAlias,'!Microsoft.Unix.Computer','&quot;',']/NetworkName$')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('$Target/Property[Type=','&quot;',$MPAlias,'!Microsoft.Unix.Computer','&quot;',']/NetworkName$')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<xsl:copy-of select="/Category"/>
<xsl:copy-of select="/LocaleId"/>
<xsl:copy-of select="/Command"/>
<!--
Construct RunAs UserName reference from MP Alias for the Unix Library MP and the Run As profile name.
For the Rule & Task templates, this could be done with a Template $Reference variable, but it is used consistently
for all templates in this MP, and monitor templates cannot use that convention.
-->
<xsl:element name="UserName">
<xsl:variable name="SelectedProfile" select="/RunAsProfile"/>
<xsl:variable name="MPAlias" select="/UnixLibraryAlias"/>
<xsl:value-of select="concat('$RunAs[Name=','&quot;',$MPAlias,'!',$SelectedProfile,'&quot;',']/UserName$')"/>
</xsl:element>
<!--
Construct RunAs Password reference from MP Alias for the Unix Library MP and the Run As profile name.
For the Rule & Task templates, this could be done with a Template $Reference variable, but it is used consistently
for all templates in this MP, and monitor templates cannot use that convention.
-->
<xsl:element name="Password">
<xsl:variable name="SelectedProfile" select="/RunAsProfile"/>
<xsl:variable name="MPAlias" select="/UnixLibraryAlias"/>
<xsl:value-of select="concat('$RunAs[Name=','&quot;',$MPAlias,'!',$SelectedProfile,'&quot;',']/Password$')"/>
</xsl:element>
<xsl:copy-of select="/TimeOut"/>
<xsl:copy-of select="/TimeOutInMS"/>
<xsl:element name="Interval">
<xsl:variable name="RawInterval" select="/SimpleReccuringSchedule/Interval"/>
<xsl:variable name="Units" select="/SimpleReccuringSchedule/Interval/@Unit"/>
<xsl:choose>
<xsl:when test="not(boolean($Units)) or $Units='Seconds'">
<xsl:value-of select="$RawInterval"/>
</xsl:when>
<xsl:when test="$Units='Minutes'">
<xsl:value-of select="$RawInterval*60"/>
</xsl:when>
<xsl:when test="$Units='Hours'">
<xsl:value-of select="$RawInterval*3600"/>
</xsl:when>
<xsl:when test="$Units='Days'">
<xsl:value-of select="$RawInterval*86400"/>
</xsl:when>
</xsl:choose>
</xsl:element>
<xsl:element name="SyncTime">
<xsl:value-of select="/SimpleReccuringSchedule/SyncTime"/>
</xsl:element>
<xsl:copy-of select="/Enabled"/>
<xsl:element name="Expression">
<xsl:copy-of select="/Expression[1]/*"/>
</xsl:element>
<xsl:copy-of select="/Priority"/>
<xsl:copy-of select="/Severity"/>
<xsl:copy-of select="/AlertName"/>
<xsl:copy-of select="/AlertDescription"/>
<xsl:copy-of select="/AlertOwner"/>
<xsl:copy-of select="/AlertParameters"/>
<xsl:copy-of select="/Suppression"/>
<xsl:copy-of select="/Custom1"/>
<xsl:copy-of select="/Custom2"/>
<xsl:copy-of select="/Custom3"/>
<xsl:copy-of select="/Custom4"/>
<xsl:copy-of select="/Custom5"/>
<xsl:copy-of select="/Custom6"/>
<xsl:copy-of select="/Custom7"/>
<xsl:copy-of select="/Custom8"/>
<xsl:copy-of select="/Custom9"/>
<xsl:copy-of select="/Custom10"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</OutputTransform>
</UIPageSet>