mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-30 00:49:53 +03:00
Add list of registry repositories with riot
This commit is contained in:
parent
92c8a1761f
commit
c00f858f8f
6 changed files with 182 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.project
|
||||||
|
node_modules
|
48
catalog.tag
Normal file
48
catalog.tag
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2016 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/>.
|
||||||
|
-->
|
||||||
|
<catalog>
|
||||||
|
<div class="catalog">
|
||||||
|
<div class="section-centerd mdl-card mdl-shadow--2dp mdl-cell--6-col">
|
||||||
|
<ul class="mdl-list">
|
||||||
|
<div class="mdl-card__title">
|
||||||
|
<h2 class="mdl-card__title-text">Repositories of { registryUI.url() }</h2>
|
||||||
|
</div>
|
||||||
|
<li class="mdl-list__item" each="{ item in catalog.repositories }">
|
||||||
|
<span class="mdl-list__item-primary-content">
|
||||||
|
{ item }
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
catalog.instance = this;
|
||||||
|
var oReq = new XMLHttpRequest();
|
||||||
|
oReq.addEventListener("load", function () {
|
||||||
|
catalog.repositories = JSON.parse(this.responseText).repositories;
|
||||||
|
catalog.instance.update();
|
||||||
|
});
|
||||||
|
oReq.open("GET", registryUI.url() + "/v2/_catalog", true);
|
||||||
|
oReq.setRequestHeader('Origin', '*');
|
||||||
|
oReq.withCredentials = false;
|
||||||
|
oReq.send();
|
||||||
|
catalog.inst
|
||||||
|
this.update();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</catalog>
|
72
index.html
Normal file
72
index.html
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2016 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/>.
|
||||||
|
-->
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<LINK href="node_modules/dialog-polyfill/dialog-polyfill.css" rel="stylesheet" type="text/css">
|
||||||
|
<LINK href="node_modules/material-design-lite/dist/material.min.css" rel="stylesheet" type="text/css">
|
||||||
|
<LINK href="node_modules/leaflet/dist/leaflet.css" rel="stylesheet" type="text/css">
|
||||||
|
<LINK href="node_modules/material-design-icons/iconfont/material-icons.css" rel="stylesheet" type="text/css">
|
||||||
|
<LINK href="style.css" rel="stylesheet" type="text/css">
|
||||||
|
<title>Docker Registry UI</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Always shows a header, even in smaller screens. -->
|
||||||
|
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
|
||||||
|
<header class="mdl-layout__header">
|
||||||
|
<div class="mdl-layout__header-row">
|
||||||
|
<!-- Title -->
|
||||||
|
<span class="mdl-layout-title">Docker Registry UI</span>
|
||||||
|
<!-- Add spacer, to align navigation to the right -->
|
||||||
|
<div class="mdl-layout-spacer"></div>
|
||||||
|
<!-- Navigation. We hide it in small screens. -->
|
||||||
|
<nav class="mdl-navigation mdl-layout--large-screen-only">
|
||||||
|
<a class="mdl-navigation__link" href="">Name spaces</a><a class="mdl-navigation__link" href="index.html">Home</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="mdl-layout__drawer">
|
||||||
|
<span class="mdl-layout-title">Docker Registry UI</span>
|
||||||
|
<nav class="mdl-navigation">
|
||||||
|
<a class="mdl-navigation__link" href="">Home</a>
|
||||||
|
<a class="mdl-navigation__link" href="">Name spaces</a>
|
||||||
|
<a class="mdl-navigation__link" href="">Change URL</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
<main class="mdl-layout__content">
|
||||||
|
<div class="page-content">
|
||||||
|
<catalog></catalog>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer class="mdl-mini-footer">
|
||||||
|
<div class="mdl-mini-footer__left-section">
|
||||||
|
<div class="mdl-logo">Docker Registry UI</div>
|
||||||
|
<ul class="mdl-mini-footer__link-list">
|
||||||
|
<li><a href="https://github.com/Joxit/docker-registry-ui">Contribute on GitHub</a></li>
|
||||||
|
<li><a href="https://github.com/Joxit/docker-registry-ui/blob/master/LICENSE">Privacy & Terms</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="catalog.tag" type="riot/tag"></script>
|
||||||
|
<script src="node_modules/riot/riot+compiler.min.js"></script>
|
||||||
|
<script src="node_modules/dialog-polyfill/dialog-polyfill.js"></script>
|
||||||
|
<script src="node_modules/material-design-lite/dist/material.min.js"></script>
|
||||||
|
<script src="script.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
8
package.json
Normal file
8
package.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"material-design-lite": "^1.1",
|
||||||
|
"material-design-icons": "^2.2",
|
||||||
|
"dialog-polyfill": "^0.4",
|
||||||
|
"riot": "^2.3"
|
||||||
|
}
|
||||||
|
}
|
24
script.js
Normal file
24
script.js
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2016 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/>.
|
||||||
|
*/
|
||||||
|
var registryUI = {}
|
||||||
|
registryUI.url = function () {
|
||||||
|
return localStorage.getItem('registryServer');
|
||||||
|
}
|
||||||
|
var catalog = {};
|
||||||
|
|
||||||
|
|
||||||
|
riot.mount('catalog');
|
28
style.css
Normal file
28
style.css
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2016 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/>.
|
||||||
|
*/
|
||||||
|
.mdl-mini-footer {
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.catalog {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-centerd {
|
||||||
|
margin: auto;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue