Skip to content

Commit

Permalink
Merge pull request #25337 from mshima/sonar-img
Browse files Browse the repository at this point in the history
fix new sonar issues
  • Loading branch information
DanielFran authored Feb 27, 2024
2 parents 84e7544 + 9aeb4b6 commit ab43706
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="modal-header">
<h4 class="modal-title" <%= jhiPrefix %>Translate="entity.delete.title">__jhiTransformTranslate__('entity.delete.title')</h4>

<button type="button" class="btn-close" data-dismiss="modal" aria-hidden="true" (click)="cancel()">&times;</button>
<button type="button" class="btn-close" data-dismiss="modal" (click)="cancel()">&times;</button>
</div>

<div class="modal-body">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
<div class="modal-header">
<h4 class="modal-title" data-cy="<%= entityInstance %>DeleteDialogHeading" <%= jhiPrefix %>Translate="entity.delete.title">__jhiTransformTranslate__('entity.delete.title')</h4>

<button type="button" class="btn-close" data-dismiss="modal" aria-hidden="true"
(click)="cancel()">&times;</button>
<button type="button" class="btn-close" data-dismiss="modal" (click)="cancel()">&times;</button>
</div>

<div class="modal-body">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ _%>
@if (<%= entityInstance %>.<%= fieldName %>) {
<div>
<a (click)="openFile(<%= entityInstance %>.<%= fieldName %>, <%= entityInstance %>.<%= fieldName %>ContentType)">
<img [src]="'data:' + <%= entityInstance %>.<%= fieldName %>ContentType + ';base64,' + <%= entityInstance %>.<%= fieldName %>" style="max-width: 100%;" alt="<%= entityInstance %> image"/>
<img [src]="'data:' + <%= entityInstance %>.<%= fieldName %>ContentType + ';base64,' + <%= entityInstance %>.<%= fieldName %>" style="max-width: 100%;" alt="<%= entityInstance %>"/>
</a>
{{ <%= entityInstance %>.<%= fieldName %>ContentType }}, {{ byteSize(<%= entityInstance %>.<%= fieldName %>) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ _%>
<td>
@if (<%= entityInstance %>.<%= fieldName %>) {
<a (click)="openFile(<%= entityInstance %>.<%= fieldName %>, <%= entityInstance %>.<%= fieldName %>ContentType)">
<img [src]="'data:' + <%= entityInstance %>.<%= fieldName %>ContentType + ';base64,' + <%= entityInstance %>.<%= fieldName %>" style="max-height: 30px;" alt="<%= entityInstance %> image"/>
<img [src]="'data:' + <%= entityInstance %>.<%= fieldName %>ContentType + ';base64,' + <%= entityInstance %>.<%= fieldName %>" style="max-height: 30px;" alt="<%= entityInstance %>"/>
</a>
<span>{{ <%= entityInstance %>.<%= fieldName %>ContentType }}, {{ byteSize(<%= entityInstance %>.<%= fieldName %>) }}</span>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ _%>
<div>
<%_ if (field.blobContentTypeImage) { _%>
@if (editForm.get('<%= fieldName %>')!.value) {
<img [src]="'data:' + editForm.get('<%= fieldName %>ContentType')!.value + ';base64,' + editForm.get('<%= fieldName %>')!.value" style="max-height: 100px" alt="<%= entityInstance %> image"/>
<img [src]="'data:' + editForm.get('<%= fieldName %>ContentType')!.value + ';base64,' + editForm.get('<%= fieldName %>')!.value" style="max-height: 100px" alt="<%= entityInstance %>"/>
}
<%_ } _%>
@if (editForm.get('<%= fieldName %>')!.value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<%_ } else if (field.fieldTypeBinary && field.blobContentTypeImage) { _%>
<div v-if="<%= entityInstance %>.<%= fieldName %>">
<a v-on:click="openFile(<%= entityInstance %>.<%= fieldName %>ContentType, <%= entityInstance %>.<%= fieldName %>)">
<img v-bind:src="'data:' + <%=entityInstance %>.<%= fieldName %>ContentType + ';base64,' + <%= entityInstance %>.<%= fieldName %>" style="max-width: 100%;" alt="<%=entityInstance %> image"/>
<img v-bind:src="'data:' + <%=entityInstance %>.<%= fieldName %>ContentType + ';base64,' + <%= entityInstance %>.<%= fieldName %>" style="max-width: 100%;" alt="<%=entityInstance %>"/>
</a>
{{<%= entityInstance %>.<%= fieldName %>ContentType}}, {{byteSize(<%= entityInstance %>.<%= fieldName %>)}}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ _%>
<%_ if (field.fieldTypeBinary && !field.blobContentTypeText) { _%>
<div>
<%_ if (field.blobContentTypeImage) { _%>
<img v-bind:src="'data:' + <%=entityInstance %>.<%=fieldName%>ContentType + ';base64,' + <%=entityInstance %>.<%=fieldName%>" style="max-height: 100px;" v-if="<%= entityInstance %>.<%= fieldName %>" alt="<%=entityInstance %> image"/>
<img v-bind:src="'data:' + <%=entityInstance %>.<%=fieldName%>ContentType + ';base64,' + <%=entityInstance %>.<%=fieldName%>" style="max-height: 100px;" v-if="<%= entityInstance %>.<%= fieldName %>" alt="<%=entityInstance %>"/>
<%_ } _%>
<div v-if="<%= entityInstance %>.<%= fieldName %>" class="form-text text-danger clearfix">
<%_ if (field.blobContentTypeAny) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<%_ if (field.fieldTypeBinary && field.blobContentTypeImage) { _%>
<td>
<a v-if="<%= entityInstance %>.<%= fieldName %>" v-on:click="openFile(<%= entityInstance %>.<%= fieldName %>ContentType, <%= entityInstance %>.<%= fieldName %>)">
<img v-bind:src="'data:' + <%=entityInstance %>.<%=fieldName%>ContentType + ';base64,' + <%=entityInstance %>.<%=fieldName%>" style="max-height: 30px;" alt="<%=entityInstance %> image"/>
<img v-bind:src="'data:' + <%=entityInstance %>.<%=fieldName%>ContentType + ';base64,' + <%=entityInstance %>.<%=fieldName%>" style="max-height: 30px;" alt="<%=entityInstance %>"/>
</a>
<span v-if="<%= entityInstance %>.<%= fieldName %>">{{<%= entityInstance %>.<%= fieldName %>ContentType}}, {{byteSize(<%= entityInstance %>.<%= fieldName %>)}}</span>
</td>
Expand Down

0 comments on commit ab43706

Please sign in to comment.