From 3a470ce78948ae355ca3494cd2038f464d993886 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 3 Oct 2017 07:28:00 -0700 Subject: [PATCH 1/3] Only report exceptions we want to see --- app/Exceptions/Handler.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index b2ea845cc..c63f3e858 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -7,6 +7,7 @@ use Illuminate\Auth\AuthenticationException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use App\Helpers\Helper; use Illuminate\Validation\ValidationException; +use Log; class Handler extends ExceptionHandler { @@ -34,8 +35,10 @@ class Handler extends ExceptionHandler */ public function report(Exception $exception) { - \Log::error($exception); // rollbar - parent::report($exception); + if ($this->shouldReport($exception)) { + Log::error($exception); + return parent::report($exception); + } } /** From c8bed867da505843763ed3959585f0d5d9e854a3 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 3 Oct 2017 07:32:18 -0700 Subject: [PATCH 2/3] Export PDF as landscape --- resources/views/partials/bootstrap-table.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index d3e911849..ce1889f6b 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -54,6 +54,7 @@ $('.snipe-table').bootstrapTable({ ignoreColumn: ['actions','change','checkbox','checkincheckout','icon'], worksheetName: "Snipe-IT Export", jspdf: { + orientation: 'l', autotable: { styles: { rowHeight: 20, From d119372ff0abf8154b96f12b352a674b5e3a21d4 Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Tue, 3 Oct 2017 11:46:06 -0400 Subject: [PATCH 3/3] Fix License Import. (#4121) The license name is not unique, so keying by license alone was causing issues. Match using name + serial instead. --- app/Importer/LicenseImporter.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Importer/LicenseImporter.php b/app/Importer/LicenseImporter.php index 207e346a5..8d1a0ac8f 100644 --- a/app/Importer/LicenseImporter.php +++ b/app/Importer/LicenseImporter.php @@ -33,10 +33,12 @@ class LicenseImporter extends ItemImporter public function createLicenseIfNotExists(array $row) { $editingLicense = false; - $license = License::where('name', $this->item['name'])->first(); + $license = License::where('name', $this->item['name']) + ->where('serial', $this->item['serial']) + ->first(); if ($license) { if (!$this->updating) { - $this->log('A matching License ' . $this->item['name'] . ' already exists'); + $this->log('A matching License ' . $this->item['name'] . 'with serial ' . $this->item['serial'] . ' already exists'); return; }