progress indicators, bug fixes, after a while

This commit is contained in:
Kwesi Banson
2023-12-13 12:13:47 +00:00
parent ea6d83e5d9
commit bc97f69748
1283 changed files with 1010757 additions and 7379 deletions

View File

@@ -0,0 +1,100 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('infrastructure/server-list') !!}">Server List</a></li>
<li class="active">Add Server</li>
</ol>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
@include('commons.notifications')
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
Add Server
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::open(['url' => 'infrastructure/storeserver', 'class' => 'form-horizontal form-label-left']) !!}
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="serverNumber">DS Number *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('server_number') ? 'has-error' : ''}}">
{!! Form::text('server_number', old('server_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter DS number' , 'id' => 'serverNumber']) !!}
{!! $errors->first('server_number', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="friendlyName">Friendly Name *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('friendly_name') ? 'has-error' : ''}}">
{!! Form::text('friendly_name', old('friendly_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter partner name' , 'id' => 'friendlyName']) !!}
{!! $errors->first('friendly_name', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="publicIpAddress">Public IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('public_ip_address') ? 'has-error' : ''}}">
{!! Form::text('public_ip_address', old('public_ip_address'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Public IP Address' , 'id' => 'publicIpAddress']) !!}
{!! $errors->first('public_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="privateIpAddress">Private IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('private_ip_address') ? 'has-error' : ''}}">
{!! Form::text('private_ip_address', old('private_ip_address'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter private ip address' , 'id' => 'privateIpAddress']) !!}
{!! $errors->first('private_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainUse">Main Use</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::text('main_use', old('main_use'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter main use' , 'id' => 'mainUse']) !!}
{!! $errors->first('main_use', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="remarks">Remarks </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remarks') ? 'has-error' : ''}}">
{!! Form::text('remarks', old('remarks'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter remarks' , 'id' => 'remarks']) !!}
{!! $errors->first('remarks', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Update</button>
</div>
</div>
{!! Form::close() !!}
</div>
{{-- end of x_content --}}
</div>
{{-- end of x_panel --}}
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(function(){
$('select').select2();
});
</script>
@endsection

View File

@@ -0,0 +1,101 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('infrastructure/server-list') !!}">Server List</a></li>
<li class="active">Updating Server</li>
</ol>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
@include('commons.notifications')
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
Updating Server Details {{ $server->friendly_name }} | {{ $server->public_ip_address}} ({{ $server->private_ip_address}} )
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::open(['url' => 'infrastructure/updateserver', 'class' => 'form-horizontal form-label-left']) !!}
<input type="hidden" name="server_id" value="{{ $server->id }}">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="friendlyName">Friendly Name *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('friendly_name') ? 'has-error' : ''}}">
{!! Form::text('friendly_name', $server->friendly_name, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter partner name' , 'id' => 'friendlyName']) !!}
{!! $errors->first('friendly_name', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="publicIpAddress">Public IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('public_ip_address') ? 'has-error' : ''}}">
{!! Form::text('public_ip_address', $server->public_ip_address, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Public IP Address' , 'id' => 'publicIpAddress']) !!}
{!! $errors->first('public_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="privateIpAddress">Private IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('private_ip_address') ? 'has-error' : ''}}">
{!! Form::text('private_ip_address', $server->private_ip_address, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter private ip address' , 'id' => 'privateIpAddress']) !!}
{!! $errors->first('private_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainUse">Main Use</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::text('main_use', $server->main_use, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter port number' , 'id' => 'mainUse']) !!}
{!! $errors->first('main_use', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="remarks">Remarks </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remarks') ? 'has-error' : ''}}">
{!! Form::text('remarks', $server->remarks, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter remarks' , 'id' => 'remarks']) !!}
{!! $errors->first('remarks', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type">Root Password</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('password') ? 'has-error' : ''}}">
<?php $password = ($credentials !== null) ? decrypt($credentials->password) : null; ?>
{!! Form::text('password', $password, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter password ' , 'id' => 'password']) !!}
{!! $errors->first('password', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Update</button>
</div>
</div>
{!! Form::close() !!}
</div>
{{-- end of x_content --}}
</div>
{{-- end of x_panel --}}
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(function(){
$('select').select2();
});
</script>
@endsection

View File

@@ -10,7 +10,8 @@
<div class="title_left" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li class="active">Updating Direct Connection</li>
<li><a href="{!! url('infrastructure/server-list') !!}">Server List</a></li>
<li class="active">Update Server</li>
</ol>
</div>
</div>
@@ -20,7 +21,7 @@
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
Updating Server Details {{ $server->friendly_name }} | {{ $server->public_ip_address}} ({{ $server->private_ip_address}} )
Updating Server Details for <b><em>{{ $server->friendly_name }} | {{ $server->public_ip_address}} ({{ $server->private_ip_address}} )</em></b>
<div class="clearfix"></div>
</div>
{{-- start of content --}}
@@ -28,6 +29,13 @@
<br>
{!! Form::open(['url' => 'infrastructure/updateserver', 'class' => 'form-horizontal form-label-left']) !!}
<input type="hidden" name="server_id" value="{{ $server->id }}">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="serverNumber">DS Number *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('server_number') ? 'has-error' : ''}}">
{!! Form::text('server_number', $server->server_id, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter DS number' , 'id' => 'serverNumber']) !!}
{!! $errors->first('server_number', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="friendlyName">Friendly Name *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('friendly_name') ? 'has-error' : ''}}">
@@ -52,7 +60,7 @@
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainUse">Main Use</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::text('main_use', $server->main_use, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter port number' , 'id' => 'mainUse']) !!}
{!! Form::text('main_use', $server->main_use, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter main user' , 'id' => 'mainUse']) !!}
{!! $errors->first('main_use', '<p class="help-block">:message</p>') !!}
</div>
</div>
@@ -64,11 +72,10 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type">Root Password</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('password') ? 'has-error' : ''}}">
<?php $password = ($credentials !== null) ? decrypt($credentials->password) : null; ?>
{!! Form::text('password', $password, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter password ' , 'id' => 'password']) !!}
{!! $errors->first('password', '<p class="help-block">:message</p>') !!}
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="serverStatus">Status</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('status') ? 'has-error' : ''}}">
{!! Form::select('status', $status_arr ,old('status'), ['class' => 'form-control col-md-7 col-xs-12', 'id' => 'serverStatus']) !!}
{!! $errors->first('status', '<p class="help-block">:message</p>') !!}
</div>
</div>

View File

@@ -0,0 +1,109 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left">
<div class="title_left">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li class="active">Server List</li>
</ol>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
@include('commons.notifications')
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<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> -->
</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>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(document).ready(function(){
});
</script>
@endsection

View File

@@ -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>