Browse Source

Logging fixed.

pull/344/head
Sebastian Stehle 8 years ago
parent
commit
0c11cadfcc
  1. 2
      src/Squidex/Pipeline/RequestLogPerformanceMiddleware.cs
  2. 6
      src/Squidex/app/features/administration/pages/restore/restore-page.component.scss
  3. 4
      src/Squidex/app/features/dashboard/pages/dashboard-page.component.html
  4. 4
      src/Squidex/app/features/dashboard/pages/dashboard-page.component.scss
  5. 8
      src/Squidex/app/features/dashboard/pages/dashboard-page.component.ts

2
src/Squidex/Pipeline/RequestLogPerformanceMiddleware.cs

@ -66,7 +66,7 @@ namespace Squidex.Pipeline
var clientId = context.User.OpenIdClientId();
if (!string.IsNullOrWhiteSpace(userId))
if (!string.IsNullOrWhiteSpace(clientId))
{
c.WriteProperty(nameof(clientId), clientId);
}

6
src/Squidex/app/features/administration/pages/restore/restore-page.component.scss

@ -47,15 +47,15 @@ h3 {
color: $color-dark-foreground;
vertical-align: middle;
}
&-pending {
color: inherit;
}
&-failed {
background: $color-theme-error;
}
&-success {
background: $color-theme-green;
}

4
src/Squidex/app/features/dashboard/pages/dashboard-page.component.html

@ -73,7 +73,9 @@
API Calls
<div class="float-right">
<a class="force" (click)="downloadLog()">
<img *ngIf="isLoadingLog" class="loader mr-2" src="/images/loader.gif" />
<a class="force" (click)="downloadLog()" [class.disabled]="isLoadingLog">
<small>Download Log</small>
</a>
</div>

4
src/Squidex/app/features/dashboard/pages/dashboard-page.component.scss

@ -31,6 +31,10 @@
color: $color-text-decent;
}
.loader {
height: 12px;
}
.card {
& {
margin-right: 1rem;

8
src/Squidex/app/features/dashboard/pages/dashboard-page.component.ts

@ -99,6 +99,8 @@ export class DashboardPageComponent implements OnDestroy, OnInit {
public callsCurrent = 0;
public callsMax = 0;
public isLoadingLog = false;
constructor(
public readonly appsState: AppsState,
public readonly authState: AuthService,
@ -209,9 +211,15 @@ export class DashboardPageComponent implements OnDestroy, OnInit {
}
public downloadLog() {
this.isLoadingLog = true;
this.usagesService.getLog(this.appsState.appName)
.subscribe(buffer => {
saveAs(buffer, 'Log.csv');
}, () => {
this.isLoadingLog = false;
}, () => {
this.isLoadingLog = false;
});
}
}

Loading…
Cancel
Save