diff --git a/Web/lib/MeshMage/Web/Controller/Network.pm b/Web/lib/MeshMage/Web/Controller/Network.pm index e806001..a7d6609 100644 --- a/Web/lib/MeshMage/Web/Controller/Network.pm +++ b/Web/lib/MeshMage/Web/Controller/Network.pm @@ -13,7 +13,7 @@ sub create ($c) { $c->param('network_name'), $c->param('network_tld'), $c->param('network_cidr') ]); - $c->redirect_to( '/network' ); + $c->redirect_to( $c->url_for( 'dashboard' )->query( notice => 'network-created' ) ); } 1; diff --git a/Web/lib/MeshMage/Web/Controller/Node.pm b/Web/lib/MeshMage/Web/Controller/Node.pm index 36e4446..46907bc 100644 --- a/Web/lib/MeshMage/Web/Controller/Node.pm +++ b/Web/lib/MeshMage/Web/Controller/Node.pm @@ -14,17 +14,7 @@ sub create ($c) { $c->param('network_id'), $c->param('is_lighthouse'), $c->param('hostname'), $c->param('address'), $c->param('public_address') ]); - $c->redirect_to( '/node' ); -} - -sub show ($c) { - my $node = $c->db->resultset('Node')->find( $c->param('node_id') ); - my $jobs = $c->minion->jobs( { notes => [ $node->hostname ] } ); - - $c->stash( - node => $node, - jobs => $jobs, - ); + $c->redirect_to( $c->url_for( 'dashboard' )->query( notice => 'node-created' ) ); } 1; diff --git a/Web/templates/dashboard/index.html.tx b/Web/templates/dashboard/index.html.tx index 0ed0b02..5b8387c 100644 --- a/Web/templates/dashboard/index.html.tx +++ b/Web/templates/dashboard/index.html.tx @@ -11,6 +11,12 @@ %% } %% if ( $notice == 'ssh-import' ) { Your ssh key is being imported, it should display below when complete. +%% } +%% if ( $notice == 'node-created' ) { + Your node has been created, it should display below when its certs are generated. +%% } +%% if ( $notice == 'network-created' ) { + Your network has been created, it should display below when its certs are generated. %% } %% }