Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Nov 28, 2022
2 parents e58f11a + af47255 commit 66ef72d
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 114 deletions.
171 changes: 79 additions & 92 deletions src/app/virtualmachines/imageCarouselSlide.component.html
Original file line number Diff line number Diff line change
@@ -1,125 +1,112 @@
<div class="not-allowed-cursor"
[ngClass]="{'not-allowed-cursor':(selectedFlavor?.rootdisk < image?.min_disk && image?.min_disk > 0)}">
<div *ngIf="image !== selectedImage" (click)="selectedImageChange.emit(image);"
class="card flavor-image-card inactive-image-card "
id="id_image_owl_{{image?.name}}"
[attr.data-test-id]="'image_' + image?.name.replace(regexp_data_test_id, '_')"
[ngClass]="{'inactive-image-card':(selectedFlavor?.rootdisk < image?.min_disk && image?.min_disk > 0)}"
<div
class="not-allowed-cursor"
[ngClass]="{ 'not-allowed-cursor': selectedFlavor?.rootdisk < image?.min_disk && image?.min_disk > 0 }"
>
<div
*ngIf="image !== selectedImage"
(click)="selectedImageChange.emit(image)"
class="card flavor-image-card inactive-image-card"
id="id_image_owl_{{ image?.name }}"
[attr.data-test-id]="'image_' + image?.name.replace(regexp_data_test_id, '_')"
[ngClass]="{ 'inactive-image-card': selectedFlavor?.rootdisk < image?.min_disk && image?.min_disk > 0 }"
>
<div
[ngClass]="{'bg-info-image':!image?.is_snapshot,'bg-warning':image?.is_snapshot}"

class="card-header text-truncate" data-toggle="tooltip" data-placement="top"
title="{{image?.name}}"><i *ngIf="image?.is_snapshot"
class="fa fa-camera" aria-hidden="true"></i>
<strong>{{image.name}}</strong></div>
<div class="card-body" style="color:#58595B;" tabindex="-1">
<div class="scroll-image" tabindex="-1">
<div *ngIf="!image?.logo_url || !image_visible" class="col" tabindex="-1"
(mouseleave)="setImageVisible()">
{{image?.description}}
[ngClass]="{ 'bg-info-image': !image?.is_snapshot, 'bg-warning': image?.is_snapshot }"
class="card-header text-truncate"
data-toggle="tooltip"
data-placement="top"
title="{{ image?.name }}"
>
<i *ngIf="image?.is_snapshot" class="fa fa-camera" aria-hidden="true"></i> <strong>{{ image.name }}</strong>
</div>
<div class="card-body" style="color: #58595b" tabindex="-1">
<div tabindex="-1">
<div *ngIf="!image?.logo_url || !image_visible" class="col" tabindex="-1" (mouseleave)="setImageVisible()">
{{ image?.description }}
</div>
<div *ngIf=" image?.logo_url && image_visible" (mouseenter)="setImageVisible()" tabindex="-1"><img
src="{{image?.logo_url}}" tabindex="-1"
[ngStyle]="{'width':img_width,'height':img_height}"
alt="{{image?.description}}">
<div *ngIf="image?.logo_url && image_visible" (mouseenter)="setImageVisible()" tabindex="-1">
<img
src="{{ image?.logo_url }}"
tabindex="-1"
[style]="{ width: img_width, height: img_height }"
style="object-fit: scale-down"
alt="{{ image?.description }}"
/>
</div>
</div>
</div>
<div class="card-footer text-muted" *ngIf="image?.min_disk >0 ">
<div class="card-footer text-muted" *ngIf="image?.min_disk > 0">
Requirements:
<div class="scroll-flavor">

<!-- min_ram quickfix <div class="row" *ngIf="image?.min_ram > 0">
<div class="col-2">
<figure class="image-card-icons">
<img src="{{RAM_ICON_PATH}}" alt="">
</figure>
</div>
<div class="col-10">
{{image?.min_ram}} GB min Ram <i *ngIf="selectedFlavor?.ram < image?.min_ram" class="fas fa-times"
style="color: red !important;"></i>&nbsp;
<i *ngIf="selectedFlavor?.ram >= image?.min_ram" class="fa fa-check"
style="color: green !important;"></i>&nbsp;
</div>
</div> -->
<div class="row" *ngIf="image?.min_disk > 0">
<div class="col-2">
<i class="image-card-icons">
<img src="{{STORAGE_ICON_PATH}}" alt="">
</i></div>
<img src="{{ STORAGE_ICON_PATH }}" alt="" />
</i>
</div>
<div class="col-10">

{{image?.min_disk}}
GB min root Disk <i *ngIf="selectedFlavor?.rootdisk < image?.min_disk" class="fas fa-times"
style="color: red !important;"></i>&nbsp;
<i *ngIf="selectedFlavor?.rootdisk >= image?.min_disk" class="fa fa-check"
style="color: green !important;"></i>&nbsp;

{{ image?.min_disk }}
GB min root Disk
<i *ngIf="selectedFlavor?.rootdisk < image?.min_disk" class="fas fa-times" style="color: red !important"></i
>&nbsp;
<i
*ngIf="selectedFlavor?.rootdisk >= image?.min_disk"
class="fa fa-check"
style="color: green !important"
></i
>&nbsp;
</div>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="image === selectedImage" class="card border-success flavor-image-card"
>
<div *ngIf="image === selectedImage" class="card border-success flavor-image-card">
<div
class="card-header bg-success text-truncate" data-toggle="tooltip" data-placement="top"
title="{{selectedImage?.name}}">
<i
*ngIf="selectedImage?.is_snapshot"
class="fa fa-camera" aria-hidden="true"></i>
<strong>{{selectedImage?.name}}</strong></div>
<div class="card-body" style="color:#58595B;" tabindex="-1">
class="card-header bg-success text-truncate"
data-toggle="tooltip"
data-placement="top"
title="{{ selectedImage?.name }}"
>
<i *ngIf="selectedImage?.is_snapshot" class="fa fa-camera" aria-hidden="true"></i>
<strong>{{ selectedImage?.name }}</strong>
</div>
<div class="card-body" style="color: #58595b" tabindex="-1">
<div class="scroll-image" tabindex="-1">
<div *ngIf="!selectedImage?.logo_url || !image_visible" class="col" tabindex="-1"
(mouseleave)="setImageVisible()">
{{selectedImage?.description}}
<div
*ngIf="!selectedImage?.logo_url || !image_visible"
class="col"
tabindex="-1"
(mouseleave)="setImageVisible()"
>
{{ selectedImage?.description }}
</div>
<div *ngIf=" selectedImage?.logo_url && image_visible" (mouseenter)="setImageVisible()" tabindex="-1"><img
src="{{selectedImage?.logo_url}}"
[ngStyle]="{'width':img_width,'height':img_height}"
alt="Logo">

<div *ngIf="selectedImage?.logo_url && image_visible" (mouseenter)="setImageVisible()" tabindex="-1">
<img
src="{{ selectedImage?.logo_url }}"
[style]="{ width: img_width, height: img_height }"
style="object-fit: scale-down"
alt="Logo"
/>
</div>


</div>
</div>
<div class="card-footer text-muted" *ngIf="image?.min_disk >0 ">
<div class="card-footer text-muted" *ngIf="image?.min_disk > 0">
Requirements:
<div class="scroll-flavor">
<!-- min ram quickfix <div class="row" *ngIf="image?.min_ram > 0">
<div class="col-2">
<figure class="image-card-icons">
<img src="{{RAM_ICON_PATH}}" alt="">
</figure>
</div>
<div class="col-8">
{{image?.min_ram}} GB min Ram <i *ngIf="selectedFlavor?.ram < image?.min_ram" class="fas fa-times"
style="color: red !important;"></i>&nbsp;
<i *ngIf="selectedFlavor?.ram >= image?.min_ram" class="fa fa-check"
style="color: green !important;"></i>&nbsp;
</div>
</div> -->
<div class="row" *ngIf="image?.min_disk > 0">
<div class="col-2">
<i class="image-card-icons">
<img src="{{STORAGE_ICON_PATH}}" alt="">
</i></div>
<img src="{{ STORAGE_ICON_PATH }}" alt="" />
</i>
</div>
<div class="col-8">

{{image?.min_disk}}
GB min root Disk <i *ngIf="selectedFlavor?.rootdisk < image?.min_disk" class="fas fa-times"
style="color: red !important;"></i>&nbsp;
<i *ngIf="selectedFlavor?.rootdisk >= image?.min_disk" class="fa fa-check"
style="color: green !important;"></i>&nbsp;

{{ image?.min_disk }}
GB min root Disk
<i *ngIf="selectedFlavor?.rootdisk < image?.min_disk" class="fas fa-times" style="color: red !important"></i
>&nbsp;
<i *ngIf="selectedFlavor?.rootdisk >= image?.min_disk" class="fa fa-check" style="color: green !important"></i
>&nbsp;
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/app/virtualmachines/imageCarouselSlide.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ export class ImageCarouselSlideComponent implements OnInit {
@Input() selectedFlavor: Flavor;
@Output() readonly selectedImageChange: EventEmitter<Image> = new EventEmitter();
window_size: number;
img_height: string = '120px';
img_width: string = '210px';
img_height: string = '120px!important';
img_width: string = '210px!important';
object_fit_scale: string = 'scale';
image_visible: boolean = true;
regexp_data_test_id: RegExp = /[ ().]/g;
STATIC_IMG_FOLDER: String = 'static/webapp/assets/img/';
Expand All @@ -34,5 +35,4 @@ export class ImageCarouselSlideComponent implements OnInit {
public setImageVisible(): void {
this.image_visible = !this.image_visible;
}

}
18 changes: 2 additions & 16 deletions src/app/virtualmachines/imagedetail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
<div *ngIf="selectedImage?.logo_url && image_visible" (mouseenter)="setImageVisible()">
<img
src="{{ selectedImage?.logo_url }}"
[ngStyle]="{ width: img_width, height: img_height }"
[style]="{ width: img_width, height: img_height }"
style="object-fit: scale-down"
alt="{{ selectedImage?.description }}"
/>
</div>
Expand All @@ -102,21 +103,6 @@
<div class="card-footer text-muted" *ngIf="selectedImage?.min_disk > 0">
Requirements:
<div class="scroll-flavor">
<!-- min ram quickfix <div class="row" *ngIf="selectedImage?.min_ram > 0">
<div class="col-2">
<figure class="image-card-icons">
<img src="{{RAM_ICON_PATH}}" alt="">
</figure>
</div>
<div class="col-10">
{{selectedImage?.min_ram}} GB min Ram <i *ngIf="selectedFlavor?.ram < selectedImage?.min_ram" class="fas fa-times"
style="color: red !important;"></i>&nbsp;
<i *ngIf="selectedFlavor?.ram >= selectedImage?.min_ram" class="fa fa-check"
style="color: green !important;"></i>&nbsp;
</div>
</div> -->
<div class="row" *ngIf="selectedImage?.min_disk > 0">
<div class="col-2">
<i class="image-card-icons">
Expand Down
4 changes: 2 additions & 2 deletions src/app/virtualmachines/imagedetail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export class ImageDetailComponent implements OnInit {
carousel_window_min_xl_9: number = 1700;
carousel_window_min_xl_8: number = 1380;
carousel_window_min_xl6: number = 1200;
img_height: string = '120px';
img_width: string = '210px';
img_height: string = '120px!important';
img_width: string = '210px!important';
image_visible: boolean = true;
selected_image_type: string = ImageTypes.IMAGE;
image_types: { [name: string]: Image[] } = {};
Expand Down
3 changes: 2 additions & 1 deletion src/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ header {
.card-body {
flex: 1 1 auto;
padding: 1.25rem;

}


Expand Down Expand Up @@ -909,7 +910,7 @@ header {

.flavor-image-card {
width: 16rem;
margin: 5px;
margin: 2px;
cursor: pointer;
height: auto;
}
Expand Down

0 comments on commit 66ef72d

Please sign in to comment.