feat: show popular searches
parent
63572c23ce
commit
f4cf482a87
@ -0,0 +1,25 @@
|
|||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- admin
|
||||||
|
summary: Get detailed user registration analytics
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: A JSON object containing popular searches.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
searches:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
description: The string that was searched
|
||||||
|
score:
|
||||||
|
type: number
|
||||||
|
description: Number of times this string has been searched
|
||||||
|
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps
|
@ -0,0 +1,25 @@
|
|||||||
|
<div class="row dashboard">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<a class="btn btn-link" href="{config.relative_path}/admin/dashboard">
|
||||||
|
<i class="fa fa-chevron-left"></i>
|
||||||
|
[[admin/dashboard:back-to-dashboard]]
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="table table-striped search-list">
|
||||||
|
<tbody>
|
||||||
|
{{{ if !searches.length}}}
|
||||||
|
<tr>
|
||||||
|
<td colspan=4" class="text-center"><em>[[admin/dashboard:details.no-searches]]</em></td>
|
||||||
|
</tr>
|
||||||
|
{{{ end }}}
|
||||||
|
{{{ each searches }}}
|
||||||
|
<tr>
|
||||||
|
<td>{searches.value}</a></td>
|
||||||
|
<td class="text-right">{searches.score}</td>
|
||||||
|
</tr>
|
||||||
|
{{{ end }}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue