Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aheinze committed Apr 3, 2020
1 parent 29447c8 commit 4a675af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions modules/Cockpit/Helper/Revisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ public function count($id) {
return $this->storage->count('cockpit/revisions', ['_oid' => $id]);
}

public function getList($id) {
public function getList($id, $limit = 50, $skip = 0) {

return $this->storage->find('cockpit/revisions', [
$options = [
'filter' => ['_oid' => $id],
'sort' => ['_created' => -1]
])->toArray();
'sort' => ['_created' => -1],
'limit' => $limit,
'skip' => $skip
];

return $this->storage->find('cockpit/revisions', $options)->toArray();
}

public function add($id, $data, $meta = null, $creator = null) {
Expand Down
6 changes: 3 additions & 3 deletions modules/Cockpit/views/restadmin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="uk-grid uk-grid-small uk-flex-middle uk-margin-small-top">
<div class="uk-flex-item-1">
<input class="uk-width-1-1 uk-form-large uk-text-primary uk-text-monospace" type="text" placeholder="@lang('No key generated')" bind="keys.master" name="fullaccesskey" readonly>
<span class="uk-text-small uk-text-danger uk-margin-small-top" show="{ keys.master }">@lang('Share with caution')</span>
<span class="uk-text-small uk-text-danger uk-text-bold uk-text-upper uk-margin-small-top" show="{ keys.master }">@lang('Share with caution')</span>
</div>
<div if="{keys.master}">
<a class="uk-margin-right" onclick="{ copyApiKey }" title="@lang('Copy Token')" data-uk-tooltip="pos:'top'"><i class="uk-icon-clone"></i></a>
Expand All @@ -38,10 +38,10 @@
<div class="uk-panel uk-panel-box uk-panel-card uk-flex-item-1 uk-margin-right">
<div class="uk-form-row">
<label class="uk-text-small uk-text-bold uk-text-uppercase">@lang('API-Key')</label>
<label class="uk-text-small uk-text-bold uk-text-upper">@lang('API-Key')</label>
<div class="uk-flex uk-flex-middle">
<input class="uk-width-1-1 uk-form-large uk-margin-right uk-text-primary uk-text-monospace" type="text" placeholder="@lang('No key generated')" bind="keys.special[{idx}].token" readonly>
<input class="uk-width-1-1 uk-form-large uk-margin-right uk-text-monospace" type="text" placeholder="@lang('No key generated')" bind="keys.special[{idx}].token" readonly>
<a class="uk-margin-right" onclick="{ parent.copyApiKey }" title="@lang('Copy Token')" data-uk-tooltip="pos:'top'"><i class="uk-icon-clone"></i></a>
<a onclick="{ parent.generate }" title="@lang('Generate Token')" data-uk-tooltip="pos:'top'"><i class="uk-icon-magic"></i></a>
</div>
Expand Down

0 comments on commit 4a675af

Please sign in to comment.