2017-09-26 02:43:01 +00:00
{{ -- Pterodactyl - Panel -- }}
2017-03-03 22:30:39 +00:00
{{ -- Copyright ( c ) 2015 - 2017 Dane Everitt < dane @ daneeveritt . com > -- }}
2017-09-26 02:43:01 +00:00
{{ -- This software is licensed under the terms of the MIT license . -- }}
{{ -- https :// opensource . org / licenses / MIT -- }}
2017-03-03 22:30:39 +00:00
@ extends ( 'layouts.admin' )
@ section ( 'title' )
{{ $node -> name }} : Configuration
@ endsection
@ section ( 'content-header' )
< h1 > {{ $node -> name }} < small > Your daemon configuration file .</ small ></ h1 >
< ol class = " breadcrumb " >
< li >< a href = " { { route('admin.index') }} " > Admin </ a ></ li >
< li >< a href = " { { route('admin.nodes') }} " > Nodes </ a ></ li >
< li >< a href = " { { route('admin.nodes.view', $node->id ) }} " > {{ $node -> name }} </ a ></ li >
< li class = " active " > Configuration </ li >
</ ol >
@ endsection
@ section ( 'content' )
< div class = " row " >
< div class = " col-xs-12 " >
< div class = " nav-tabs-custom nav-tabs-floating " >
< ul class = " nav nav-tabs " >
< li >< a href = " { { route('admin.nodes.view', $node->id ) }} " > About </ a ></ li >
< li >< a href = " { { route('admin.nodes.view.settings', $node->id ) }} " > Settings </ a ></ li >
< li class = " active " >< a href = " { { route('admin.nodes.view.configuration', $node->id ) }} " > Configuration </ a ></ li >
< li >< a href = " { { route('admin.nodes.view.allocation', $node->id ) }} " > Allocation </ a ></ li >
< li >< a href = " { { route('admin.nodes.view.servers', $node->id ) }} " > Servers </ a ></ li >
</ ul >
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col-sm-8 " >
< div class = " box box-primary " >
< div class = " box-header with-border " >
< h3 class = " box-title " > Configuration File </ h3 >
</ div >
< div class = " box-body " >
2019-12-08 19:29:46 +00:00
< pre class = " no-margin " > {{ $node -> getYamlConfiguration () }} </ pre >
2017-03-03 22:30:39 +00:00
</ div >
< div class = " box-footer " >
2019-12-08 19:29:46 +00:00
< p class = " no-margin " > This file should be placed in your daemon ' s root directory ( usually < code >/ srv / wings </ code > ) in a file called < code > config . yml </ code >.</ p >
2017-03-03 22:30:39 +00:00
</ div >
</ div >
</ div >
< div class = " col-sm-4 " >
< div class = " box box-success " >
< div class = " box-header with-border " >
< h3 class = " box-title " > Auto - Deploy </ h3 >
</ div >
< div class = " box-body " >
< p class = " text-muted small " > To simplify the configuration of nodes it is possible to fetch the config from the panel . A token is required for this process . The button below will generate a token and provide you with the commands necessary for automatic configuration of the node . < em > Tokens are only valid for 5 minutes .</ em ></ p >
</ div >
< div class = " box-footer " >
< button type = " button " id = " configTokenBtn " class = " btn btn-sm btn-default " style = " width:100%; " > Generate Token </ button >
</ div >
</ div >
</ div >
</ div >
@ endsection
@ section ( 'footer-scripts' )
@ parent
< script >
$ ( '#configTokenBtn' ) . on ( 'click' , function ( event ) {
2017-03-04 04:14:23 +00:00
$ . getJSON ( '{{ route(' admin . nodes . view . configuration . token ', $node->id) }}' ) . done ( function ( data ) {
2017-03-03 22:30:39 +00:00
swal ({
type : 'success' ,
title : 'Token created.' ,
text : 'Your token will expire <strong>in 5 minutes.</strong><br /><br />' +
'<p>To auto-configure your node run the following command:<br /><small><pre>npm run configure -- --panel-url {{ config(' app . url ') }} --token ' + data . token + '</pre></small></p>' ,
html : true
})
}) . fail ( function () {
swal ({
title : 'Error' ,
text : 'Something went wrong creating your token.' ,
type : 'error'
});
});
});
</ script >
@ endsection