Skip to content

Commit

Permalink
Merge branch 'master' into SHIBUI-692
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Aug 10, 2018
2 parents d3a14e0 + 74e6411 commit bb7ec1e
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="col-md-12">
<span class="display-6">
<i class="fa fa-fw fa-gears"></i>
<ng-container i18n="@@label--new-filter">&nbsp; Edit EntityAttributesFilter - {{ filter.name }}</ng-container>
<ng-container i18n="@@label--new-filter">&nbsp; Edit EntityAttributesFilter</ng-container>
</span>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion ui/src/app/metadata/provider/effect/collection.effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Store } from '@ngrx/store';
import { Router } from '@angular/router';

import { of } from 'rxjs';
import { map, catchError, switchMap, tap, withLatestFrom } from 'rxjs/operators';
import { map, catchError, switchMap, tap, withLatestFrom, debounceTime } from 'rxjs/operators';
import {
ProviderCollectionActionsUnion,
ProviderCollectionActionTypes,
Expand All @@ -25,6 +25,7 @@ import { MetadataProviderService } from '../../domain/service/provider.service';
import * as fromProvider from '../reducer';
import * as fromRoot from '../../../app.reducer';
import { AddFilterSuccess, FilterCollectionActionTypes } from '../../filter/action/collection.action';
import { debounce } from '../../../../../node_modules/rxjs-compat/operator/debounce';


/* istanbul ignore next */
Expand All @@ -48,6 +49,7 @@ export class CollectionEffects {
selectProviders$ = this.actions$.pipe(
ofType<SelectProviderRequest>(ProviderCollectionActionTypes.SELECT_PROVIDER_REQUEST),
map(action => action.payload),
debounceTime(500),
switchMap(id =>
this.providerService
.find(id)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<fieldset>
<div class="row">
<div class="col-lg-6">
<div ngbDropdown>
<button ngbDropdownToggle
class="btn btn-outline-secondary dropdown-toggle"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
{{ this.displayType }}
</button>
<div class="dropdown-menu" ngbDropdownMenu>
<a *ngFor="let option of typeOptions" class="dropdown-item" href="#" (click)="$event.preventDefault(); select(option.value);">
{{ option.description }}
</a>
<div class="d-flex justify-content-start">
<div ngbDropdown>
<button ngbDropdownToggle
class="btn btn-outline-secondary dropdown-toggle"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
{{ this.displayType }}
</button>
<div class="dropdown-menu" ngbDropdownMenu>
<a *ngFor="let option of typeOptions" class="dropdown-item" href="#" (click)="$event.preventDefault(); select(option.value);">
{{ option.description }}
</a>
</div>
</div>
&nbsp;
<i class="fa fa-asterisk text-danger"></i>
</div>
<br />
<div class="d-flex justify-content-between">
Expand All @@ -28,12 +32,21 @@
[matches]="ids$ | async"
(keydown.enter)="onSelectValue(search.value)">
</auto-complete>
<small>You must add at least one entity id target.</small>
</ng-container>
<ng-container *ngSwitchCase="'CONDITION_SCRIPT'">
<p class="codearea form-control" rows="8" contenteditable [formControl]="script" name="script"></p>
<small id="script-help" class="text-danger">
<ng-container *ngIf="script.invalid && script.touched">Required for Scripts</ng-container>
&nbsp;
</small>
</ng-container>
<ng-container *ngSwitchCase="'REGEX'">
<input class="form-control" type="text" [formControl]="script" name="script" />
<small id="regex-help" class="text-danger">
<ng-container *ngIf="script.invalid && script.touched">Required for Regex</ng-container>
&nbsp;
</small>
</ng-container>
</div>
<div class="ml-2" *ngIf="entityAttributesFilterTargetType === 'ENTITY'">
Expand All @@ -47,7 +60,6 @@
</div>
</div>
<div class="col-lg-6">
<p *ngIf="!targets.length">You must add at least one entity id target.</p>
<ul class="list-group list-group-sm list-group-scroll" *ngIf="entityAttributesFilterTargetType === 'ENTITY'">
<li class="list-group-item d-flex justify-content-between align-items-center" *ngFor="let id of targets">
{{ id }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export class FilterTargetComponent extends ObjectWidget implements OnDestroy, Af
select(value: string): void {
this.formProperty.getProperty('entityAttributesFilterTargetType').setValue(value);
this.setTargetValue([]);
this.script.setValue(null);
this.search.setValue(null);
this.script.reset();
this.search.reset();
}

removeId(id: string): void {
Expand Down
6 changes: 3 additions & 3 deletions ui/src/app/schema-form/widget/string/string.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[attr.readonly]="schema.readOnly?true:null"
class="text-widget.id textline-widget form-control"
[attr.type]="this.getInputType()"
[attr.id]="id"
[attr.id]="id"
[formControl]="control"
[attr.placeholder]="schema.placeholder"
[attr.maxLength]="schema.maxLength || null"
Expand All @@ -25,7 +25,7 @@
<small class="form-text text-danger" *ngIf="errorMessages && errorMessages.length && control.touched">
{{ errorMessages }}
</small>
<small class="form-text text-muted" *ngIf="!(control.touched && errorMessages && errorMessages.length) && schema.widget.help">
<small class="form-text text-secondary" *ngIf="!(control.touched && errorMessages && errorMessages.length) && schema.widget.help">
{{ schema.widget.help }}
</small>
</div>
</div>
2 changes: 1 addition & 1 deletion ui/src/assets/schema/filter/entity-attributes.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}
}
},
"required": ["value"]
"required": ["value", "entityAttributesFilterTargetType"]
},
"relyingPartyOverrides": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"satisfyAnyPredicates"
],
"required": [
"name",
"xmlId",
"metadataURL"
],
Expand Down Expand Up @@ -223,7 +224,7 @@
"default": true
},
"satisfyAnyPredicates": {
"title": "Satisy Any Predicates?",
"title": "Satisfy Any Predicates?",
"description": "Flag which determines whether predicates used in filtering are connected by a logical 'OR' (true) or by logical 'AND' (false).",
"type": "boolean",
"widget": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"default": true
},
"satisfyAnyPredicates": {
"title": "Satisy Any Predicates?",
"title": "Satisfy Any Predicates?",
"description": "Flag which determines whether predicates used in filtering are connected by a logical 'OR' (true) or by logical 'AND' (false).",
"type": "boolean",
"widget": {
Expand Down
6 changes: 6 additions & 0 deletions ui/src/theme/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
background: none;
}

.btn.btn-link {
&:focus {
outline: 5px auto -webkit-focus-ring-color;
}
}

.nav.nav-wizard {
.nav-item {
margin-right: $custom-control-spacer-x * 3;
Expand Down
1 change: 1 addition & 0 deletions ui/src/theme/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Json schema form
resize: vertical;
font-family: monospace;
min-height: 166px;
margin-bottom: 0px;
}

@media only screen and (max-width: 1200px) {
Expand Down

0 comments on commit bb7ec1e

Please sign in to comment.