mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
Bugfix/metrics leak (#1008)
* metrics leak potential fix: * typo * max of that or zero * page movement * animation edit Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com>
This commit is contained in:
committed by
Aiden McClelland
parent
8f0639cb72
commit
b3fe55a895
@@ -4,6 +4,7 @@
|
|||||||
<ion-back-button [defaultHref]="'/services/' + pkgId"></ion-back-button>
|
<ion-back-button [defaultHref]="'/services/' + pkgId"></ion-back-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>Monitor</ion-title>
|
<ion-title>Monitor</ion-title>
|
||||||
|
<ion-title slot="end"><ion-spinner name="dots" class="fader"></ion-spinner></ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@@ -45,8 +45,9 @@ export class AppMetricsPage {
|
|||||||
async startDaemon (): Promise<void> {
|
async startDaemon (): Promise<void> {
|
||||||
this.going = true
|
this.going = true
|
||||||
while (this.going) {
|
while (this.going) {
|
||||||
|
const startTime = Date.now()
|
||||||
await this.getMetrics()
|
await this.getMetrics()
|
||||||
await pauseFor(250)
|
await pauseFor(Math.max(4000 - (Date.now() - startTime), 0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
<ion-col *ngFor="let pkg of pkgs" sizeXs="12" sizeSm="12" sizeMd="6">
|
<ion-col *ngFor="let pkg of pkgs" sizeXs="12" sizeSm="12" sizeMd="6">
|
||||||
<ion-item [routerLink]="['/marketplace', pkg.manifest.id]">
|
<ion-item [routerLink]="['/marketplace', pkg.manifest.id]">
|
||||||
<ion-thumbnail slot="start">
|
<ion-thumbnail slot="start">
|
||||||
<img [src]="pkg.icon" />
|
<img [src]="'/marketplace' + pkg.icon" />
|
||||||
</ion-thumbnail>
|
</ion-thumbnail>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<h2 style="font-family: 'Montserrat'; font-weight: bold;">{{ pkg.manifest.title }}</h2>
|
<h2 style="font-family: 'Montserrat'; font-weight: bold;">{{ pkg.manifest.title }}</h2>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<ion-back-button defaultHref="embassy"></ion-back-button>
|
<ion-back-button defaultHref="embassy"></ion-back-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>Monitor</ion-title>
|
<ion-title>Monitor</ion-title>
|
||||||
|
<ion-title slot="end"><ion-spinner name="dots" class="fader"></ion-spinner></ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
.metric-note {
|
.metric-note {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
@@ -43,8 +43,9 @@ export class ServerMetricsPage {
|
|||||||
private async startDaemon (): Promise<void> {
|
private async startDaemon (): Promise<void> {
|
||||||
this.going = true
|
this.going = true
|
||||||
while (this.going) {
|
while (this.going) {
|
||||||
|
const startTime = Date.now()
|
||||||
await this.getMetrics()
|
await this.getMetrics()
|
||||||
await pauseFor(250)
|
await pauseFor(4000 - Math.max(Date.now() - startTime, 0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export class WifiPage {
|
|||||||
private async connect (ssid: string): Promise<void> {
|
private async connect (ssid: string): Promise<void> {
|
||||||
const loader = await this.loadingCtrl.create({
|
const loader = await this.loadingCtrl.create({
|
||||||
spinner: 'lines',
|
spinner: 'lines',
|
||||||
message: 'Connecting. This could take while...',
|
message: 'Connecting. This could take a while...',
|
||||||
cssClass: 'loader',
|
cssClass: 'loader',
|
||||||
})
|
})
|
||||||
await loader.present()
|
await loader.present()
|
||||||
@@ -287,7 +287,7 @@ export class WifiPage {
|
|||||||
private async saveAndConnect (ssid: string, password: string): Promise<void> {
|
private async saveAndConnect (ssid: string, password: string): Promise<void> {
|
||||||
const loader = await this.loadingCtrl.create({
|
const loader = await this.loadingCtrl.create({
|
||||||
spinner: 'lines',
|
spinner: 'lines',
|
||||||
message: 'Connecting. This could take while...',
|
message: 'Connecting. This could take a while...',
|
||||||
cssClass: 'loader',
|
cssClass: 'loader',
|
||||||
})
|
})
|
||||||
await loader.present()
|
await loader.present()
|
||||||
|
|||||||
@@ -336,3 +336,13 @@ h2 {
|
|||||||
content: "...";
|
content: "...";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes flickerAnimation {
|
||||||
|
0% { opacity:1; }
|
||||||
|
20% { opacity:0; }
|
||||||
|
60% { opacity:0; }
|
||||||
|
100% { opacity:1; }
|
||||||
|
}
|
||||||
|
.fader {
|
||||||
|
animation: flickerAnimation 4s infinite;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user