Skip to content

Instantly share code, notes, and snippets.

@grueni
Last active April 2, 2019 14:51
Show Gist options
  • Save grueni/e2d0d0acbb01dc23375f4fe5b3dbc8bd to your computer and use it in GitHub Desktop.
Save grueni/e2d0d0acbb01dc23375f4fe5b3dbc8bd to your computer and use it in GitHub Desktop.
test.cgi
#!/usr/bin/perl
use WebminCore;

init_config();

ui_print_header(undef, "Test", "", undef, 1, 1, 0, undef, undef, undef, undef );

print ui_hidden_start('Tasks 1', 'hidden_1',1 );
print ui_columns_start([ "Virtual Device", "State", "Read", "Write", "Cksum" ]);
for (my $i = 0; $i < 10; $i++)
{
print ui_columns_row(["<a href='config-vdev.cgi?pool=".$i.'&dev='.$key."'>|_".$i."", $i, $i, $i, $i]);
}
print ui_columns_end();
print ui_hidden_end('hidden_1');

print ui_hidden_start('Tasks 2', 'hidden_2',1 );
print ui_columns_start([ "Virtual Device", "State", "Read", "Write", "Cksum" ]);
for (my $i = 0; $i < 10; $i++)
{
print ui_columns_row(["<a href='config-vdev.cgi?pool=".$i.'&dev='.$key."'>|_".$i."", $i, $i, $i, $i]);
}
print ui_columns_end();
print ui_hidden_end('hidden_2');

Output of test.cgi

testcgi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment