1
0
Fork 0
mirror of synced 2024-06-11 15:24:45 +12:00

Stats for last 30 days

This commit is contained in:
Eldad Fux 2020-05-01 21:44:43 +03:00
parent cd999c5742
commit 3588b2e2ca
7 changed files with 21 additions and 9 deletions

View file

@ -153,7 +153,7 @@ $utopia->get('/v1/projects/:projectId/usage')
->label('sdk.namespace', 'projects')
->label('sdk.method', 'getUsage')
->param('projectId', '', function () { return new UID(); }, 'Project unique ID.')
->param('range', 'monthly', function () { return new WhiteList(['daily', 'monthly', 'last30', 'last90']); }, 'Date range.', true)
->param('range', 'last30', function () { return new WhiteList(['daily', 'monthly', 'last30', 'last90']); }, 'Date range.', true)
->action(
function ($projectId, $range) use ($response, $consoleDB, $projectDB, $register) {
$project = $consoleDB->getDocument($projectId);

View file

@ -32,7 +32,7 @@ const APP_EMAIL_SECURITY = 'security@localhost.test'; // Default security email
const APP_USERAGENT = APP_NAME.'-Server v%s. Please report abuse at %s';
const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 15;
const APP_CACHE_BUSTER = 117;
const APP_CACHE_BUSTER = 119;
const APP_VERSION_STABLE = '0.5.3';
const APP_STORAGE_UPLOADS = '/storage/uploads';
const APP_STORAGE_CACHE = '/storage/cache';

View file

@ -18,6 +18,7 @@ $graph = $this->getParam('graph', false);
<li class="pull-start margin-end margin-bottom-small"><a data-ls-attrs="href=/console/keys?project={{router.params.project}}"><i class="icon-key-inv"></i> &nbsp;API Keys</a> &nbsp;&nbsp;</li>
<li class="pull-start margin-end margin-bottom-small"><a data-ls-attrs="href=/console/webhooks?project={{router.params.project}}"><i class="icon-link"></i> &nbsp;Webhooks</a> &nbsp;&nbsp;</li>
<li class="pull-start margin-end margin-bottom-small"><a data-ls-attrs="href=/console/tasks?project={{router.params.project}}"><i class="icon-clock"></i> &nbsp;Tasks</a> &nbsp;&nbsp;</li>
<!-- <li class="pull-end margin-start margin-bottom-small text-size-small margin-top-tiny"><a data-ls-attrs="href=/console/tasks?project={{router.params.project}}">May 2020 &nbsp; <i class="icon-down-dir"></i></a></li> -->
</ul>
</div>
</div>
@ -29,7 +30,7 @@ $graph = $this->getParam('graph', false);
data-event="load"
data-name="usage"
data-param-project-id="{{router.params.project}}"
data-param-range="monthly">
data-param-range="last30">
<?php if (!$graph) : ?>
<div class="row responsive">
@ -41,13 +42,13 @@ $graph = $this->getParam('graph', false);
<div class="chart-metric">
<div class="value margin-bottom-small"><span class="sum" data-ls-bind="{{usage.requests.total|statsTotal}}">N/A</span></div>
<div class="metric margin-bottom-small">Requests <span class="tooltip" data-tooltip="Total number of API requests this month"><i class="icon-info-circled"></i></span></div>
<div class="range">Current Month</div>
<div class="range">Last 30 days</div>
</div>
</div>
<div class="col span-3">
<div class="value margin-bottom-small"><span class="sum" data-ls-bind="{{usage.network.total|humanFileSize}}" data-default="0">0</span></div>
<div class="metric margin-bottom-small">Bandwidth</div>
<div class="range">Current Month</div>
<div class="range">Last 30 days</div>
<!-- <div class="margin-top dev-feature">
<a href="">Full Usage Report <i class="icon-right-open"></i></a>
</div> -->
@ -254,7 +255,7 @@ $graph = $this->getParam('graph', false);
<h1 class="margin-bottom-xl">Register your Flutter App</h1>
<ul class="phases clear margin-top-negative-large padding" data-ui-phases>
<ul class="phases clear margin-top-negative-small padding" data-ui-phases>
<li>
<h2 style="display: none">&nbsp;&nbsp;iOS&nbsp;&nbsp;</h2>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -54,6 +54,12 @@
}
}
.tabs {
border-bottom: solid 1px var(--config-border-color);
margin: 0 -30px;
padding: 0 30px!important;
}
&>footer {
margin: 0 -30px -30px -30px;
padding: 15px 30px;

View file

@ -661,6 +661,7 @@ input[type=checkbox], input[type=radio] {
padding-top: 0;
background: var(--config-color-background-input);
line-height: normal !important;
position: relative;
&.hide {
padding: 0 !important;
@ -684,6 +685,10 @@ input[type=checkbox], input[type=radio] {
border-bottom: solid 1px var(--config-color-fade-light);
margin: 0 -15px 15px -15px;
padding: 10px 15px;
position: sticky;
top: 70px;
background: var(--config-color-background-input);
border-radius: 10px 10px 0 0;
}
.pell-content {
@ -1098,7 +1103,7 @@ ol {
&:before {
border: solid;
border-color: #ffffff transparent;
border-color: var(--config-color-background-fade) transparent;
border-width: 8px 8px 0 8px;
bottom: -8px;
content: "";