Skip to content

Commit

Permalink
Merge pull request #7 from EyeSeeTea/development
Browse files Browse the repository at this point in the history
Release 0.2.0
  • Loading branch information
adrianq authored Jul 12, 2023
2 parents 10760c7 + 6fba893 commit eaba377
Show file tree
Hide file tree
Showing 48 changed files with 322,055 additions and 191,048 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PORT=8081
SKIP_PREFLIGHT_CHECK=true
REACT_APP_DHIS2_BASE_URL=https://dev.eyeseetea.com/play
REACT_APP_DHIS2_AUTH='admin:district'
REACT_APP_STORAGE=datastore

CYPRESS_DHIS2_AUTH='admin:district'
CYPRESS_EXTERNAL_API="https://dev.eyeseetea.com/play"
Expand Down
85 changes: 85 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,88 @@ The file `src/contexts/app-context.ts` holds some general context so typical inf
### Scripts

Check the example script, entry `"script-example"`in `package.json`->scripts and `src/scripts/example.ts`.

### About Plugins

Right now the application support 5 different plugins:

| Report | plugin filename |
| ------------- | --------------- |
| Pivot Tables | reporttable.js |
| Event Charts | eventchart.js |
| Event Reports | eventreport.js |
| Maps | map.js |
| Charts | chart.js |

You can see within the **public** folder the following folder structure:

```
/236
reporttable.min.js
eventchart.min.js
# all the other plugins
/237
reporttable.min.js
eventchart.min.js
# all the other plugins
/238
reporttable.min.js
eventchart.min.js
# all the other plugins
```

Plugins have different functionality depending on the DHIS2 version, so we first get the version and then load all the scripts from the specific folder.

### Adding a new version

If you want to add a new version the first thing to do is download the .war file from the [releases page](https://releases.dhis2.org/). Pick the version you want.

Now you need to unzip the war file into a folder in your computer

```bash
$ unzip ./dhis2-stable-2.39.0.war -d ./war-239
```

Now go into the new folder and find the plugins:

```bash
$ cd war-239
$ find | grep '\(eventreport\|reporttable\|chart\|map\)\.js$'
```

Which returns the path to plugin scripts (not all the versions have the plugins in the same paths):

```
./dhis-web-event-visualizer/eventchart.js
./dhis-web-event-reports/eventreport.js
./dhis-web-maps/map.js
./dhis-web-interpretation/chart.js
./dhis-web-interpretation/reporttable.js
```

Inside **public**, create a new folder with the version (example: `239`) you want to add:

```
/public
/239
```

Now copy all files inside the folder. As a final step, please add the word ".min" to the every file so prettier does not try to do its magic on them.

```
/public
/239
reporttable.min.js
eventchart.min.js
eventreport.min.js
map.min.js
chart.min.js
```

Now you can start the server and check if every visualization is working properly.

### Storage

Settings can be saved in the data store (default) or as constants. Use the env variable **REACT_APP_STORAGE** to select which one to use (`datastore` or `constants`).
5 changes: 4 additions & 1 deletion i18n/ar.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2023-05-09T16:17:40.581Z\n"
"POT-Creation-Date: 2023-06-13T18:46:56.801Z\n"
"PO-Revision-Date: 2018-10-25T09:02:35.143Z\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -32,6 +32,9 @@ msgstr ""
msgid "Font Size"
msgstr ""

msgid "Show/Hide Feedback"
msgstr ""

msgid "Save"
msgstr ""

Expand Down
7 changes: 5 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2023-05-09T16:17:40.581Z\n"
"PO-Revision-Date: 2023-05-09T16:17:40.581Z\n"
"POT-Creation-Date: 2023-06-13T18:46:56.801Z\n"
"PO-Revision-Date: 2023-06-13T18:46:56.801Z\n"

msgid "Select Dashboard"
msgstr ""
Expand All @@ -32,6 +32,9 @@ msgstr ""
msgid "Font Size"
msgstr ""

msgid "Show/Hide Feedback"
msgstr ""

msgid "Save"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2023-05-09T16:17:40.581Z\n"
"POT-Creation-Date: 2023-06-13T18:46:56.801Z\n"
"PO-Revision-Date: 2018-10-25T09:02:35.143Z\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -32,6 +32,9 @@ msgstr ""
msgid "Font Size"
msgstr ""

msgid "Show/Hide Feedback"
msgstr ""

msgid "Save"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion i18n/fr.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2023-05-09T16:17:40.581Z\n"
"POT-Creation-Date: 2023-06-13T18:46:56.801Z\n"
"PO-Revision-Date: 2018-10-25T09:02:35.143Z\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -32,6 +32,9 @@ msgstr ""
msgid "Font Size"
msgstr ""

msgid "Show/Hide Feedback"
msgstr ""

msgid "Save"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion i18n/pt.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2023-05-09T16:17:40.581Z\n"
"POT-Creation-Date: 2023-06-13T18:46:56.801Z\n"
"PO-Revision-Date: 2018-10-25T09:02:35.143Z\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -32,6 +32,9 @@ msgstr ""
msgid "Font Size"
msgstr ""

msgid "Show/Hide Feedback"
msgstr ""

msgid "Save"
msgstr ""

Expand Down
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dashboard-reports",
"description": "Dashboard Reports",
"version": "0.1.0",
"version": "0.2.0",
"license": "GPL-3.0",
"author": "EyeSeeTea team",
"homepage": ".",
Expand Down
36 changes: 36 additions & 0 deletions public/236/chart.min.js

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions public/236/eventchart.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit eaba377

Please sign in to comment.