mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2026-07-12 08:39:19 +00:00
[riot-mui] Fix when there is an error, resets the view
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<div hide="{ registryUI.catalog.loadend }" class="spinner-wrapper">
|
||||
<material-spinner></material-spinner>
|
||||
</div>
|
||||
<ul class="list" show="{ registryUI.catalog.loadend }">
|
||||
<ul class="list highlight" show="{ registryUI.catalog.loadend }">
|
||||
<li each="{ item in registryUI.catalog.repositories }" onclick="registryUI.catalog.go('{item}');">
|
||||
<span>
|
||||
<i class="material-icons">send</i>
|
||||
@@ -39,6 +39,7 @@
|
||||
registryUI.catalog.display = function () {
|
||||
var oReq = new Http();
|
||||
oReq.addEventListener('load', function () {
|
||||
registryUI.catalog.repositories = [];
|
||||
if (this.status == 200) {
|
||||
registryUI.catalog.repositories = JSON.parse(this.responseText).repositories || [];
|
||||
registryUI.catalog.repositories.sort();
|
||||
@@ -50,6 +51,7 @@
|
||||
});
|
||||
oReq.addEventListener('error', function () {
|
||||
registryUI.snackbar('An error occured', true);
|
||||
registryUI.catalog.repositories = [];
|
||||
});
|
||||
oReq.addEventListener('loadend', function () {
|
||||
registryUI.catalog.loadend = true;
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
registryUI.taglist.name = name;
|
||||
registryUI.taglist.instance.update();
|
||||
oReq.addEventListener('load', function () {
|
||||
registryUI.taglist.tags = [];
|
||||
if (this.status == 200) {
|
||||
registryUI.taglist.tags = JSON.parse(this.responseText).tags || [];
|
||||
registryUI.taglist.tags.sort();
|
||||
@@ -67,6 +68,7 @@
|
||||
});
|
||||
oReq.addEventListener('error', function () {
|
||||
registryUI.snackbar('An error occured', true);
|
||||
registryUI.taglist.tags = [];
|
||||
});
|
||||
oReq.addEventListener('loadend', function () {
|
||||
registryUI.taglist.loadend = true;
|
||||
|
||||
Reference in New Issue
Block a user