RE: [SA-list] Nested SAIF tags

2014-12-17 Thread Demeulemeester, Pieter
Nested IF's are often used as a replacement for a "Do Case" or "Select" 
construction. 
Don't know if that's the case for you, but I've use the  tag 
with nested  tags, see example :


  
class="normal" style="background:red;color:black; 
font-weight:normal"
  
class="normal" style="background:darkorange; color:black; 
font-weight:normal" 
  
class="normal" style="background:lightblue;  color:black; 
font-weight:normal"  
  
 
class="normal" style="background:silver; color:black; font-weight: normal" 

 
class="normal" style="background:white;  color:black; font-weight: normal" 

  
class="normal" style="background:white;  color:black; 
font-weight:normal"
  
class="normal" 
style="background:red;color:black; font-weight:normal" 
 class="normal" 
style="background:darkorange; color:black; font-weight:normal" 
   class="normal" 
style="background:lightblue;  color:black; font-weight:normal" 
 class="normal" 
style="background:silver; color:black; font-weight:normal" 
  class="normal" 
style="background:white;  color:black; font-weight:normal" 
class="normal" style="background:olive;  color:blue; 
font-weight:normal"
  
class="normal" style="background:olive;  color:white; 
font-weight:normal"


Kind regards,
Pieter



-Original Message-
From: Servers Alive Discussion List [mailto:salive@woodstone.nu] On Behalf Of 
dirk
Sent: donderdag 18 december 2014 8:36
To: Servers Alive Discussion List
Subject: Re: [SA-list] Nested SAIF tags

nested saif tags are not supported in SA...



dirk

On 2014-12-18 07:40, Jason Richards Pagh wrote:
> Hi there,
> 
> I’m trying to develop a template that utilizes jQuery so it 
> will 
> format
> well on a mobile device. I am having a lot of success, but I think 
> I’m
> running into a bug and am hoping for some help confirming that (and
> getting it fixed) or another way to accomplish what I want to do. Part 
> of
> utilizing jQuery requires the use of  tags, which of course have 
> to
> be properly closed. Because I want to use collapsible sets that use
> sa_hostname as the section title, I need to use nested  blocks. 
> It
> sort of seems to work in one example and then not in another.
> 
> My question is whether nested  blocks is expected to work or not.
> 
> For more detail (if it matters), here’s the logic 
> I’m finding 
> myself
> trying to run through:
> 
> * In the header (before  tag) I open a  tag with 
> attribute
> of data-role=“collapsibleset".
> * For ONLY the very first entry inside the  tag, I need to 
> open
> a  tag with attribute of data-role=â€Å
> “collapsibleâ€. I can’t 
> have a
>  tag first, or that would close the above section I just opened.
> * For every next entry, if the sa_hostname is the same as the previous
> one, I don’t want to close or open a new  tag at this 
> level
>  * However, if the sa_hostname is new, I need to close out the
> previous  tag at this level and start a new one.
> * After the closing  tag I have the last  tag to 
> close
> out the hanging collapsible for the last entry in the report, then I 
> have
> another  tag to close out the collapsibleset started in the 
> header.
> 
> To accomplish this, I’m using the following snippet of code:
> 
> —SNIP—
> 
> 
> 
>  data-role="collapsible" data-collapsed="true"
> data-inset="false"> data-inset="false">
>  sa_hostname not sa_previous_hostname_in_html> data-role="collapsible" data-collapsed="true"
> data-inset="false"> data-inset="false">
> 
> 
> 
> 
> 
> 
> 
>  class="ui-li-aside">
> 
> 
> 
> 
> 
> 
> 
> 
> —SNIP—
> 
> That works all well and good, but it leaves in a  in the report
> only for the first entry as seen below:
> 
> —SNIP—
> 
> 
>  data-inset="false">192.168.20.105 data-inset="false">
>  
> 
> 
> nsmn3220-1b - a_VM aggr used %
> SNMP (.1.3.6.1.4.1.789.1.5.4.1.6.1 result > 
> 80)
> 12/17/2014 5:05:48 PM
> 82
> 
> 
>  data-inset="false">192.168.11.2 data-inset="false">
> 
> 
> phx-firewall - ping
> ping
> 12/17/2014 4:39:08 PM
> 100%
> 
> 
> 
> phx-firewall01 - CPU load 1 min
> SNMP (.1.3.6.1.4.1.2021.10.1.5.1 result > 
> 50)
> 12/17/2014 9:38:30 PM
> 2
> 
> 
> 
> phx-firewall01 - Temperature Err Cond
> SNMP (.1.3.6.1.4.1.2620.1.6.7.8.1.1.6.1.0 result <>
> 0)
>

Re: [SA-list] Nested SAIF tags

2014-12-17 Thread dirk
nested saif tags are not supported in SA...



dirk

On 2014-12-18 07:40, Jason Richards Pagh wrote:
> Hi there,
> 
> I’m trying to develop a template that utilizes jQuery so it will 
> format
> well on a mobile device. I am having a lot of success, but I think 
> I’m
> running into a bug and am hoping for some help confirming that (and
> getting it fixed) or another way to accomplish what I want to do. Part 
> of
> utilizing jQuery requires the use of  tags, which of course have 
> to
> be properly closed. Because I want to use collapsible sets that use
> sa_hostname as the section title, I need to use nested  blocks. 
> It
> sort of seems to work in one example and then not in another.
> 
> My question is whether nested  blocks is expected to work or not.
> 
> For more detail (if it matters), here’s the logic I’m finding 
> myself
> trying to run through:
> 
> * In the header (before  tag) I open a  tag with 
> attribute
> of data-role=“collapsibleset".
> * For ONLY the very first entry inside the  tag, I need to 
> open
> a  tag with attribute of data-role=“collapsibleâ€. I 
> can’t 
> have a
>  tag first, or that would close the above section I just opened.
> * For every next entry, if the sa_hostname is the same as the previous
> one, I don’t want to close or open a new  tag at this level
>  * However, if the sa_hostname is new, I need to close out the
> previous  tag at this level and start a new one.
> * After the closing  tag I have the last  tag to 
> close
> out the hanging collapsible for the last entry in the report, then I 
> have
> another  tag to close out the collapsibleset started in the 
> header.
> 
> To accomplish this, I’m using the following snippet of code:
> 
> —SNIP—
> 
> 
> 
>  data-role="collapsible" data-collapsed="true"
> data-inset="false"> data-inset="false">
>  sa_hostname not sa_previous_hostname_in_html> data-role="collapsible" data-collapsed="true"
> data-inset="false"> data-inset="false">
> 
> 
> 
> 
> 
> 
> 
>  class="ui-li-aside">
> 
> 
> 
> 
> 
> 
> 
> 
> —SNIP—
> 
> That works all well and good, but it leaves in a  in the report
> only for the first entry as seen below:
> 
> —SNIP—
> 
> 
>  data-inset="false">192.168.20.105 data-inset="false">
>  
> 
> 
> nsmn3220-1b - a_VM aggr used %
> SNMP (.1.3.6.1.4.1.789.1.5.4.1.6.1 result > 
> 80)
> 12/17/2014 5:05:48 PM
> 82
> 
> 
>  data-inset="false">192.168.11.2 data-inset="false">
> 
> 
> phx-firewall - ping
> ping
> 12/17/2014 4:39:08 PM
> 100%
> 
> 
> 
> phx-firewall01 - CPU load 1 min
> SNMP (.1.3.6.1.4.1.2021.10.1.5.1 result > 
> 50)
> 12/17/2014 9:38:30 PM
> 2
> 
> 
> 
> phx-firewall01 - Temperature Err Cond
> SNMP (.1.3.6.1.4.1.2620.1.6.7.8.1.1.6.1.0 result <>
> 0)
> 12/17/2014 9:34:13 PM
> 0
> 
> 
>  data-inset="false">192.168.11.41 data-inset="false">
> 
> 
> phxn3220-1a - ping
> ping
> 12/17/2014 4:39:06 PM
> 100%
> 
> 
> 
> 
> 
> 
> 
> 
> —SNIP—
> 
> That doesn’t seem like a problem, however I wanted to do some further
> customization where I add some attributes to the  tag for the
> collapsible level and so I tried changing the template as follows:
> 
> —SNIP—
> 
> 
> 
> 
>  sa_hostname not sa_previous_hostname_in_html> 
> 
>   
> data-icon="alert"
>   
> data-icon="clock"
> 
>  sa_previous_hostname_in_html>data-role="collapsible" 
> data-collapsed="true"
> data-inset="false"> data-inset="false">
> 
> 
> 
> 
> 
> 
> 
> 
>  class="ui-li-aside">
> 
> 
> 
> 
> 
> 
> 
> 
> —SNIP—
> 
> That would seem like it should work for me, however because of the
> leftover  tag, the  tag that I’m trying to inject
> data-icon=“alert†attribute into gets closed prematurely by the 
> closing
> angle bracket in the  hanging tag. See below:
> 
> —SNIP—
> 
> 
>   
> data-icon="alert"
> data-role="collapsible" data-collapsed="true"
> data-inset="false">192.168.20.105 data-inset="false">
> 
> 
> 
> nsmn3220-1b - a_VM aggr used %
> SNMP (.1.3.6.1.4.1.789.1.5.4.1.6.1 result > 
> 80)
> 12/17/2014 5:05:48 PM
> 82
> 
> 
> —SNIP—
> 
> So when the page renders, not only do I not get the alert icon, but I 
> get
> the two lines after the  hanging tag showing up in the web page
> (because the tag they were a part of got clo

[SA-list] Nested SAIF tags

2014-12-17 Thread Jason Richards Pagh
Hi there,

I’m trying to develop a template that utilizes jQuery so it will format 
well on a mobile device. I am having a lot of success, but I think I’m 
running into a bug and am hoping for some help confirming that (and 
getting it fixed) or another way to accomplish what I want to do. Part of 
utilizing jQuery requires the use of  tags, which of course have to 
be properly closed. Because I want to use collapsible sets that use 
sa_hostname as the section title, I need to use nested  blocks. It 
sort of seems to work in one example and then not in another. 

My question is whether nested  blocks is expected to work or not. 

For more detail (if it matters), here’s the logic I’m finding myself 
trying to run through:

* In the header (before  tag) I open a  tag with attribute 
of data-role=“collapsibleset".
* For ONLY the very first entry inside the  tag, I need to open 
a  tag with attribute of data-role=“collapsible”. I can’t have a 
 tag first, or that would close the above section I just opened.
* For every next entry, if the sa_hostname is the same as the previous 
one, I don’t want to close or open a new  tag at this level
 * However, if the sa_hostname is new, I need to close out the 
previous  tag at this level and start a new one.
* After the closing  tag I have the last  tag to close 
out the hanging collapsible for the last entry in the report, then I have 
another  tag to close out the collapsibleset started in the header.

To accomplish this, I’m using the following snippet of code:

—SNIP—





   




 



 






—SNIP—

That works all well and good, but it leaves in a  in the report 
only for the first entry as seen below:

—SNIP—


192.168.20.105
 


nsmn3220-1b - a_VM aggr used %
SNMP (.1.3.6.1.4.1.789.1.5.4.1.6.1 result > 80)
12/17/2014 5:05:48 PM
82


192.168.11.2


phx-firewall - ping
ping
12/17/2014 4:39:08 PM
100%



phx-firewall01 - CPU load 1 min
SNMP (.1.3.6.1.4.1.2021.10.1.5.1 result > 50)
12/17/2014 9:38:30 PM
2



phx-firewall01 - Temperature Err Cond
SNMP (.1.3.6.1.4.1.2620.1.6.7.8.1.1.6.1.0 result <> 
0)
12/17/2014 9:34:13 PM
0


192.168.11.41


phxn3220-1a - ping
ping
12/17/2014 4:39:06 PM
100%








—SNIP—

That doesn’t seem like a problem, however I wanted to do some further 
customization where I add some attributes to the  tag for the 
collapsible level and so I tried changing the template as follows:

—SNIP—




 

  
data-icon="alert"
  
data-icon="clock"

data-role="collapsible" data-collapsed="true" 
data-inset="false">
   





 



 






—SNIP—

That would seem like it should work for me, however because of the 
leftover  tag, the  tag that I’m trying to inject 
data-icon=“alert” attribute into gets closed prematurely by the closing 
angle bracket in the  hanging tag. See below:

—SNIP—



data-icon="alert"
data-role="collapsible" data-collapsed="true" 
data-inset="false">192.168.20.105



nsmn3220-1b - a_VM aggr used %
SNMP (.1.3.6.1.4.1.789.1.5.4.1.6.1 result > 80)
12/17/2014 5:05:48 PM
82


—SNIP—

So when the page renders, not only do I not get the alert icon, but I get 
the two lines after the  hanging tag showing up in the web page 
(because the tag they were a part of got closed).

Thoughts about how to get this working?

Thanks,
Jason


To unsubscribe send a message with UNSUBSCRIBE in the subject line to 
salive@woodstone.nu
If you use auto-responders (like out-of-the-office messages), make sure that 
they are not sent to the list nor to individual members.  Doing so will cause 
you to be automatically removed from the list.