mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-05-01 01:19:54 +03:00
[catalog] Minor fixes
This commit is contained in:
parent
ebf31c12f3
commit
0728d8fb7b
1 changed files with 8 additions and 6 deletions
14
catalog.tag
14
catalog.tag
|
@ -29,7 +29,7 @@
|
||||||
</span></li>
|
</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="error-snackbar" class="mdl-js-snackbar mdl-snackbar">
|
<div id="error-snackbar" aria-live="assertive" aria-atomic="true" aria-relevant="text" class="mdl-js-snackbar mdl-snackbar">
|
||||||
<div class="mdl-snackbar__text"></div>
|
<div class="mdl-snackbar__text"></div>
|
||||||
<button class="mdl-snackbar__action" type="button"></button>
|
<button class="mdl-snackbar__action" type="button"></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,22 +50,24 @@
|
||||||
actionText: 'Undo'
|
actionText: 'Undo'
|
||||||
};
|
};
|
||||||
snackbar.MaterialSnackbar.showSnackbar(data);
|
snackbar.MaterialSnackbar.showSnackbar(data);
|
||||||
}
|
};
|
||||||
oReq.addEventListener("load", function () {
|
oReq.addEventListener('load', function () {
|
||||||
if (this.status == 200) {
|
if (this.status == 200) {
|
||||||
catalog.repositories = JSON.parse(this.responseText).repositories;
|
catalog.repositories = JSON.parse(this.responseText).repositories;
|
||||||
|
} else if (this.status == 404) {
|
||||||
|
catalog.createSnackbar('Server not found');
|
||||||
} else {
|
} else {
|
||||||
catalog.createSnackbar(this.responseText);
|
catalog.createSnackbar(this.responseText);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
oReq.addEventListener("error", function () {
|
oReq.addEventListener('error', function () {
|
||||||
catalog.createSnackbar('An error occured');
|
catalog.createSnackbar('An error occured');
|
||||||
});
|
});
|
||||||
oReq.addEventListener("loadend", function () {
|
oReq.addEventListener('loadend', function () {
|
||||||
catalog.loadend = true;
|
catalog.loadend = true;
|
||||||
catalog.instance.update();
|
catalog.instance.update();
|
||||||
});
|
});
|
||||||
oReq.open("GET", registryUI.url() + "/v2/_catalog");
|
oReq.open('GET', registryUI.url() + '/v2/_catalog');
|
||||||
oReq.withCredentials = false;
|
oReq.withCredentials = false;
|
||||||
oReq.send();
|
oReq.send();
|
||||||
catalog.instance.update();
|
catalog.instance.update();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue