Skip to content

Commit

Permalink
Improve "Search with AQL" page
Browse files Browse the repository at this point in the history
  • Loading branch information
askask committed Nov 7, 2024
1 parent f1166d6 commit 3df3bea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,14 @@ <h2>{{ 'BUILD_QUERY' | translate }}</h2>
<num-editor-determine-hits
[isButtonDisabled]="!isValidForExecution || isExecutionLoading"
[content]="determineHitsContent"
(clicked)="determineHits()"
(clicked)="getData()"
></num-editor-determine-hits>
</mat-card-content>
</mat-card>
</section>

<section role="region" fxLayout="column" fxFlex="100%">
<h2>{{ 'SEARCH_WITH_AQL.QUERY_DATA' | translate }}</h2>
<num-button
icon="play"
class="num-margin-b-60"
(singleClick)="getData()"
data-test="manager-data-explorer__retrieval-button"
>{{ 'BUTTON.GET_DATA' | translate }}</num-button
>

<div
*ngIf="resultSet && !isDataSetLoading"
fxFlex
fxLayout="row"
fxLayoutGap="10px"
fxLayoutAlign="start center"
class="num-margin-b-40"
></div>
<h2 *ngIf="resultSet && !isDataSetLoading">{{ 'SEARCH_WITH_AQL.QUERY_DATA' | translate }}</h2>

<ng-container *ngIf="!isDataSetLoading; else loading">
<num-result-table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class SearchComponent extends AqlEditorCeatorComponent implements OnDestr
}

getData(): void {
this.determineHits()
this.isDataSetLoading = true
this.queryService.setQuery(this.aqlQuery)
this.subscriptions.add(
Expand All @@ -42,6 +43,7 @@ export class SearchComponent extends AqlEditorCeatorComponent implements OnDestr
this.isDataSetLoading = false
},
error: () => {
this.resultSet = null
this.isDataSetLoading = false
this.toastMessageService.openToast(RESULT_SET_LOADING_ERROR)
},
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
},
"SEARCH_WITH_AQL": {
"BUILD_QUERY_CONTENT": "Erstellen Sie eine Abfrage im Abfrage-Builder. Danach können Sie die Abfrage im untenstehenden Editor bearbeiten.",
"QUERY_DATA": "Daten abrufen"
"QUERY_DATA": "Ergebnisse"
},
"CONTENT_EDITOR": {
"SAVE_NAVIGATION_SUCCESS": "Die Navigationselemente wurden erfolgreich veröffentlicht.",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
},
"SEARCH_WITH_AQL": {
"BUILD_QUERY_CONTENT": "Create a query in the Builder. Afterwards you can edit the query in the editor below.",
"QUERY_DATA": "Retrieve data"
"QUERY_DATA": "Results"
},
"CONTENT_EDITOR": {
"SAVE_NAVIGATION_SUCCESS": "The navigations items were successfully published.",
Expand Down

0 comments on commit 3df3bea

Please sign in to comment.