Merge remote-tracking branch 'origin/master'

This commit is contained in:
Lennart Blom 2018-12-06 21:10:51 +01:00
commit 06a11a706b
3 changed files with 15 additions and 10 deletions

View file

@ -426,3 +426,8 @@ select {
.tag-history-element .parent div.value { .tag-history-element .parent div.value {
font-size: 12px; font-size: 12px;
} }
tag-history-button button {
background: none;
border: none;
}

View file

@ -95,27 +95,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}; };
registryUI.errorSnackbar = function(message) { registryUI.errorSnackbar = function(message) {
return registryUI.snackbar(message, true); return registryUI.snackbar(message, true);
} };
registryUI.cleanName = function() { registryUI.cleanName = function() {
const url = (registryUI.url() && registryUI.url().length > 0 && registryUI.url()) || window.location.host; const url = (registryUI.url() && registryUI.url().length > 0 && registryUI.url()) || window.location.host;
if (url) { if (url) {
return url.startsWith('http') ? url.replace(/https?:\/\//, '') : url; return url.startsWith('http') ? url.replace(/https?:\/\//, '') : url;
} }
return ''; return '';
} };
route.parser(null, function(path, filter) { route.parser(null, function(path, filter) {
const f = filter const f = filter
.replace(/\?/g, '\\?') .replace(/\?/g, '\\?')
.replace(/\*/g, '([^?#]+?)') .replace(/\*/g, '([^?#]+?)')
.replace(/\.\./, '.*') .replace(/\.\./, '.*');
const re = new RegExp('^' + f + '$') const re = new RegExp('^' + f + '$');
const args = path.match(re) const args = path.match(re);
if (args) return args.slice(1) if (args) return args.slice(1)
}); });
registryUI.isDigit = function(char) { registryUI.isDigit = function(char) {
return char >= '0' && char <= '9'; return char >= '0' && char <= '9';
} };
registryUI.DockerImage = function(name, tag) { registryUI.DockerImage = function(name, tag) {
this.name = name; this.name = name;
@ -148,7 +148,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
acc.push(e); acc.push(e);
} }
return acc; return acc;
} };
registryUI.DockerImage.compare = function(e1, e2) { registryUI.DockerImage.compare = function(e1, e2) {
const tag1 = e1.tag.match(/./g).reduce(registryUI.DockerImage._tagReduce, []); const tag1 = e1.tag.match(/./g).reduce(registryUI.DockerImage._tagReduce, []);
@ -194,7 +194,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
oReq.open('GET', registryUI.url() + '/v2/' + self.name + '/manifests/' + self.tag); oReq.open('GET', registryUI.url() + '/v2/' + self.name + '/manifests/' + self.tag);
oReq.setRequestHeader('Accept', 'application/vnd.docker.distribution.manifest.v2+json'); oReq.setRequestHeader('Accept', 'application/vnd.docker.distribution.manifest.v2+json');
oReq.send(); oReq.send();
} };
registryUI.DockerImage.prototype.getBlobs = function(blob) { registryUI.DockerImage.prototype.getBlobs = function(blob) {
const oReq = new Http(); const oReq = new Http();

View file

@ -15,9 +15,9 @@ 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/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<tag-history-button> <tag-history-button>
<a href="#" title="This will show the history of given tag" <button title="This will show the history of given tag"
onclick="registryUI.taghistory.go('{ opts.image.name }', '{ opts.image.tag }');"> onclick="registryUI.taghistory.go('{ opts.image.name }', '{ opts.image.tag }');">
<i class="material-icons">history</i> <i class="material-icons">history</i>
</a> </button>
</tag-history-button> </tag-history-button>