Beta version
This commit is too large to list all changes.
This commit is contained in:
30
resources/js/app.js
vendored
30
resources/js/app.js
vendored
@@ -7,10 +7,6 @@
|
||||
require('chart.js');
|
||||
require('./bootstrap');
|
||||
|
||||
import { Calendar } from '@fullcalendar/core';
|
||||
import dayGridPlugin from '@fullcalendar/daygrid';
|
||||
import timeGridPlugin from '@fullcalendar/timegrid';
|
||||
import listPlugin from '@fullcalendar/list';
|
||||
import flatpickr from "flatpickr";
|
||||
|
||||
|
||||
@@ -21,6 +17,32 @@ flatpickr("#appointmentDateTime", {
|
||||
static: false
|
||||
});
|
||||
|
||||
$("#banAccountTrigger").on("click", function(event){
|
||||
|
||||
$("#banAccountModal").modal('show');
|
||||
|
||||
});
|
||||
|
||||
$("#durationDropdown").dropdown();
|
||||
|
||||
$(".dropdown-menu a").on("click", function(e){
|
||||
|
||||
$(".duration-btn").text(this.innerHTML);
|
||||
$("#operator").val(this.innerHTML);
|
||||
|
||||
});
|
||||
|
||||
$("#banAccountButton").on("click", function(){
|
||||
$("#banAccountForm").submit();
|
||||
});
|
||||
|
||||
$("#comment").keyup(function(){
|
||||
$("#charcount").text($("#comment").val().length);
|
||||
});
|
||||
|
||||
$("#submitComment").on('click', function(){
|
||||
$("#newComment").submit();
|
||||
});
|
||||
|
||||
window.Vue = require('vue');
|
||||
|
||||
|
13
resources/lang/vendor/log-viewer/ar.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/ar.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "تاريخ",
|
||||
"The list of logs is empty!": "قائمة سجلات فارغة!",
|
||||
"All": "الجميع",
|
||||
"Emergency": "حالات الطوارئ",
|
||||
"Alert": "إنذار",
|
||||
"Critical": "حرج",
|
||||
"Error": "خطأ",
|
||||
"Warning": "تحذير",
|
||||
"Notice": "ملاحظة",
|
||||
"Info": "المعلومات",
|
||||
"Debug": "التصحيح"
|
||||
}
|
13
resources/lang/vendor/log-viewer/bg.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/bg.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Дата",
|
||||
"The list of logs is empty!": "Не са намерени логове!",
|
||||
"All": "Всички",
|
||||
"Emergency": "Emergency",
|
||||
"Alert": "Alert",
|
||||
"Critical": "Critical",
|
||||
"Error": "Error",
|
||||
"Warning": "Warning",
|
||||
"Notice": "Notice",
|
||||
"Info": "Info",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/de.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/de.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Datum",
|
||||
"The list of logs is empty!": "KeineLogDateiengefunden!",
|
||||
"All": "Alle",
|
||||
"Emergency": "Notfall",
|
||||
"Alert": "Alarm",
|
||||
"Critical": "Kritisch",
|
||||
"Error": "Fehler",
|
||||
"Warning": "Warnung",
|
||||
"Notice": "Hinweis",
|
||||
"Info": "Info",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/es.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/es.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Fecha",
|
||||
"The list of logs is empty!": "La lista del log está vacía!",
|
||||
"All": "Todos",
|
||||
"Emergency": "Emergencia",
|
||||
"Alert": "Alerta",
|
||||
"Critical": "Criticos",
|
||||
"Error": "Errores",
|
||||
"Warning": "Advertencia",
|
||||
"Notice": "Aviso",
|
||||
"Info": "Info",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/et.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/et.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Kuupäev",
|
||||
"The list of logs is empty!": "Logide nimekiri on tühi!",
|
||||
"All": "Kõik",
|
||||
"Emergency": "Erakorraline",
|
||||
"Alert": "Häire",
|
||||
"Critical": "Kriitiline",
|
||||
"Error": "Viga",
|
||||
"Warning": "Hoiatus",
|
||||
"Notice": "Teade",
|
||||
"Info": "Info",
|
||||
"Debug": "Silumine"
|
||||
}
|
13
resources/lang/vendor/log-viewer/fa.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/fa.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "تاریخ",
|
||||
"The list of logs is empty!": "چیزی برای نمایش وجود ندارد!",
|
||||
"All": "همه",
|
||||
"Emergency": "اورژانسی",
|
||||
"Alert": "اخطار",
|
||||
"Critical": "بحرانی",
|
||||
"Error": "خطا",
|
||||
"Warning": "هشدار",
|
||||
"Notice": "اعلان",
|
||||
"Info": "اطلاعات",
|
||||
"Debug": "دیباگ"
|
||||
}
|
13
resources/lang/vendor/log-viewer/fr.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/fr.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Date",
|
||||
"The list of logs is empty!": "La liste des logs est vide!",
|
||||
"All": "Tous",
|
||||
"Emergency": "Urgence",
|
||||
"Alert": "Alerte",
|
||||
"Critical": "Critique",
|
||||
"Error": "Erreur",
|
||||
"Warning": "Avertissement",
|
||||
"Notice": "Notice",
|
||||
"Info": "Info",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/hu.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/hu.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Dátum",
|
||||
"The list of logs is empty!": "A naplók listája üres!",
|
||||
"All": "Összes",
|
||||
"Emergency": "Vészhelyzet",
|
||||
"Alert": "Riasztás",
|
||||
"Critical": "Kritikus",
|
||||
"Error": "Hiba",
|
||||
"Warning": "Figyelmeztetés",
|
||||
"Notice": "Értesítés",
|
||||
"Info": "Információ",
|
||||
"Debug": "Hibakeresés"
|
||||
}
|
13
resources/lang/vendor/log-viewer/hy.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/hy.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Ամսաթիվ",
|
||||
"The list of logs is empty!": "Լոգերի ցուցակը դատարկ է։",
|
||||
"All": "Բոլորը",
|
||||
"Emergency": "Վթարային",
|
||||
"Alert": "Նախազգուշացում",
|
||||
"Critical": "Կրիտիկական",
|
||||
"Error": "Սխալ",
|
||||
"Warning": "Նախազգուշացում",
|
||||
"Notice": "Ծանուցում",
|
||||
"Info": "Տեղեկատվություն",
|
||||
"Debug": "Կարգաբերում"
|
||||
}
|
13
resources/lang/vendor/log-viewer/id.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/id.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Tanggal",
|
||||
"The list of logs is empty!": "Daftar Log Kosong",
|
||||
"All": "Semua",
|
||||
"Emergency": "Darurat",
|
||||
"Alert": "Waspada",
|
||||
"Critical": "Kritis",
|
||||
"Error": "Kesalahan",
|
||||
"Warning": "Peringatan",
|
||||
"Notice": "Pemberitahuan",
|
||||
"Info": "Info",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/it.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/it.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Data",
|
||||
"The list of logs is empty!": "L'elenco dei log è vuoto!",
|
||||
"All": "Tutti",
|
||||
"Emergency": "Emergenza",
|
||||
"Alert": "Allarme",
|
||||
"Critical": "Critico",
|
||||
"Error": "Errore",
|
||||
"Warning": "Avviso",
|
||||
"Notice": "Notifica",
|
||||
"Info": "Info",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/ja.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/ja.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "日付",
|
||||
"The list of logs is empty!": "ログリストが空です!",
|
||||
"All": "すべて",
|
||||
"Emergency": "緊急",
|
||||
"Alert": "警戒",
|
||||
"Critical": "致命的",
|
||||
"Error": "エラー",
|
||||
"Warning": "警告",
|
||||
"Notice": "通知",
|
||||
"Info": "情報",
|
||||
"Debug": "デバッグ"
|
||||
}
|
13
resources/lang/vendor/log-viewer/ko.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/ko.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "날짜",
|
||||
"The list of logs is empty!": "로그가 없습니다.",
|
||||
"All": "전체",
|
||||
"Emergency": "긴급",
|
||||
"Alert": "경고",
|
||||
"Critical": "심각",
|
||||
"Error": "오류",
|
||||
"Warning": "주의",
|
||||
"Notice": "알림",
|
||||
"Info": "정보",
|
||||
"Debug": "디버그"
|
||||
}
|
13
resources/lang/vendor/log-viewer/ms.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/ms.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Tarikh",
|
||||
"The list of logs is empty!": "Senarai log kosong!",
|
||||
"All": "Semua",
|
||||
"Emergency": "Kecemasan",
|
||||
"Alert": "Waspada",
|
||||
"Critical": "Kritikal",
|
||||
"Error": "Ralat",
|
||||
"Warning": "Amaran",
|
||||
"Notice": "Notis",
|
||||
"Info": "Info",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/nl.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/nl.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Datum",
|
||||
"The list of logs is empty!": "De lijst met logs is leeg!",
|
||||
"All": "Alle",
|
||||
"Emergency": "Noodgeval",
|
||||
"Alert": "Alarm",
|
||||
"Critical": "Cruciaal",
|
||||
"Error": "Error",
|
||||
"Warning": "Waarschuwing",
|
||||
"Notice": "Opmerking",
|
||||
"Info": "Informatie",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/pl.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/pl.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Data",
|
||||
"The list of logs is empty!": "Lista logów jest pusta!",
|
||||
"All": "Wszystkie",
|
||||
"Emergency": "Awaryjne",
|
||||
"Alert": "Alerty",
|
||||
"Critical": "Krytyczne",
|
||||
"Error": "Błędy",
|
||||
"Warning": "Ostrzeżenia",
|
||||
"Notice": "Warte uwagi",
|
||||
"Info": "Informacje",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/pt-BR.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/pt-BR.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Data",
|
||||
"The list of logs is empty!": "A lista de logs está vazia!",
|
||||
"All": "Todos",
|
||||
"Emergency": "Emergência",
|
||||
"Alert": "Alerta",
|
||||
"Critical": "Crítico",
|
||||
"Error": "Erro",
|
||||
"Warning": "Aviso",
|
||||
"Notice": "Notícia",
|
||||
"Info": "Informação",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/ro.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/ro.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Dată",
|
||||
"The list of logs is empty!": "Nu există niciun log!",
|
||||
"All": "Toate",
|
||||
"Emergency": "Urgență",
|
||||
"Alert": "Alertă",
|
||||
"Critical": "Critic",
|
||||
"Error": "Eroare",
|
||||
"Warning": "Pericol",
|
||||
"Notice": "Avertisment",
|
||||
"Info": "Informare",
|
||||
"Debug": "Depanare"
|
||||
}
|
13
resources/lang/vendor/log-viewer/ru.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/ru.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Дата",
|
||||
"The list of logs is empty!": "Список журналов пуст!",
|
||||
"All": "Все",
|
||||
"Emergency": "Аварийная",
|
||||
"Alert": "Предупреждение",
|
||||
"Critical": "Критический",
|
||||
"Error": "Ошибка",
|
||||
"Warning": "Предупреждение",
|
||||
"Notice": "Уведомление",
|
||||
"Info": "Информация",
|
||||
"Debug": "Отладка"
|
||||
}
|
13
resources/lang/vendor/log-viewer/sv.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/sv.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Datum",
|
||||
"The list of logs is empty!": "Det finns inga loggar att visa.",
|
||||
"All": "Alla",
|
||||
"Emergency": "Akut",
|
||||
"Alert": "Alarmerande",
|
||||
"Critical": "Kritisk",
|
||||
"Error": "Error",
|
||||
"Warning": "Varning",
|
||||
"Notice": "Notis",
|
||||
"Info": "Information",
|
||||
"Debug": "Debug"
|
||||
}
|
13
resources/lang/vendor/log-viewer/th.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/th.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "วันที่",
|
||||
"The list of logs is empty!": "ไม่มีรายการล็อก!",
|
||||
"All": "ทั้งหมด",
|
||||
"Emergency": "ฉุกเฉิน",
|
||||
"Alert": "วิกฤติ",
|
||||
"Critical": "ร้ายแรง",
|
||||
"Error": "ข้อผิดพลาด",
|
||||
"Warning": "คำเตือน",
|
||||
"Notice": "ประกาศ",
|
||||
"Info": "ข้อมูล",
|
||||
"Debug": "ดีบัก"
|
||||
}
|
13
resources/lang/vendor/log-viewer/tr.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/tr.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Tarih",
|
||||
"The list of logs is empty!": "Günlük listesi boş!",
|
||||
"All": "Tümü",
|
||||
"Emergency": "Acil",
|
||||
"Alert": "Alarm",
|
||||
"Critical": "Kritik",
|
||||
"Error": "Hata",
|
||||
"Warning": "Uyarı",
|
||||
"Notice": "Bildirim",
|
||||
"Info": "Bilgi",
|
||||
"Debug": "Hata ayıklama"
|
||||
}
|
13
resources/lang/vendor/log-viewer/uk.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/uk.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "Дата",
|
||||
"The list of logs is empty!": "Список журналів порожній!",
|
||||
"All": "Всі",
|
||||
"Emergency": "Аварійна",
|
||||
"Alert": "Попередження",
|
||||
"Critical": "Критична",
|
||||
"Error": "Помилка",
|
||||
"Warning": "Попереждення",
|
||||
"Notice": "Сповіщення",
|
||||
"Info": "Інформація",
|
||||
"Debug": "Відладка"
|
||||
}
|
13
resources/lang/vendor/log-viewer/zh-TW.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/zh-TW.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "日期",
|
||||
"The list of logs is empty!": "列表中沒有任何紀錄!",
|
||||
"All": "全部",
|
||||
"Emergency": "緊急",
|
||||
"Alert": "警報",
|
||||
"Critical": "嚴重",
|
||||
"Error": "錯誤",
|
||||
"Warning": "警告",
|
||||
"Notice": "注意",
|
||||
"Info": "訊息",
|
||||
"Debug": "除錯"
|
||||
}
|
13
resources/lang/vendor/log-viewer/zh.json
vendored
Normal file
13
resources/lang/vendor/log-viewer/zh.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Date": "日期",
|
||||
"The list of logs is empty!": "日志列表为空!",
|
||||
"All": "全部",
|
||||
"Emergency": "危急",
|
||||
"Alert": "紧急",
|
||||
"Critical": "严重",
|
||||
"Error": "错误",
|
||||
"Warning": "警告",
|
||||
"Notice": "注意",
|
||||
"Info": "信息",
|
||||
"Debug": "调试"
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
<!-- Smile, breathe, and go slowly. - Thich Nhat Hanh -->
|
||||
|
||||
<div class="modal fade" id="{{$id}}" role="dialog" aria-labelledby="{{$modalLabel}}" aria-hidden="true">
|
||||
<div class="modal fade" tabindex="-1" id="{{$id}}" role="dialog" aria-labelledby="{{$modalLabel}}" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
@@ -44,8 +44,8 @@
|
||||
|
||||
<div class="alert alert-warning">
|
||||
|
||||
<i class="fa fa-exclamation-triangle"></i> <b>Warning: Do not use these options if you don't know what you're doing, even if you have access to this page.</b>
|
||||
|
||||
<i class="fa fa-exclamation-triangle"></i> <b>Warning</b>
|
||||
<p>Do not use these options if you don't know what you're doing, even if you have access to this page.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -60,11 +60,11 @@
|
||||
<x-slot name="cardHeader">
|
||||
|
||||
</x-slot>
|
||||
|
||||
<button type="button" class="btn btn-danger" onclick="$('#confirmForceEventDispatch').modal('show')">Force Vote Evaluation</button>
|
||||
<button type="button" class="btn btn-danger" onclick="$('#confirmForceEventDispatch').modal('show')">Override Vote Evaluation</button>
|
||||
<button type="button" class="btn btn-warning ml-3">Artisan: Evaluate Votes Now</button>
|
||||
|
||||
<x-slot name="cardFooter">
|
||||
|
||||
<p class="text-muted"> This panel may be also used to completely override the vote system in stalemate scenarios.</p>
|
||||
</x-slot>
|
||||
</x-card>
|
||||
|
||||
|
@@ -8,6 +8,12 @@
|
||||
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
|
||||
<x-global-errors></x-global-errors>
|
||||
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
@@ -15,7 +21,7 @@
|
||||
<div class="col">
|
||||
<div class="small-box bg-info">
|
||||
<div class="inner">
|
||||
<h3>11</h3>
|
||||
<h3>{{$users->count()}}</h3>
|
||||
|
||||
<p>Registered Players</p>
|
||||
</div>
|
||||
@@ -29,7 +35,7 @@
|
||||
|
||||
<div class="small-box bg-danger">
|
||||
<div class="inner">
|
||||
<h3>200</h3>
|
||||
<h3>{{$bannedUserCount}}</h3>
|
||||
|
||||
<p>Total Banned Players</p>
|
||||
</div>
|
||||
@@ -40,6 +46,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
I
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -53,10 +60,10 @@
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<form name="search">
|
||||
|
||||
<form name="search" method="POST" action="{{route('searchRegisteredPLayerList')}}">
|
||||
@csrf
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Username or UUID, etc...">
|
||||
<input type="text" name="searchTerm" class="form-control" placeholder="Username/email search">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">
|
||||
<i class="fa fa-search"></i>
|
||||
@@ -101,7 +108,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
@if (!$users->isEmpty())
|
||||
<table class="table table-borderless table-active">
|
||||
|
||||
<thead>
|
||||
@@ -117,21 +124,41 @@
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Notch</td>
|
||||
<td>069a79f4-44e9-4726-a5be-fca90e38aaf5</td>
|
||||
<td><span class="badge badge-success">Active</span></td>
|
||||
<td>2020-02-10</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-success"><i class="fa fa-eye"></i> View Record</button>
|
||||
@foreach($users as $user)
|
||||
|
||||
<tr>
|
||||
<td>{{$user->id}}</td>
|
||||
<td>{{UUID::toUsername($user->uuid)}}</td>
|
||||
<td>{{$user->uuid}}</td>
|
||||
<td>
|
||||
@if ($user->isBanned())
|
||||
<span class="badge badge-danger"><i class="fa fa-ban"></i> Banned</span>
|
||||
@else
|
||||
<span class="badge badge-success">Active</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{$user->created_at}}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{route('showSingleProfile', ['user' => $user->id])}}'"><i class="fa fa-eye"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
@else
|
||||
<div class="alert alert-secondary">
|
||||
|
||||
<i class="fas fa-question"></i><span> There are no registered players!</span>
|
||||
<p>
|
||||
Registered players are those without a staff role in the team management application.
|
||||
There may be other users registered in the platform, but they won't be displayed here.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
|
@@ -15,7 +15,7 @@
|
||||
<div class="col">
|
||||
<div class="small-box bg-info">
|
||||
<div class="inner">
|
||||
<h3>11</h3>
|
||||
<h3>{{$users->count()}}</h3>
|
||||
|
||||
<p>Active Staff Members</p>
|
||||
</div>
|
||||
@@ -24,68 +24,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="small-box bg-warning">
|
||||
<div class="inner">
|
||||
<h3>2</h3>
|
||||
|
||||
<p>Former Staff Members</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-users"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="small-box bg-danger">
|
||||
<div class="inner">
|
||||
<h3>1</h3>
|
||||
|
||||
<p>Terminated Staff Member(s)</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-user-alt-slash"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 offset-md-4">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header">
|
||||
<div class="card-title"><h4><i class="fas fa-search"></i>Search Active Members</h4></div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<form name="search">
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for names, email addresses, etc...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -109,7 +47,7 @@
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Full Name</th>
|
||||
<th>IGN</th>
|
||||
<th>UUID</th>
|
||||
<th>Rank</th>
|
||||
<th>Status</th>
|
||||
<th>Join Date</th>
|
||||
@@ -119,51 +57,27 @@
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Monica Smith</td>
|
||||
<td>mssmith223</td>
|
||||
<td><span class="badge badge-success">Moderator</span></td>
|
||||
<td><span class="badge badge-success">Active</span></td>
|
||||
<td>2020-02-10</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-success"><i class="fa fa-eye"></i> Staff Record</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Zak Unknown</td>
|
||||
<td>Skeppy</td>
|
||||
<td><span class="badge badge-info">Helper</span></td>
|
||||
<td><span class="badge badge-success">Active</span></td>
|
||||
<td>2020-02-10</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-success"><i class="fa fa-eye"></i> Staff Record</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>John Doe</td>
|
||||
<td>kjj192</td>
|
||||
<td><span class="badge badge-danger">Admin</span></td>
|
||||
<td><span class="badge badge-success">Active</span></td>
|
||||
<td>2020-02-10</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-success"><i class="fa fa-eye"></i> Staff Record</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>Angela Smith</td>
|
||||
<td>kkrapsody1221</td>
|
||||
<td><span class="badge badge-success">Moderator</span></td>
|
||||
<td><span class="badge badge-success">Active</span></td>
|
||||
<td>2020-02-10</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-success"><i class="fa fa-eye"></i> Staff Record</button>
|
||||
</td>
|
||||
</tr>
|
||||
@foreach($users as $user)
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>{{$user->name}}</td>
|
||||
<td>{{UUID::toUsername($user->uuid)}}</td>
|
||||
<td>
|
||||
@foreach($user->roles as $role)
|
||||
<span class="badge badge-info badge-sm">{{$role->name}}</span>
|
||||
@endforeach
|
||||
</td>
|
||||
<td><span class="badge badge-success">Active</span></td>
|
||||
<td>{{$user->created_at}}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-success mr-2" onclick="window.location.href='{{route('showSingleProfile', ['user' => $user->id])}}'"><i class="fa fa-eye"></i></button>
|
||||
<button type="button" class="btn btn-sm btn-warning mr-2"><i class="fas fa-pencil-alt"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
@@ -141,9 +141,15 @@
|
||||
<tr>
|
||||
<td>{{$upcomingApp->id}}</td>
|
||||
<td>{{$upcomingApp->user->name}}</td>
|
||||
<td><span class="badge badge-success"><i class="fa fa-check"></i> {{ucfirst(strtolower($upcomingApp->appointment->appointmentStatus))}}</span></td>
|
||||
<td>{{$upcomingApp->appointment->appointmentDate}}</td>
|
||||
<td><span class="badge badge-success"><i class="fa fa-check"></i> {{ucfirst(strtolower($upcomingApp->appointment->appointmentLocation))}}</span></td>
|
||||
@if (is_null($upcomingApp->appointment))
|
||||
<td><span class="badge badge-warning"><i class="fa fa-question-circle"></i>Pending Schedule</span></td>
|
||||
<td>None yet</td>
|
||||
<td><span class="badge badge-warning"><i class="fa fa-question-circle"></i>Pending Schedule</span></td>
|
||||
@else
|
||||
<td><span class="badge badge-success"><i class="fa fa-check"></i> {{ucfirst(strtolower($upcomingApp->appointment->appointmentStatus))}}</span></td>
|
||||
<td>{{$upcomingApp->appointment->appointmentDate}}</td>
|
||||
<td><span class="badge badge-success"><i class="fa fa-check"></i> {{ucfirst(strtolower($upcomingApp->appointment->appointmentLocation))}}</span></td>
|
||||
@endif
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{route('showUserApp', ['id' => $upcomingApp->id])}}'"><i class="fa fa-eye"></i> View Details</button>
|
||||
</td>
|
||||
|
@@ -10,19 +10,7 @@
|
||||
|
||||
@section('js')
|
||||
|
||||
@if (session()->has('success'))
|
||||
|
||||
<script>
|
||||
toastr.success("{{session('success')}}")
|
||||
</script>
|
||||
|
||||
@elseif(session()->has('error'))
|
||||
|
||||
<script>
|
||||
toastr.error("{{session('error')}}")
|
||||
</script>
|
||||
|
||||
@endif
|
||||
<x-global-errors></x-global-errors>
|
||||
|
||||
@stop
|
||||
|
||||
@@ -121,7 +109,7 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<button type="button" class="btn btn-success"><i class="fa fa-eye"></i> View</button>
|
||||
<button type="button" class="btn btn-success" onclick="window.location.href='{{route('showUserApp', ['id' => $application->id])}}'"><i class="fa fa-eye"></i> View</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
411
resources/views/dashboard/user/profile/displayprofile.blade.php
Normal file
411
resources/views/dashboard/user/profile/displayprofile.blade.php
Normal file
@@ -0,0 +1,411 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Raspberry Network | ' . $profile->user->name . '\'s profile')
|
||||
|
||||
@section('content_header')
|
||||
|
||||
<h4>Profile</h4>
|
||||
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
|
||||
<script src="/js/app.js"></script>
|
||||
<x-global-errors></x-global-errors>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($profile->user->isBanned())
|
||||
|
||||
<div class="alert alert-danger">
|
||||
|
||||
<span><i class="fa fa-ban"></i> <b>Account banned</b></span>
|
||||
|
||||
<p>This user has been banned by the moderators.</p>
|
||||
|
||||
<p>
|
||||
<i class="fas fa-chevron-right"></i> <b>{{$profile->user->bans->reason}}</>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->hasRole('admin'))
|
||||
|
||||
<x-modal id="banAccountModal" modal-label="banAccount" modal-title="Please confirm" include-close-button="true">
|
||||
|
||||
<p>Please confirm that you want to ban this user account. You'll need to add a reason and expiration date to confirm this. Bans don't transfer to connected Minecraft networks (yet).</p>
|
||||
|
||||
<form id="banAccountForm" name="banAccount" method="POST" action="{{route('banUser', ['user' => $profile->user->id])}}">
|
||||
@csrf
|
||||
|
||||
<label for="reason">Reason</label>
|
||||
<input type="string" name="reason" id="reason" class="form-control" placeholder="e.g. Spamming">
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="durationOperand" aria-label="Punishment duration">
|
||||
<div class="input-group-append">
|
||||
<button id="durationDropdown" class="btn btn-outline-secondary dropdown-toggle duration-btn" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Duration</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Days</a>
|
||||
<a class="dropdown-item" href="#">Weeks</a>
|
||||
<a class="dropdown-item" href="#">Months</a>
|
||||
<div role="separator" class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Years</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-muted text-sm">Leave empty for a permanent ban</p>
|
||||
|
||||
<input id="operator" type="hidden" value="" name="durationOperator" class="duration-operator-fld">
|
||||
|
||||
</form>
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
|
||||
<button id="banAccountButton" type="button" class="btn btn-danger"><i class="fa fa-ban"></i> Ban</button>
|
||||
|
||||
</x-slot>
|
||||
|
||||
</x-modal>
|
||||
|
||||
@if (!Auth::user()->is($profile->user) && $profile->user->isStaffMember())
|
||||
<x-modal id="terminateUser" modal-label="terminateUser" modal-title="Please confirm" include-close-button="true">
|
||||
|
||||
<p><i class="fa fa-exclamation-triangle"></i> <b>You are about to terminate a staff member</b></p>
|
||||
<p>
|
||||
Terminating a staff member will remove their privileges on the team management site and Network.
|
||||
They will be notified of their termination. Make sure to have discussed this with them first.
|
||||
</p>
|
||||
<p>
|
||||
<b>THIS PROCESS IS IRREVERSIBLE AND IMMEDIATE</b>
|
||||
</p>
|
||||
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
|
||||
<form method="POST" action="{{route('terminateStaffMember', ['user' => $profile->user->id])}}" id="terminateUserForm">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button type="submit" class="btn btn-warning"><i class="fas fa-exclamation-circle"></i> Confirm</button>
|
||||
|
||||
</form>
|
||||
|
||||
</x-slot>
|
||||
|
||||
</x-modal>
|
||||
@endif
|
||||
|
||||
<x-modal id="deleteAccount" modal-label="deleteAccount" modal-title="Please confirm" include-close-button="true">
|
||||
|
||||
<p><i class="fa fa-exclamation-triangle"></i><b> WARNING: This is a potentially destructive action!</b></p>
|
||||
|
||||
<p>Deleting a user's account is an irreversible process. Historic and current applications, votes, and profile content, as well as any personally identifiable information will be immediately erased.</p>
|
||||
|
||||
<form id="deleteAccountForm" method="POST" action={{route('deleteUser', ['user' => $profile->user->id])}}>
|
||||
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
|
||||
<label for="promptConfirm">Type to confirm: "DELETE ACCOUNT"</label>
|
||||
<input type="text" name="confirmPrompt" class="form-control" placeholder="Please type the above">
|
||||
|
||||
</form>
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
|
||||
<button type="button" class="btn btn-danger" onclick="document.getElementById('deleteAccountForm').submit()"><i class="fa fa-trash"></i> CONFIRM</button>
|
||||
|
||||
</x-slot>
|
||||
</x-modal>
|
||||
|
||||
<x-modal id="ipInfo" modal-label="ipInfo" modal-title="IP Address Information for {{$ipInfo->ip ?? 'Unknown'}}" include-close-button="true">
|
||||
|
||||
<h4 class="text-center">Search results</h3>
|
||||
|
||||
@if (!isset($ipInfo->message))
|
||||
|
||||
<table class="table table-borderless">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th>Origin Country</th>
|
||||
<td>{{$ipInfo->country_name ?? 'N/A'}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>State/Province</th>
|
||||
<td>{{$ipInfo->state_prov ?? 'None'}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>District (if any)</th>
|
||||
<td>{{$ipInfo->district ?? 'N/A'}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>City</th>
|
||||
<td>{{$ipInfo->city ?? 'N/A'}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Zipcode</th>
|
||||
<td>{{$ipInfo->zipcode ?? 'N/A'}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Coordinates</th>
|
||||
<td>{{$ipInfo->latitude ?? 0}}, {{$ipInfo->longitude ?? 0}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>European?</th>
|
||||
<td>{{($ipInfo->is_eu) ? 'Yes' : 'No'}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>ISP</th>
|
||||
<td>{{$ipInfo->isp ?? 'N/A'}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Organization (if any)</th>
|
||||
<td>{{$ipInfo->organization ?? 'N/A'}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>C. Type</th>
|
||||
<td>{{$ipInfo->connection_type ?? 'N/A'}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Timezone</th>
|
||||
<td>{{$ipInfo->time_zone->name ?? 'N/A'}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
@else
|
||||
<div class="alert alert-danger">
|
||||
|
||||
<i class="fas fa-exclamation-circle"></i> <b>This query returned no results</b>
|
||||
<p>
|
||||
{{$ipInfo->message}}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<x-slot name="modalFooter"></x-slot>
|
||||
</x-modal>
|
||||
|
||||
<x-modal id="editUser" modal-label="editUser" modal-title="Edit PII and Roles" include-close-button="true">
|
||||
|
||||
<form id="updateUserForm" method="post" action="{{ route('updateUser', ['user' => $profile->user->id]) }}">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
|
||||
<label for="email">Email address</label>
|
||||
<input id="email" type="text" name="email" class="form-control" required value="{{ $profile->user->email }}" />
|
||||
|
||||
<label for="name">Name</label>
|
||||
<input id="name" type="text" name="name" class="form-control" required value="{{ $profile->user->name }}" />
|
||||
|
||||
<label for="uuid">Mojang UUID</label>
|
||||
<input id="uuid" type="text" name="uuid" class="form-control" required value="{{ $profile->user->uuid }}" />
|
||||
<p class="text-muted text-sm">
|
||||
<i class="fas fa-exclamation-triangle"></i> Warning! This is a sensitive setting! Changing this could have unintended consequences!
|
||||
</p>
|
||||
|
||||
<div class="form-group mt-3">
|
||||
|
||||
<label>Roles</label>
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
|
||||
@foreach($roles as $roleName => $status)
|
||||
<tr>
|
||||
<th><input type="checkbox" name="roles[]" value="{{ $roleName }}" {{ ($status) ? 'checked' : '' }}></th>
|
||||
<td class="col-md-2">{{ ucfirst($roleName) }}</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
|
||||
<button type="button" class="btn btn-warning" onclick="$('#updateUserForm').submit()"><i class="fa fa-exclamation-cicle"></i> Save changes</button>
|
||||
|
||||
</x-slot>
|
||||
|
||||
</x-modal>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="text-center">
|
||||
@if($profile->avatarPreference == 'gravatar')
|
||||
<img class="profile-user-img img-fluid img-circle" src="https://gravatar.com/avatar/{{md5($profile->user->email)}}" alt="User profile picture">
|
||||
@else
|
||||
<img class="profile-user-img img-fluid img-circle" src="https://crafatar.com/avatars/{{$profile->user->uuid}}" alt="User profile picture">
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 offset-md-4">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body text-center">
|
||||
|
||||
@if ($profile->user->isBanned())
|
||||
<del><h3>{{$profile->user->name}}</h3></del>
|
||||
@else
|
||||
<h3>{{$profile->user->name}}</h3>
|
||||
@endif
|
||||
|
||||
<p class="text-muted">{{$profile->profileShortBio}}</p>
|
||||
<p class="text-muted">Member since {{$since}}</p>
|
||||
@if (Auth::user()->hasRole('admin'))
|
||||
<button type="button" class="btn btn-sm btn-info" onclick="$('#ipInfo').modal('show')">Lookup {{$profile->user->originalIP}}</button>
|
||||
@endif
|
||||
|
||||
@if ($profile->user->is(Auth::user()))
|
||||
<button type="button" class="btn btn-sm btn-warning" onclick="window.location.href='{{route('showProfileSettings')}}'"><i class="fas fa-pencil-alt"></i></button>
|
||||
@elseif (Auth::user()->hasRole('admin') && $profile->user->isStaffMember())
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="$('#terminateUser').modal('show')">Terminate Staff Member</button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-center">
|
||||
|
||||
@foreach ($profile->user->roles as $role)
|
||||
|
||||
<span class="badge badge-success mr-2">{{ucfirst($role->name)}}</span>
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@if (Auth::user()->hasRole('admin'))
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
<a class="collapsed d-block" data-toggle="collapse" href="#collapse-collapsed" aria-expanded="true" aria-controls="collapse-collapsed" id="heading-collapsed">
|
||||
<i class="fa fa-chevron-down pull-right"></i>
|
||||
Account Management (Admin)
|
||||
</a>
|
||||
</h5>
|
||||
<div id="collapse-collapsed" class="collapse" aria-labelledby="heading-collapsed">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="management-btn text-center">
|
||||
|
||||
@if (!$profile->user->isBanned())
|
||||
<button class="btn btn-danger mb-2" id="banAccountTrigger"><i class="fa fa-ban"></i> Ban Account</button><br>
|
||||
@else
|
||||
<form method="post" action="{{route('unbanUser', ['user' => $profile->user->id])}}">
|
||||
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-warning mb-2"><i class="fa fa-check"></i> Unban</button>
|
||||
|
||||
</form>
|
||||
@endif
|
||||
<button class="btn btn-danger mb-2" onclick="$('#deleteAccount').modal('show')"><i class="fas fa-trash-alt"></i> Delete Account</button><br>
|
||||
|
||||
<button class="btn btn-warning mb-2" onclick="$('#editUser').modal('show')"><i class="fas fa-pencil-alt"></i> Edit Account</button><br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- .col -->
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row buttonBar">
|
||||
|
||||
<div class="col-md-4 offset-md-4">
|
||||
|
||||
<div class="card" style="border-radius: 50px">
|
||||
|
||||
<div class="card-body text-center">
|
||||
|
||||
<a href="https://github.com/{{$github}}" class="pr-2 pl-2"><i class="fab fa-github fa-2x"></i></a>
|
||||
<a href="#" onclick="toastr.info('User\'s Discord tag: {{$discord}}')" class="pr-2 pl-2"><i class="fab fa-discord fa-2x"></i></a>
|
||||
<a href="https://twitter.com/{{$twitter}}" class="pr-2 pl-2"><i class="fab fa-twitter fa-2x"></i></a>
|
||||
<a href="https://instagram.com/{{$insta}}" class="pr-2 pl-2"><i class="fab fa-instagram fa-2x"></i></a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header">
|
||||
<h4>About</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
{{$profile->profileAboutMe}}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@stop
|
@@ -56,6 +56,12 @@
|
||||
<h3 class="profile-username text-center">{{Auth::user()->name}}</h3>
|
||||
|
||||
<p class="text-muted text-center">{{$profile->profileShortBio}}</p>
|
||||
|
||||
<div class="text-center">
|
||||
|
||||
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{route('showSingleProfile', ['user' => Auth::user()->id])}}'"><i class="fas fa-eye"></i></button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-center">
|
||||
|
@@ -12,6 +12,7 @@
|
||||
|
||||
<link rel="stylesheet" href="/css/mixed.css">
|
||||
<link rel="stylesheet" href="/css/viewapplication.css">
|
||||
<link rel="stylesheet" href="/css/comments.css">
|
||||
<!-- TODO: Move to Mix + Webpack -->
|
||||
|
||||
|
||||
@@ -21,8 +22,7 @@
|
||||
|
||||
<script type="text/javascript" src="/js/app.js"></script>
|
||||
<x-global-errors></x-global-errors>
|
||||
|
||||
@if (!$canVote)
|
||||
@if (!$canVote && Auth::user()->can('applications.vote') && $application->applicationStatus == 'STAGE_PEERAPPROVAL')
|
||||
<script>
|
||||
toastr.info('You cannot vote on this application anymore.', 'Warning')
|
||||
</script>
|
||||
@@ -32,37 +32,48 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
<x-modal id="notes" modal-label="notes" modal-title="Shared Notepad" include-close-button="true">
|
||||
@if (!is_null($application->appointment))
|
||||
|
||||
<form id="meetingNotes" method="POST" action="{{route('saveNotes', ['applicationID' => $application->id])}}">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<textarea name="noteText" rows="5" class="form-control">{{$application->appointment->meetingNotes ?? 'There are no notes yet. Add some!'}}</textarea>
|
||||
</form>
|
||||
<p class="text-muted text-sm">Last updated @ {{$application->appointment->updated_at}}</p>
|
||||
@canany('applications.view.all', 'appointments.*')
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
<button type="button" class="btn btn-success" onclick="document.getElementById('meetingNotes').submit()"><i class="far fa-paper-plane"></i> Save & Close</button>
|
||||
</x-slot>
|
||||
</x-modal>
|
||||
<x-modal id="notes" modal-label="notes" modal-title="Shared Notepad" include-close-button="true">
|
||||
|
||||
<x-modal id="denyApplication" modal-label="denyApplicationLabel" modal-title="Please confirm" include-close-button="true">
|
||||
<form id="meetingNotes" method="POST" action="{{route('saveNotes', ['applicationID' => $application->id])}}">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<textarea name="noteText" rows="5" class="form-control">{{$application->appointment->meetingNotes ?? 'There are no notes yet. Add some!'}}</textarea>
|
||||
</form>
|
||||
<p class="text-muted text-sm">Last updated @ {{$application->appointment->updated_at}}</p>
|
||||
|
||||
<p>Are you sure you want to deny this application? Please keep in mind that this user will only be allowed to apply 30 days after their first application.</p>
|
||||
<p class="text-muted">This action cannot be undone.</p>
|
||||
<x-slot name="modalFooter">
|
||||
<button type="button" class="btn btn-success" onclick="document.getElementById('meetingNotes').submit()"><i class="far fa-paper-plane"></i> Save & Close</button>
|
||||
</x-slot>
|
||||
</x-modal>
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
@endcanany
|
||||
@endif
|
||||
|
||||
<form id="updateApplication" action="{{route('updateApplicationStatus', ['id' => $application->id, 'newStatus' => 'deny'])}}" method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button type="submit" class="btn btn-danger">Confirm: Deny Applicant</button>
|
||||
</form>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
@role('hiringManager')
|
||||
|
||||
</x-slot>
|
||||
<x-modal id="denyApplication" modal-label="denyApplicationLabel" modal-title="Please confirm" include-close-button="true">
|
||||
|
||||
</x-modal>
|
||||
<p>Are you sure you want to deny this application? Please keep in mind that this user will only be allowed to apply 30 days after their first application.</p>
|
||||
<p class="text-muted">This action cannot be undone.</p>
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
|
||||
<form id="updateApplication" action="{{route('updateApplicationStatus', ['id' => $application->id, 'newStatus' => 'deny'])}}" method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button type="submit" class="btn btn-danger">Confirm: Deny Applicant</button>
|
||||
</form>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
|
||||
</x-slot>
|
||||
|
||||
</x-modal>
|
||||
|
||||
@endhasrole
|
||||
|
||||
|
||||
<div class="row">
|
||||
@@ -91,6 +102,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- TODO: Simplify logic by using switches, as well as a single Gate check -->
|
||||
<div class="col">
|
||||
|
||||
<div class="row">
|
||||
@@ -106,7 +118,9 @@
|
||||
<div class="card-body">
|
||||
|
||||
<p><b>Applicant Name: </b> <span class="badge badge-primary">{{$application->user->name}}</span></p>
|
||||
<p><b>Applicant IP Address:</b> <span class="badge badge-primary">{{$application->user->originalIP}}</span></p>
|
||||
@if (Auth::user()->hasRole('hiringManager'))
|
||||
<p><b>Applicant IP Address:</b> <span class="badge badge-primary">{{$application->user->originalIP}}</span></p>
|
||||
@endif
|
||||
<p><b>Applied On:</b> <span class="badge badge-primary">{{$application->created_at}}</span></p>
|
||||
<p><b>Last acted on:</b><span class="badge badge-primary">{{$application->updated_at}}</span></p>
|
||||
<p><b>Applying for:</b> <span class="badge badge-primary">{{$vacancy->vacancyName}}</span></p>
|
||||
@@ -155,7 +169,7 @@
|
||||
|
||||
<div class="col">
|
||||
|
||||
@if ($application->applicationStatus == 'STAGE_SUBMITTED')
|
||||
@if ($application->applicationStatus == 'STAGE_SUBMITTED' && Auth::user()->hasRole('hiringManager'))
|
||||
|
||||
<div class="card bg-gray">
|
||||
<div class="card-header bg-gradient-gray">
|
||||
@@ -192,7 +206,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
@if ($application->applicationStatus == 'STAGE_INTERVIEW')
|
||||
@if ($application->applicationStatus == 'STAGE_INTERVIEW' && Auth::user()->hasRole('hiringManager'))
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -259,15 +273,18 @@
|
||||
|
||||
<x-slot name="cardFooter">
|
||||
|
||||
<form class="footer-button" action="{{route('updateAppointment', ['applicationID' => $application->id, 'status' => 'concluded'])}}" method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button type="submit" class="btn btn-success">Finish Meeting</button>
|
||||
</form>
|
||||
<button class="btn btn-warning mr-3">View Meeting Notes</button>
|
||||
@can('appointments.schedule.edit')
|
||||
<form style="white-space: nowrap;display:inline-block" class="footer-button" action="{{route('updateAppointment', ['applicationID' => $application->id, 'status' => 'concluded'])}}" method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button type="submit" class="btn btn-success">Finish Meeting</button>
|
||||
</form>
|
||||
@endcan
|
||||
|
||||
@can('applications.vote')
|
||||
<button class="btn btn-warning mr-3" onclick="$('#notes').modal('show')">View Meeting Notes</button>
|
||||
@endcan
|
||||
|
||||
<!-- Show to users only -->
|
||||
<button class="btn btn-success mr-3">Accept Meeting</button>
|
||||
</x-slot>
|
||||
|
||||
</x-card>
|
||||
@@ -278,7 +295,7 @@
|
||||
|
||||
@endif
|
||||
|
||||
@if ($application->applicationStatus = 'STAGE_PEERAPPROVAL')
|
||||
@if ($application->applicationStatus == 'STAGE_PEERAPPROVAL' && Auth::user()->can('applications.vote'))
|
||||
|
||||
<x-card id="peerApproval" card-title="Vote on this Application" footer-style="text-center">
|
||||
|
||||
@@ -313,19 +330,162 @@
|
||||
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
@can('applications.view.all')
|
||||
|
||||
<div class="col text-center">
|
||||
<div class="row">
|
||||
|
||||
<button type="button" class="btn btn-primary" onclick="window.location.href='{{route('staffPendingApps')}}'">View more Applications</button>
|
||||
<div class="col text-center">
|
||||
|
||||
<button type="button" class="btn btn-primary" onclick="window.location.href='{{route('staffPendingApps')}}'">View more Applications</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@hasanyrole('reviewer|hiringManager|admin')
|
||||
@if (!Auth::user()->is($application->user))
|
||||
<div class="row mb-3 mt-2">
|
||||
|
||||
<h3>Comments ({{$comments->count()}})</h3>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col">
|
||||
|
||||
@if ($comments->isEmpty())
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<i class="fas fa-question"></i> <b>Such wow, much empty</b>
|
||||
|
||||
|
||||
<p>There are no comments here! Comments are only visible to staff members. Be the first to share your input!</p>
|
||||
<p>Commenting may help with decision-making when time comes to vote for an application.</p>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@if (!$comments->isEmpty())
|
||||
|
||||
@foreach($comments as $comment)
|
||||
<div class="row mt-3 mb-3">
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="text-center">
|
||||
@if($application->user->avatarPreference == 'gravatar')
|
||||
<img class="profile-user-img img-fluid img-circle" src="https://gravatar.com/avatar/{{md5($comment->user->email)}}" alt="User profile picture">
|
||||
@else
|
||||
<img class="profile-user-img img-fluid img-circle" src="https://crafatar.com/avatars/{{$comment->user->uuid}}" alt="User profile picture">
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card comment">
|
||||
|
||||
<div class="card-header comment-header">
|
||||
|
||||
<h1 class="commenter">{{$comment->user->name}} ● {{Carbon\Carbon::parse($comment->created_at)->diffForHumans()}}</h3>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
{{$comment->text}}
|
||||
|
||||
</div>
|
||||
|
||||
@if(Auth::user()->is($comment->user) || Auth::user()->hasRole('admin'))
|
||||
|
||||
<div class="card-footer comment-footer">
|
||||
|
||||
<form method="POST" id="deleteComment" action="{{route('deleteApplicationComment', ['comment' => $comment->id])}}">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-outline-danger"><i class="fas fa-trash-alt"></i></button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<!-- display comments here -->
|
||||
|
||||
<div class="row mt-5">
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="text-center">
|
||||
@if($application->user->avatarPreference == 'gravatar')
|
||||
<img class="profile-user-img img-fluid img-circle" src="https://gravatar.com/avatar/{{md5(Auth::user()->email)}}" alt="User profile picture">
|
||||
@else
|
||||
<img class="profile-user-img img-fluid img-circle" src="https://crafatar.com/avatars/{{Auth::user()->uuid}}" alt="User profile picture">
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="card border-top border-bottom">
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<form id="newComment" method="POST" action="{{route('addApplicationComment', ['application' => $application->id])}}">
|
||||
|
||||
@csrf
|
||||
|
||||
<textarea id="comment" name="comment" class="form-control" id="commentText"></textarea>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col text-left">
|
||||
<p class="text-sm text-muted">Commenting as {{Auth::user()->name}}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col text-right">
|
||||
|
||||
<p class="text-sm text-muted"><span id="charcount">0</span>/600 max characters</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-right">
|
||||
|
||||
<button type="button" id="submitComment" class="btn btn-sm btn-secondary">Post</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endhasanyrole
|
||||
|
||||
@endsection
|
||||
|
342
resources/views/vendor/log-viewer/bootstrap-3/_master.blade.php
vendored
Normal file
342
resources/views/vendor/log-viewer/bootstrap-3/_master.blade.php
vendored
Normal file
@@ -0,0 +1,342 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>LogViewer - Created by ARCANEDEV</title>
|
||||
<meta name="description" content="LogViewer">
|
||||
<meta name="author" content="ARCANEDEV">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
||||
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700|Source+Sans+Pro:400,600' rel='stylesheet' type='text/css'>
|
||||
<style>
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 50px;
|
||||
/* Margin bottom by footer height */
|
||||
margin-bottom: 50px;
|
||||
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, sans-serif;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
font-family: 'Montserrat', 'Helvetica Neue', Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.sub-header {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #EEE;
|
||||
}
|
||||
|
||||
.navbar-inverse {
|
||||
background-color: #1a237e;
|
||||
border-color: #1a237e;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav>.active>a,
|
||||
.navbar-inverse .navbar-nav>.active>a:focus,
|
||||
.navbar-inverse .navbar-nav>.active>a:hover {
|
||||
background-color: #3949ab;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand {
|
||||
color: #c5cae9;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav>li>a {
|
||||
color: #c5cae9;
|
||||
}
|
||||
|
||||
.navbar-fixed-top {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.main {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.main .page-header {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
footer.main-footer {
|
||||
position: absolute;
|
||||
padding: 10px 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background-color: #e8eaf6;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
footer.main-footer p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
footer.main-footer i.fa.fa-heart {
|
||||
color: #C62828;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
padding: 4px 10px;
|
||||
}
|
||||
|
||||
.table-condensed > tbody > tr > td.stack,
|
||||
.table-condensed > tfoot > tr > td.stack,
|
||||
.table-condensed > thead > tr > td.stack {
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
background-color: #F6F6F6;
|
||||
border-top: 1px solid #D1D1D1;
|
||||
max-width: 0;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.table-condensed > tbody > tr > td > p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.stack-content {
|
||||
padding: 8px;
|
||||
color: #AE0E0E;
|
||||
font-family: consolas, Menlo, Courier, monospace;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.info-box.level {
|
||||
display: block;
|
||||
padding: 0;
|
||||
margin-bottom: 15px;
|
||||
min-height: 70px;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,0.1);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.info-box.level .info-box-text,
|
||||
.info-box.level .info-box-number,
|
||||
.info-box.level .info-box-icon > i {
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.info-box.level .info-box-text {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.info-box.level .info-box-content {
|
||||
padding: 5px 10px;
|
||||
margin-left: 70px;
|
||||
}
|
||||
|
||||
.info-box.level .info-box-number {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.info-box.level .info-box-icon {
|
||||
border-radius: 2px 0 0 2px;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 70px; width: 70px;
|
||||
text-align: center;
|
||||
font-size: 40px;
|
||||
line-height: 70px;
|
||||
background: rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.info-box.level .progress {
|
||||
background: rgba(0,0,0,0.2);
|
||||
margin: 5px -10px 5px -10px;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
.info-box.level .progress .progress-bar {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.info-box.level-empty {
|
||||
opacity: .6;
|
||||
-webkit-filter: grayscale(1);
|
||||
-moz-filter: grayscale(1);
|
||||
-ms-filter: grayscale(1);
|
||||
filter: grayscale(1);
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-moz-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
-webkit-transition-property: -webkit-filter, opacity;
|
||||
-moz-transition-property: -moz-filter, opacity;
|
||||
-o-transition-property: filter, opacity;
|
||||
transition-property: -webkit-filter, -moz-filter, -o-filter, filter, opacity;
|
||||
}
|
||||
|
||||
.info-box.level-empty:hover {
|
||||
opacity: 1;
|
||||
-webkit-filter: grayscale(0);
|
||||
-moz-filter: grayscale(0);
|
||||
-ms-filter: grayscale(0);
|
||||
filter: grayscale(0);
|
||||
}
|
||||
|
||||
.level {
|
||||
padding: 2px 6px;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 2px;
|
||||
font-size: .9em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.badge.level-all,
|
||||
.badge.level-emergency,
|
||||
.badge.level-alert,
|
||||
.badge.level-critical,
|
||||
.badge.level-error,
|
||||
.badge.level-warning,
|
||||
.badge.level-notice,
|
||||
.badge.level-info,
|
||||
.badge.level-debug,
|
||||
.level, .level i,
|
||||
.info-box.level-all,
|
||||
.info-box.level-emergency,
|
||||
.info-box.level-alert,
|
||||
.info-box.level-critical,
|
||||
.info-box.level-error,
|
||||
.info-box.level-warning,
|
||||
.info-box.level-notice,
|
||||
.info-box.level-info,
|
||||
.info-box.level-debug {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.label-env {
|
||||
font-size: .85em;
|
||||
}
|
||||
|
||||
.badge.level-all, .level.level-all, .info-box.level-all {
|
||||
background-color: {{ log_styler()->color('all') }};
|
||||
}
|
||||
|
||||
.badge.level-emergency, .level.level-emergency, .info-box.level-emergency {
|
||||
background-color: {{ log_styler()->color('emergency') }};
|
||||
}
|
||||
|
||||
.badge.level-alert, .level.level-alert, .info-box.level-alert {
|
||||
background-color: {{ log_styler()->color('alert') }};
|
||||
}
|
||||
|
||||
.badge.level-critical, .level.level-critical, .info-box.level-critical {
|
||||
background-color: {{ log_styler()->color('critical') }};
|
||||
}
|
||||
|
||||
.badge.level-error, .level.level-error, .info-box.level-error {
|
||||
background-color: {{ log_styler()->color('error') }};
|
||||
}
|
||||
|
||||
.badge.level-warning, .level.level-warning, .info-box.level-warning {
|
||||
background-color: {{ log_styler()->color('warning') }};
|
||||
}
|
||||
|
||||
.badge.level-notice, .level.level-notice, .info-box.level-notice {
|
||||
background-color: {{ log_styler()->color('notice') }};
|
||||
}
|
||||
|
||||
.badge.level-info, .level.level-info, .info-box.level-info {
|
||||
background-color: {{ log_styler()->color('info') }};
|
||||
}
|
||||
|
||||
.badge.level-debug, .level.level-debug, .info-box.level-debug {
|
||||
background-color: {{ log_styler()->color('debug') }};
|
||||
}
|
||||
|
||||
.badge.level-empty, .level.level-empty {
|
||||
background-color: {{ log_styler()->color('empty') }};
|
||||
}
|
||||
|
||||
.badge.label-env, .label.label-env {
|
||||
background-color: #6A1B9A;
|
||||
}
|
||||
</style>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
{{-- Navbar --}}
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">@lang('Toggle navigation')</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="{{ route('log-viewer::dashboard') }}" class="navbar-brand">
|
||||
<i class="fa fa-fw fa-book"></i> LogViewer
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="navbar">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="{{ Route::is('log-viewer::dashboard') ? 'active' : '' }}">
|
||||
<a href="{{ route('log-viewer::dashboard') }}">
|
||||
<i class="fa fa-dashboard"></i> @lang('Dashboard')
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ Route::is('log-viewer::logs.list') ? 'active' : '' }}">
|
||||
<a href="{{ route('log-viewer::logs.list') }}">
|
||||
<i class="fa fa-archive"></i> @lang('Logs')
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{{-- Main container --}}
|
||||
<main class="container-fluid">
|
||||
@yield('content')
|
||||
</main>
|
||||
|
||||
{{-- Footer --}}
|
||||
<footer class="main-footer">
|
||||
<div class="container">
|
||||
<p class="text-muted pull-left">
|
||||
LogViewer - <span class="label label-info">version {{ log_viewer()->version() }}</span>
|
||||
</p>
|
||||
<p class="text-muted pull-right">
|
||||
Created with <i class="fa fa-heart"></i> by ARCANEDEV <sup>©</sup>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{-- Scripts --}}
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.min.js"></script>
|
||||
<script>
|
||||
Chart.defaults.global.responsive = true;
|
||||
Chart.defaults.global.scaleFontFamily = "'Source Sans Pro'";
|
||||
Chart.defaults.global.animationEasing = "easeOutQuart";
|
||||
</script>
|
||||
@yield('modals')
|
||||
@yield('scripts')
|
||||
</body>
|
||||
</html>
|
52
resources/views/vendor/log-viewer/bootstrap-3/dashboard.blade.php
vendored
Normal file
52
resources/views/vendor/log-viewer/bootstrap-3/dashboard.blade.php
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
@extends('log-viewer::bootstrap-3._master')
|
||||
|
||||
@section('content')
|
||||
<h1 class="page-header">@lang('Dashboard')</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<canvas id="stats-doughnut-chart" height="300"></canvas>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<section class="box-body">
|
||||
<div class="row">
|
||||
@foreach($percents as $level => $item)
|
||||
<div class="col-md-4">
|
||||
<div class="info-box level level-{{ $level }} {{ $item['count'] === 0 ? 'level-empty' : '' }}">
|
||||
<span class="info-box-icon">
|
||||
{{ log_styler()->icon($level) }}
|
||||
</span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ $item['name'] }}</span>
|
||||
<span class="info-box-number">
|
||||
{{ $item['count'] }} @lang('entries') - {!! $item['percent'] !!} %
|
||||
</span>
|
||||
<div class="progress">
|
||||
<div class="progress-bar" style="width: {{ $item['percent'] }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function() {
|
||||
new Chart($('canvas#stats-doughnut-chart'), {
|
||||
type: 'doughnut',
|
||||
data: {!! $chartData !!},
|
||||
options: {
|
||||
legend: {
|
||||
position: 'bottom'
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
152
resources/views/vendor/log-viewer/bootstrap-3/logs.blade.php
vendored
Normal file
152
resources/views/vendor/log-viewer/bootstrap-3/logs.blade.php
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
@extends('log-viewer::bootstrap-3._master')
|
||||
|
||||
<?php /** @var Illuminate\Pagination\LengthAwarePaginator $rows */ ?>
|
||||
|
||||
@section('content')
|
||||
<h1 class="page-header">@lang('Logs')</h1>
|
||||
|
||||
{{ $rows->render() }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed table-hover table-stats">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach($headers as $key => $header)
|
||||
<th class="{{ $key == 'date' ? 'text-left' : 'text-center' }}">
|
||||
@if ($key == 'date')
|
||||
<span class="label label-info">{{ $header }}</span>
|
||||
@else
|
||||
<span class="level level-{{ $key }}">
|
||||
{{ log_styler()->icon($key) }} {{ $header }}
|
||||
</span>
|
||||
@endif
|
||||
</th>
|
||||
@endforeach
|
||||
<th class="text-right">@lang('Actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($rows as $date => $row)
|
||||
<tr>
|
||||
@foreach($row as $key => $value)
|
||||
<td class="{{ $key == 'date' ? 'text-left' : 'text-center' }}">
|
||||
@if ($key == 'date')
|
||||
<span class="label label-primary">{{ $value }}</span>
|
||||
@elseif ($value == 0)
|
||||
<span class="level level-empty">{{ $value }}</span>
|
||||
@else
|
||||
<a href="{{ route('log-viewer::logs.filter', [$date, $key]) }}">
|
||||
<span class="level level-{{ $key }}">{{ $value }}</span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
@endforeach
|
||||
<td class="text-right">
|
||||
<a href="{{ route('log-viewer::logs.show', [$date]) }}" class="btn btn-xs btn-info">
|
||||
<i class="fa fa-search"></i>
|
||||
</a>
|
||||
<a href="{{ route('log-viewer::logs.download', [$date]) }}" class="btn btn-xs btn-success">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
<a href="#delete-log-modal" class="btn btn-xs btn-danger" data-log-date="{{ $date }}">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="11" class="text-center">
|
||||
<span class="label label-default">{{ trans('log-viewer::general.empty-logs') }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ $rows->render() }}
|
||||
@endsection
|
||||
|
||||
@section('modals')
|
||||
{{-- DELETE MODAL --}}
|
||||
<div id="delete-log-modal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<form id="delete-log-form" action="{{ route('log-viewer::logs.delete') }}" method="POST">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="date" value="">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">@lang('Delete log file')</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-sm btn-default pull-left" data-dismiss="modal">@lang('Cancel')</button>
|
||||
<button type="submit" class="btn btn-sm btn-danger" data-loading-text="@lang('Loading')…">@lang('Delete')</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function () {
|
||||
var deleteLogModal = $('div#delete-log-modal'),
|
||||
deleteLogForm = $('form#delete-log-form'),
|
||||
submitBtn = deleteLogForm.find('button[type=submit]');
|
||||
|
||||
$("a[href=#delete-log-modal]").on('click', function(event) {
|
||||
event.preventDefault();
|
||||
var date = $(this).data('log-date'),
|
||||
message = "@lang('Are you sure you want to DELETE this log file: :date ?')";
|
||||
|
||||
deleteLogForm.find('input[name=date]').val(date);
|
||||
deleteLogModal.find('.modal-body p').html(message.replace(':date', date));
|
||||
|
||||
deleteLogModal.modal('show');
|
||||
});
|
||||
|
||||
deleteLogForm.on('submit', function(event) {
|
||||
event.preventDefault();
|
||||
submitBtn.button('loading');
|
||||
|
||||
$.ajax({
|
||||
url: $(this).attr('action'),
|
||||
type: $(this).attr('method'),
|
||||
dataType: 'json',
|
||||
data: $(this).serialize(),
|
||||
success: function(data) {
|
||||
submitBtn.button('reset');
|
||||
if (data.result === 'success') {
|
||||
deleteLogModal.modal('hide');
|
||||
location.reload();
|
||||
}
|
||||
else {
|
||||
alert('AJAX ERROR ! Check the console !');
|
||||
console.error(data);
|
||||
}
|
||||
},
|
||||
error: function(xhr, textStatus, errorThrown) {
|
||||
alert('AJAX ERROR ! Check the console !');
|
||||
console.error(errorThrown);
|
||||
submitBtn.button('reset');
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
deleteLogModal.on('hidden.bs.modal', function() {
|
||||
deleteLogForm.find('input[name=date]').val('');
|
||||
deleteLogModal.find('.modal-body p').html('');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
287
resources/views/vendor/log-viewer/bootstrap-3/show.blade.php
vendored
Normal file
287
resources/views/vendor/log-viewer/bootstrap-3/show.blade.php
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
<?php
|
||||
/**
|
||||
* @var Arcanedev\LogViewer\Entities\Log $log
|
||||
* @var Illuminate\Pagination\LengthAwarePaginator $entries
|
||||
* @var string|null $query
|
||||
*/
|
||||
?>
|
||||
|
||||
@extends('log-viewer::bootstrap-3._master')
|
||||
|
||||
@section('content')
|
||||
<h1 class="page-header">@lang('Log') [{{ $log->date }}]</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><i class="fa fa-fw fa-flag"></i> @lang('Levels')</div>
|
||||
<ul class="list-group">
|
||||
@foreach($log->menu() as $levelKey => $item)
|
||||
@if ($item['count'] === 0)
|
||||
<a href="#" class="list-group-item disabled">
|
||||
<span class="badge">
|
||||
{{ $item['count'] }}
|
||||
</span>
|
||||
{!! $item['icon'] !!} {{ $item['name'] }}
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ $item['url'] }}" class="list-group-item {{ $levelKey }}">
|
||||
<span class="badge level-{{ $levelKey }}">
|
||||
{{ $item['count'] }}
|
||||
</span>
|
||||
<span class="level level-{{ $levelKey }}">
|
||||
{!! $item['icon'] !!} {{ $item['name'] }}
|
||||
</span>
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
{{-- Log Details --}}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@lang('Log info') :
|
||||
|
||||
<div class="group-btns pull-right">
|
||||
<a href="{{ route('log-viewer::logs.download', [$log->date]) }}" class="btn btn-xs btn-success">
|
||||
<i class="fa fa-download"></i> @lang('Download')
|
||||
</a>
|
||||
<a href="#delete-log-modal" class="btn btn-xs btn-danger" data-toggle="modal">
|
||||
<i class="fa fa-trash-o"></i> @lang('Delete')
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>@lang('File path') :</td>
|
||||
<td colspan="5">{{ $log->getPath() }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>@lang('Log entries') :</td>
|
||||
<td>
|
||||
<span class="label label-primary">{{ $entries->total() }}</span>
|
||||
</td>
|
||||
<td>@lang('Size') :</td>
|
||||
<td>
|
||||
<span class="label label-primary">{{ $log->size() }}</span>
|
||||
</td>
|
||||
<td>@lang('Created at') :</td>
|
||||
<td>
|
||||
<span class="label label-primary">{{ $log->createdAt() }}</span>
|
||||
</td>
|
||||
<td>@lang('Updated at') :</td>
|
||||
<td>
|
||||
<span class="label label-primary">{{ $log->updatedAt() }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
{{-- Search --}}
|
||||
<form action="{{ route('log-viewer::logs.search', [$log->date, $level]) }}" method="GET">
|
||||
<div class=form-group">
|
||||
<div class="input-group">
|
||||
<input id="query" name="query" class="form-control" value="{{ $query }}" placeholder="@lang('Type here to search')">
|
||||
<span class="input-group-btn">
|
||||
@unless (is_null($query))
|
||||
<a href="{{ route('log-viewer::logs.show', [$log->date]) }}" class="btn btn-default">
|
||||
(@lang(':count results', ['count' => $entries->count()])) <span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
@endunless
|
||||
<button id="search-btn" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Log Entries --}}
|
||||
<div class="panel panel-default">
|
||||
@if ($entries->hasPages())
|
||||
<div class="panel-heading">
|
||||
{{ $entries->appends(compact('query'))->render() }}
|
||||
|
||||
<span class="label label-info pull-right">
|
||||
{{ __('Page :current of :last', ['current' => $entries->currentPage(), 'last' => $entries->lastPage()]) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="entries" class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@lang('ENV')</th>
|
||||
<th style="width: 120px;">@lang('Level')</th>
|
||||
<th style="width: 65px;">@lang('Time')</th>
|
||||
<th>@lang('Header')</th>
|
||||
<th class="text-right">@lang('Actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($entries as $key => $entry)
|
||||
<?php /** @var Arcanedev\LogViewer\Entities\LogEntry $entry */ ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="label label-env">{{ $entry->env }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="level level-{{ $entry->level }}">{!! $entry->level() !!}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="label label-default">
|
||||
{{ $entry->datetime->format('H:i:s') }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<p>{{ $entry->header }}</p>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@if ($entry->hasStack())
|
||||
<a class="btn btn-xs btn-default" role="button" data-toggle="collapse"
|
||||
href="#log-stack-{{ $key }}" aria-expanded="false" aria-controls="log-stack-{{ $key }}">
|
||||
<i class="fa fa-toggle-on"></i> @lang('Stack')
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if ($entry->hasContext())
|
||||
<a class="btn btn-xs btn-default" role="button" data-toggle="collapse"
|
||||
href="#log-context-{{ $key }}" aria-expanded="false" aria-controls="log-context-{{ $key }}">
|
||||
<i class="fa fa-toggle-on"></i> @lang('Context')
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if ($entry->hasStack() || $entry->hasContext())
|
||||
<tr>
|
||||
<td colspan="5" class="stack">
|
||||
@if ($entry->hasStack())
|
||||
<div class="stack-content collapse" id="log-stack-{{ $key }}">
|
||||
{!! $entry->stack() !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($entry->hasContext())
|
||||
<div class="stack-content collapse" id="log-context-{{ $key }}">
|
||||
<pre>{{ $entry->context() }}</pre>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">
|
||||
<span class="label label-default">@lang('The list of logs is empty!')</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($entries->hasPages())
|
||||
<div class="panel-footer">
|
||||
{!! $entries->appends(compact('query'))->render() !!}
|
||||
|
||||
<span class="label label-info pull-right">
|
||||
@lang('Page :current of :last', ['current' => $entries->currentPage(), 'last' => $entries->lastPage()])
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modals')
|
||||
{{-- DELETE MODAL --}}
|
||||
<div id="delete-log-modal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<form id="delete-log-form" action="{{ route('log-viewer::logs.delete') }}" method="POST">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="date" value="{{ $log->date }}">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">@lang('Delete log file')</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>@lang('Are you sure you want to delete this log file: :date ?', ['date' => $log->date])</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-sm btn-default pull-left" data-dismiss="modal">@lang('Cancel')</button>
|
||||
<button type="submit" class="btn btn-sm btn-danger" data-loading-text="@lang('Loading')…">@lang('Delete')</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function () {
|
||||
var deleteLogModal = $('div#delete-log-modal'),
|
||||
deleteLogForm = $('form#delete-log-form'),
|
||||
submitBtn = deleteLogForm.find('button[type=submit]');
|
||||
|
||||
deleteLogForm.on('submit', function(event) {
|
||||
event.preventDefault();
|
||||
submitBtn.button('loading');
|
||||
|
||||
$.ajax({
|
||||
url: $(this).attr('action'),
|
||||
type: $(this).attr('method'),
|
||||
dataType: 'json',
|
||||
data: $(this).serialize(),
|
||||
success: function(data) {
|
||||
submitBtn.button('reset');
|
||||
if (data.result === 'success') {
|
||||
deleteLogModal.modal('hide');
|
||||
location.replace("{{ route('log-viewer::logs.list') }}");
|
||||
}
|
||||
else {
|
||||
alert('OOPS ! This is a lack of coffee exception !')
|
||||
}
|
||||
},
|
||||
error: function(xhr, textStatus, errorThrown) {
|
||||
alert('AJAX ERROR ! Check the console !');
|
||||
console.error(errorThrown);
|
||||
submitBtn.button('reset');
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
@unless (empty(log_styler()->toHighlight()))
|
||||
@php
|
||||
$htmlHighlight = version_compare(PHP_VERSION, '7.4.0') >= 0
|
||||
? join('|', log_styler()->toHighlight())
|
||||
: join(log_styler()->toHighlight(), '|');
|
||||
@endphp
|
||||
$('.stack-content').each(function() {
|
||||
var $this = $(this);
|
||||
var html = $this.html().trim()
|
||||
.replace(/({!! $htmlHighlight !!})/gm, '<strong>$1</strong>');
|
||||
|
||||
$this.html(html);
|
||||
});
|
||||
@endunless
|
||||
});
|
||||
</script>
|
||||
@endsection
|
266
resources/views/vendor/log-viewer/bootstrap-4/_master.blade.php
vendored
Normal file
266
resources/views/vendor/log-viewer/bootstrap-4/_master.blade.php
vendored
Normal file
@@ -0,0 +1,266 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="LogViewer">
|
||||
<meta name="author" content="ARCANEDEV">
|
||||
<title>LogViewer - Created by ARCANEDEV</title>
|
||||
{{-- Styles --}}
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
||||
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700|Source+Sans+Pro:400,600' rel='stylesheet' type='text/css'>
|
||||
<style>
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: .875rem;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
background-color: #E8EAF6;
|
||||
}
|
||||
|
||||
.main-footer p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.main-footer .fa.fa-heart {
|
||||
color: #C62828;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
border-bottom: 1px solid #8a8a8a;
|
||||
}
|
||||
|
||||
/*
|
||||
* Navbar
|
||||
*/
|
||||
|
||||
.navbar-brand {
|
||||
padding: .75rem 1rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.navbar-nav .nav-link {
|
||||
padding-right: .5rem;
|
||||
padding-left: .5rem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Boxes
|
||||
*/
|
||||
|
||||
.box {
|
||||
display: block;
|
||||
padding: 0;
|
||||
min-height: 70px;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,0.1);
|
||||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
.box > .box-icon > i,
|
||||
.box .box-content .box-text,
|
||||
.box .box-content .box-number {
|
||||
color: #FFF;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.box > .box-icon {
|
||||
border-radius: 2px 0 0 2px;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 70px; width: 70px;
|
||||
text-align: center;
|
||||
font-size: 40px;
|
||||
line-height: 70px;
|
||||
background: rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.box .box-content {
|
||||
padding: 5px 10px;
|
||||
margin-left: 70px;
|
||||
}
|
||||
|
||||
.box .box-content .box-text {
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.box .box-content .box-number {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.box .box-content .progress {
|
||||
background: rgba(0,0,0,0.2);
|
||||
margin: 5px -10px 5px -10px;
|
||||
}
|
||||
|
||||
.box .box-content .progress .progress-bar {
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
/*
|
||||
* Log Menu
|
||||
*/
|
||||
|
||||
.log-menu .list-group-item.disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.log-menu .list-group-item.disabled .level-name {
|
||||
color: #D1D1D1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Log Entry
|
||||
*/
|
||||
|
||||
.stack-content {
|
||||
color: #AE0E0E;
|
||||
font-family: consolas, Menlo, Courier, monospace;
|
||||
white-space: pre-line;
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Colors: Badge & Infobox
|
||||
*/
|
||||
|
||||
.badge.badge-env,
|
||||
.badge.badge-level-all,
|
||||
.badge.badge-level-emergency,
|
||||
.badge.badge-level-alert,
|
||||
.badge.badge-level-critical,
|
||||
.badge.badge-level-error,
|
||||
.badge.badge-level-warning,
|
||||
.badge.badge-level-notice,
|
||||
.badge.badge-level-info,
|
||||
.badge.badge-level-debug,
|
||||
.badge.empty {
|
||||
color: #FFF;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.badge.badge-level-all,
|
||||
.box.level-all {
|
||||
background-color: {{ log_styler()->color('all') }};
|
||||
}
|
||||
|
||||
.badge.badge-level-emergency,
|
||||
.box.level-emergency {
|
||||
background-color: {{ log_styler()->color('emergency') }};
|
||||
}
|
||||
|
||||
.badge.badge-level-alert,
|
||||
.box.level-alert {
|
||||
background-color: {{ log_styler()->color('alert') }};
|
||||
}
|
||||
|
||||
.badge.badge-level-critical,
|
||||
.box.level-critical {
|
||||
background-color: {{ log_styler()->color('critical') }};
|
||||
}
|
||||
|
||||
.badge.badge-level-error,
|
||||
.box.level-error {
|
||||
background-color: {{ log_styler()->color('error') }};
|
||||
}
|
||||
|
||||
.badge.badge-level-warning,
|
||||
.box.level-warning {
|
||||
background-color: {{ log_styler()->color('warning') }};
|
||||
}
|
||||
|
||||
.badge.badge-level-notice,
|
||||
.box.level-notice {
|
||||
background-color: {{ log_styler()->color('notice') }};
|
||||
}
|
||||
|
||||
.badge.badge-level-info,
|
||||
.box.level-info {
|
||||
background-color: {{ log_styler()->color('info') }};
|
||||
}
|
||||
|
||||
.badge.badge-level-debug,
|
||||
.box.level-debug {
|
||||
background-color: {{ log_styler()->color('debug') }};
|
||||
}
|
||||
|
||||
.badge.empty,
|
||||
.box.empty {
|
||||
background-color: {{ log_styler()->color('empty') }};
|
||||
}
|
||||
|
||||
.badge.badge-env {
|
||||
background-color: #6A1B9A;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-md navbar-dark sticky-top bg-dark p-0">
|
||||
<a href="{{ route('log-viewer::dashboard') }}" class="navbar-brand mr-0">
|
||||
<i class="fa fa-fw fa-book"></i> LogViewer
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item {{ Route::is('log-viewer::dashboard') ? 'active' : '' }}">
|
||||
<a href="{{ route('log-viewer::dashboard') }}" class="nav-link">
|
||||
<i class="fa fa-dashboard"></i> @lang('Dashboard')
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item {{ Route::is('log-viewer::logs.list') ? 'active' : '' }}">
|
||||
<a href="{{ route('log-viewer::logs.list') }}" class="nav-link">
|
||||
<i class="fa fa-archive"></i> @lang('Logs')
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<main role="main" class="pt-3">
|
||||
@yield('content')
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{{-- Footer --}}
|
||||
<footer class="main-footer">
|
||||
<div class="container-fluid">
|
||||
<p class="text-muted pull-left">
|
||||
LogViewer - <span class="badge badge-info">version {{ log_viewer()->version() }}</span>
|
||||
</p>
|
||||
<p class="text-muted pull-right">
|
||||
Created with <i class="fa fa-heart"></i> by ARCANEDEV <sup>©</sup>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{-- Scripts --}}
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
|
||||
|
||||
@yield('modals')
|
||||
@yield('scripts')
|
||||
</body>
|
||||
</html>
|
53
resources/views/vendor/log-viewer/bootstrap-4/dashboard.blade.php
vendored
Normal file
53
resources/views/vendor/log-viewer/bootstrap-4/dashboard.blade.php
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
@extends('log-viewer::bootstrap-4._master')
|
||||
|
||||
@section('content')
|
||||
<div class="page-header mb-4">
|
||||
<h1>@lang('Dashboard')</h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<canvas id="stats-doughnut-chart" height="300" class="mb-3"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-lg-9">
|
||||
<div class="row">
|
||||
@foreach($percents as $level => $item)
|
||||
<div class="col-sm-6 col-md-12 col-lg-4 mb-3">
|
||||
<div class="box level-{{ $level }} {{ $item['count'] === 0 ? 'empty' : '' }}">
|
||||
<div class="box-icon">
|
||||
{!! log_styler()->icon($level) !!}
|
||||
</div>
|
||||
|
||||
<div class="box-content">
|
||||
<span class="box-text">{{ $item['name'] }}</span>
|
||||
<span class="box-number">
|
||||
{{ $item['count'] }} @lang('entries') - {!! $item['percent'] !!} %
|
||||
</span>
|
||||
<div class="progress" style="height: 3px;">
|
||||
<div class="progress-bar" style="width: {{ $item['percent'] }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function() {
|
||||
new Chart(document.getElementById("stats-doughnut-chart"), {
|
||||
type: 'doughnut',
|
||||
data: {!! $chartData !!},
|
||||
options: {
|
||||
legend: {
|
||||
position: 'bottom'
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
152
resources/views/vendor/log-viewer/bootstrap-4/logs.blade.php
vendored
Normal file
152
resources/views/vendor/log-viewer/bootstrap-4/logs.blade.php
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
@extends('log-viewer::bootstrap-4._master')
|
||||
|
||||
<?php /** @var Illuminate\Pagination\LengthAwarePaginator $rows */ ?>
|
||||
|
||||
@section('content')
|
||||
<div class="page-header mb-4">
|
||||
<h1>@lang('Logs')</h1>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach($headers as $key => $header)
|
||||
<th scope="col" class="{{ $key == 'date' ? 'text-left' : 'text-center' }}">
|
||||
@if ($key == 'date')
|
||||
<span class="badge badge-info">{{ $header }}</span>
|
||||
@else
|
||||
<span class="badge badge-level-{{ $key }}">
|
||||
{{ log_styler()->icon($key) }} {{ $header }}
|
||||
</span>
|
||||
@endif
|
||||
</th>
|
||||
@endforeach
|
||||
<th scope="col" class="text-right">@lang('Actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($rows as $date => $row)
|
||||
<tr>
|
||||
@foreach($row as $key => $value)
|
||||
<td class="{{ $key == 'date' ? 'text-left' : 'text-center' }}">
|
||||
@if ($key == 'date')
|
||||
<span class="badge badge-primary">{{ $value }}</span>
|
||||
@elseif ($value == 0)
|
||||
<span class="badge empty">{{ $value }}</span>
|
||||
@else
|
||||
<a href="{{ route('log-viewer::logs.filter', [$date, $key]) }}">
|
||||
<span class="badge badge-level-{{ $key }}">{{ $value }}</span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
@endforeach
|
||||
<td class="text-right">
|
||||
<a href="{{ route('log-viewer::logs.show', [$date]) }}" class="btn btn-sm btn-info">
|
||||
<i class="fa fa-search"></i>
|
||||
</a>
|
||||
<a href="{{ route('log-viewer::logs.download', [$date]) }}" class="btn btn-sm btn-success">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
<a href="#delete-log-modal" class="btn btn-sm btn-danger" data-log-date="{{ $date }}">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="11" class="text-center">
|
||||
<span class="badge badge-secondary">@lang('The list of logs is empty!')</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ $rows->render() }}
|
||||
@endsection
|
||||
|
||||
@section('modals')
|
||||
{{-- DELETE MODAL --}}
|
||||
<div id="delete-log-modal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="delete-log-form" action="{{ route('log-viewer::logs.delete') }}" method="POST">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="date" value="">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">@lang('Delete log file')</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-sm btn-secondary mr-auto" data-dismiss="modal">@lang('Cancel')</button>
|
||||
<button type="submit" class="btn btn-sm btn-danger" data-loading-text="@lang('Loading')…">@lang('Delete')</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function () {
|
||||
var deleteLogModal = $('div#delete-log-modal'),
|
||||
deleteLogForm = $('form#delete-log-form'),
|
||||
submitBtn = deleteLogForm.find('button[type=submit]');
|
||||
|
||||
$("a[href='#delete-log-modal']").on('click', function(event) {
|
||||
event.preventDefault();
|
||||
var date = $(this).data('log-date'),
|
||||
message = "{{ __('Are you sure you want to delete this log file: :date ?') }}";
|
||||
|
||||
deleteLogForm.find('input[name=date]').val(date);
|
||||
deleteLogModal.find('.modal-body p').html(message.replace(':date', date));
|
||||
|
||||
deleteLogModal.modal('show');
|
||||
});
|
||||
|
||||
deleteLogForm.on('submit', function(event) {
|
||||
event.preventDefault();
|
||||
submitBtn.button('loading');
|
||||
|
||||
$.ajax({
|
||||
url: $(this).attr('action'),
|
||||
type: $(this).attr('method'),
|
||||
dataType: 'json',
|
||||
data: $(this).serialize(),
|
||||
success: function(data) {
|
||||
submitBtn.button('reset');
|
||||
if (data.result === 'success') {
|
||||
deleteLogModal.modal('hide');
|
||||
location.reload();
|
||||
}
|
||||
else {
|
||||
alert('AJAX ERROR ! Check the console !');
|
||||
console.error(data);
|
||||
}
|
||||
},
|
||||
error: function(xhr, textStatus, errorThrown) {
|
||||
alert('AJAX ERROR ! Check the console !');
|
||||
console.error(errorThrown);
|
||||
submitBtn.button('reset');
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
deleteLogModal.on('hidden.bs.modal', function() {
|
||||
deleteLogForm.find('input[name=date]').val('');
|
||||
deleteLogModal.find('.modal-body p').html('');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
274
resources/views/vendor/log-viewer/bootstrap-4/show.blade.php
vendored
Normal file
274
resources/views/vendor/log-viewer/bootstrap-4/show.blade.php
vendored
Normal file
@@ -0,0 +1,274 @@
|
||||
<?php
|
||||
/**
|
||||
* @var Arcanedev\LogViewer\Entities\Log $log
|
||||
* @var Illuminate\Pagination\LengthAwarePaginator $entries
|
||||
* @var string|null $query
|
||||
*/
|
||||
?>
|
||||
|
||||
@extends('log-viewer::bootstrap-4._master')
|
||||
|
||||
@section('content')
|
||||
<div class="page-header mb-4">
|
||||
<h1>@lang('Log') [{{ $log->date }}]</h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-2">
|
||||
{{-- Log Menu --}}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header"><i class="fa fa-fw fa-flag"></i> @lang('Levels')</div>
|
||||
<div class="list-group list-group-flush log-menu">
|
||||
@foreach($log->menu() as $levelKey => $item)
|
||||
@if ($item['count'] === 0)
|
||||
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center disabled">
|
||||
<span class="level-name">{!! $item['icon'] !!} {{ $item['name'] }}</span>
|
||||
<span class="badge empty">{{ $item['count'] }}</span>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ $item['url'] }}" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center level-{{ $levelKey }}{{ $level === $levelKey ? ' active' : ''}}">
|
||||
<span class="level-name">{!! $item['icon'] !!} {{ $item['name'] }}</span>
|
||||
<span class="badge badge-level-{{ $levelKey }}">{{ $item['count'] }}</span>
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
{{-- Log Details --}}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
@lang('Log info') :
|
||||
<div class="group-btns pull-right">
|
||||
<a href="{{ route('log-viewer::logs.download', [$log->date]) }}" class="btn btn-sm btn-success">
|
||||
<i class="fa fa-download"></i> @lang('Download')
|
||||
</a>
|
||||
<a href="#delete-log-modal" class="btn btn-sm btn-danger" data-toggle="modal">
|
||||
<i class="fa fa-trash-o"></i> @lang('Delete')
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>@lang('File path') :</td>
|
||||
<td colspan="7">{{ $log->getPath() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@lang('Log entries') :</td>
|
||||
<td>
|
||||
<span class="badge badge-primary">{{ $entries->total() }}</span>
|
||||
</td>
|
||||
<td>@lang('Size') :</td>
|
||||
<td>
|
||||
<span class="badge badge-primary">{{ $log->size() }}</span>
|
||||
</td>
|
||||
<td>@lang('Created at') :</td>
|
||||
<td>
|
||||
<span class="badge badge-primary">{{ $log->createdAt() }}</span>
|
||||
</td>
|
||||
<td>@lang('Updated at') :</td>
|
||||
<td>
|
||||
<span class="badge badge-primary">{{ $log->updatedAt() }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
{{-- Search --}}
|
||||
<form action="{{ route('log-viewer::logs.search', [$log->date, $level]) }}" method="GET">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input id="query" name="query" class="form-control" value="{{ $query }}" placeholder="@lang('Type here to search')">
|
||||
<div class="input-group-append">
|
||||
@unless (is_null($query))
|
||||
<a href="{{ route('log-viewer::logs.show', [$log->date]) }}" class="btn btn-secondary">
|
||||
(@lang(':count results', ['count' => $entries->count()])) <i class="fa fa-fw fa-times"></i>
|
||||
</a>
|
||||
@endunless
|
||||
<button id="search-btn" class="btn btn-primary">
|
||||
<span class="fa fa-fw fa-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Log Entries --}}
|
||||
<div class="card mb-4">
|
||||
@if ($entries->hasPages())
|
||||
<div class="card-header">
|
||||
<span class="badge badge-info float-right">
|
||||
{{ __('Page :current of :last', ['current' => $entries->currentPage(), 'last' => $entries->lastPage()]) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="entries" class="table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@lang('ENV')</th>
|
||||
<th style="width: 120px;">@lang('Level')</th>
|
||||
<th style="width: 65px;">@lang('Time')</th>
|
||||
<th>@lang('Header')</th>
|
||||
<th class="text-right">@lang('Actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($entries as $key => $entry)
|
||||
<?php /** @var Arcanedev\LogViewer\Entities\LogEntry $entry */ ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="badge badge-env">{{ $entry->env }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-level-{{ $entry->level }}">
|
||||
{!! $entry->level() !!}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-secondary">
|
||||
{{ $entry->datetime->format('H:i:s') }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ $entry->header }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@if ($entry->hasStack())
|
||||
<a class="btn btn-sm btn-light" role="button" data-toggle="collapse"
|
||||
href="#log-stack-{{ $key }}" aria-expanded="false" aria-controls="log-stack-{{ $key }}">
|
||||
<i class="fa fa-toggle-on"></i> @lang('Stack')
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if ($entry->hasContext())
|
||||
<a class="btn btn-sm btn-light" role="button" data-toggle="collapse"
|
||||
href="#log-context-{{ $key }}" aria-expanded="false" aria-controls="log-context-{{ $key }}">
|
||||
<i class="fa fa-toggle-on"></i> @lang('Context')
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if ($entry->hasStack() || $entry->hasContext())
|
||||
<tr>
|
||||
<td colspan="5" class="stack py-0">
|
||||
@if ($entry->hasStack())
|
||||
<div class="stack-content collapse" id="log-stack-{{ $key }}">
|
||||
{!! $entry->stack() !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($entry->hasContext())
|
||||
<div class="stack-content collapse" id="log-context-{{ $key }}">
|
||||
<pre>{{ $entry->context() }}</pre>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">
|
||||
<span class="badge badge-secondary">@lang('The list of logs is empty!')</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $entries->appends(compact('query'))->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modals')
|
||||
{{-- DELETE MODAL --}}
|
||||
<div id="delete-log-modal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="delete-log-form" action="{{ route('log-viewer::logs.delete') }}" method="POST">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="date" value="{{ $log->date }}">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">@lang('Delete log file')</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>@lang('Are you sure you want to delete this log file: :date ?', ['date' => $log->date])</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-sm btn-secondary mr-auto" data-dismiss="modal">@lang('Cancel')</button>
|
||||
<button type="submit" class="btn btn-sm btn-danger" data-loading-text="@lang('Loading')…">@lang('Delete')</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function () {
|
||||
var deleteLogModal = $('div#delete-log-modal'),
|
||||
deleteLogForm = $('form#delete-log-form'),
|
||||
submitBtn = deleteLogForm.find('button[type=submit]');
|
||||
|
||||
deleteLogForm.on('submit', function(event) {
|
||||
event.preventDefault();
|
||||
submitBtn.button('loading');
|
||||
|
||||
$.ajax({
|
||||
url: $(this).attr('action'),
|
||||
type: $(this).attr('method'),
|
||||
dataType: 'json',
|
||||
data: $(this).serialize(),
|
||||
success: function(data) {
|
||||
submitBtn.button('reset');
|
||||
if (data.result === 'success') {
|
||||
deleteLogModal.modal('hide');
|
||||
location.replace("{{ route('log-viewer::logs.list') }}");
|
||||
}
|
||||
else {
|
||||
alert('OOPS ! This is a lack of coffee exception !')
|
||||
}
|
||||
},
|
||||
error: function(xhr, textStatus, errorThrown) {
|
||||
alert('AJAX ERROR ! Check the console !');
|
||||
console.error(errorThrown);
|
||||
submitBtn.button('reset');
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
@unless (empty(log_styler()->toHighlight()))
|
||||
@php
|
||||
$htmlHighlight = version_compare(PHP_VERSION, '7.4.0') >= 0
|
||||
? join('|', log_styler()->toHighlight())
|
||||
: join(log_styler()->toHighlight(), '|');
|
||||
@endphp
|
||||
|
||||
$('.stack-content').each(function() {
|
||||
var $this = $(this);
|
||||
var html = $this.html().trim()
|
||||
.replace(/({!! $htmlHighlight !!})/gm, '<strong>$1</strong>');
|
||||
|
||||
$this.html(html);
|
||||
});
|
||||
@endunless
|
||||
});
|
||||
</script>
|
||||
@endsection
|
Reference in New Issue
Block a user