simple and ugly viewer for store data
[pxelator] / lib / PXElator / html.pm
index a1fd6f6..905915b 100644 (file)
@@ -51,7 +51,6 @@ sub select {
                , qq|<select type=select name=$name>|
                , join("\n", map { my $selected = $_ eq $selected_option ? 'selected' : ''; qq|<option name=$_ $selected>$_</option>| } @_ )
                , qq|</select>|
-               , qq|</form>|
        );
 }
 
@@ -71,7 +70,7 @@ sub conf {
        my ($ip,$conf,$format) = @_;
        my @editable = splice(@_,3);
 
-       warn "# conf ",dump( $ip, $conf, $format, [ @editable ] );
+#      warn "# conf ",dump( $ip, $conf, $format, [ @editable ] );
 
        $format ||= 'inline';
 
@@ -85,7 +84,8 @@ sub conf {
                } else {
                        if ( $name eq 'amt' ) {
                                my $amt_ip = amt::ip($ip,$html);
-                               $html = qq|<a title="$html" href=http://$amt_ip:16992/logon.htm target=$amt_ip>$amt_ip</a>|;
+                               # $html contains password!
+                               $html = qq|<a href=http://$amt_ip:16992/logon.htm target=$amt_ip>$amt_ip</a>|;
 
                                if ( $format ne 'inline' ) {
                                        my $power = amt::power_on($ip);
@@ -99,6 +99,8 @@ sub conf {
                        } elsif ( $name eq 'ssh' ) {
                                $html =~ s{\s(\S{16}).+(\S{16})\s}{ $1..$2 };
                                chomp($html);
+                       } elsif ( $name eq 'kvm' ) {
+                               $html = qq|<a href="/start_stop/kvm?nr=$html">$html</a>|;
                        }
                        $html = qq|<tt>$html</tt>|
                        unless