progress indicators, bug fixes, after a while
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
{{ $page_title }}
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link href="{!! url('public/assets/vendors/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
@@ -16,6 +18,31 @@
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title_right">
|
||||
<div class="row">
|
||||
<form method="GET" action="{!! url('infrastructure') !!}">
|
||||
<div class="col-md-5 col-sm-5 col-xs-12 form-group">
|
||||
<div style="margin-top:1px; margin-right:-90px;" class="top_search">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search" style="margin-top: -2px;">
|
||||
<div class="input-group">
|
||||
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here...">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-primary" style="color: #fff;" type="button">Go!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-right">
|
||||
<!-- <a href="{!! url('clients') !!}" class="btn btn-warning btn-xs"><i class="fa fa-refresh"></i> Reset Filter</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -28,69 +55,13 @@
|
||||
<div class="x_title">
|
||||
<h2> Servers </h2>
|
||||
<div class="pull-right">
|
||||
<!-- <a class="btn btn-primary btn-sm" href="{!! url('clients/create') !!}"><i class="fa fa-plus-circle"></i> Add Client
|
||||
</a> -->
|
||||
<a class="btn btn-primary btn-sm" href="{!! url('infrastructure/create') !!}"><i class="fa fa-plus-square"></i> Add Server</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="x_content">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped ">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
{{-- <th>#</th> --}}
|
||||
<th class="column-title">Friendly Name</th>
|
||||
<th class="column-title">Public IP</th>
|
||||
<th class="column-title">Private IP</th>
|
||||
<th class="column-title">Main Use</th>
|
||||
<th class="column-title">Remarks</th>
|
||||
<th class="column-title">Root Password (encrypted)</th>
|
||||
<th class="column-title">Last Modified By</th>
|
||||
<th class="column-title no-link last"><span class="nobr">Action</span>
|
||||
</th>
|
||||
<th class="bulk-actions" colspan="7">
|
||||
<a class="antoo" style="color:#fff; font-weight:500;">Bulk Actions ( <span class="action-cnt"> </span> ) <i class="fa fa-chevron-down"></i></a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@if ($servers->isEmpty())
|
||||
<tr>
|
||||
<td class="" colspan="6">No Records found</td>
|
||||
</tr>
|
||||
@else
|
||||
@foreach ($servers as $row)
|
||||
<tr class="even pointer">
|
||||
<td class="mes-td">{{ $row->friendly_name }}</td>
|
||||
<td class="mes-td">{{ $row->public_ip_address }}</td>
|
||||
<td class="mes-td">{{ $row->private_ip_address }}</td>
|
||||
<td class="mes-td">{{ $row->main_use }}</td>
|
||||
<td class="mes-td">{{ $row->remarks }}</td>
|
||||
<td class="mes-td">
|
||||
<?php $credentials = $row->credentials_info->where('username', 'root')->first();
|
||||
if ($credentials) {
|
||||
if ($credentials->password) {
|
||||
echo substr($credentials->password, -200, 20);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
<td class="mes-td">{{ $row->modified_by_info->name }}</td>
|
||||
|
||||
<td class="last">
|
||||
<a href="{!! url('infrastructure/editserver-list', $row->id) !!}" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i></a>
|
||||
<input type="hidden" name="server_id" class="serverID" value="{{ $row->id }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="serverListTable"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,8 +71,102 @@
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script src="{!! url('public/assets/vendors/tabulator/js/tabulator.js') !!}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
function link(cell, formatterParams){
|
||||
var url = cell.getValue();
|
||||
var rowID = cell.getData().id
|
||||
return "<a href='"+ base_url + "/infrastructure/editserver-list/"+rowID+"' class='btn btn-link'>"+url+"</a>";
|
||||
}
|
||||
var table = new Tabulator("#serverListTable", {
|
||||
ajaxURL: "all",
|
||||
paginationSize: 15,
|
||||
layout: "fitColumns",
|
||||
rowFormatter:function(row){
|
||||
if(row.getData().connection_status == "active"){
|
||||
//row.getElement().style.backgroundColor = "#1e3b20";
|
||||
row.getElement().style.backgroundColor = "red";
|
||||
}
|
||||
},
|
||||
pagination: "remote",
|
||||
selectable: false,
|
||||
printAsHtml: true,
|
||||
ajaxLoaderLoading: $('#logo_spinner').html(),
|
||||
columns: [
|
||||
{
|
||||
title: "Friendly Name",
|
||||
field: "friendly_name",
|
||||
sorter: "string",
|
||||
formatter:link,
|
||||
},
|
||||
{
|
||||
title: "DS Number",
|
||||
field: "server_id",
|
||||
sorter: "string",
|
||||
},
|
||||
{
|
||||
title: "Public IP",
|
||||
field: "public_ip_address",
|
||||
sorter: "string",
|
||||
},
|
||||
{
|
||||
title: "Private IP",
|
||||
field: "private_ip_address",
|
||||
sorter: "string",
|
||||
},
|
||||
{
|
||||
title: "Main Use",
|
||||
field: "main_use",
|
||||
sorter: "string",
|
||||
},
|
||||
{
|
||||
title: "Last Modified By",
|
||||
field: "username",
|
||||
sorter: "string",
|
||||
},
|
||||
{
|
||||
title: "Remarks",
|
||||
field: "remarks",
|
||||
sorter: "string",
|
||||
},
|
||||
{
|
||||
title: "Status",
|
||||
field: "status",
|
||||
sorter: "string",
|
||||
formatter:function(cell, formatterParams){
|
||||
var value = cell.getValue();
|
||||
if(value == 'Active'){
|
||||
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
else if(value == 'Pending'){
|
||||
return "<span style='color:#f0ad4e; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
else if(value == 'Decommissioned'){
|
||||
return "<span style='color:#f0ad4e; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
else if(value == null || value == ''){
|
||||
return "<span style='color:#d9534f; font-weight:bold;'>Not Specified</span>";
|
||||
}
|
||||
else{
|
||||
return "<span style='color:#d9534f; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
}}
|
||||
],
|
||||
|
||||
rowClick:function(e, row){
|
||||
var userID = row.getData().id;
|
||||
console.log(userID);
|
||||
//$('#userEditModal').modal('show');
|
||||
},
|
||||
});
|
||||
|
||||
$('#keywordField').on('keyup', function(){
|
||||
console.log('up');
|
||||
var keyword = $(this).val();
|
||||
table.setData("all?keyword=" + keyword);
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user