|
2 | 2 | * ログ管理のメインテンプレート |
3 | 3 | * |
4 | 4 | * @author 永原 篤 <[email protected]> |
| 5 | + * @author 牟田口 満 <[email protected]> |
5 | 6 | * @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved |
6 | 7 | * @category ログ管理 |
7 | 8 | --}} |
|
11 | 12 | {{-- 管理画面メイン部分のコンテンツ section:manage_content で作ること --}} |
12 | 13 | @section('manage_content') |
13 | 14 |
|
| 15 | +<script type="text/javascript"> |
| 16 | + let calendar_setting = { |
| 17 | + @if (App::getLocale() == ConnectLocale::ja) |
| 18 | + dayViewHeaderFormat: 'YYYY年 M月', |
| 19 | + @endif |
| 20 | + locale: '{{ App::getLocale() }}', |
| 21 | + // 日時の両方入力 |
| 22 | + format: 'YYYY-MM-DD HH:mm:ss', |
| 23 | + sideBySide: true |
| 24 | + }; |
| 25 | +
|
| 26 | + $(function () { |
| 27 | + // 時計ボタン押下の設定 |
| 28 | + $('#start_created_at').datetimepicker(calendar_setting); |
| 29 | + $('#end_created_at').datetimepicker(calendar_setting); |
| 30 | + }); |
| 31 | +</script> |
| 32 | + |
14 | 33 | <div class="card"> |
15 | 34 | <div class="card-header p-0"> |
16 | 35 | {{-- 機能選択タブ --}} |
|
31 | 50 | <form name="form_search" id="form_search" class="form-horizontal" method="post" action="{{url('/')}}/manage/log/search"> |
32 | 51 | {{ csrf_field() }} |
33 | 52 |
|
34 | | - {{-- ログインID --}} |
| 53 | + <!-- 日時 --> |
35 | 54 | <div class="form-group row"> |
36 | | - <label for="app_log_search_condition_userid" class="col-md-3 col-form-label text-md-right">ログインID</label> |
| 55 | + <label class="col-md-3 col-form-label text-md-right">日時</label> |
37 | 56 | <div class="col-md-9"> |
38 | | - <input type="text" name="app_log_search_condition[userid]" id="app_log_search_condition_userid" value="{{Session::get('app_log_search_condition.userid')}}" class="form-control"> |
39 | | - <small class="text-muted">ログインID & 以下の条件を指定した場合はいずれかに合致した場合</small> |
| 57 | + |
| 58 | + <div class="form-row"> |
| 59 | + <!-- 日時From --> |
| 60 | + <div class="col-md-6"> |
| 61 | + <div class="input-group" id="start_created_at" data-target-input="nearest"> |
| 62 | + @php |
| 63 | + $start_created_at = Session::get("app_log_search_condition.start_created_at"); |
| 64 | + $start_created_at = $start_created_at ? (new Carbon($start_created_at)) : ''; |
| 65 | + @endphp |
| 66 | + <input type="text" name="app_log_search_condition[start_created_at]" value="{{$start_created_at}}" class="form-control datetimepicker-input" data-target="#start_created_at"> |
| 67 | + <div class="input-group-append" data-target="#start_created_at" data-toggle="datetimepicker"> |
| 68 | + <div class="input-group-text"><i class="far fa-clock"></i></div> |
| 69 | + </div> |
| 70 | + <div class="form-text pl-2"> |
| 71 | + ~ |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + <!-- 日時To --> |
| 76 | + <div class="col-md-6"> |
| 77 | + <div class="input-group" id="end_created_at" data-target-input="nearest"> |
| 78 | + @php |
| 79 | + $end_created_at = Session::get("app_log_search_condition.end_created_at"); |
| 80 | + $end_created_at = $end_created_at ? (new Carbon($end_created_at)) : ''; |
| 81 | + @endphp |
| 82 | + <input type="text" name="app_log_search_condition[end_created_at]" value="{{$end_created_at}}" class="form-control datetimepicker-input" data-target="#end_created_at"> |
| 83 | + <div class="input-group-append" data-target="#end_created_at" data-toggle="datetimepicker"> |
| 84 | + <div class="input-group-text"><i class="far fa-clock"></i></div> |
| 85 | + </div> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + </div><!-- /.form-row --> |
| 89 | + @include('plugins.common.errors_inline', ['name' => 'app_log_search_condition.start_created_at']) |
| 90 | + @include('plugins.common.errors_inline', ['name' => 'app_log_search_condition.end_created_at']) |
| 91 | + |
| 92 | + </div><!-- /.col-md-9 --> |
| 93 | + </div><!-- /.row --> |
| 94 | + |
| 95 | + <!-- ログインID --> |
| 96 | + <div class="form-group row"> |
| 97 | + <label class="col-md-3 col-form-label text-md-right">ログインID</label> |
| 98 | + <div class="col-md-9"> |
| 99 | + <input type="text" name="app_log_search_condition[userid]" value="{{Session::get('app_log_search_condition.userid')}}" class="form-control"> |
| 100 | + </div> |
| 101 | + </div> |
| 102 | + |
| 103 | + <!-- URI --> |
| 104 | + <div class="form-group row"> |
| 105 | + <label class="col-md-3 col-form-label text-md-right">URI</label> |
| 106 | + <div class="col-md-9"> |
| 107 | + <input type="text" name="app_log_search_condition[uri]" value="{{Session::get('app_log_search_condition.uri')}}" class="form-control"> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + |
| 111 | + <div class="row"> |
| 112 | + <div class="col-md-3"></div> |
| 113 | + <div class="col-md-9"> |
| 114 | + <div class="alert alert-secondary"> |
| 115 | + 以下の条件を指定した場合はいずれかに合致した場合 |
| 116 | + </div> |
40 | 117 | </div> |
41 | 118 | </div> |
42 | 119 |
|
43 | | - {{-- ログイン関係 --}} |
| 120 | + <!-- ログイン関係 --> |
44 | 121 | <div class="form-group row"> |
45 | | - <label for="app_log_search_condition_type" class="col-md-3 text-md-right">ログイン関係</label> |
| 122 | + <label class="col-md-3 text-md-right">ログイン関係</label> |
46 | 123 | <div class="col-md-9"> |
47 | 124 | <div class="custom-control custom-control-inline custom-checkbox"> |
48 | 125 | <input name="app_log_search_condition[log_type_login]" value="1" type="checkbox" class="custom-control-input" id="log_type_login"@if(Session::get('app_log_search_condition.log_type_login') == "1") checked @endif> |
|
59 | 136 | </div> |
60 | 137 | </div> |
61 | 138 |
|
62 | | - {{-- 種別 --}} |
| 139 | + <!-- 種別 --> |
63 | 140 | <div class="form-group row"> |
64 | | - <label for="app_log_search_condition_type" class="col-md-3 text-md-right">種別</label> |
| 141 | + <label class="col-md-3 text-md-right">種別</label> |
65 | 142 | <div class="col-md-9"> |
66 | 143 | <div class="custom-control custom-control-inline custom-checkbox"> |
67 | 144 | <input name="app_log_search_condition[log_type_page]" value="1" type="checkbox" class="custom-control-input" id="log_type_page"@if(Session::get('app_log_search_condition.log_type_page') == "1") checked @endif> |
|
130 | 207 | </div> |
131 | 208 | </div> |
132 | 209 |
|
133 | | - {{-- HTTPメソッド --}} |
| 210 | + <!-- HTTPメソッド --> |
134 | 211 | <div class="form-group row"> |
135 | | - <label for="app_log_search_condition_type" class="col-md-3 text-md-right">HTTPメソッド</label> |
| 212 | + <label class="col-md-3 text-md-right">HTTPメソッド</label> |
136 | 213 | <div class="col-md-9"> |
137 | 214 | <div class="custom-control custom-control-inline custom-checkbox"> |
138 | 215 | <input name="app_log_search_condition[log_type_http_get]" value="1" type="checkbox" class="custom-control-input" id="log_type_http_get"@if(Session::get('app_log_search_condition.log_type_http_get') == "1") checked @endif> |
|
145 | 222 | </div> |
146 | 223 | </div> |
147 | 224 |
|
148 | | - {{-- ボタンエリア --}} |
| 225 | + <!-- ボタンエリア --> |
149 | 226 | <div class="form-group text-center"> |
150 | 227 | <div class="row"> |
151 | 228 | <div class="mx-auto"> |
|
166 | 243 |
|
167 | 244 | <div class="row mt-2"> |
168 | 245 | <div class="col text-left d-flex align-items-end"> |
169 | | - {{-- (左側)件数 --}} |
| 246 | + <!-- (左側)件数 --> |
170 | 247 | <span class="badge badge-pill badge-light">{{ $app_logs->total() }} 件</span> |
171 | 248 | </div> |
172 | 249 |
|
173 | 250 | <div class="col text-right"> |
174 | | - {{-- (右側)ダウンロードボタン --}} |
| 251 | + <!-- (右側)ダウンロードボタン --> |
175 | 252 | <a href="{{url('/')}}/manage/log/downloadCsv" target="_blank" onclick="return confirm('現在の絞り込み条件のログをダウンロードします。\nよろしいですか?')"> |
176 | 253 | <span class="btn btn-link"><i class="fas fa-file-download"></i> ダウンロード</span> |
177 | 254 | </a> |
|
0 commit comments