@openmrs/esm-report-builder 0.1.1-pre.89 → 0.1.1-pre.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/253.js +1 -1
- package/dist/253.js.map +1 -1
- package/dist/openmrs-esm-report-builder.js.buildmanifest.json +3 -3
- package/dist/routes.json +1 -1
- package/e2e/pages/etl-sources.page.ts +7 -7
- package/e2e/pages/report-sections.page.ts +2 -2
- package/e2e/pages/section-preview.modal.ts +4 -4
- package/e2e/specs/section-preview.spec.ts +1 -1
- package/e2e/support/github/Dockerfile +6 -1
- package/package.json +1 -1
- package/src/components/report-sections/report-section-preview-modal.component.tsx +1 -1
- package/src/components/shared/header/header.component.tsx +1 -1
- package/src/components/shared/header/header.scss +1 -0
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"initial": false,
|
|
87
87
|
"entry": false,
|
|
88
88
|
"recorded": false,
|
|
89
|
-
"size":
|
|
89
|
+
"size": 4016444,
|
|
90
90
|
"sizes": {
|
|
91
|
-
"javascript":
|
|
91
|
+
"javascript": 4016444
|
|
92
92
|
},
|
|
93
93
|
"names": [],
|
|
94
94
|
"idHints": [],
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"auxiliaryFiles": [
|
|
103
103
|
"253.js.map"
|
|
104
104
|
],
|
|
105
|
-
"hash": "
|
|
105
|
+
"hash": "7e72b814b58ccc18",
|
|
106
106
|
"childrenByOrder": {}
|
|
107
107
|
},
|
|
108
108
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","pages":[{"component":"root","route":"report-builder","online":true,"offline":false,"order":1}],"extensions":[{"name":"system-administration-report-builder-card-link","slot":"system-admin-page-card-link-slot","component":"reportBuilderAdminLink","online":true,"offline":false,"privileges":"Task: reportbuilder.report.view"},{"component":"confirmModal","name":"confirm-modal","online":true,"offline":true}],"version":"0.1.1-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","pages":[{"component":"root","route":"report-builder","online":true,"offline":false,"order":1}],"extensions":[{"name":"system-administration-report-builder-card-link","slot":"system-admin-page-card-link-slot","component":"reportBuilderAdminLink","online":true,"offline":false,"privileges":"Task: reportbuilder.report.view"},{"component":"confirmModal","name":"confirm-modal","online":true,"offline":true}],"version":"0.1.1-pre.92"}
|
|
@@ -10,7 +10,7 @@ export class ETLSourcesPage {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
async expectLoaded() {
|
|
13
|
-
await expect(this.page.getByRole('heading', { name: 'ETL Sources' })).toBeVisible();
|
|
13
|
+
await expect(this.page.getByRole('heading', { name: 'ETL Sources', exact: true })).toBeVisible();
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
async clickNew() {
|
|
@@ -18,12 +18,12 @@ export class ETLSourcesPage {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async fillForm(data: { name: string; code?: string; schemaName?: string; sourceType?: string; description?: string; tablePatterns?: string }) {
|
|
21
|
-
await this.page.
|
|
22
|
-
if (data.code !== undefined) await this.page.
|
|
23
|
-
if (data.schemaName !== undefined) await this.page.
|
|
24
|
-
if (data.sourceType !== undefined) await this.page.
|
|
25
|
-
if (data.description !== undefined) await this.page.
|
|
26
|
-
if (data.tablePatterns !== undefined) await this.page.
|
|
21
|
+
await this.page.getByTestId('etl-source-name').fill(data.name);
|
|
22
|
+
if (data.code !== undefined) await this.page.getByTestId('etl-source-code').fill(data.code);
|
|
23
|
+
if (data.schemaName !== undefined) await this.page.getByTestId('etl-source-schema').fill(data.schemaName);
|
|
24
|
+
if (data.sourceType !== undefined) await this.page.getByTestId('etl-source-type').fill(data.sourceType);
|
|
25
|
+
if (data.description !== undefined) await this.page.getByTestId('etl-source-description').fill(data.description);
|
|
26
|
+
if (data.tablePatterns !== undefined) await this.page.getByTestId('etl-source-table-patterns').fill(data.tablePatterns);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
async save() {
|
|
@@ -10,12 +10,12 @@ export class ReportSectionsPage {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
async expectLoaded() {
|
|
13
|
-
await expect(this.page.getByRole('heading', { name: 'Sections' })).toBeVisible();
|
|
13
|
+
await expect(this.page.getByRole('heading', { name: 'Sections', exact: true })).toBeVisible();
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
async openPreviewFor(sectionName: string) {
|
|
17
17
|
const row = this.page.getByTestId(`section-row-${sectionName.replace(/\s+/g, '-')}`);
|
|
18
|
-
await row.
|
|
18
|
+
await row.getByRole('button').click();
|
|
19
19
|
await this.page.getByText('Preview', { exact: true }).click();
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -9,10 +9,10 @@ export class SectionPreviewModal {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
async fillPreviewRequest(data: { startDate: string; endDate: string; indicatorUuid?: string; maxRows?: number }) {
|
|
12
|
-
await this.page.
|
|
13
|
-
await this.page.
|
|
14
|
-
if (data.indicatorUuid !== undefined) await this.page.
|
|
15
|
-
if (data.maxRows !== undefined) await this.page.
|
|
12
|
+
await this.page.getByTestId('section-preview-startdate').fill(data.startDate);
|
|
13
|
+
await this.page.getByTestId('section-preview-enddate').fill(data.endDate);
|
|
14
|
+
if (data.indicatorUuid !== undefined) await this.page.getByTestId('section-preview-indicatoruuid').fill(data.indicatorUuid);
|
|
15
|
+
if (data.maxRows !== undefined) await this.page.getByTestId('section-preview-maxrows').fill(String(data.maxRows));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
async run() {
|
|
@@ -89,6 +89,6 @@ test.describe('section preview', () => {
|
|
|
89
89
|
});
|
|
90
90
|
await sectionPreviewModal.run();
|
|
91
91
|
await sectionPreviewModal.expectMatrixVisible();
|
|
92
|
-
await expect(page.
|
|
92
|
+
await expect(page.getByRole('cell', { name: 'HTS TST' })).toBeVisible();
|
|
93
93
|
});
|
|
94
94
|
});
|
|
@@ -23,5 +23,10 @@ RUN npm_config_legacy_peer_deps=true openmrs assemble --manifest --mode config -
|
|
|
23
23
|
|
|
24
24
|
FROM openmrs/openmrs-reference-application-3-frontend:nightly
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
# Keep the image's default index.html (the startup script patches it with
|
|
27
|
+
# SPA_PATH/API_URL at runtime); overlay the freshly assembled import map and
|
|
28
|
+
# modules after dropping the precompressed variants that would shadow them.
|
|
29
|
+
RUN rm -f /usr/share/nginx/html/importmap.json.br /usr/share/nginx/html/importmap.json.gz \
|
|
30
|
+
/usr/share/nginx/html/routes.registry.json.br /usr/share/nginx/html/routes.registry.json.gz
|
|
31
|
+
|
|
27
32
|
COPY --from=build /app/spa/ /usr/share/nginx/html/
|
package/package.json
CHANGED
|
@@ -236,7 +236,7 @@ export default function ReportSectionPreviewModal({ open, onClose, section }: Pr
|
|
|
236
236
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
237
237
|
}, [selectedTabIndex, data, section]); // generateSql and sqlData are intentionally omitted to avoid infinite loops
|
|
238
238
|
|
|
239
|
-
const canRun = Boolean(section?.uuid) &&
|
|
239
|
+
const canRun = Boolean(section?.uuid) && !loading;
|
|
240
240
|
|
|
241
241
|
// Function to extract pre-compiled SQL from section configJson
|
|
242
242
|
const generateSql = (indicatorUuid: string, section: ReportSectionDto) => {
|
|
@@ -39,7 +39,7 @@ const Header: React.FC<HeaderProps> = ({ title, subtitle, status, actions, showA
|
|
|
39
39
|
|
|
40
40
|
<div className={styles.pageLabels}>
|
|
41
41
|
<div className={styles.appName}>{t('reportBuilder', 'Report builder')}</div>
|
|
42
|
-
<
|
|
42
|
+
<h1 className={styles.pageTitle}>{title}</h1>
|
|
43
43
|
|
|
44
44
|
{(metaLeft || metaRight) && (
|
|
45
45
|
<div className={styles.metaLine}>
|