mirror of
				https://github.com/cp6/my-idlers.git
				synced 2025-11-03 23:59:09 +00:00 
			
		
		
		
	Updated server show page
Updated server show page for a click reveal YABS command to automatically POST the result. e.g curl -sL yabs.sh | bash -s -- -s "http://domain.com/api/yabs/tnSJLyhz/THEUSERAPIKEYISHERE"
This commit is contained in:
		
							parent
							
								
									13a37242d2
								
							
						
					
					
						commit
						a8a87a2e0f
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
					@ -1,6 +1,14 @@
 | 
				
			||||||
@section('title')
 | 
					@section('title')
 | 
				
			||||||
    {{$server_data->hostname}} {{'server'}}
 | 
					    {{$server_data->hostname}} {{'server'}}
 | 
				
			||||||
@endsection
 | 
					@endsection
 | 
				
			||||||
 | 
					@section('scripts')
 | 
				
			||||||
 | 
					    <script>
 | 
				
			||||||
 | 
					        function showYabsCode() {
 | 
				
			||||||
 | 
					            const el = document.querySelector('#yabs_code');
 | 
				
			||||||
 | 
					            el.classList.remove("d-none");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    </script>
 | 
				
			||||||
 | 
					@endsection
 | 
				
			||||||
<x-app-layout>
 | 
					<x-app-layout>
 | 
				
			||||||
    <x-slot name="header">
 | 
					    <x-slot name="header">
 | 
				
			||||||
        {{ __('Server details') }}
 | 
					        {{ __('Server details') }}
 | 
				
			||||||
| 
						 | 
					@ -135,6 +143,9 @@
 | 
				
			||||||
                    <x-edit-btn>
 | 
					                    <x-edit-btn>
 | 
				
			||||||
                        <x-slot name="route">{{ route('servers.edit', $server_data->id) }}</x-slot>
 | 
					                        <x-slot name="route">{{ route('servers.edit', $server_data->id) }}</x-slot>
 | 
				
			||||||
                    </x-edit-btn>
 | 
					                    </x-edit-btn>
 | 
				
			||||||
 | 
					                    <a href="#" class="btn btn-light btn-sm mx-1" onclick="showYabsCode()">
 | 
				
			||||||
 | 
					                        Show code to add a YABS
 | 
				
			||||||
 | 
					                    </a>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="col-12 col-lg-6">
 | 
					                <div class="col-12 col-lg-6">
 | 
				
			||||||
                    @if($server_data->has_yabs)
 | 
					                    @if($server_data->has_yabs)
 | 
				
			||||||
| 
						 | 
					@ -199,6 +210,7 @@
 | 
				
			||||||
                            see Geekbench, disk and network speeds</p>
 | 
					                            see Geekbench, disk and network speeds</p>
 | 
				
			||||||
                    @endif
 | 
					                    @endif
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
 | 
					                <p id="yabs_code" class="d-none pt-3"><code>curl -sL yabs.sh | bash -s -- -s "{{route('api.store-yabs', [$server_data->id, \Illuminate\Support\Facades\Auth::user()->api_token])}}"</code></p>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </x-card>
 | 
					        </x-card>
 | 
				
			||||||
        @if(Session::has('timer_version_footer') && Session::get('timer_version_footer') === 1)
 | 
					        @if(Session::has('timer_version_footer') && Session::get('timer_version_footer') === 1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue