mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-05-02 01:49:55 +03:00
fix(delete): update the message and wrap the delete function for onclick
This commit is contained in:
parent
8b7bd6cfb8
commit
8524c0d18b
5 changed files with 16 additions and 12 deletions
|
@ -24,4 +24,5 @@
|
||||||
- [@wuyue92tree](https://github.com/wuyue92tree)
|
- [@wuyue92tree](https://github.com/wuyue92tree)
|
||||||
- Giovanni Toraldo [@gionn](https://github.com/gionn)
|
- Giovanni Toraldo [@gionn](https://github.com/gionn)
|
||||||
- [@marcusblake](https://github.com/marcusblake)
|
- [@marcusblake](https://github.com/marcusblake)
|
||||||
- Dario [@pidario](https://github.com/pidario)
|
- Dario [@pidario](https://github.com/pidario)
|
||||||
|
- Jernej K. [Cvetk0](https://github.com/Cvetk0)
|
2
dist/scripts/docker-registry-ui-static.js
vendored
2
dist/scripts/docker-registry-ui-static.js
vendored
File diff suppressed because one or more lines are too long
2
dist/scripts/docker-registry-ui.js
vendored
2
dist/scripts/docker-registry-ui.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "docker-registry-ui",
|
"name": "docker-registry-ui",
|
||||||
"version": "1.4.2",
|
"version": "1.4.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "./node_modules/gulp/bin/gulp.js build"
|
"build": "./node_modules/gulp/bin/gulp.js build"
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,8 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
if (self.multiDelete == self.opts.multiDelete) {
|
if (self.multiDelete == self.opts.multiDelete) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.tags['material-button']) {
|
if (self.tags['material-button']) {
|
||||||
this.delete = this.tags['material-button'].root.onclick = function(ignoreError) {
|
self.delete = function(ignoreError) {
|
||||||
const name = self.opts.image.name;
|
const name = self.opts.image.name;
|
||||||
const tag = self.opts.image.tag;
|
const tag = self.opts.image.tag;
|
||||||
registryUI.taglist.go(name);
|
registryUI.taglist.go(name);
|
||||||
|
@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
registryUI.taglist.display()
|
registryUI.taglist.display()
|
||||||
registryUI.snackbar('Deleting ' + name + ':' + tag + ' image. Run `registry garbage-collect config.yml` on your registry');
|
registryUI.snackbar('Deleting ' + name + ':' + tag + ' image. Run `registry garbage-collect config.yml` on your registry');
|
||||||
} else if (this.status == 404) {
|
} else if (this.status == 404) {
|
||||||
ignoreError || registryUI.errorSnackbar('Digest not found');
|
ignoreError || registryUI.errorSnackbar('Digest not found for this image in your registry.');
|
||||||
} else {
|
} else {
|
||||||
registryUI.snackbar(this.responseText);
|
registryUI.snackbar(this.responseText);
|
||||||
}
|
}
|
||||||
|
@ -56,14 +56,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
});
|
});
|
||||||
oReq.send();
|
oReq.send();
|
||||||
};
|
};
|
||||||
|
self.tags['material-button'].root.onclick = function() {
|
||||||
|
self.delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.tags['material-checkbox']) {
|
if (self.tags['material-checkbox']) {
|
||||||
if (!this.opts.multiDelete && this.tags['material-checkbox'].checked) {
|
if (!self.opts.multiDelete && self.tags['material-checkbox'].checked) {
|
||||||
this.tags['material-checkbox'].toggle();
|
self.tags['material-checkbox'].toggle();
|
||||||
}
|
}
|
||||||
this.tags['material-checkbox'].on('toggle', function() {
|
self.tags['material-checkbox'].on('toggle', function() {
|
||||||
registryUI.taglist.instance.trigger('toggle-remove-image', this.checked);
|
registryUI.taglist.instance.trigger('toggle-remove-image', self.checked);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
self.multiDelete = self.opts.multiDelete;
|
self.multiDelete = self.opts.multiDelete;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue