Skip to content

Commit

Permalink
Update embedded logging (#2337)
Browse files Browse the repository at this point in the history
* update embedded logging

* remove first do/retry
  • Loading branch information
Allison Gruninger authored Feb 13, 2018
1 parent 468a0bb commit 79c7c43
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
1 change: 1 addition & 0 deletions AzureFunctions.AngularClient/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/observable/of';
import 'rxjs/add/operator/retry';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/take';
import 'rxjs/add/operator/takeUntil';
import 'rxjs/add/observable/timer';
import 'rxjs/add/observable/throw';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ export class EmbeddedFunctionEditorComponent implements OnInit, AfterContentInit
setBottomBarState(expanded: boolean) {
this.bottomBarExpanded = expanded;

console.log('editor bottom bar expanded - ' + this.bottomBarExpanded);

setTimeout(() => {
this.codeEditor.resize();
});
Expand Down Expand Up @@ -170,22 +168,22 @@ export class EmbeddedFunctionEditorComponent implements OnInit, AfterContentInit
if (result) {
this._busyManager.setBusy();
this._embeddedService.deleteFunction(this.resourceId)
.subscribe(r => {
.subscribe(r => {
if (r.isSuccessful) {
this._busyManager.clearBusy();
this._broadcastService.broadcastEvent<TreeUpdateEvent>(BroadcastEvent.TreeUpdate, {
resourceId: this.resourceId,
operation: 'remove'
});
this._busyManager.clearBusy();
this._broadcastService.broadcastEvent<TreeUpdateEvent>(BroadcastEvent.TreeUpdate, {
resourceId: this.resourceId,
operation: 'remove'
});
} else {
this._busyManager.clearBusy();
this._broadcastService.broadcast<ErrorEvent>(BroadcastEvent.Error, {
message: r.error.message,
errorId: r.error.errorId,
resourceId: this.resourceId,
});
this._busyManager.clearBusy();
this._broadcastService.broadcast<ErrorEvent>(BroadcastEvent.Error, {
message: r.error.message,
errorId: r.error.errorId,
resourceId: this.resourceId,
});
}
});
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ export class EmbeddedFunctionLogsTabComponent extends BottomTabComponent impleme
.switchMap(t => {
return this._cacheService.getArm(`${this.resourceId}/logs`, true);
})
.catch(e => {
return Observable.of(null);
})
.switchMap(r => {
if (r) {
const files: VfsObject[] = r.json();
Expand All @@ -140,6 +137,10 @@ export class EmbeddedFunctionLogsTabComponent extends BottomTabComponent impleme
}
return Observable.of(null);
})
.do(null, e => {
return Observable.of(null);
})
.retry()
.subscribe(r => {
if (r) {
this.logContent = r.text();
Expand Down

0 comments on commit 79c7c43

Please sign in to comment.