mirror of
https://github.com/appwrite/appwrite
synced 2026-05-21 07:58:55 +00:00
Updated to the UI
This commit is contained in:
parent
fb2631e108
commit
aa580f32a0
5 changed files with 30 additions and 65 deletions
|
|
@ -196,7 +196,7 @@ App::get('/v1/functions/:functionId/usage')
|
|||
|
||||
foreach ($points as $point) {
|
||||
$compute[] = [
|
||||
'value' => round((!empty($point['value'])) ? $point['value'] / 60000 : 0, 2), // minutes
|
||||
'value' => round((!empty($point['value'])) ? $point['value'] / 1000 : 0, 2), // minutes
|
||||
'date' => \strtotime($point['time']),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,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 = 12;
|
||||
const APP_CACHE_BUSTER = 129;
|
||||
const APP_CACHE_BUSTER = 131;
|
||||
const APP_VERSION_STABLE = '0.6.2';
|
||||
const APP_STORAGE_UPLOADS = '/storage/uploads';
|
||||
const APP_STORAGE_FUNCTIONS = '/storage/functions';
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ $timeout = $this->getParam('timeout', 900);
|
|||
<div class="box margin-bottom-small">
|
||||
<div class="margin-start-negative-small margin-end-negative-small margin-top-negative-small margin-bottom-negative-small">
|
||||
<div class="chart margin-bottom-no">
|
||||
<input type="hidden" data-ls-bind="{{usage}}" data-forms-chart="CPU Time (minutes)=usage.compute.data" data-colors="orange" data-height="140" />
|
||||
<input type="hidden" data-ls-bind="{{usage}}" data-forms-chart="CPU Time (seconds)=usage.compute.data" data-colors="orange" data-height="140" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -318,36 +318,6 @@ $timeout = $this->getParam('timeout', 900);
|
|||
<li class="red">Errors <span data-ls-bind="({{usage.failures.total}})"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--
|
||||
<div
|
||||
data-service="functions.getUsage"
|
||||
data-event="load"
|
||||
data-name="usage"
|
||||
data-param-function-id="{{router.params.id}}">
|
||||
<div class="box margin-bottom-small">
|
||||
<div class="margin-start-negative-small margin-end-negative-small margin-top-negative-small margin-bottom-negative-small">
|
||||
<div class="chart margin-bottom-no">
|
||||
<div class="content" data-forms-chart="Executions=usage.executions.data" data-height="140"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="chart-notes margin-bottom-large">
|
||||
<li>Executions</li>
|
||||
</ul>
|
||||
|
||||
<div class="box margin-bottom-small">
|
||||
<div class="margin-start-negative-small margin-end-negative-small margin-top-negative-small margin-bottom-negative-small">
|
||||
<div class="chart margin-bottom-no">
|
||||
<div class="content" data-forms-chart="CPU Time (minutes)=usage.compute.data" data-height="140"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="chart-notes margin-bottom-large">
|
||||
<li>CPU Time (minutes)</li>
|
||||
</ul>
|
||||
</div> -->
|
||||
</li>
|
||||
<li data-state="/console/functions/function/logs?id={{router.params.id}}&project={{router.params.project}}">
|
||||
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ $environments = $this->getParam('environments', []);
|
|||
|
||||
<span data-ls-bind="{{function.name}}"></span>
|
||||
|
||||
<div class="text-fade" data-ls-if="({{function.events.length}})" style="margin-top: 10px;"><span data-ls-bind="{{function.events.length}}"></span> events assigned</div>
|
||||
<div class="text-fade" data-ls-if="(!{{function.events.length}})" style="margin-top: 10px;"> </div>
|
||||
<p class="text-fade margin-bottom-no" data-ls-bind="{{function.env|envName}} {{function.env|envVersion}}" style="margin-top: 10px;"></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,39 +13,20 @@ $graph = $this->getParam('graph', false);
|
|||
<span class="title" data-ls-bind="{{console-project.name}}"> </span>
|
||||
</h1>
|
||||
|
||||
<ul class="margin-top-negative-small margin-bottom clear">
|
||||
<ul class="desktops-only margin-top-negative-small margin-bottom clear">
|
||||
<li class="pull-start margin-end margin-bottom-small"><a data-ls-attrs="href=/console/settings?project={{router.params.project}}" class="link-animation-enabled"><i class="icon-cog"></i> Settings</a> </li>
|
||||
<li class="pull-start margin-end margin-bottom-small"><a data-ls-attrs="href=/console/keys?project={{router.params.project}}" class="link-animation-enabled"><i class="icon-key-inv"></i> API Keys</a> </li>
|
||||
<li class="pull-start margin-end margin-bottom-small"><a data-ls-attrs="href=/console/webhooks?project={{router.params.project}}" class="link-animation-enabled"><i class="icon-link"></i> Webhooks</a> </li>
|
||||
<li class="pull-start margin-end margin-bottom-small"><a data-ls-attrs="href=/console/tasks?project={{router.params.project}}" class="link-animation-enabled"><i class="icon-clock"></i> Tasks</a> </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 <i class="icon-down-dir"></i></a></li> -->
|
||||
</ul>
|
||||
|
||||
<div class="margin-bottom phones-only"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="zone xxl margin-top-negative-xxxl">
|
||||
<div class="clear margin-bottom-small margin-top-negative">
|
||||
<div class="pull-end">
|
||||
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '90d'"
|
||||
data-service="projects.getUsage"
|
||||
data-event="submit"
|
||||
data-name="usage"
|
||||
data-param-project-id="{{router.params.project}}"
|
||||
data-param-range="90d">
|
||||
<button class="tick">90d</button>
|
||||
</form>
|
||||
|
||||
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '90d'" disabled>90d</button>
|
||||
|
||||
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '30d'"
|
||||
data-service="projects.getUsage"
|
||||
data-event="submit"
|
||||
data-name="usage"
|
||||
data-param-project-id="{{router.params.project}}">
|
||||
<button class="tick">30d</button>
|
||||
</form>
|
||||
|
||||
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '30d'" disabled>30d</button>
|
||||
|
||||
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '24h'"
|
||||
data-service="projects.getUsage"
|
||||
|
|
@ -58,6 +39,26 @@ $graph = $this->getParam('graph', false);
|
|||
|
||||
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '24h'" disabled>24h</button>
|
||||
|
||||
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '30d'"
|
||||
data-service="projects.getUsage"
|
||||
data-event="submit"
|
||||
data-name="usage"
|
||||
data-param-project-id="{{router.params.project}}">
|
||||
<button class="tick">30d</button>
|
||||
</form>
|
||||
|
||||
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '30d'" disabled>30d</button>
|
||||
|
||||
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '90d'"
|
||||
data-service="projects.getUsage"
|
||||
data-event="submit"
|
||||
data-name="usage"
|
||||
data-param-project-id="{{router.params.project}}"
|
||||
data-param-range="90d">
|
||||
<button class="tick">90d</button>
|
||||
</form>
|
||||
|
||||
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '90d'" disabled>90d</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
|
@ -78,16 +79,11 @@ $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 last 30 days"><i class="icon-info-circled"></i></span></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">Last 30 days</div> -->
|
||||
<!-- <div class="margin-top dev-feature">
|
||||
<a href="">Full Usage Report <i class="icon-right-open"></i></a>
|
||||
</div> -->
|
||||
|
||||
<div class="margin-top-large value small">
|
||||
<b class="text-size-small sum small" data-ls-bind="{{usage.functions.total|statsTotal}}" data-default="0"></b>
|
||||
|
|
@ -172,12 +168,12 @@ $graph = $this->getParam('graph', false);
|
|||
<img src="" data-ls-attrs="src=/images/clients/android.png?v=<?php echo APP_CACHE_BUSTER; ?>" class="avatar xs" loading="lazy" width="30" height="30" />
|
||||
</div>
|
||||
</div>
|
||||
<span data-ls-bind="{{platform.name}}"></span>
|
||||
<span class="text-one-liner" data-ls-bind="{{platform.name}}"></span>
|
||||
</div>
|
||||
|
||||
<p class="margin-bottom-no" style="margin-top: 10px;"><small data-ls-bind="{{platform.hostname}}{{platform.key}}"></small></p>
|
||||
<p class="margin-bottom-no text-one-liner" style="margin-top: 10px;"><small data-ls-bind="{{platform.hostname}}{{platform.key}}"></small></p>
|
||||
|
||||
<div class="phones-only-inline tablets-only-inline margin-top-tiny">
|
||||
<div class="phones-only-inline tablets-only-inline margin-top-small">
|
||||
<button class="link" data-ls-ui-trigger="platform-update-{{platform.$id}}">Update</button>
|
||||
<button class="link danger" data-ls-ui-trigger="platform-delete-{{platform.$id}}">Delete</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue