mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-30 00:49:53 +03:00
feat(riot-v5): upgrade all tag-history components
This commit is contained in:
parent
962592c54a
commit
a3276dcb79
10 changed files with 287 additions and 196 deletions
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2016-2021 Jones Magloire @Joxit
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import { router, getCurrentRoute } from '@riotjs/route';
|
||||
|
||||
function baseUrl() {
|
||||
|
@ -13,5 +29,14 @@ export default {
|
|||
},
|
||||
getTagListImage() {
|
||||
return getCurrentRoute().replace(/^.*(#!)?\/?taglist\//, '');
|
||||
}
|
||||
},
|
||||
history(image, tag) {
|
||||
router.push(`${baseUrl()}#!/taghistory/image/${image}/tag/${tag}`);
|
||||
},
|
||||
getTagHistoryImage() {
|
||||
return getCurrentRoute().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/, '$2');
|
||||
},
|
||||
getTagHistoryTag() {
|
||||
return getCurrentRoute().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/, '$3');
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue