- {{ vars.torAddress | truncateCenter:18:18:true }}
+
+ {{ vars.torAddress }}
diff --git a/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.ts b/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.ts
index 596447f53..1d906bc5a 100644
--- a/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.ts
+++ b/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.ts
@@ -17,6 +17,7 @@ import { catchError, concatMap, filter, switchMap, tap } from 'rxjs/operators'
import { Cleanup } from 'src/app/util/cleanup'
import { InformationPopoverComponent } from 'src/app/components/information-popover/information-popover.component'
import { Emver } from 'src/app/services/emver.service'
+import { displayEmver } from 'src/app/pipes/emver.pipe'
@Component({
selector: 'app-installed-show',
@@ -115,7 +116,7 @@ export class AppInstalledShowPage extends Cleanup {
const alert = await this.alertCtrl.create({
backdropDismiss: false,
header: 'Update Available',
- message: `New version ${versionLatest} found for ${app.title}.`,
+ message: `New version ${displayEmver(versionLatest)} found for ${app.title}.`,
buttons: [
{
text: 'Cancel',
diff --git a/ui/src/app/pipes/truncate.pipe.ts b/ui/src/app/pipes/truncate.pipe.ts
index 9a76a428f..19c9560d2 100644
--- a/ui/src/app/pipes/truncate.pipe.ts
+++ b/ui/src/app/pipes/truncate.pipe.ts
@@ -20,13 +20,3 @@ export class TruncateEndPipe implements PipeTransform {
return val.slice(0, length) + '...'
}
}
-
-
-// 4 and 4
-
-// 12345678 => 12345678
-// 123456789 => 123456789
-// 1234567890 => 1234567890
-// 12345678901 => 12345678901
-// 1234...9012 => 1234...9012
-// 1234...0123 => 1234...0123
\ No newline at end of file
diff --git a/ui/src/app/services/api/api.service.ts b/ui/src/app/services/api/api.service.ts
index c0df7176e..7678b3ba6 100644
--- a/ui/src/app/services/api/api.service.ts
+++ b/ui/src/app/services/api/api.service.ts
@@ -47,7 +47,7 @@ export abstract class ApiService {
abstract restoreAppBackup (appId: string, logicalname: string, password?: string): Promise
abstract stopAppBackup (appId: string): Promise
abstract patchAppConfig (app: AppInstalledPreview, config: object, dryRun?: boolean): Promise<{ breakages: DependentBreakage[] }>
- abstract postConfigureDependency(dependencyId: string, dependentId: string, dryRun?: boolean): Promise<{config: object, breakages: DependentBreakage[] }>
+ abstract postConfigureDependency (dependencyId: string, dependentId: string, dryRun?: boolean): Promise< {config: object, breakages: DependentBreakage[] }>
abstract patchServerConfig (attr: string, value: any): Promise
abstract wipeAppData (app: AppInstalledPreview): Promise
abstract addSSHKey (sshKey: string): Promise
diff --git a/ui/src/app/services/api/live-api.service.ts b/ui/src/app/services/api/live-api.service.ts
index f1887a1f9..eeec15c75 100644
--- a/ui/src/app/services/api/live-api.service.ts
+++ b/ui/src/app/services/api/live-api.service.ts
@@ -9,6 +9,7 @@ import { HttpErrorResponse } from '@angular/common/http'
import { isUnauthorized } from 'src/app/util/web.util'
import { Replace } from 'src/app/util/types.util'
import { AppMetrics, parseMetricsPermissive } from 'src/app/util/metrics.util'
+import { modulateTime } from 'src/app/util/misc.util'
@Injectable()
export class LiveApiService extends ApiService {
@@ -122,23 +123,23 @@ export class LiveApiService extends ApiService {
}
async uninstallApp (appId: string, dryRun: boolean = false): Promise<{ breakages: DependentBreakage[] }> {
- return this.authRequest({ method: Method.POST, url: `/apps/${appId}/uninstall${dryRunParam(dryRun, true)}`, readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: `/apps/${appId}/uninstall${dryRunParam(dryRun, true)}`, readTimeout: 60000 })
}
async startApp (appId: string): Promise {
- return this.authRequest({ method: Method.POST, url: `/apps/${appId}/start`, readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: `/apps/${appId}/start`, readTimeout: 60000 })
.then(() => this.appModel.update({ id: appId, status: AppStatus.RUNNING }))
.then(() => ({ }))
}
async stopApp (appId: string, dryRun: boolean = false): Promise<{ breakages: DependentBreakage[] }> {
- const res = await this.authRequest<{ breakages: DependentBreakage[] }>({ method: Method.POST, url: `/apps/${appId}/stop${dryRunParam(dryRun, true)}`, readTimeout: 30000 })
- if (!dryRun) this.appModel.update({ id: appId, status: AppStatus.STOPPING })
+ const res = await this.authRequest<{ breakages: DependentBreakage[] }>({ method: Method.POST, url: `/apps/${appId}/stop${dryRunParam(dryRun, true)}`, readTimeout: 60000 })
+ if (!dryRun) this.appModel.update({ id: appId, status: AppStatus.STOPPING }, modulateTime(new Date(), 5, 'seconds'))
return res
}
async restartApp (appId: string): Promise {
- return this.authRequest({ method: Method.POST, url: `/apps/${appId}/restart`, readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: `/apps/${appId}/restart`, readTimeout: 60000 })
.then(() => ({ } as any))
}
@@ -147,13 +148,13 @@ export class LiveApiService extends ApiService {
password: password || undefined,
logicalname,
}
- return this.authRequest({ method: Method.POST, url: `/apps/${appId}/backup`, data, readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: `/apps/${appId}/backup`, data, readTimeout: 60000 })
.then(() => this.appModel.update({ id: appId, status: AppStatus.CREATING_BACKUP }))
.then(() => ({ }))
}
async stopAppBackup (appId: string): Promise {
- return this.authRequest({ method: Method.POST, url: `/apps/${appId}/backup/stop`, readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: `/apps/${appId}/backup/stop`, readTimeout: 60000 })
.then(() => this.appModel.update({ id: appId, status: AppStatus.STOPPED }))
.then(() => ({ }))
}
@@ -163,7 +164,7 @@ export class LiveApiService extends ApiService {
password: password || undefined,
logicalname,
}
- return this.authRequest({ method: Method.POST, url: `/apps/${appId}/backup/restore`, data, readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: `/apps/${appId}/backup/restore`, data, readTimeout: 60000 })
.then(() => this.appModel.update({ id: appId, status: AppStatus.RESTORING_BACKUP }))
.then(() => ({ }))
}
@@ -172,24 +173,24 @@ export class LiveApiService extends ApiService {
const data: ReqRes.PatchAppConfigReq = {
config,
}
- return this.authRequest({ method: Method.PATCH, url: `/apps/${app.id}/config${dryRunParam(dryRun, true)}`, data, readTimeout: 30000 })
+ return this.authRequest({ method: Method.PATCH, url: `/apps/${app.id}/config${dryRunParam(dryRun, true)}`, data, readTimeout: 60000 })
}
async postConfigureDependency (dependencyId: string, dependentId: string, dryRun?: boolean): Promise<{ config: object, breakages: DependentBreakage[] }> {
- return this.authRequest({ method: Method.POST, url: `/apps/${dependencyId}/autoconfig/${dependentId}${dryRunParam(dryRun, true)}`, readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: `/apps/${dependencyId}/autoconfig/${dependentId}${dryRunParam(dryRun, true)}`, readTimeout: 60000 })
}
async patchServerConfig (attr: string, value: any): Promise {
const data: ReqRes.PatchServerConfigReq = {
value,
}
- return this.authRequest({ method: Method.PATCH, url: `/${attr}`, data, readTimeout: 30000 })
+ return this.authRequest({ method: Method.PATCH, url: `/${attr}`, data, readTimeout: 60000 })
.then(() => this.serverModel.update({ [attr]: value }))
.then(() => ({ }))
}
async wipeAppData (app: AppInstalledPreview): Promise {
- return this.authRequest({ method: Method.POST, url: `/apps/${app.id}/wipe`, readTimeout: 30000 }).then((res) => {
+ return this.authRequest({ method: Method.POST, url: `/apps/${app.id}/wipe`, readTimeout: 60000 }).then((res) => {
this.appModel.update({ id: app.id, status: AppStatus.NEEDS_CONFIG })
return res
})
@@ -230,11 +231,11 @@ export class LiveApiService extends ApiService {
}
async restartServer (): Promise {
- return this.authRequest({ method: Method.POST, url: '/restart', readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: '/restart', readTimeout: 60000 })
}
async shutdownServer (): Promise {
- return this.authRequest({ method: Method.POST, url: '/shutdown', readTimeout: 30000 })
+ return this.authRequest({ method: Method.POST, url: '/shutdown', readTimeout: 60000 })
}
private async authRequest (opts: HttpOptions, overrides: Partial<{ version: string }> = { }): Promise {