Skip to content

Commit

Permalink
Merged in bugfix/noJIRA-provider-editor (pull request #122)
Browse files Browse the repository at this point in the history
Fixed issue with too many load requests, removed logged data

Approved-by: Shibui Jenkins <shibui.jenkins@gmail.com>
Approved-by: Ryan Mathis <rmathis@unicon.net>
  • Loading branch information
rmathis committed Jul 23, 2018
2 parents 8bbb79d + 94897df commit 00d7968
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
</valid-form-icon>
</a>
</nav>
<pre>{{ status$ | async | json }}</pre>
</div>
<div class="col-lg-6">
<router-outlet></router-outlet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export class ProviderWizardComponent implements OnDestroy {
this.store
.select(fromWizard.getCurrentWizardSchema)
.subscribe(s => {
this.store.dispatch(new LoadSchemaRequest(s));
if (s) {
this.store.dispatch(new LoadSchemaRequest(s));
}
});
this.valid$ = this.store.select(fromProvider.getEditorIsValid);
this.changes$ = this.store.select(fromProvider.getEntityChanges);
Expand Down
3 changes: 2 additions & 1 deletion ui/src/app/metadata/provider/effect/editor.effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
LoadSchemaFail,
EditorActionTypes
} from '../action/editor.action';
import { map, switchMap, catchError, withLatestFrom } from 'rxjs/operators';
import { map, switchMap, catchError, withLatestFrom, debounceTime } from 'rxjs/operators';
import { of } from 'rxjs';
import { SetDefinition, WizardActionTypes, AddSchema } from '../../../wizard/action/wizard.action';
import { ResetChanges } from '../action/entity.action';
Expand All @@ -23,6 +23,7 @@ export class EditorEffects {
$loadSchemaRequest = this.actions$.pipe(
ofType<LoadSchemaRequest>(EditorActionTypes.LOAD_SCHEMA_REQUEST),
map(action => action.payload),
debounceTime(100),
switchMap((schemaPath: string) =>
this.schemaService
.get(schemaPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"order": [
"name",
"@type",
"id",
"xmlId",
"metadataURL",
"initializeFromBackupFile",
"backingFile",
Expand All @@ -14,7 +14,7 @@
"satisfyAnyPredicates"
],
"required": [
"id",
"xmlId",
"metadataURL"
],
"anyOf": [
Expand Down Expand Up @@ -50,7 +50,7 @@
},
{
"fields": [
"id",
"xmlId",
"metadataURL",
"initializeFromBackupFile",
"backingFile",
Expand Down Expand Up @@ -90,7 +90,7 @@
}
]
},
"id": {
"xmlId": {
"title": "ID",
"description": "Identifier for logging, identification for command line reload, etc.",
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "object",
"order": [
"id",
"xmlId",
"metadataURL",
"initializeFromBackupFile",
"backingFile",
Expand All @@ -11,7 +11,7 @@
"useDefaultPredicateRegistry",
"satisfyAnyPredicates"
],
"required": ["id", "metadataURL"],
"required": ["xmlId", "metadataURL"],
"dependencies": {
"initializeFromBackupFile": {"required": ["backingFile", "backupFileInitNextRefreshDelay"]}
},
Expand Down Expand Up @@ -40,7 +40,7 @@
}
],
"properties": {
"id": {
"xmlId": {
"title": "ID",
"description": "Identifier for logging, identification for command line reload, etc.",
"type": "string",
Expand Down

0 comments on commit 00d7968

Please sign in to comment.