Skip to content

Commit dff737f

Browse files
authored
Merge from Dev to Master (#2340)
* Making sure selected option in DropDownComponent matches the selected option in the native select element (fixes #2060) * Add CRM headers (#2225) * Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#2218)" This reverts commit 300746c. * add keyboard controls to download function app * CRM headers only on create and delete (#2226) * rp update * add headers only on create and delete calls * pr updates and add headers for get entities * update delete calls to include headers * Tentatively remove MSA login for Try Functions * update icon (#2236) fixes #2235 * Use ARM url specified from Ibiza for national clouds (#2239) * Revert "Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#2218)"" This reverts commit 481a96b. * Use ARM url specified from Ibiza for national clouds * Fixing CR comments * Experimental Language Toggle (#2238) * Experimental Language Toggle * pr updates * Add TIP1 to accepted origins (#2242) * Handling namespace for embedded scenario (#2237) * Fixes #1592 - [Accessibility] Screen reader does not read tree node options when in focus (#2221) * Minor embedded updates (#2245) * update templates and filter out errors * remove retrieve option * Fixing runtime upgrade warning string * Updating Ibiza redirect URL's (#2247) * Minor fixes to disable some features that don't work in national clouds (#2249) * Fix all functions caching (#2250) * Fix all functions caching on create * update function create calls * nit update * Change SiteManage component to open the new App Service Plan blade * Change Destroy to Delete (#2252) * Fixing build * Add durable resources (#2251) * CICD Rework ( Deployment Center) (#2205) * CICD Rework * Fixing a build break and updating the portal-resources.ts file * Fixing Resources from a bad merge * Adding flag in tsc to not check lib typings * correcting import casing for linux build server * Fixing issues in build with unused variables * Polish adjustments dashboard tables and auto refreshing of data * adding state to bitbucket and github oauth * cleaned up deployment detail log and fixed some translate pipes * removing unused variables to make compiler happy * removing bad debug logging from server code * Made first pass at a basic summary page * adding some support for summary of Local Git Choice * first pass at PR Comments, any that are currently marked resolved should be fixed here * Adjustments based on PR comments * Fixing build break * Update travis.yml angular cli * Removing nodejs server auth and making pug use minified * adding production check for optimized js files * adding AI support on the server * fixing azure head pug * Fixing some bugs around loading * Fixing PR changes * Hiding Deployment Center behind a feature flag * Fixing build breaks from last commit * adjustments based on PR comments * Last of PR comments * Fixing file name casing issues for linux builds * securing session cookie * fixing file names to match our format * Addressing PR Comment * Stop showing invalid connection string types, except when already configured (fixes #2248) * Adding build badges * Fixing windows local server running (#2268) * Fixes #2267 and Fixes #2227 Adding mime type for static json files for iisnode (#2269) * Let NodeJS handle static file loading * Trying different fix * Embedded updates (#2271) * Add preview and update editor name for embedded * Add ibiza support for deployment center (#2272) * Let NodeJS handle static file loading * Trying different fix * Adding support for loading deployment center inside of ibiza * fixing build * build fixes * Updated settings file to format TS files on save * Fixing deployment center to load itself rather than app settings * Adding site service and generalizing conditional-http-client (#2266) * Adding site service and generalizing conditional-http-client * Removing arm-preconditions * Moving precondition.ts back to where it was originally * Removing deployment center auth state check from returning auth tokens * Adding telemetry for AppSettings and creating base FeatureComponent (#2280) * Adding telemetry for AppSettings and creating base FeatureComponent * Updating with code review comments * Added parent component concept to make sure we log feature timings only when a parent exists to represent the entire feature * Whitelist update and accessibility updates (#2273) * whitelist update and accessibility updates * remove comment * pr updates * Making sure the form control and displayed value are in sync for the AutoSwapSlotName dropdown (fixes #2275) * EventGrid UI support in function2.0. Fixes #2199 * Disable "enable/disable" and "delete" for VS functions * Add variable cdn url injected at build time * Setting view cache to true on node server to check performance increase in next * making cdn url in body.pug correct * Fixing typo in index.pug that is preventing the rendering in ng-min * Updating the referenced templates (#2291) * Fixing web config to add static file mime types * Make gulp ignore resources made specifically for Visual Studio that aren't used for portal * Updating template package, fixing resources * Updating the swagger editor to match the luminosity ratio (#2288) * manage blade, focus on input when adding key * [API definition blade] adding role for expand / collapse (#2286) * Create from Integrate Tab (#2296) * Embedded templates "type" update (#2295) * xrmwebhooktrigger replaces synctrigger * update binding type * Moving as many pieces as possible to go through CDN rather than directly to the app (#2300) * Add variable cdn url injected at build time * trigger build * Adding Woff Mime type to web.config * fixing mime map in web.config * Adding mime types to web config * moving more assets to load from cdn * fixing mime types * adding ttf mime type * get resources from cdn when possible * Moving pieces to load from CDN where available * fixing cdn image loading * Adding cache breaking cdn calls * focus on combo box when get function url clicked * Adding Cache break query for image loading (#2303) * add role and label to click to show/click to hide * undo template update (#2305) * Add redirects for people going directly to functions.azure.com (#2313) * correct fowarding address for try functions * Updated Travis CI link * xrmwebhooktrigger change (#2314) * Fixes #2267 - Updating conditional http client to handle complex error types being thrown (#2311) * Fixing TriggerFunctionAPIM api for ASP.Net controller * Fixing build * Implement /api/runtimetoken in node server. Closes #2253 (#2298) * Implement /api/runtimetoken in node server. Closes #2253 * CR 1 * Temporarily updating APIMTrigger API in node for debugging purposes * Updating site-config to do permission/lock checks after initial load (#2318) * Updating site-config to do permission/lock checks after initial load * Add error handling to several components * Fixing connection string type * Error handle updates (#2323) * creation error handle * update log error catch * type update * Support linux function apps that don't have scm endpoint (#2322) * Support linux function apps that don't have scm endpoint * Updating site summary and site manage tabs to inherit from FeatureComponent (#2326) * Updating site summary and site manage tabs to inherit from FeatureComponent * Updated SiteEnabledFeaturesComponent to be a FeatureComponent * Cleaning up based on PR feedback * PR feedback * Upgrading from Angular 4 to Angular 5 (#2335) * Update embedded API version (#2336) * add role link to revoke renew * removing vendor import script that is not there in Angular 5 * Fixing local loading * Update embedded logging (#2337) * update embedded logging * remove first do/retry * Only display error on HostStatus === 'Error'. Closes #2330 * Fixing bug in embedded logging
1 parent b8acf02 commit dff737f

File tree

68 files changed

+1330
-985
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1330
-985
lines changed

AzureFunctions.AngularClient/package.json

+18-17
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,24 @@
1515
},
1616
"private": true,
1717
"dependencies": {
18-
"@angular/common": "^4.0.0",
19-
"@angular/compiler": "^4.0.0",
20-
"@angular/core": "^4.0.0",
21-
"@angular/forms": "^4.0.0",
22-
"@angular/http": "^4.0.0",
23-
"@angular/platform-browser": "^4.0.0",
24-
"@angular/platform-browser-dynamic": "^4.0.0",
25-
"@angular/router": "^4.0.0",
26-
"@ngx-translate/core": "^6.0.1",
18+
"@angular/animations": "^5.0.0",
19+
"@angular/common": "^5.0.0",
20+
"@angular/compiler": "^5.0.0",
21+
"@angular/core": "^5.0.0",
22+
"@angular/forms": "^5.0.0",
23+
"@angular/http": "^5.0.0",
24+
"@angular/platform-browser": "^5.0.0",
25+
"@angular/platform-browser-dynamic": "^5.0.0",
26+
"@angular/platform-server": "^5.0.0",
27+
"@angular/router": "^5.0.0",
28+
"@ngx-translate/core": "^9.1.1",
2729
"angular2-uuid": "^1.1.1",
2830
"azure-mobile-apps-client": "^2.0.1",
2931
"bootstrap": "^3.3.7",
3032
"core-js": "^2.4.1",
3133
"font-awesome": "^4.7.0",
3234
"jsonschema": "^1.1.1",
35+
"lodash": "4.17.4",
3336
"marked": "^0.3.9",
3437
"moment": "^2.17.0",
3538
"monaco-editor": "^0.10.0",
@@ -38,20 +41,18 @@
3841
"ng2-file-upload": "~1.2.1",
3942
"ng2-popover": "^0.0.14",
4043
"node-sass": "^4.7.2",
41-
"rxjs": "^5.1.0",
42-
"swagger-editor": "git+https://github.com/azure/swagger-editor.git#ff974a50cc7c756f0a96a66f1e92f1286324c549",
44+
"rxjs": "^5.5.2",
45+
"swagger-editor": "git+https://github.com/azure/swagger-editor.git#5c7736ff93ffe36569e1f21efd72a91c9c1f9f77",
4346
"ts-helpers": "^1.1.1",
44-
"zone.js": "^0.8.4",
45-
"ng-sidebar": "^6.0.1",
46-
"lodash": "4.17.4"
47+
"zone.js": "^0.8.4"
4748
},
4849
"devDependencies": {
4950
"@angular/cli": "^1.1.3",
50-
"@angular/compiler-cli": "^4.0.0",
51+
"@angular/compiler-cli": "^5.0.0",
5152
"@types/jasmine": "2.5.38",
5253
"@types/jsonschema": "^1.1.1",
53-
"@types/node": "~6.0.60",
5454
"@types/lodash": "^4.14.80",
55+
"@types/node": "~6.0.60",
5556
"codelyzer": "~2.0.0",
5657
"jasmine-core": "~2.5.2",
5758
"jasmine-spec-reporter": "~3.2.0",
@@ -64,7 +65,7 @@
6465
"protractor": "~5.1.0",
6566
"ts-node": "~2.0.0",
6667
"tslint": "~4.5.0",
67-
"typescript": "^2.4.1",
68+
"typescript": "2.4.2",
6869
"webpack-bundle-analyzer": "^2.9.0"
6970
}
7071
}

AzureFunctions.AngularClient/src/app/api/api-details/api-details.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class ApiDetailsComponent extends NavigableComponent implements OnDestroy
107107
route = '/' + route;
108108
}
109109

110-
this.proxyUrl = `https://${this.context.site.properties.hostNameSslStates.find(s => s.hostType === 0).name}` + route;
110+
this.proxyUrl = `https://${this.context.mainSiteUrl}` + route;
111111

112112
const methods = {};
113113
methods['method_GET'] = false;

AzureFunctions.AngularClient/src/app/api/api-new/api-new.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ export class ApiNewComponent extends NavigableComponent {
106106
}
107107
if (res.proxies.isSuccessful) {
108108
this.apiProxies = res.proxies.result;
109-
} else if (res.proxies.error.errorId === errorIds.proxyJsonNotFound ||
110-
res.proxies.error.message === errorIds.proxyJsonNotFound) {
109+
} else if (res.proxies.error.errorId === errorIds.proxyJsonNotFound) {
111110
this.apiProxies = [];
112111
} else {
113112
this.showComponentError({

AzureFunctions.AngularClient/src/app/app.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import 'rxjs/add/operator/mergeMap';
2424
import 'rxjs/add/observable/of';
2525
import 'rxjs/add/operator/retry';
2626
import 'rxjs/add/operator/switchMap';
27+
import 'rxjs/add/operator/take';
2728
import 'rxjs/add/operator/takeUntil';
2829
import 'rxjs/add/observable/timer';
2930
import 'rxjs/add/observable/throw';

AzureFunctions.AngularClient/src/app/controls/load-image/load-image.directive.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LogCategories } from './../../shared/models/constants';
1+
import { LogCategories, Constants } from './../../shared/models/constants';
22
import { Guid } from './../../shared/Utilities/Guid';
33
import { LogService } from './../../shared/services/log.service';
44
import { CacheService } from './../../shared/services/cache.service';
@@ -20,8 +20,9 @@ export class LoadImageDirective implements OnChanges {
2020

2121
ngOnChanges() {
2222
if (this.imageUrl) {
23+
const cdnUrl = Constants.cdnNgMin;
2324
if (!this.imageUrl.toLowerCase().endsWith('.svg')) {
24-
this._elementRef.nativeElement.innerHTML = `<img src="${this.imageUrl}" />`;
25+
this._elementRef.nativeElement.innerHTML = `<img src="${cdnUrl}${this.imageUrl}?cacheBreak=${window.appsvc.cacheBreakQuery}" />`;
2526
} else {
2627
const headers = new Headers();
2728
headers.append('Accept', 'image/webp,image/apng,image/*,*/*;q=0.8');
@@ -32,7 +33,7 @@ export class LoadImageDirective implements OnChanges {
3233
// cacheService isn't entirely necessary, though it does mimic actual browser
3334
// behavior a little better which doesn't make new requests (even to local disk) for
3435
// every instance of an image
35-
this._cacheService.get(this.imageUrl, false, headers)
36+
this._cacheService.get(`${cdnUrl}${this.imageUrl}?cacheBreak=${window.appsvc.cacheBreakQuery}`, false, headers)
3637
.subscribe(image => {
3738
this._elementRef.nativeElement.innerHTML = image.text();
3839
}, (e => {

AzureFunctions.AngularClient/src/app/function-dev/function-dev.component.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<div class="modal-body keys-dialog-body">
99
<div *ngIf="isHttpFunction && hostKeys">
1010
<div class="text-label">{{'keysDialog_key' | translate}}</div>
11-
<select (change)="onChangeKey($event.target.value)">
12-
<option *ngFor="let key of functionKeys.keys" [value]="key.value">{{key.name}} (Function key)</option>
13-
<option *ngFor="let key of hostKeys.keys" [value]="key.value">{{key.name}} (Host key)</option>
14-
</select>
11+
<select #selectKeys (change)="onChangeKey($event.target.value)">
12+
<option *ngFor="let key of functionKeys.keys" [value]="key.value">{{key.name}} (Function key)</option>
13+
<option *ngFor="let key of hostKeys.keys" [value]="key.value">{{key.name}} (Host key)</option>
14+
</select>
1515
</div>
1616
<div class="keys-dialog-body-invokeUrl">
1717
<div class="text-label">{{'keysDialog_url' | translate}}</div>

AzureFunctions.AngularClient/src/app/function-dev/function-dev.component.ts

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { FunctionAppService } from './../shared/services/function-app.service';
33
import { FileUtilities } from './../shared/Utilities/file';
44
import { EditModeHelper } from './../shared/Utilities/edit-mode.helper';
55
import { ConfigService } from './../shared/services/config.service';
6-
import { Component, QueryList, ViewChild, ViewChildren, OnDestroy, ElementRef, ChangeDetectorRef, AfterViewInit, AfterContentInit } from '@angular/core';
6+
import { Component, QueryList, ViewChild, ViewChildren, OnDestroy, ElementRef, ChangeDetectorRef, AfterViewInit, AfterContentInit, AfterViewChecked } from '@angular/core';
77
import { Observable } from 'rxjs/Observable';
88
import { Subject } from 'rxjs/Subject';
99
import { Subscription } from 'rxjs/Subscription';
@@ -40,7 +40,7 @@ import { AccessibilityHelper } from '../shared/Utilities/accessibility-helper';
4040
templateUrl: './function-dev.component.html',
4141
styleUrls: ['./function-dev.component.scss']
4242
})
43-
export class FunctionDevComponent extends FunctionAppContextComponent implements AfterViewInit, AfterContentInit, OnDestroy {
43+
export class FunctionDevComponent extends FunctionAppContextComponent implements AfterViewInit, AfterContentInit, OnDestroy, AfterViewChecked {
4444
@ViewChild(FileExplorerComponent) fileExplorer: FileExplorerComponent;
4545
@ViewChild(RunHttpComponent) runHttp: RunHttpComponent;
4646
@ViewChildren(BusyStateComponent) BusyStates: QueryList<BusyStateComponent>;
@@ -51,6 +51,7 @@ export class FunctionDevComponent extends FunctionAppContextComponent implements
5151
@ViewChild('editorContainer') editorContainer: ElementRef;
5252
@ViewChild('rightContainer') rightContainer: ElementRef;
5353
@ViewChild('bottomContainer') bottomContainer: ElementRef;
54+
@ViewChild('selectKeys') selectKeys: ElementRef;
5455

5556
public functionInfo: FunctionInfo;
5657
public functionUpdate: Subscription;
@@ -146,7 +147,7 @@ export class FunctionDevComponent extends FunctionAppContextComponent implements
146147

147148
setup(): Subscription {
148149
return this.viewInfoEvents
149-
.switchMap(functionView => {
150+
.switchMap(functionView => {
150151
delete this.updatedTestContent;
151152
delete this.runResult;
152153
this.disabled = this._functionAppService.getFunctionAppEditMode(functionView.context)
@@ -162,7 +163,7 @@ export class FunctionDevComponent extends FunctionAppContextComponent implements
162163
.subscribe(tuple => {
163164
if (tuple[2].isSuccessful) {
164165
const status = tuple[2].result;
165-
if (status.state !== 'Running' && status.state !== 'Default') {
166+
if (status.state === 'Error') {
166167
status.errors = status.errors || [];
167168
this.showComponentError({
168169
message: this._translateService.instant(PortalResources.error_functionRuntimeIsUnableToStart)
@@ -317,6 +318,12 @@ export class FunctionDevComponent extends FunctionAppContextComponent implements
317318
this.onDisableTestData(this._disableTestDataAfterViewInit);
318319
}
319320

321+
ngAfterViewChecked() {
322+
if (this.showFunctionInvokeUrlModal) {
323+
this.selectKeys.nativeElement.focus();
324+
}
325+
}
326+
320327
private setInvokeUrlVisibility() {
321328
if (this.functionInfo.config.bindings) {
322329
const b = this.functionInfo.config.bindings.find((b) => {

AzureFunctions.AngularClient/src/app/function-keys/function-keys.component.html

+44-16
Original file line numberDiff line numberDiff line change
@@ -13,51 +13,79 @@
1313
<tbody>
1414
<tr class="not-clickable" *ngFor="let key of keys">
1515
<td><label id="keyNameLabel">{{key.name}}</label></td>
16-
<td>
17-
<a (click)="key.show=!key.show"
16+
<td>
17+
<a *ngIf="key.show"
18+
role="button"
19+
(click)="key.show=!key.show"
20+
(keydown)="keyDown($event, 'showKey', key)"
21+
class="operation"
22+
tabindex="0"
23+
[attr.aria-expanded]="key.show"
24+
[attr.aria-label]="clickToHide">
25+
{{'functionKeys_clickToHide' | translate}}
26+
</a>
27+
<a *ngIf="!key.show"
28+
role="button"
29+
(click)="key.show=!key.show"
1830
(keydown)="keyDown($event, 'showKey', key)"
1931
class="operation"
2032
tabindex="0"
2133
[attr.aria-expanded]="key.show"
22-
[attr.aria-label]="key.name"
23-
>
24-
<ng-container *ngIf="key.show">{{'functionKeys_clickToHide' | translate}}</ng-container>
25-
<ng-container *ngIf="!key.show">{{'functionKeys_clickToShow' | translate}}</ng-container>
34+
[attr.aria-label]="clickToShow">
35+
{{'functionKeys_clickToShow' | translate}}
2636
</a>
2737
<span *ngIf="key.show" [attr.aria-label]="key.value" tabindex="0">{{ key.value }}</span>
2838
</td>
2939
<td>
3040
<div id="operations-bar">
31-
<pop-over message="{{ 'copypre_copied' | translate }}" hideAfter="300">
41+
<pop-over message="{{ 'copypre_copied' | translate }}" hideAfter="300">
3242
<span class="operation"
3343
(click)="copyKey(key)"
34-
(keydown)="keyDown($event, 'copyKey', key)"
35-
>
44+
(keydown)="keyDown($event, 'copyKey', key)">
3645
<i class="fa fa-copy"></i> {{'functionKeys_copy' | translate}}
3746
</span>
3847
</pop-over>
39-
<a class="operation"
48+
<a class="operation"
49+
role="link"
4050
(click)="renewKey(key)"
4151
(keydown)="keyDown($event, 'renewKey', key)"
4252
tabindex="0"
4353
id="renewKeyAction"
4454
aria-labelledby="keyNameLabel renewKeyAction">
45-
<i class="fa fa-refresh"></i> {{'functionKeys_renew' | translate}}</a>
46-
<a class="operation"
55+
<i class="fa fa-refresh"></i>
56+
{{'functionKeys_renew' | translate}}
57+
</a>
58+
<a class="operation"
59+
role="link"
4760
*ngIf="key.name !== '_master'"
4861
(click)="revokeKey(key)"
4962
(keydown)="keyDown($event, 'revokeKey', key)"
5063
tabindex="0"
5164
id="revokeKeyAction"
5265
aria-labelledby="keyNameLabel revokeKeyAction">
53-
<i class="fa fa-times"></i> {{'functionKeys_revoke' | translate}}
66+
<i class="fa fa-times"></i>
67+
{{'functionKeys_revoke' | translate}}
5468
</a>
5569
</div>
5670
</td>
5771
</tr>
5872
<tr *ngIf="addingNew" class="not-clickable">
59-
<td><input type="text" id="newKeyName" (keyup)="checkValidName($event)" [(ngModel)]="newKeyName" placeholder="{{'functionKeys_enterKeyName' | translate}}" /></td>
60-
<td><input type="text" id="newKeyValue" (keyup)="checkValidName($event)" [(ngModel)]="newKeyValue" placeholder="{{'functionKeys_enterKeyValue' | translate}}" /></td>
73+
<td>
74+
<input #newKeyInput
75+
type="text"
76+
id="newKeyName"
77+
(keyup)="checkValidName($event)"
78+
[(ngModel)]="newKeyName"
79+
placeholder="{{'functionKeys_enterKeyName' | translate}}" />
80+
</td>
81+
<td>
82+
<input
83+
type="text"
84+
id="newKeyValue"
85+
(keyup)="checkValidName($event)"
86+
[(ngModel)]="newKeyValue"
87+
placeholder="{{'functionKeys_enterKeyValue' | translate}}" />
88+
</td>
6189
<td>
6290
<button
6391
class="custom-button"
@@ -66,7 +94,7 @@
6694
tabindex="0"
6795
id="saveNewKeyButton"
6896
aria-labelledby="newKeyName newKeyValue saveNewKeyButton">
69-
{{'save' | translate}}
97+
{{'save' | translate}}
7098
</button>
7199
</td>
72100
</tr>

AzureFunctions.AngularClient/src/app/function-keys/function-keys.component.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input, ViewChild } from '@angular/core';
1+
import { Component, Input, ViewChild, AfterViewChecked, ElementRef } from '@angular/core';
22
import { Observable } from 'rxjs/Observable';
33
import 'rxjs/add/operator/catch';
44
import 'rxjs/add/operator/debounceTime';
@@ -28,10 +28,12 @@ import { ReplaySubject } from 'rxjs/ReplaySubject';
2828
templateUrl: './function-keys.component.html',
2929
styleUrls: ['./function-keys.component.scss', '../table-function-monitor/table-function-monitor.component.scss']
3030
})
31-
export class FunctionKeysComponent extends FunctionAppContextComponent {
31+
export class FunctionKeysComponent extends FunctionAppContextComponent implements AfterViewChecked {
3232
@Input() autoSelect: boolean;
3333
@Input() adminKeys: boolean;
3434
@ViewChild(BusyStateComponent) busyState: BusyStateComponent;
35+
@ViewChild('newKeyInput') newKeyInput: ElementRef;
36+
3537
public newKeyName: string;
3638
public newKeyValue: string;
3739
public validKey: boolean;
@@ -103,6 +105,16 @@ export class FunctionKeysComponent extends FunctionAppContextComponent {
103105
});
104106
}
105107

108+
setFocusNewKeyInput() {
109+
this.newKeyInput.nativeElement.focus();
110+
}
111+
112+
ngAfterViewChecked () {
113+
if (this.addingNew) {
114+
this.setFocusNewKeyInput();
115+
}
116+
}
117+
106118
showOrHideNewKeyUi() {
107119
if (this.addingNew) {
108120
this.resetState();

AzureFunctions.AngularClient/src/app/function/embedded/embedded-function-editor/embedded-function-editor.component.ts

+13-15
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ export class EmbeddedFunctionEditorComponent implements OnInit, AfterContentInit
137137
setBottomBarState(expanded: boolean) {
138138
this.bottomBarExpanded = expanded;
139139

140-
console.log('editor bottom bar expanded - ' + this.bottomBarExpanded);
141-
142140
setTimeout(() => {
143141
this.codeEditor.resize();
144142
});
@@ -170,22 +168,22 @@ export class EmbeddedFunctionEditorComponent implements OnInit, AfterContentInit
170168
if (result) {
171169
this._busyManager.setBusy();
172170
this._embeddedService.deleteFunction(this.resourceId)
173-
.subscribe(r => {
171+
.subscribe(r => {
174172
if (r.isSuccessful) {
175-
this._busyManager.clearBusy();
176-
this._broadcastService.broadcastEvent<TreeUpdateEvent>(BroadcastEvent.TreeUpdate, {
177-
resourceId: this.resourceId,
178-
operation: 'remove'
179-
});
173+
this._busyManager.clearBusy();
174+
this._broadcastService.broadcastEvent<TreeUpdateEvent>(BroadcastEvent.TreeUpdate, {
175+
resourceId: this.resourceId,
176+
operation: 'remove'
177+
});
180178
} else {
181-
this._busyManager.clearBusy();
182-
this._broadcastService.broadcast<ErrorEvent>(BroadcastEvent.Error, {
183-
message: r.error.message,
184-
errorId: r.error.errorId,
185-
resourceId: this.resourceId,
186-
});
179+
this._busyManager.clearBusy();
180+
this._broadcastService.broadcast<ErrorEvent>(BroadcastEvent.Error, {
181+
message: r.error.message,
182+
errorId: r.error.errorId,
183+
resourceId: this.resourceId,
184+
});
187185
}
188-
});
186+
});
189187
}
190188
}
191189
}

0 commit comments

Comments
 (0)