mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-28 16:09:54 +03:00
[remove] Add new menu dialog for removing servers
This commit is contained in:
parent
f92c5ceced
commit
a62142d48e
5 changed files with 83 additions and 0 deletions
11
script.js
11
script.js
|
@ -50,6 +50,16 @@ registryUI.changeServer = function(url) {
|
|||
registryServer = [url].concat(registryServer);
|
||||
localStorage.setItem('registryServer', JSON.stringify(registryServer));
|
||||
}
|
||||
registryUI.removeServer = function(url) {
|
||||
var registryServer = registryUI.getRegistryServer();
|
||||
url = url.trim().replace(/\/*$/, '');
|
||||
var index = registryServer.indexOf(url);
|
||||
if (index == -1) {
|
||||
return;
|
||||
}
|
||||
registryServer.splice(index, 1);
|
||||
localStorage.setItem('registryServer', JSON.stringify(registryServer));
|
||||
}
|
||||
registryUI.catalog = {};
|
||||
registryUI.taglist = {};
|
||||
|
||||
|
@ -57,5 +67,6 @@ riot.mount('catalog');
|
|||
riot.mount('taglist');
|
||||
riot.mount('add');
|
||||
riot.mount('change');
|
||||
riot.mount('remove');
|
||||
riot.mount('menu');
|
||||
riot.mount('app');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue