From 5d84a4356d5ee072bd34b7dca30158748ab49aa8 Mon Sep 17 00:00:00 2001 From: Hubert depesz Lubaczewski Date: Tue, 3 Aug 2021 20:43:56 +0200 Subject: [PATCH] Correctly display InitPlan details --- templates/controller/show.html.ep | 50 +++++++++++++++++-------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/templates/controller/show.html.ep b/templates/controller/show.html.ep index 0aee589..b9a2463 100755 --- a/templates/controller/show.html.ep +++ b/templates/controller/show.html.ep @@ -425,30 +425,36 @@ % if ( $node->initplans ) { - % my $ip_node_id = $global_node_id++; + % for my $idx ( 0 .. $#{ $node->initplans } ) { + % my $initnode = $node->initplans->[$idx]; + % my $meta = $node->initplans_metainfo->[$idx] if $node->initplans_metainfo; + % my $ip_node_id = $global_node_id++; - - <%= $global_node_id =%>. -   -   -   -   -   - % if ( $buf_r ) { - - % } - % if ( $buf_w ) { - - % } - -
-

Initplan (for <%= $node->type %>)

-
- - + + <%= $global_node_id =%>. +   +   +   +   +   + % if ( $buf_r ) { + + % } + % if ( $buf_w ) { + + % } + +
+ % if ($meta) { +

InitPlan <%= $meta->{'name'} %> (for <%= $node->type %>) (returns <%= $meta->{'returns'} %>)

+ % } else { +

InitPlan (for <%= $node->type %>)

+ % } +
+ + - % for ( @{ $node->initplans } ) { - %== $block->( $_, $level + 1, $ip_node_id ); + %== $block->( $initnode, $level + 1, $ip_node_id ); % } % }