Commit e053130b authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(frontend): network and node settings mojo9

issue #1547
parent f9f24228
......@@ -663,7 +663,7 @@ any '/machine/manage/(:id).(:type)' => sub {
return manage_machine($c);
};
any '/(:item)/settings/(:id)' => sub($c) {
any '/(:item)/settings/(:id).html' => sub($c) {
push @{$c->stash->{css}}, '/css/admin.css';
push @{$c->stash->{js}}, '/js/admin.js';
......
......@@ -70,6 +70,7 @@ sub test_nodes($vm_name) {
is($found->{hostname}, $new_hostname) or die Dumper(\@list_nodes);
test_exists_node( $id_node, $name2 );
test_settings_item( $id_node, 'node' );
$t->get_ok("/v1/node/remove/".$found->{id});
is($t->tx->res->code(),200) or die $t->tx->res->body;
......@@ -78,6 +79,11 @@ sub test_nodes($vm_name) {
}
sub test_settings_item($id, $item) {
$t->get_ok('/'.$item.'/settings/'.$id.'.html');
is($t->tx->res->code(),200) or die $t->tx->res->body;
}
sub test_exists_node($id_node, $name) {
$t->post_ok("/v1/exists/vms", json => {
id => $id_node
......@@ -165,6 +171,8 @@ sub test_networks($vm_name) {
test_exists_network($id_network, 'name', $new_name);
test_exists_network($id_network, 'address', $address);
test_settings_item( $id_network, 'network' );
$t->get_ok("/v1/network/remove/".$found->{id});
is($t->tx->res->code(),200) or die $t->tx->res->body;
......
......@@ -24,7 +24,7 @@
class="row"
>
<div class="col-md-2">
<a href="/network/settings/{{network.id}}">{{network.name}}</a>
<a href="/network/settings/{{network.id}}.html">{{network.name}}</a>
</div>
<div class="col-md-2">{{network.address}}</div>
<!--
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment