|
| 1 | +{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}} |
| 2 | + |
| 3 | +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} |
| 4 | +{{-- of this software and associated documentation files (the "Software"), to deal --}} |
| 5 | +{{-- in the Software without restriction, including without limitation the rights --}} |
| 6 | +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} |
| 7 | +{{-- copies of the Software, and to permit persons to whom the Software is --}} |
| 8 | +{{-- furnished to do so, subject to the following conditions: --}} |
| 9 | + |
| 10 | +{{-- The above copyright notice and this permission notice shall be included in all --}} |
| 11 | +{{-- copies or substantial portions of the Software. --}} |
| 12 | + |
| 13 | +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} |
| 14 | +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} |
| 15 | +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} |
| 16 | +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} |
| 17 | +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} |
| 18 | +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} |
| 19 | +{{-- SOFTWARE. --}} |
| 20 | +@extends('layouts.admin') |
| 21 | + |
| 22 | +@section('title') |
| 23 | + Server List |
| 24 | +@endsection |
| 25 | + |
| 26 | +@section('content') |
| 27 | +<div class="col-md-12"> |
| 28 | + <ul class="breadcrumb"> |
| 29 | + <li><a href="/admin">Admin Control</a></li> |
| 30 | + <li class="active">Databases</li> |
| 31 | + </ul> |
| 32 | + <h3>Manage Databases</h3><hr /> |
| 33 | + <ul class="nav nav-tabs tabs_with_panel" id="config_tabs"> |
| 34 | + <li class="active"><a href="#tab_databases" data-toggle="tab">Databases</a></li> |
| 35 | + <li><a href="#tb_dbservers" data-toggle="tab">Database Servers</a></li> |
| 36 | + </ul> |
| 37 | + <div class="tab-content"> |
| 38 | + <div class="tab-pane active" id="tab_databases"> |
| 39 | + <div class="panel panel-default"> |
| 40 | + <div class="panel-heading"></div> |
| 41 | + <div class="panel-body"> |
| 42 | + <table class="table table-bordered table-hover" style="margin-bottom:0;"> |
| 43 | + <thead> |
| 44 | + <tr> |
| 45 | + <th>Server</th> |
| 46 | + <th>Database</th> |
| 47 | + <th>Username</th> |
| 48 | + <th>Connection</th> |
| 49 | + <th></th> |
| 50 | + </tr> |
| 51 | + </thead> |
| 52 | + <tbody> |
| 53 | + @foreach($databases as $db) |
| 54 | + <tr> |
| 55 | + <td>{{ $db->a_serverName }}</td> |
| 56 | + <td>{{ $db->database }}</td> |
| 57 | + <td>{{ $db->username }} ({{ $db->remote }})</td> |
| 58 | + <td><code>{{ $db->a_host }}:{{ $db->a_port }}</code></td> |
| 59 | + <td class="text-center"><a href="/admin/servers/view/{{ $db->a_serverId }}?tab=tab_database"><i class="fa fa-search"></i></a></td> |
| 60 | + </tr> |
| 61 | + @endforeach |
| 62 | + </tbody> |
| 63 | + </table> |
| 64 | + <div class="col-md-12 text-center"> |
| 65 | + {{ $databases->render() }} |
| 66 | + </div> |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + <div class="tab-pane" id="tb_dbservers"> |
| 71 | + <div class="panel panel-default"> |
| 72 | + <div class="panel-heading"></div> |
| 73 | + <div class="panel-body"> |
| 74 | + <table class="table table-bordered table-hover" style="margin-bottom:0;"> |
| 75 | + <thead> |
| 76 | + <tr> |
| 77 | + <th>Name</th> |
| 78 | + <th>Connection</th> |
| 79 | + <th>Username</th> |
| 80 | + <th class="text-center">Databases</th> |
| 81 | + <th>Linked Node</th> |
| 82 | + <th></th> |
| 83 | + </tr> |
| 84 | + </thead> |
| 85 | + <tbody> |
| 86 | + @foreach($dbh as $db) |
| 87 | + <tr> |
| 88 | + <td><a href="#">{{ $db->name }}</a></td> |
| 89 | + <td><code>{{ $db->host }}:{{ $db->port }}</code></td> |
| 90 | + <td>{{ $db->username }}</td> |
| 91 | + <td class="text-center">{{ $db->c_databases }}</td> |
| 92 | + <td>@if(is_null($db->a_linkedNode))<em>unlinked</em>@else{{ $db->a_linkedNode }}@endif</td> |
| 93 | + <td class="text-center"><a href="#" class="text-danger"><i class="fa fa-trash-o"></i></a></td> |
| 94 | + </tr> |
| 95 | + @endforeach |
| 96 | + </tbody> |
| 97 | + </table> |
| 98 | + <div class="col-md-12 text-center"> |
| 99 | + {{ $dbh->render() }} |
| 100 | + </div> |
| 101 | + </div> |
| 102 | + </div> |
| 103 | + </div> |
| 104 | + </div> |
| 105 | +</div> |
| 106 | +<script> |
| 107 | +$(document).ready(function () { |
| 108 | + $('#sidebar_links').find("a[href='/admin/databases']").addClass('active'); |
| 109 | +}); |
| 110 | +</script> |
| 111 | +@endsection |
0 commit comments