mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 09:34:10 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
a425c2b765
|
@ -56,6 +56,11 @@ class AssetsController extends Controller
|
||||||
public function index(Request $request, $action = null, $upcoming_status = null) : JsonResponse | array
|
public function index(Request $request, $action = null, $upcoming_status = null) : JsonResponse | array
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// This handles the legacy audit endpoints :(
|
||||||
|
if ($action == 'audit') {
|
||||||
|
$action = 'audits';
|
||||||
|
}
|
||||||
$filter_non_deprecable_assets = false;
|
$filter_non_deprecable_assets = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -154,8 +159,8 @@ class AssetsController extends Controller
|
||||||
* Handle due and overdue audits and checkin dates
|
* Handle due and overdue audits and checkin dates
|
||||||
*/
|
*/
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'audits':
|
// Audit (singular) is left over from earlier legacy APIs
|
||||||
|
case 'audits' :
|
||||||
switch ($upcoming_status) {
|
switch ($upcoming_status) {
|
||||||
case 'due':
|
case 'due':
|
||||||
$assets->DueForAudit($settings);
|
$assets->DueForAudit($settings);
|
||||||
|
|
|
@ -356,21 +356,22 @@
|
||||||
<h2 class="box-title">{{ trans('admin/settings/general.system') }}</h2>
|
<h2 class="box-title">{{ trans('admin/settings/general.system') }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="container row row-striped" style="width:97%">
|
<div class="row" style="margin-right:4px;">
|
||||||
|
<div class="row row-new-striped" style="line-height: 23px;">
|
||||||
|
|
||||||
<!-- row -->
|
<!-- row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.snipe_version') }}:</strong>
|
<strong>{{ trans('admin/settings/general.snipe_version') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
{{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
|
{{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.license') }}:</strong>
|
<strong>{{ trans('admin/settings/general.license') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html" rel="noopener">AGPL3</a>
|
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html" rel="noopener">AGPL3</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -378,52 +379,52 @@
|
||||||
|
|
||||||
<!-- row -->
|
<!-- row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.php') }}:</strong>
|
<strong>{{ trans('admin/settings/general.php') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
{{ phpversion() }}
|
{{ phpversion() }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.laravel') }}:</strong>
|
<strong>{{ trans('admin/settings/general.laravel') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
{{ $snipeSettings->lar_ver() }}
|
{{ $snipeSettings->lar_ver() }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- row -->
|
<!-- row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.timezone') }}:</strong>
|
<strong>{{ trans('admin/settings/general.timezone') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
{{ config('app.timezone') }}
|
{{ config('app.timezone') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.database_driver') }}:</strong>
|
<strong>{{ trans('admin/settings/general.database_driver') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
{{ config('database.default') }}
|
{{ config('database.default') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- row -->
|
<!-- row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.mail_from') }}:</strong>
|
<strong>{{ trans('admin/settings/general.mail_from') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
{{ config('mail.from.name') }}
|
{{ config('mail.from.name') }}
|
||||||
<code><{{ config('mail.from.address') }}></code>
|
<code><{{ config('mail.from.address') }}></code>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.mail_reply_to') }}:</strong>
|
<strong>{{ trans('admin/settings/general.mail_reply_to') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
{{ config('mail.reply_to.name') }}
|
{{ config('mail.reply_to.name') }}
|
||||||
<code><{{ config('mail.reply_to.address') }}></code>
|
<code><{{ config('mail.reply_to.address') }}></code>
|
||||||
</div>
|
</div>
|
||||||
|
@ -431,15 +432,18 @@
|
||||||
|
|
||||||
<!-- row -->
|
<!-- row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
<strong>{{ trans('admin/settings/general.bs_table_storage') }}:</strong>
|
<strong>{{ trans('admin/settings/general.bs_table_storage') }}:</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-4" style="padding-top: 3px; padding-bottom: 3px;">
|
||||||
{{ config('session.bs_table_storage') }}
|
{{ config('session.bs_table_storage') }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--/ row -->
|
<!--/ row -->
|
||||||
|
|
|
@ -495,24 +495,17 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi
|
||||||
)->name('api.assets.show.byserial')
|
)->name('api.assets.show.byserial')
|
||||||
->where('any', '.*');
|
->where('any', '.*');
|
||||||
|
|
||||||
// LEGACY URL - Get assets that are due or overdue for audit
|
|
||||||
Route::get('audit/{status}',
|
|
||||||
[
|
|
||||||
Api\AssetsController::class,
|
|
||||||
'index'
|
|
||||||
]
|
|
||||||
)->name('api.asset.to-audit');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// This gets the "due or overdue" API endpoints for audits and checkins
|
// This gets the "due or overdue" API endpoints for audit/audits and checkins
|
||||||
Route::get('{action}/{upcoming_status}',
|
Route::get('{action}/{upcoming_status}',
|
||||||
[
|
[
|
||||||
Api\AssetsController::class,
|
Api\AssetsController::class,
|
||||||
'index'
|
'index'
|
||||||
]
|
]
|
||||||
)->name('api.assets.list-upcoming')
|
)->name('api.assets.list-upcoming')
|
||||||
->where(['action' => 'audits|checkins', 'upcoming_status' => 'due|overdue|due-or-overdue']);
|
->where(['action' => 'audit|audits|checkins', 'upcoming_status' => 'due|overdue|due-or-overdue']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue