Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded updates #2271

Merged
merged 3 commits into from
Jan 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section class="editor-section">
<command-bar>
<h2>{{fileName}}</h2>
<h2>{{displayName}}</h2>
<command displayText="{{ 'save' | translate }}"
iconUrl="image/save.svg"
(click)="saveEditorContent()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class EmbeddedFunctionEditorComponent implements OnInit, AfterContentInit
public fileName = '';
public rightBarExpanded = false;
public bottomBarExpanded = false;
public displayName = '';

private _updatedEditorContent = '';

Expand Down Expand Up @@ -91,6 +92,9 @@ export class EmbeddedFunctionEditorComponent implements OnInit, AfterContentInit

const scriptHrefParts = this._functionInfo.script_href.split('/');
this.fileName = scriptHrefParts[scriptHrefParts.length - 1];
const event = this._functionInfo.config.bindings[0].message.toLowerCase();
const entity = scriptHrefParts[8].toLowerCase();
this.displayName = `${entity}/${event}/${this.fileName}`;
return this._cacheService.getArm(this._functionInfo.script_href, true);
})
.map(r => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

<div class="browse-container">
<img src="image/function_f.svg" />
<h2>{{ 'functions' | translate }}</h2><i *ngIf="isLoading" class="fa fa-refresh fa-spin fa-fw"></i>
<h2 *ngIf="!isEmbedded">{{ 'functions' | translate }}</h2>
<h2 *ngIf="isEmbedded">{{ 'functionsPreviewTitle' | translate }}</h2>
<i *ngIf="isLoading" class="fa fa-refresh fa-spin fa-fw"></i>

<div class="search-box-container">
<search-box (onInputChange)="searchChanged($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ export interface FunctionBinding {
authLevel: string;
route: string;
methods: string[];
}
message: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -901,4 +901,5 @@
public static DurableFunctionsActivity_description: string = "DurableFunctionsActivity_description";
public static DurableFunctionsOrchestrator_description: string = "DurableFunctionsOrchestrator_description";
public static DurableFunctionsHttpStart_description: string = "DurableFunctionsHttpStart_description";
public static functionsPreviewTitle: string = "functionsPreviewTitle";
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Observable } from 'rxjs/Observable';

export class EmbeddedFunctionsNode extends TreeNode implements Collection, MutableCollection {

public title = this.sideNav.translateService.instant(PortalResources.functions);
public title = this.sideNav.translateService.instant(PortalResources.functionsPreviewTitle);
public dashboardType = DashboardType.FunctionsDashboard;
private _cacheService: CacheService;
private _broadcastService: BroadcastService;
Expand Down
3 changes: 3 additions & 0 deletions AzureFunctions/ResourcesPortal/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2827,4 +2827,7 @@ Set to "External URL" to use an API definition that is hosted elsewhere.</value>
<data name="DurableFunctionsHttpStart_description" xml:space="preserve">
<value>A function that will trigger whenever it receives an HTTP request to execute an orchestrator function.</value>
</data>
<data name="functionsPreviewTitle" xml:space="preserve">
<value>Functions (Preview)</value>
</data>
</root>