Skip to content

Commit

Permalink
Handle the missing summary
Browse files Browse the repository at this point in the history
Prior to this change, if there were no summary provided
in the schema json it displayed nothing, which is a bit
confusing.

This change shows a grayout [none] when the summary is
not included in the json.
  • Loading branch information
zahraaalizadeh committed May 2, 2024
1 parent dc46044 commit 566aaec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gcp/appengine/frontend3/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,10 @@ dl.vulnerability-details,
margin-top: 16px;
}

dd.muted {
color: $osv-grey-600;
}

dd.details {
overflow-wrap: break-word;

Expand Down
8 changes: 7 additions & 1 deletion gcp/appengine/frontend3/src/templates/vulnerability.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ <h1 class="title">{{ vulnerability.id }}</h1>
<dt>Modified</dt>
<dd>{{ vulnerability.modified }}</dd>
<dt class="summary">Summary</dt>
<dd class="summary">{{ vulnerability.summary }}</dd>
<dd class="summary {% if not vulnerability.summary %}muted{% endif %}">
{% if vulnerability.summary %}
{{ vulnerability.summary }}
{% else %}
[none]
{% endif %}
</dd>
<dt>Details</dt>
<dd class="details">
{{ vulnerability.details|markdown|safe -}}
Expand Down

0 comments on commit 566aaec

Please sign in to comment.