Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty container layer history and UI #21251

Merged
merged 6 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/packages/container/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ func parseOCIImageConfig(r io.Reader) (*Metadata, error) {
if i := strings.Index(cmd, "#(nop) "); i != -1 {
cmd = strings.TrimSpace(cmd[i+7:])
}
imageLayers = append(imageLayers, cmd)
if cmd != "" {
imageLayers = append(imageLayers, cmd)
}
}

metadata := &Metadata{
Expand Down
4 changes: 2 additions & 2 deletions templates/package/content/container.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{{if .PackageDescriptor.Metadata.ImageLayers}}
<h4 class="ui top attached header">{{.locale.Tr "packages.container.layers"}}</h4>
<div class="ui attached segment">
<table id="notice-table" class="ui very basic compact table">
<table class="ui very basic compact table">
<tbody>
{{range .PackageDescriptor.Metadata.ImageLayers}}
<tr>
Expand All @@ -61,7 +61,7 @@
{{if .PackageDescriptor.Metadata.Labels}}
<h4 class="ui top attached header">{{.locale.Tr "packages.container.labels"}}</h4>
<div class="ui attached segment">
<table id="notice-table" class="ui very basic compact table">
<table class="ui very basic compact table container-labels">
<thead>
<tr>
<th>{{.locale.Tr "packages.container.labels.key"}}</th>
Expand Down
9 changes: 9 additions & 0 deletions web_src/less/_package.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.container-labels {
td:nth-child(1) {
vertical-align: top;
}

td:nth-child(2) {
overflow-wrap: anywhere;
}
}
1 change: 1 addition & 0 deletions web_src/less/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
@import "_admin";
@import "_explore";
@import "_review";
@import "_package";

@import "./helpers.less";