mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
feat: new dashboard page to show percentile scores on PoW performance analysis records
This commit is contained in:
@@ -5,15 +5,15 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<nav class="secondary-menu">
|
||||
<input type="checkbox" class="nav-toggle" id="nav-toggle" >
|
||||
<input type="checkbox" class="nav-toggle" id="nav-toggle" >
|
||||
<div class="secondary-menu__heading">
|
||||
<a class="novisit" href="/">
|
||||
<img class="secondary-menu__logo" src="<.= crate::MCAPTCHA_TRANS_ICON.0 .>" alt="<.= crate::MCAPTCHA_TRANS_ICON.1 .>" />
|
||||
<a class="novisit" href="/">
|
||||
<img class="secondary-menu__logo" src="<.= crate::MCAPTCHA_TRANS_ICON.0 .>" alt="<.= crate::MCAPTCHA_TRANS_ICON.1 .>" />
|
||||
</a>
|
||||
<a href="/" class="secondary-menu__brand-name">
|
||||
mCaptcha
|
||||
</a>
|
||||
<label class="nav__hamburger-menu"for="nav-toggle">
|
||||
<label class="nav__hamburger-menu"for="nav-toggle">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
@@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
</div>
|
||||
<ul class="secondary-menu__list">
|
||||
<li class="secondary-menu__item">
|
||||
<a class="secondary-menu__item-link" href="<.= crate::PAGES.home .>">
|
||||
<a class="secondary-menu__item-link" href="<.= crate::PAGES.home .>">
|
||||
<img class="secondary-menu__icon" src="<.= crate::HOME.0 .>" alt="<.= crate::HOME.1 .>" />
|
||||
<div class="secondary-menu__item-name">
|
||||
Overview
|
||||
@@ -29,13 +29,21 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
</a>
|
||||
</li>
|
||||
<li class="secondary-menu__item">
|
||||
<a class="secondary-menu__item-link" href="<.= crate::PAGES.panel.sitekey.list .>">
|
||||
<a class="secondary-menu__item-link" href="<.= crate::PAGES.panel.sitekey.list .>">
|
||||
<img class="secondary-menu__icon" src="<.= crate::KEY.0 .>" alt="<.= crate::KEY.1 .>" />
|
||||
<div class="secondary-menu__item-name">
|
||||
Site Keys
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="secondary-menu__item">
|
||||
<a class="secondary-menu__item-link" href="<.= crate::PAGES.panel.utils.percentile .>">
|
||||
<img class="secondary-menu__icon" src="<.= crate::BAR_CHART.0 .>" alt="<.= crate::BAR_CHART.1 .>" />
|
||||
<div class="secondary-menu__item-name">
|
||||
Statistics
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="secondary-menu__item">
|
||||
<a class="secondary-menu__item-link" href="<.= crate::PAGES.panel.settings.home .>">
|
||||
<img class="secondary-menu__icon" src="<.= crate::SETTINGS_ICON.0 .>" alt="<.= crate::SETTINGS_ICON.1 .>" />
|
||||
|
||||
67
templates/panel/utils/percentile/index.html
Normal file
67
templates/panel/utils/percentile/index.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<. include!("../../../components/headers/index.html"); .>
|
||||
<. include!("../../navbar/index.html"); .>
|
||||
<div class="tmp-layout">
|
||||
<. include!("../../header/index.html"); .>
|
||||
<main class="panel-main">
|
||||
<. include!("../../help-banner/index.html"); .>
|
||||
<!-- Main content container -->
|
||||
<div class="inner-container">
|
||||
<div class="sitekey-form" action="<.= crate::V1_API_ROUTES.captcha.create .>" method="post">
|
||||
<h1 class="form__title">
|
||||
<.= PAGE .>
|
||||
</h1>
|
||||
|
||||
<form class="settings__form" id="utils_percentile-form"
|
||||
action="<.= crate::PAGES.panel.utils.percentile .>" method="post">
|
||||
|
||||
<. if let Some(difficulty_factor) = difficulty_factor { .>
|
||||
<legend class="sitekey__level-title">
|
||||
<p>Difficulty factor: <.= difficulty_factor .></p>
|
||||
</legend>
|
||||
<. } else { .>
|
||||
<. if time.is_some() && percentile.is_some() { .>
|
||||
<legend class="sitekey__level-title">
|
||||
<p>Not enough inputs to compute statistics. Please try again later</p>
|
||||
</legend>
|
||||
<. } .>
|
||||
<. } .>
|
||||
|
||||
|
||||
<label class="settings-form__label" for="time">
|
||||
Maximum time taken to solve CAPTCHA (in seconds)
|
||||
<input
|
||||
class="settings-form__input"
|
||||
type="number"
|
||||
name="time"
|
||||
required
|
||||
id="time"
|
||||
<. if let Some(time) = time { .>
|
||||
value="<.= time .>"
|
||||
<. } .>
|
||||
/>
|
||||
</label>
|
||||
<label class="settings-form__label" for="percentile">
|
||||
Percentile of requests coming under time limit
|
||||
<input
|
||||
class="settings-form__input"
|
||||
type="number"
|
||||
name="percentile"
|
||||
required
|
||||
id="percentile"
|
||||
<. if let Some(percentile) = percentile { .>
|
||||
value="<.= percentile .>"
|
||||
<. } .>
|
||||
/>
|
||||
</label>
|
||||
<button class="settings__submit-btn" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end of container -->
|
||||
<. include!("../../../components/footers.html"); .>
|
||||
Reference in New Issue
Block a user