Skip to content

Commit

Permalink
NAS-131113: PR update
Browse files Browse the repository at this point in the history
  • Loading branch information
undsoft authored and AlexKarpov98 committed Sep 11, 2024
1 parent 43fa508 commit 8c9249f
Show file tree
Hide file tree
Showing 93 changed files with 197 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,30 @@
></ix-app-status-cell>
</div>
<div class="cell cell-cpu" [matTooltip]="'Percentage of total core utilization' | translate">
@if (stats()?.cpu_usage) {
@if (hasStats()) {
<span>{{ stats().cpu_usage.toFixed(0) }}%</span>
} @else {
{{ 'N/A' | translate }}
}
</div>
<div class="cell cell-ram" [matTooltip]="'Memory usage of app' | translate">
@if (stats()?.memory) {
@if (hasStats()) {
<span>{{ stats().memory | ixFileSize }}</span>
} @else {
{{ 'N/A' | translate }}
}
</div>
<div class="cell cell-io" [matTooltip]="'Block I/O read and writes' | translate">
@if (hasStats()) {
<span>
{{ stats().blkio.read | ixFileSize }} - {{ stats().blkio.write | ixFileSize }}
</span>
} @else {
{{ 'N/A' | translate }}
}
</div>
<div class="cell cell-network" [matTooltip]="'Incoming / Outgoing network traffic' | translate">
@if (stats()?.networks?.length) {
@if (hasStats() && stats()?.networks?.length) {
<span>
{{ incomingTraffic() | ixNetworkSpeed }}
-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ describe('AppRowComponent', () => {
it('shows app usages stats', () => {
expect(spectator.query('.cell-cpu')).toHaveText('90%');
expect(spectator.query('.cell-ram')).toHaveText('80 MiB');
expect(spectator.query('.cell-io')).toHaveText('1 KiB - 2 KiB');
expect(spectator.query('.cell-network')).toHaveText('768 b/s - 1.02 kb/s');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Component, computed, input, output,
} from '@angular/core';
import { appImagePlaceholder } from 'app/constants/catalog.constants';
import { CatalogAppState } from 'app/enums/catalog-app-state.enum';
import { Role } from 'app/enums/role.enum';
import { App, AppStartQueryParams, AppStats } from 'app/interfaces/app.interface';
import { Job } from 'app/interfaces/job.interface';
Expand Down Expand Up @@ -30,7 +31,10 @@ export class AppRowComponent {
protected readonly requiredRoles = [Role.AppsWrite];

readonly hasUpdates = computed(() => this.app().upgrade_available);
readonly isAppStopped = computed(() => this.status() === AppStatus.Stopped);
readonly isAppStopped = computed(() => this.app().state === CatalogAppState.Stopped);
readonly hasStats = computed(() => {
return this.app().state === CatalogAppState.Running && this.stats();
});

readonly inProgress = computed(() => {
return [AppStatus.Deploying].includes(this.status()) || this.isStartingOrStopping();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ <h2>{{ 'Applications' | translate }}</h2>
</div>
<div>{{ 'CPU' | translate }}</div>
<div>{{ 'RAM' | translate }}</div>
<div>{{ 'Block I/O' | translate }}</div>
<div>{{ 'Network' | translate }}</div>
<div
class="app-update-header"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

ix-app-row,
.app-header-row {
grid-template-columns: 45px minmax(160px, auto) minmax(100px, 120px) 50px 55px 85px 85px 40px;
grid-template-columns: 45px minmax(160px, auto) minmax(100px, 120px) 50px 55px 85px 85px 85px 40px;

@media (max-width: $breakpoint-tablet) {
grid-template-columns: 45px auto 0 0 0 0 0 0;
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/af.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/br.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/bs.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Boot": "",
"Boot Environment": "",
"Boot Pool Condition": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/dsb.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/en-au.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/en-gb.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/eo.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/es-ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@
"Bind": "",
"Bind Interfaces": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Boot Environment": "",
"Boot Pool Condition": "",
"Boot Pool Disk Replaced": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/es-co.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/es-mx.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/es-ni.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/es-ve.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot Loader Type": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"Bind DN": "",
"Bind Interfaces": "",
"Bind Password": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Boot Environment": "",
"Boot Pool Condition": "",
"Box": "",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/fy.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
5 changes: 3 additions & 2 deletions src/assets/i18n/ga.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"Application Information": "",
"Application Memory": "",
"Application Network": "",
"CONNECT": "",
"Block I/O": "",
"Block I/O read and writes": "",
"CPU Overview": "",
"CPU Temperature Per Core": "",
"CPU Usage Per Core": "",
Expand Down Expand Up @@ -5086,4 +5087,4 @@
"{used} of {total} ({used_pct})": "{used} de {total} ({used_pct})",
"{version} is available!": "Tá {version} ar fáil!",
"{view} on {enclosure}": "{view} ar {enclosure}"
}
}
2 changes: 2 additions & 0 deletions src/assets/i18n/gd.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
"Bind Interfaces": "",
"Bind Password": "",
"Block (iSCSI) Shares Targets": "",
"Block I/O": "",
"Block I/O read and writes": "",
"Block Size": "",
"Block size": "",
"Boot": "",
Expand Down
Loading

0 comments on commit 8c9249f

Please sign in to comment.