Skip to content

Commit

Permalink
feat(simulator-ui): faster access to scenario executions by status
Browse files Browse the repository at this point in the history
  • Loading branch information
bbortt committed Nov 6, 2023
1 parent bd70698 commit 024520d
Show file tree
Hide file tree
Showing 62 changed files with 244 additions and 102 deletions.
2 changes: 1 addition & 1 deletion simulator-ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"error",
{
"type": "element",
"prefix": ["app", "jhi"],
"prefix": "app",
"style": "kebab-case"
}
],
Expand Down
5 changes: 5 additions & 0 deletions simulator-ui/src/main/webapp/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ import NavbarComponent from './layouts/navbar/navbar.component';
data: { pageTitle: 'citrusSimulatorApp.scenario.home.title' },
loadChildren: () => import(`./scenario/scenario.routes`),
},
{
path: 'scenario-result',
data: { pageTitle: 'citrusSimulatorApp.scenarioExecution.home.title' },
loadChildren: () => import(`./scenario-result/scenario-result.routes`),
},
...errorRoute,
],
{ enableTracing: DEBUG_INFO_ENABLED, bindToComponentInputs: true },
Expand Down
17 changes: 11 additions & 6 deletions simulator-ui/src/main/webapp/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
import { NgModule, LOCALE_ID } from '@angular/core';
import { registerLocaleData } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import locale from '@angular/common/locales/en';
import { NgModule, LOCALE_ID } from '@angular/core';
import { BrowserModule, Title } from '@angular/platform-browser';
import { TitleStrategy } from '@angular/router';
import { ServiceWorkerModule } from '@angular/service-worker';

import { FaIconLibrary } from '@fortawesome/angular-fontawesome';
import dayjs from 'dayjs/esm';

import { NgbDateAdapter, NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';

import dayjs from 'dayjs/esm';

import { ApplicationConfigService } from 'app/core/config/application-config.service';
import './config/dayjs';
import { httpInterceptorProviders } from 'app/core/interceptor';
import { TranslationModule } from 'app/shared/language/translation.module';
import { httpInterceptorProviders } from 'app/core/interceptor/index';

import { AppPageTitleStrategy } from './app-page-title-strategy';
import { AppRoutingModule } from './app-routing.module';
// jhipster-needle-angular-add-module-import JHipster will add new module here
import './config/dayjs';
import { NgbDateDayjsAdapter } from './config/datepicker-adapter';
import { fontAwesomeIcons } from './config/font-awesome-icons';
import MainComponent from './layouts/main/main.component';
import MainModule from './layouts/main/main.module';
import { AppPageTitleStrategy } from './app-page-title-strategy';

// jhipster-needle-angular-add-module-import JHipster will add new module here

@NgModule({
imports: [
Expand Down
4 changes: 4 additions & 0 deletions simulator-ui/src/main/webapp/app/config/font-awesome-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
faCalendarAlt,
faChartPie,
faCheck,
faCircleInfo,
faCloud,
faCogs,
faDatabase,
Expand All @@ -31,6 +32,7 @@ import {
faSort,
faSortDown,
faSortUp,
faSquarePollVertical,
faSync,
faTachometerAlt,
faTasks,
Expand Down Expand Up @@ -58,6 +60,7 @@ export const fontAwesomeIcons = [
faCalendarAlt,
faChartPie,
faCheck,
faCircleInfo,
faCloud,
faCogs,
faDatabase,
Expand All @@ -81,6 +84,7 @@ export const fontAwesomeIcons = [
faSort,
faSortDown,
faSortUp,
faSquarePollVertical,
faSync,
faTachometerAlt,
faTasks,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const TOTAL_COUNT_RESPONSE_HEADER = 'X-Total-Count';
export const PAGE_HEADER = 'page';
export const ITEMS_PER_PAGE = 20;
export const ITEMS_PER_PAGE = 10;
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ <h2 data-cy="messageHeaderDetailsHeading">

<hr />

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<dl class="row-md jh-entity-details">
<dt><span jhiTranslate="citrusSimulatorApp.messageHeader.id">ID</span></dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IMessageHeader } from '../message-header.model';

@Component({
standalone: true,
selector: 'jhi-message-header-detail',
selector: 'app-message-header-detail',
templateUrl: './message-header-detail.component.html',
imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ <h2 id="page-heading" data-cy="MessageHeaderHeading">
</div>
</h2>

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<jhi-filter [filters]="filters"></jhi-filter>
<app-filter [filters]="filters"></app-filter>

<div class="alert alert-warning" id="no-result" *ngIf="messageHeaders?.length === 0">
<span jhiTranslate="citrusSimulatorApp.messageHeader.home.notFound">No Message Headers found</span>
Expand Down Expand Up @@ -97,7 +97,7 @@ <h2 id="page-heading" data-cy="MessageHeaderHeading">

<div *ngIf="messageHeaders && messageHeaders.length > 0">
<div class="d-flex justify-content-center">
<jhi-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></jhi-item-count>
<app-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></app-item-count>
</div>

<div class="d-flex justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { IMessageHeader } from '../message-header.model';

@Component({
standalone: true,
selector: 'jhi-message-header',
selector: 'app-message-header',
templateUrl: './message-header.component.html',
imports: [
RouterModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ <h2 data-cy="messageDetailsHeading"><span jhiTranslate="citrusSimulatorApp.messa

<hr />

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<dl class="row-md jh-entity-details">
<dt><span jhiTranslate="citrusSimulatorApp.message.id">ID</span></dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IMessage } from '../message.model';

@Component({
standalone: true,
selector: 'jhi-message-detail',
selector: 'app-message-detail',
templateUrl: './message-detail.component.html',
imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ <h2 id="page-heading" data-cy="MessageHeading">
</div>
</h2>

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<jhi-filter [filters]="filters"></jhi-filter>
<app-filter [filters]="filters"></app-filter>

<div class="alert alert-warning" id="no-result" *ngIf="messages?.length === 0">
<span jhiTranslate="citrusSimulatorApp.message.home.notFound">No Messages found</span>
Expand Down Expand Up @@ -119,7 +119,7 @@ <h2 id="page-heading" data-cy="MessageHeading">

<div *ngIf="messages && messages.length > 0">
<div class="d-flex justify-content-center">
<jhi-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></jhi-item-count>
<app-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></app-item-count>
</div>

<div class="d-flex justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { IMessage } from '../message.model';

@Component({
standalone: true,
selector: 'jhi-message',
selector: 'app-message',
templateUrl: './message.component.html',
imports: [
RouterModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ <h2 data-cy="scenarioActionDetailsHeading">

<hr />

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<dl class="row-md jh-entity-details">
<dt><span jhiTranslate="global.field.id">ID</span></dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IScenarioAction } from '../scenario-action.model';

@Component({
standalone: true,
selector: 'jhi-scenario-action-detail',
selector: 'app-scenario-action-detail',
templateUrl: './scenario-action-detail.component.html',
imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ <h2 id="page-heading" data-cy="ScenarioActionHeading">
</div>
</h2>

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<jhi-filter [filters]="filters"></jhi-filter>
<app-filter [filters]="filters"></app-filter>

<div class="alert alert-warning" id="no-result" *ngIf="scenarioActions?.length === 0">
<span jhiTranslate="citrusSimulatorApp.scenarioAction.home.notFound">No Scenario Actions found</span>
Expand Down Expand Up @@ -92,7 +92,7 @@ <h2 id="page-heading" data-cy="ScenarioActionHeading">

<div *ngIf="scenarioActions && scenarioActions.length > 0">
<div class="d-flex justify-content-center">
<jhi-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></jhi-item-count>
<app-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></app-item-count>
</div>

<div class="d-flex justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { IScenarioAction } from '../scenario-action.model';

@Component({
standalone: true,
selector: 'jhi-scenario-action',
selector: 'app-scenario-action',
templateUrl: './scenario-action.component.html',
imports: [
RouterModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ <h2 data-cy="scenarioExecutionDetailsHeading">

<hr />

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<dl class="row-md jh-entity-details">
<dt><span jhiTranslate="citrusSimulatorApp.scenarioExecution.id">ID</span></dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IScenarioExecution } from '../scenario-execution.model';

@Component({
standalone: true,
selector: 'jhi-scenario-execution-detail',
selector: 'app-scenario-execution-detail',
templateUrl: './scenario-execution-detail.component.html',
imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ <h2 id="page-heading" data-cy="ScenarioExecutionHeading">
</div>
</h2>

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<jhi-filter [filters]="filters"></jhi-filter>
<app-filter [filters]="filters"></app-filter>

<div class="alert alert-warning" id="no-result" *ngIf="scenarioExecutions?.length === 0">
<span jhiTranslate="citrusSimulatorApp.scenarioExecution.home.notFound">No Scenario Executions found</span>
Expand Down Expand Up @@ -138,7 +138,7 @@ <h2 id="page-heading" data-cy="ScenarioExecutionHeading">

<div *ngIf="scenarioExecutions && scenarioExecutions.length > 0">
<div class="d-flex justify-content-center">
<jhi-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></jhi-item-count>
<app-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></app-item-count>
</div>

<div class="d-flex justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { IScenarioExecution } from '../scenario-execution.model';

@Component({
standalone: true,
selector: 'jhi-scenario-execution',
selector: 'app-scenario-execution',
templateUrl: './scenario-execution.component.html',
imports: [
RouterModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ export interface IScenarioExecution {
}

export type NewScenarioExecution = Omit<IScenarioExecution, 'executionId'> & { executionId: null };

export interface IScenarioExecutionStatus {
id: number;
name: 'UNKNOWN' | 'RUNNING' | 'SUCCESS' | 'FAILED';
}

export const STATUS_UNKNOWN: IScenarioExecutionStatus = { id: 0, name: 'UNKNOWN' };
export const STATUS_RUNNING: IScenarioExecutionStatus = { id: 1, name: 'RUNNING' };
export const STATUS_SUCCESS: IScenarioExecutionStatus = { id: 2, name: 'SUCCESS' };
export const STATUS_FAILED: IScenarioExecutionStatus = { id: 3, name: 'FAILED' };
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ <h2 data-cy="scenarioParameterDetailsHeading">

<hr />

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<dl class="row-md jh-entity-details">
<dt><span jhiTranslate="global.field.id">ID</span></dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IScenarioParameter } from '../scenario-parameter.model';

@Component({
standalone: true,
selector: 'jhi-scenario-parameter-detail',
selector: 'app-scenario-parameter-detail',
templateUrl: './scenario-parameter-detail.component.html',
imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ <h2 id="page-heading" data-cy="ScenarioParameterHeading">
</div>
</h2>

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<jhi-filter [filters]="filters"></jhi-filter>
<app-filter [filters]="filters"></app-filter>

<div class="alert alert-warning" id="no-result" *ngIf="scenarioParameters?.length === 0">
<span jhiTranslate="citrusSimulatorApp.scenarioParameter.home.notFound">No Scenario Parameters found</span>
Expand Down Expand Up @@ -106,7 +106,7 @@ <h2 id="page-heading" data-cy="ScenarioParameterHeading">

<div *ngIf="scenarioParameters && scenarioParameters.length > 0">
<div class="d-flex justify-content-center">
<jhi-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></jhi-item-count>
<app-item-count [params]="{ page: page, totalItems: totalItems, itemsPerPage: itemsPerPage }"></app-item-count>
</div>

<div class="d-flex justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { IScenarioParameter } from '../scenario-parameter.model';

@Component({
standalone: true,
selector: 'jhi-scenario-parameter',
selector: 'app-scenario-parameter',
templateUrl: './scenario-parameter.component.html',
imports: [
RouterModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ <h2 data-cy="testParameterDetailsHeading">

<hr />

<jhi-alert-error></jhi-alert-error>
<app-alert-error></app-alert-error>

<jhi-alert></jhi-alert>
<app-alert></app-alert>

<dl class="row-md jh-entity-details">
<dt><span jhiTranslate="citrusSimulatorApp.testParameter.key">Key</span></dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ITestParameter } from '../test-parameter.model';

@Component({
standalone: true,
selector: 'jhi-test-parameter-detail',
selector: 'app-test-parameter-detail',
templateUrl: './test-parameter-detail.component.html',
imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
})
Expand Down
Loading

0 comments on commit 024520d

Please sign in to comment.