diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-08 16:30:58 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-08 16:30:58 -0800 |
commit | 60c98d5e240a1b1ddac9928d975d43c82cefabb4 (patch) | |
tree | 07adf9b00bfbb69bef9800160e4a6570c0434227 /xsl | |
parent | 5b6d22043d674daa80efe3b72f39d951b75ccd82 (diff) | |
download | vyatta-nat-60c98d5e240a1b1ddac9928d975d43c82cefabb4.tar.gz vyatta-nat-60c98d5e240a1b1ddac9928d975d43c82cefabb4.zip |
merge ports in show output
Diffstat (limited to 'xsl')
-rw-r--r-- | xsl/show_nat_rules.xsl | 100 |
1 files changed, 8 insertions, 92 deletions
diff --git a/xsl/show_nat_rules.xsl b/xsl/show_nat_rules.xsl index e9fdbc9..a86233c 100644 --- a/xsl/show_nat_rules.xsl +++ b/xsl/show_nat_rules.xsl @@ -172,21 +172,13 @@ <xsl:text>&newln;</xsl:text> - - <xsl:if test="src_ports!='' or dst_ports!=''"> + <xsl:if test="src_ports!=''"> <xsl:variable name="src_ports_d"> <xsl:call-template name="decode"> <xsl:with-param name="encoded" select="src_ports"/> </xsl:call-template> </xsl:variable> - <xsl:variable name="dst_ports_d"> - <xsl:call-template name="decode"> - <xsl:with-param name="encoded" select="dst_ports"/> - </xsl:call-template> - </xsl:variable> - - <xsl:value-of select="$pad6"/> <xsl:value-of select="$pad6"/> <xsl:value-of select="$pad6"/> <xsl:value-of select="$pad11"/> @@ -201,102 +193,26 @@ <xsl:value-of select="substring($pad20,1,$pad20_len - string-length($src_ports_d))"/> </xsl:when> </xsl:choose> - - <xsl:choose> - <xsl:when test="$dst_ports_d!=''"> - <xsl:value-of select="$dst_ports_d"/> - <xsl:value-of select="substring($pad20,1,$pad20_len - string-length($dst_ports_d))"/> - </xsl:when> - </xsl:choose> <xsl:text>&newln;</xsl:text> </xsl:if> - - <xsl:if test="src_ports_apps!='' or dst_ports_apps!=''"> - <xsl:variable name="src_ports_apps_d"> - <xsl:call-template name="decode"> - <xsl:with-param name="encoded" select="src_ports_apps"/> - </xsl:call-template> - </xsl:variable> - - <xsl:variable name="dst_ports_apps_d"> + <xsl:if test="dst_ports!=''"> + <xsl:variable name="dst_ports_d"> <xsl:call-template name="decode"> - <xsl:with-param name="encoded" select="dst_ports_apps"/> + <xsl:with-param name="encoded" select="dst_ports"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="$pad6"/> <xsl:value-of select="$pad6"/> - <xsl:value-of select="$pad6"/> - <xsl:value-of select="$pad11"/> - <xsl:value-of select="$pad11"/> - - <xsl:choose> - <xsl:when test="$src_ports_apps_d=''"> - <xsl:value-of select="$pad20"/> - </xsl:when> - <xsl:when test="$src_ports_apps_d!=''"> - <xsl:value-of select="$src_ports_apps_d"/> - <xsl:value-of select="substring($pad20,1,$pad20_len - string-length($src_ports_apps_d))"/> - </xsl:when> - </xsl:choose> - - <xsl:choose> - <xsl:when test="$dst_ports_apps_d!=''"> - <xsl:value-of select="$dst_ports_apps_d"/> - <xsl:value-of select="substring($pad20,1,$pad20_len - string-length($dst_ports_apps_d))"/> - </xsl:when> - </xsl:choose> - <xsl:text>&newln;</xsl:text> - </xsl:if> - - <xsl:if test="src_port_start!='' or dst_port_start!=''"> - <xsl:value-of select="$pad6"/> - <xsl:value-of select="$pad6"/> - <xsl:value-of select="$pad6"/> - <xsl:value-of select="$pad11"/> - <xsl:value-of select="$pad11"/> - - <xsl:choose> - <xsl:when test="src_port_start=''"> - <xsl:value-of select="$pad20"/> - </xsl:when> - <xsl:when test="src_port_start!=''"> - <xsl:value-of select="src_port_start"/> - <xsl:value-of select="substring($pad20,1,$pad20_len - string-length(src_port_start))"/> - </xsl:when> - </xsl:choose> - - <xsl:choose> - <xsl:when test="dst_port_start!=''"> - <xsl:value-of select="dst_port_start"/> - <xsl:value-of select="substring($pad20,1,$pad20_len - string-length(dst_port_start))"/> - </xsl:when> - </xsl:choose> - <xsl:text>&newln;</xsl:text> - </xsl:if> - - <xsl:if test="src_port_stop!='' or dst_port_stop!=''"> - <xsl:value-of select="$pad6"/> - <xsl:value-of select="$pad6"/> - <xsl:value-of select="$pad6"/> <xsl:value-of select="$pad11"/> <xsl:value-of select="$pad11"/> + <xsl:value-of select="$pad20"/> <xsl:choose> - <xsl:when test="src_port_stop=''"> - <xsl:value-of select="$pad20"/> - </xsl:when> - <xsl:when test="src_port_stop!=''"> - <xsl:value-of select="src_port_stop"/> - <xsl:value-of select="substring($pad20,1,$pad20_len - string-length(src_port_stop))"/> - </xsl:when> - </xsl:choose> - - <xsl:choose> - <xsl:when test="dst_port_stop!=''"> - <xsl:value-of select="dst_port_stop"/> - <xsl:value-of select="substring($pad20,1,$pad20_len - string-length(dst_port_stop))"/> + <xsl:when test="$dst_ports_d!=''"> + <xsl:value-of select="$dst_ports_d"/> + <xsl:value-of select="substring($pad20,1,$pad20_len - string-length($dst_ports_d))"/> </xsl:when> </xsl:choose> <xsl:text>&newln;</xsl:text> |