114 lines
4.3 KiB
HTML
114 lines
4.3 KiB
HTML
<!--
|
|
Copyright (C) 2016-2019 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">
|
|
<!-- build:css docker-registry-ui.css -->
|
|
<link href="../node_modules/riot-mui/build/styles/riot-mui.min.css" rel="stylesheet" type="text/css">
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
<link href="material-icons.css" rel="stylesheet" type="text/css">
|
|
<link href="roboto.css" rel="stylesheet" type="text/css">
|
|
<!-- endbuild -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta property="og:site_name" content="Docker Registry UI" />
|
|
<meta name="twitter:card" content="summary" />
|
|
<meta name="twitter:site" content="@Joxit" />
|
|
<meta name="twitter:creator" content="@Jones Magloire" />
|
|
<title>Docker Registry UI</title>
|
|
</head>
|
|
|
|
<body>
|
|
<script>
|
|
const URL_QUERY_PARAM_REGEX = /[&?]url=/;
|
|
const URL_PARAM_REGEX = /^url=/;
|
|
|
|
function getUrlQueryParam() {
|
|
const search = window.location.search;
|
|
if (URL_QUERY_PARAM_REGEX.test(search)) {
|
|
const param = search.split(/^\?|&/).find(function (param) {
|
|
return param && URL_PARAM_REGEX.test(param);
|
|
});
|
|
return param ? param.replace(URL_PARAM_REGEX, '') : param;
|
|
}
|
|
}
|
|
|
|
function getRegistryServer(i) {
|
|
try {
|
|
const res = JSON.parse(localStorage.getItem('registryServer'));
|
|
if (res instanceof Array) {
|
|
return (!isNaN(i)) ? res[i] : res.map(function (url) {
|
|
return url.trim().replace(/\/*$/, '');
|
|
});
|
|
}
|
|
} catch (e) {}
|
|
return (!isNaN(i)) ? '' : [];
|
|
}
|
|
|
|
function rDecodeURI(url) {
|
|
if (!url) {
|
|
return;
|
|
}
|
|
return url.startsWith('http') ? window.decodeURIComponent(url) : atob(url);
|
|
}
|
|
|
|
function getRegistryURL() {
|
|
let url = getUrlQueryParam();
|
|
if (url) {
|
|
try {
|
|
return rDecodeURI(url);
|
|
} catch (e) {
|
|
console.log(e);
|
|
}
|
|
}
|
|
return getRegistryServer(0);
|
|
}
|
|
|
|
const tag = document.createElement('docker-registry-ui');
|
|
tag.setAttribute('registry-url', getRegistryURL());
|
|
document.getElementsByTagName('body').item(0).appendChild(tag);
|
|
</script>
|
|
<!-- build:js docker-registry-ui.js -->
|
|
<script src="../node_modules/riot/riot+compiler.min.js"></script>
|
|
<script src="../node_modules/riot-route/dist/route.js"></script>
|
|
<script src="../node_modules/riot-mui/build/js/riot-mui.js"></script>
|
|
<script src="tags/catalog.riot" type="riot/tag"></script>
|
|
<script src="tags/catalog-element.riot" type="riot/tag"></script>
|
|
<script src="tags/tag-history-button.riot" type="riot/tag"></script>
|
|
<script src="tags/tag-history.riot" type="riot/tag"></script>
|
|
<script src="tags/tag-history-element.riot" type="riot/tag"></script>
|
|
<script src="tags/taglist.riot" type="riot/tag"></script>
|
|
<script src="tags/image-tag.riot" type="riot/tag"></script>
|
|
<script src="tags/remove-image.riot" type="riot/tag"></script>
|
|
<script src="tags/copy-to-clipboard.riot" type="riot/tag"></script>
|
|
<script src="tags/dialogs/add.riot" type="riot/tag"></script>
|
|
<script src="tags/dialogs/change.riot" type="riot/tag"></script>
|
|
<script src="tags/dialogs/remove.riot" type="riot/tag"></script>
|
|
<script src="tags/dialogs/menu.riot" type="riot/tag"></script>
|
|
<script src="tags/image-size.riot" type="riot/tag"></script>
|
|
<script src="tags/image-date.riot" type="riot/tag"></script>
|
|
<script src="tags/image-content-digest.riot" type="riot/tag"></script>
|
|
<script src="tags/pagination.riot" type="riot/tag"></script>
|
|
<script src="tags/app.riot" type="riot/tag"></script>
|
|
<script src="scripts/http.js"></script>
|
|
<script src="scripts/script.js"></script>
|
|
<script src="scripts/utils.js"></script>
|
|
<!-- endbuild -->
|
|
</body>
|
|
|
|
</html> |