mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -08:00
Updated dashboard to use new API activity report and added category summary
This commit is contained in:
parent
6775c39a5e
commit
76926c97c1
|
@ -92,22 +92,26 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
|
||||||
<table
|
<table
|
||||||
class="table table-striped"
|
class="table table-striped snipe-table"
|
||||||
name="activityReport"
|
name="activityReport"
|
||||||
id="table"
|
id="table"
|
||||||
data-url="{{route('api.activity.list', ['limit' => 20]) }}">
|
data-cookie="false"
|
||||||
|
data-cookie-id-table="dashTable-{{ config('version.hash_version') }}"
|
||||||
|
data-url="{{route('api.activity.list', ['limit' => 25]) }}">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-field="icon" style="width: 40px;" class="hidden-xs"></th>
|
<th data-field="icon" style="width: 40px;" class="hidden-xs" data-formatter="iconFormatter"></th>
|
||||||
<th class="col-sm-2" data-field="created_at">{{ trans('general.date') }}</th>
|
<th class="col-sm-3" data-field="created_at" data-formatter="dateDisplayFormatter">{{ trans('general.date') }}</th>
|
||||||
<th class="col-sm-2" data-field="admin">{{ trans('general.admin') }}</th>
|
<th class="col-sm-2" data-field="admin" data-formatter="usersLinkObjFormatter">{{ trans('general.admin') }}</th>
|
||||||
<th class="col-sm-2" data-field="action_type">{{ trans('general.action') }}</th>
|
<th class="col-sm-2" data-field="action_type">{{ trans('general.action') }}</th>
|
||||||
<th class="col-sm-4" data-field="item">{{ trans('general.item') }}</th>
|
<th class="col-sm-3" data-field="item">{{ trans('general.item') }}</th>
|
||||||
<th class="col-sm-2" data-field="target">{{ trans('general.target') }}</th>
|
<th class="col-sm-2" data-field="target">{{ trans('general.target') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div><!-- /.responsive -->
|
</div><!-- /.responsive -->
|
||||||
</div><!-- /.col -->
|
</div><!-- /.col -->
|
||||||
</div><!-- /.row -->
|
</div><!-- /.row -->
|
||||||
|
@ -134,13 +138,47 @@
|
||||||
</div> <!-- /.row -->
|
</div> <!-- /.row -->
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div> <!-- /.box -->
|
</div> <!-- /.box -->
|
||||||
|
|
||||||
|
<!-- Categories -->
|
||||||
|
<div class="box box-default">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title">Asset {{ trans('general.categories') }}</h3>
|
||||||
|
<div class="box-tools pull-right">
|
||||||
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<table
|
||||||
|
class="table table-striped snipe-table"
|
||||||
|
name="categorySummary"
|
||||||
|
id="table"
|
||||||
|
data-cookie="false"
|
||||||
|
data-cookie-id-table="categorySummary-{{ config('version.hash_version') }}"
|
||||||
|
data-url="{{ route('api.categories.index', ['limit' => 15]) }}">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="col-sm-2" data-field="name" data-formatter="categoriesLinkFormatter">{{ trans('general.name') }}</th>
|
||||||
|
<th class="col-sm-2" data-field="assets_count"><i class="fa fa-barcode"></i></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div> <!-- /.col -->
|
||||||
|
</div> <!-- /.row -->
|
||||||
|
</div><!-- /.box-body -->
|
||||||
|
</div> <!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
</div> <!--/row-->
|
</div> <!--/row-->
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
|
||||||
@section('moar_scripts')
|
@section('moar_scripts')
|
||||||
|
@include ('partials.bootstrap-table', ['simple_view' => true])
|
||||||
|
|
||||||
|
|
||||||
<script src="{{ asset('assets/js/plugins/chartjs/Chart.min.js') }}"></script>
|
<script src="{{ asset('assets/js/plugins/chartjs/Chart.min.js') }}"></script>
|
||||||
<script>
|
<script>
|
||||||
var pieChartCanvas = $("#statusPieChart").get(0).getContext("2d");
|
var pieChartCanvas = $("#statusPieChart").get(0).getContext("2d");
|
||||||
|
@ -174,22 +212,5 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
|
||||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$('#table').bootstrapTable({
|
|
||||||
classes: 'table table-responsive table-no-bordered',
|
|
||||||
undefinedText: '',
|
|
||||||
iconsPrefix: 'fa',
|
|
||||||
showRefresh: false,
|
|
||||||
search: false,
|
|
||||||
pagination: false,
|
|
||||||
sidePagination: 'server',
|
|
||||||
sortable: false,
|
|
||||||
showMultiSort: false,
|
|
||||||
cookie: false,
|
|
||||||
mobileResponsive: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@stop
|
@stop
|
||||||
|
|
Loading…
Reference in a new issue