Fix Dockerfile command view for FROM
with as
clause
This commit is contained in:
parent
09e9b5cb53
commit
e0a1e05c52
2 changed files with 9 additions and 3 deletions
|
@ -31,11 +31,16 @@
|
|||
}
|
||||
|
||||
.dockerfile-command .command-title {
|
||||
font-family: Consolas, "Lucida Console", Monaco, monospace;
|
||||
font-family: Consolas, "Lucida Console", Monaco, monospace !important;
|
||||
padding-left: 90px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.dockerfile-command .command-title a {
|
||||
color: #5bc0de;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.dockerfile-command .label {
|
||||
color: white;
|
||||
|
||||
|
|
|
@ -44,13 +44,14 @@ export class DockerfileCommandComponent {
|
|||
|
||||
var kindHandlers = {
|
||||
'FROM': (command) => {
|
||||
var pieces = command.split('/');
|
||||
var parts = command.split(' ');
|
||||
var pieces = parts[0].split('/');
|
||||
var registry = pieces.length < 3 ? '' : pieces[0];
|
||||
if (!this.registryHandlers[registry]) {
|
||||
return command;
|
||||
}
|
||||
|
||||
return '<i class="fa fa-hdd-o"></i> <a href="' + this.registryHandlers[registry](pieces) + '" target="_blank">' + command + '</a>';
|
||||
return '<a href="' + this.registryHandlers[registry](pieces) + '" target="_blank">' + parts[0] + '</a> ' + (parts.splice(1).join(' '));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue