7 |
to reload the page or |
to reload the page or |
8 |
<a href="/index.html">here</a> |
<a href="/index.html">here</a> |
9 |
to move forward to a static page. |
to move forward to a static page. |
10 |
|
|
11 |
|
% my $hostname = $self->param('hostname'); |
12 |
|
|
13 |
|
<form method=get> |
14 |
|
<label for=hostname>hostname |
15 |
|
<input name=hostname type=text value="<%= $hostname %>"> |
16 |
|
</label> |
17 |
|
<input type=submit value=run> |
18 |
|
</form> |
19 |
|
|
20 |
|
<h1><%= $hostname %></h1> |
21 |
|
|
22 |
|
% foreach my $cmd ( @{ $self->stash('commands') } ) { |
23 |
|
% if ( $cmd =~ s{^(#+)\s*}{} ) { |
24 |
|
% my $l = length($1) + 1; |
25 |
|
%= "<h$l>$cmd</h$l>" |
26 |
|
% } else { |
27 |
|
% my $run = $hostname ? "ssh $hostname $cmd" : $cmd; |
28 |
|
<b><tt><%= $cmd %></tt></b><br> |
29 |
|
<pre><%= `$run` %></pre> |
30 |
|
% } |
31 |
|
% } |