mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Made type searchable in action logs
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f0813e03bf
commit
f68df1fa06
|
@ -44,21 +44,6 @@ class ReportsController extends Controller
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->filled('action_type')) {
|
|
||||||
$actionlogs = $actionlogs->where('action_type', '=', $request->input('action_type'))->orderBy('created_at', 'desc');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->filled('created_by')) {
|
|
||||||
$actionlogs = $actionlogs->where('created_by', '=', $request->input('created_by'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->filled('action_source')) {
|
|
||||||
$actionlogs = $actionlogs->where('action_source', '=', $request->input('action_source'))->orderBy('created_at', 'desc');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->filled('remote_ip')) {
|
|
||||||
$actionlogs = $actionlogs->where('remote_ip', '=', $request->input('remote_ip'))->orderBy('created_at', 'desc');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->filled('uploads')) {
|
if ($request->filled('uploads')) {
|
||||||
$actionlogs = $actionlogs->whereNotNull('filename')->orderBy('created_at', 'desc');
|
$actionlogs = $actionlogs->whereNotNull('filename')->orderBy('created_at', 'desc');
|
||||||
|
@ -74,6 +59,8 @@ class ReportsController extends Controller
|
||||||
'note',
|
'note',
|
||||||
'remote_ip',
|
'remote_ip',
|
||||||
'user_agent',
|
'user_agent',
|
||||||
|
'target_type',
|
||||||
|
'item_type',
|
||||||
'action_source',
|
'action_source',
|
||||||
'action_date',
|
'action_date',
|
||||||
];
|
];
|
||||||
|
|
|
@ -55,6 +55,8 @@ class Actionlog extends SnipeModel
|
||||||
'created_by',
|
'created_by',
|
||||||
'remote_ip',
|
'remote_ip',
|
||||||
'user_agent',
|
'user_agent',
|
||||||
|
'item_type',
|
||||||
|
'target_type',
|
||||||
'action_source'
|
'action_source'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -64,10 +66,10 @@ class Actionlog extends SnipeModel
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $searchableRelations = [
|
protected $searchableRelations = [
|
||||||
'company' => ['name'],
|
'company' => ['name'],
|
||||||
'adminuser' => ['first_name','last_name','username', 'email'],
|
'adminuser' => ['first_name','last_name','username', 'email'],
|
||||||
'user' => ['first_name','last_name','username', 'email'],
|
'user' => ['first_name','last_name','username', 'email'],
|
||||||
'assets' => ['asset_tag','name'],
|
'assets' => ['asset_tag','name'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
<th class="col-sm-2" data-field="file" data-visible="false" data-formatter="fileUploadNameFormatter">
|
<th class="col-sm-2" data-field="file" data-visible="false" data-formatter="fileUploadNameFormatter">
|
||||||
{{ trans('general.file_name') }}
|
{{ trans('general.file_name') }}
|
||||||
</th>
|
</th>
|
||||||
<th class="col-sm-1" data-field="type" data-formatter="itemTypeFormatter">
|
<th class="col-sm-1" data-field="item_type" data-searchable="true" data-formatter="itemTypeFormatter">
|
||||||
{{ trans('general.type') }}
|
{{ trans('general.type') }}
|
||||||
</th>
|
</th>
|
||||||
<th class="col-sm-3" data-field="item.serial" data-visible="false">
|
<th class="col-sm-3" data-field="item.serial" data-visible="false">
|
||||||
|
|
Loading…
Reference in a new issue