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

Some standalone and other fixes #2110

Merged
merged 37 commits into from
Dec 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1b7cbee
Some standalone fixes
afarok Nov 9, 2017
5b0b461
standalone loggedinuser info is now a seperate component
afarok Nov 9, 2017
7fe2ae4
Some css fixes for standalone portal
afarok Nov 9, 2017
7379093
some minor css and standalone refactoring
afarok Nov 10, 2017
8abbdda
standlone logout implemented
afarok Nov 14, 2017
0f7df5c
domain name from user given name is removed. some css fixes
afarok Nov 15, 2017
08b0991
Loading... issue fixed for empty subscription list
afarok Nov 15, 2017
9218878
Some refactoring
afarok Nov 16, 2017
4f90983
merge from asfarok-standalonechanges
afarok Nov 16, 2017
be37d76
Merge from dev
afarok Nov 16, 2017
981b29b
Merge branch 'dev' into asfarok-standalonechanges2
afarok Nov 16, 2017
f9f1b5c
Merge from dev
afarok Nov 20, 2017
1e9a9a3
Merge branch 'dev' into asfarok-standalonechanges2
afarok Nov 20, 2017
eb85ac1
Custom popup window for Storage and generic appsetings in create new …
afarok Nov 22, 2017
00a0722
Merge from dev
afarok Nov 23, 2017
22907b7
api/logout is used for logging out a user
afarok Nov 27, 2017
3dad6e2
logout icon is added
afarok Nov 27, 2017
d730acb
logout icon's color changed to red
afarok Nov 27, 2017
c32fb58
tree-node menu styling fixes
afarok Nov 28, 2017
516e0b1
'go to the quickstart' is removed for standalone portal
afarok Nov 29, 2017
5f6ef10
Unique subscription name validation is added
afarok Nov 29, 2017
a506eaf
Hide refresh icon when subscription is empty and remove refresh icon …
afarok Nov 29, 2017
4501770
sidenav padding is removed for standlone portal
afarok Nov 29, 2017
69a9ce8
(Create function: Storage Picker)First storage connection string must…
afarok Nov 29, 2017
d28b848
drop-down is used instead of radio button in function app creation. A…
afarok Nov 29, 2017
7e66b2a
Custom picker/popup (Storage, Generic) issue for existing function fixed
afarok Nov 29, 2017
fc38dfe
Merge from dev
afarok Nov 30, 2017
e68337c
Sql Storage picker added for function template. Text changes for Crea…
afarok Nov 30, 2017
1ea3387
innerHtml is used to properly show inner html content
afarok Nov 30, 2017
e9793be
disable app settings option and vsoption in download app content dialog
afarok Dec 1, 2017
44ecc2b
Removing unnecessary files
afarok Dec 1, 2017
f5a9a46
Merge branch 'dev' into asfarok-standalonechanges2
afarok Dec 1, 2017
18c5125
Some css fixes
afarok Dec 1, 2017
7dd8951
removing unnecessary code + add showUserMenu flag in componenet
afarok Dec 4, 2017
7edb8c4
PR feedback incorporated
afarok Dec 5, 2017
f2b0bc9
Merge branch 'dev' into asfarok-standalonechanges2
exc3eed Dec 5, 2017
dd2775a
styling fixes
afarok Dec 5, 2017
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 @@ -16,6 +16,18 @@
(selectItem)="finishDialogPicker($event)">
</app-setting>

<storage *ngIf="pickerName === 'Storage'"
[functionApp]="functionApp"
(close)="closePicker($event)"
(selectItem)="finishDialogPicker($event)">
</storage>

<sql *ngIf="pickerName === 'Sql'"
[functionApp]="functionApp"
(close)="closePicker($event)"
(selectItem)="finishDialogPicker($event)">
</sql>

<notification-hub *ngIf="pickerName === 'NotificationHub'"
[functionApp]="functionApp"
(close)="closePicker($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { DropDownElement } from '../shared/models/drop-down-element';
import { PortalResources } from '../shared/models/portal-resources';
import { GlobalStateService } from '../shared/services/global-state.service';
import { FunctionApp } from '../shared/function-app';
import { CacheService } from './../shared/services/cache.service';
import { CacheService } from '../shared/services/cache.service';
import { ScenarioService } from '../shared/services/scenario/scenario.service';
import { ScenarioIds } from '../shared/models/constants';

@Component({
selector: 'binding-input',
Expand All @@ -31,6 +33,7 @@ export class BindingInputComponent {
public appSettingValue: string;
private _input: BindingInputBase<any>;
private showTryView: boolean;
private useCustomFunctionInputPicker: boolean;
@Input() public functionApp: FunctionApp;

constructor(
Expand All @@ -39,7 +42,9 @@ export class BindingInputComponent {
private _userService: UserService,
private _translateService: TranslateService,
private _globalStateService: GlobalStateService,
private _cacheService: CacheService) {
private _cacheService: CacheService,
private _scenarioService: ScenarioService) {
this.useCustomFunctionInputPicker = this._scenarioService.checkScenario(ScenarioIds.headerOnTopOfSideNav).status === 'enabled';
this.showTryView = this._globalStateService.showTryView;
}

Expand Down Expand Up @@ -75,30 +80,35 @@ export class BindingInputComponent {
let bladeInput = null;
switch (input.resource) {
case ResourceType.Storage:
this.pickerName = 'StorageAccountPickerBlade';
this.pickerName = this.useCustomFunctionInputPicker ? 'Storage' : 'StorageAccountPickerBlade';
break;
case ResourceType.EventHub:
this.pickerName = 'EventHub';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'EventHub';
break;
case ResourceType.ServiceBus:
this.pickerName = 'ServiceBus';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'ServiceBus';
break;
case ResourceType.NotificationHub:
this.pickerName = 'NotificationHub';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'NotificationHub';
break;
case ResourceType.AppSetting:
this.pickerName = 'AppSetting';
break;
case ResourceType.DocumentDB:
this.pickerName = 'DocDbPickerBlade';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'DocDbPickerBlade';
break;
case ResourceType.ServiceBus:
this.pickerName = 'NotificationHubPickerBlade';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'NotificationHubPickerBlade';
break;
case ResourceType.ApiHub:
bladeInput = input.metadata;
bladeInput.bladeName = 'CreateDataConnectionBlade';
break;
case ResourceType.Sql:
this.pickerName = this.useCustomFunctionInputPicker ? 'Sql' : 'AppSetting';
break;
default:
this.pickerName = 'AppSetting';
}

// for tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,15 @@ export class BindingComponent {
}
}
break;
case ResourceType.Sql:
for (const key in this._appSettings) {
const value = this._appSettings[key].toLowerCase();
if (value.toLocaleLowerCase().indexOf('initial catalog=') > -1 && value.indexOf('password=') > -1) {
result.push(key);
}
}
break;

}
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ <h3>{{'downloadFunctionAppContent' | translate}}</h3>
</div>

<div class="modal-body">
<div>
<!-- when vsproj option is disabled we dont need to show radio options as there are only two options-->
<div check-scenario="DownloadWithVsProj"
[cs-input]="{}"
cs-enabledByDefault="true">
<radio-selector [defaultValue]="currentDownloadOption"
[options]="downloadOptions"
(value)="currentDownloadOption = $event">
</radio-selector>
</div>
<div id="app-settings-checkbox">
<div check-scenario="DownloadWithAppSettings"
[cs-input]="{}"
cs-enabledByDefault="true"
id="app-settings-checkbox">
<input type="checkbox" [(ngModel)]="includeAppSettings" />
<label>{{ 'downloadFunctionAppContent_includeAppSettings' | translate }}</label>
<pop-over [position]="'bottom'" [message]="'downloadFunctionAppContent_includeAppSettingsHelp' | translate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@
(selectItem)="finishDialogPicker($event)">
</app-setting>

<storage *ngIf="pickerName === 'Storage'"
[functionApp]="functionApp"
(close)="closePicker($event)"
(selectItem)="finishDialogPicker($event)">
</storage>

<sql *ngIf="pickerName === 'Sql'"
[functionApp]="functionApp"
(close)="closePicker($event)"
(selectItem)="finishDialogPicker($event)">
</sql>
<tooltip-content #freeAccountTooltip>
<p>
{{ 'tryNow_FreeAccountToolTip' | translate }}
Expand Down Expand Up @@ -93,12 +104,12 @@

<ng-container *ngIf="!!input.errorText && !input.isValid && !input.okEmpty">
<span class="fa fa-exclamation input-error-adjust"></span>
<div class="input-show-error" tabindex="0">{{input.errorText}}</div>
<div class="input-show-error" tabindex="0" [innerHTML]="input.errorText"></div>
</ng-container>

<ng-container *ngIf="!!input.errorText && input.isValid">
<span class="fa fa-exclamation input-warning-adjust"></span>
<div class="input-show-warning" tabindex="0">{{input.errorText}}</div>
<div class="input-show-warning" tabindex="0" [innerHTML]="input.errorText"></div>
</ng-container>

<div *ngIf="description && !input.errorText">
Expand Down Expand Up @@ -126,12 +137,12 @@

<ng-container *ngIf="!!input.errorText && !input.isValid && !input.okEmpty">
<span class="fa fa-exclamation input-error-adjust"></span>
<div class="input-show-error" tabindex="0">{{input.errorText}}</div>
<div class="input-show-error" tabindex="0" [innerHTML]="input.errorText"></div>
</ng-container>

<ng-container *ngIf="!!input.errorText && input.isValid">
<span class="fa fa-exclamation input-warning-adjust"></span>
<div class="input-show-warning" tabindex="0">{{input.errorText}}</div>
<div class="input-show-warning" tabindex="0" [innerHTML]="input.errorText"></div>
</ng-container>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { PortalResources } from '../../shared/models/portal-resources';
import { GlobalStateService } from '../../shared/services/global-state.service';
import { FunctionApp } from '../../shared/function-app';
import { CacheService } from './../../shared/services/cache.service';
import { ScenarioService } from '../../shared/services/scenario/scenario.service';
import { ScenarioIds } from '../../shared/models/constants';

@Component({
selector: 'binding-input-v2',
Expand All @@ -35,6 +37,7 @@ export class BindingInputV2Component {
public showAppSettingValue = false;
private _input: BindingInputBase<any>;
private showTryView: boolean;
private useCustomFunctionInputPicker: boolean;
@Input() public functionApp: FunctionApp;

constructor(
Expand All @@ -43,7 +46,9 @@ export class BindingInputV2Component {
private _userService: UserService,
private _translateService: TranslateService,
private _globalStateService: GlobalStateService,
private _cacheService: CacheService) {
private _cacheService: CacheService,
private _scenarioService: ScenarioService) {
this.useCustomFunctionInputPicker = this._scenarioService.checkScenario(ScenarioIds.headerOnTopOfSideNav).status === 'enabled';
this.showTryView = this._globalStateService.showTryView;
}

Expand Down Expand Up @@ -82,27 +87,32 @@ export class BindingInputV2Component {
let bladeInput = null;
switch (input.resource) {
case ResourceType.Storage:
this.pickerName = 'StorageAccountPickerBlade';
this.pickerName = this.useCustomFunctionInputPicker ? 'Storage' : 'StorageAccountPickerBlade';
break;
case ResourceType.EventHub:
this.pickerName = 'EventHub';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'EventHub';
break;
case ResourceType.ServiceBus:
this.pickerName = 'ServiceBus';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'ServiceBus';
break;
case ResourceType.AppSetting:
this.pickerName = 'AppSetting';
break;
case ResourceType.DocumentDB:
this.pickerName = 'DocDbPickerBlade';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'DocDbPickerBlade';
break;
case ResourceType.ServiceBus:
this.pickerName = 'NotificationHubPickerBlade';
this.pickerName = this.useCustomFunctionInputPicker ? 'AppSetting' : 'NotificationHubPickerBlade';
break;
case ResourceType.ApiHub:
bladeInput = input.metadata;
bladeInput.bladeName = 'CreateDataConnectionBlade';
break;
case ResourceType.Sql:
this.pickerName = this.useCustomFunctionInputPicker ? 'Sql' : 'AppSetting';
break;
default:
this.pickerName = 'AppSetting';
}

// for tests
Expand Down Expand Up @@ -277,6 +287,8 @@ export class BindingInputV2Component {
}
picker.inProcess = false;
this._globalStateService.clearBusyState();
this.pickerInputs = picker.items
.map(p => ({ displayLabel: p, value: p}));
}

setBottomDescription(id: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,14 @@ export class BindingV2Component {
}
}
break;
case ResourceType.Sql:
for (const key in this._appSettings) {
const value = this._appSettings[key].toLowerCase();
if (value.toLocaleLowerCase().indexOf('initial catalog=') > -1 && value.indexOf('password=') > -1) {
result.push(key);
}
}
break;
}
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@

<div class="choose">
<h2>{{ 'functionNew_chooseTemplate' | translate }}</h2>
<h2 class="quickstart link" (click)="quickstart()">{{ 'functionNew_chooseTemplateQuickstart' | translate }}</h2>
<h2 check-scenario="QuickStartLink"
[cs-input]="{}"
cs-enabledByDefault="true">{{ 'or' | translate }}</h2>
<h2 check-scenario="QuickStartLink"
[cs-input]="{}"
cs-enabledByDefault="true"
class="quickstart link" (click)="quickstart()">{{ 'functionNew_chooseTemplateQuickstart' | translate }}</h2>
</div>

<div class="search-and-sort">
Expand Down
4 changes: 4 additions & 0 deletions AzureFunctions.AngularClient/src/app/functions.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { AggregateBlockComponent } from './aggregate-block/aggregate-block.compo
import { FunctionMonitorComponent } from './function-monitor/function-monitor.component';
import { BindingEventGridComponent } from './binding-event-grid/binding-event-grid.component';
import { AppSettingComponent } from './pickers/app-setting/app-setting.component';
import { StorageComponent } from './pickers/storage/storage.component';
import { SqlComponent } from './pickers/sql/sql.component';
import { ServiceBusComponent } from './pickers/service-bus/service-bus.component';
import { NotificationHubComponent } from './pickers/notification-hub/notification-hub.component';
import { EventHubComponent } from './pickers/event-hub/event-hub.component';
Expand Down Expand Up @@ -103,6 +105,8 @@ const routing: ModuleWithProviders = RouterModule.forChild([
ServiceBusComponent,
NotificationHubComponent,
AppSettingComponent,
StorageComponent,
SqlComponent,
BindingEventGridComponent,
FunctionMonitorComponent,
AggregateBlockComponent,
Expand Down
42 changes: 41 additions & 1 deletion AzureFunctions.AngularClient/src/app/pickers/picker.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../sass/common/variables';

.line {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -32,4 +34,42 @@ select {

.button-spin {
margin-top: 20px;
}
}

.headerBox{
width: 100%;
height: 40px;
text-align: left;
color: $heading-text-color;
background-color: $custom-picker-header-bg-color;
font-size: 14px;
line-height: 37px;
margin-bottom: 20px;
img {
display: inline-block;
height: 40px;
width: 40px;
margin-right: 15px;
float: left;
padding: 5px;
}
}

.sql-pciker-header {
background-color: $custom-sq-picker-header-bg-color;
}
.sql-picker-image {
background-color: $custom-sql-picker-imgae-bg-color;
}

.storage-picker-image {
background-color: $custom-picker-imgae-bg-color;
}

.close-button {
padding: 10px;
}

.disabled{
color: $disabled-color;
}
Loading