Skip to content

Commit 744fb29

Browse files
Merge pull request #575 from EyeSeeTea/development
Release 2.2.1
2 parents 7df857f + e51accf commit 744fb29

File tree

7 files changed

+32
-79
lines changed

7 files changed

+32
-79
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,12 @@
1-
name: Application testing
2-
on:
3-
push:
4-
workflow_dispatch:
5-
jobs:
6-
unit-tests:
7-
name: Unit tests
8-
runs-on: self-hosted
9-
steps:
10-
- name: Checkout repository
11-
uses: actions/checkout@v2
12-
13-
- name: Setup Node
14-
uses: actions/setup-node@v1
15-
with:
16-
node-version: "12.x"
17-
18-
- name: Install yarn
19-
run: npm install -g yarn
20-
21-
- name: Get yarn cache directory path
22-
id: yarn-cache-dir-path
23-
run: echo "::set-output name=dir::$(yarn cache dir)"
1+
name: "Shared Master Workflow"
242

25-
- name: Cache yarn dependencies
26-
uses: actions/cache@v2
27-
id: yarn-cache
28-
with:
29-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-yarn-
33-
- name: Installing Dependencies
34-
run: yarn install --frozen-lockfile --silent
35-
36-
- name: Install translations
37-
run: yarn localize
38-
39-
- name: Run jest tests
40-
run: yarn test
3+
on:
4+
push:
5+
branches: ["master", "development"]
6+
pull_request:
7+
branches: [ "master", "development" ]
8+
workflow_dispatch:
419

42-
- name: Run typescript tests
43-
run: npx tsc
10+
jobs:
11+
master-workflow:
12+
uses: EyeSeeTea/github-workflows/.github/workflows/master.yml@master

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "data-management-app",
33
"description": "DHIS2 Data Management App",
4-
"version": "2.2.0",
4+
"version": "2.2.1",
55
"license": "GPL-3.0",
66
"author": "EyeSeeTea team",
77
"homepage": ".",
@@ -37,7 +37,7 @@
3737
"font-awesome": "^4.7.0",
3838
"lodash": "4.17.21",
3939
"luxon": "^3.7.1",
40-
"md5": "^2.2.1",
40+
"md5.js": "1.3.5",
4141
"moment": "2.29.1",
4242
"postcss-rtl": "^1.3.2",
4343
"prop-types": "^15",
@@ -100,7 +100,6 @@
100100
"@types/jest": "26.0.20",
101101
"@types/lodash": "4.14.168",
102102
"@types/luxon": "^3.6.2",
103-
"@types/md5": "2.2.1",
104103
"@types/node": "16",
105104
"@types/react": "17.0.0",
106105
"@types/react-dom": "17.0.0",

public/index.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,22 @@
44
<meta charset="utf-8" />
55
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
66

7-
<script src="//code.jquery.com/jquery-latest.min.js"></script>
7+
<script
8+
src="https://code.jquery.com/jquery-1.11.1.min.js"
9+
integrity="sha256-VAvG3sHdS5LqTT+5A/aeq/bZGa/Uj04xKxY8KM/w9EE="
10+
crossorigin="anonymous"
11+
></script>
812
<link
913
type="text/css"
1014
rel="stylesheet"
1115
href="%PUBLIC_URL%/includes/material-design-icons/material-icons.css"
1216
/>
1317
<link type="text/css" rel="stylesheet" href="%PUBLIC_URL%/includes/roboto-font.css" />
1418
<link
15-
href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"
19+
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"
20+
integrity="sha384-X7L1bhgb36bF1iFvaqvhgpaGpayKM+vXNNYRlF89BFA5s3vi1qZ8EX9086RlZjy1"
1621
rel="stylesheet"
22+
crossorigin="anonymous"
1723
/>
1824

1925
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

src/models/dev-project.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import md5 from "md5";
1+
// @ts-ignore
2+
import MD5 from "md5.js";
3+
24
import { D2Api, DataValueSetsPostRequest } from "../types/d2-api";
35
import _ from "lodash";
46
import Project from "./Project";
@@ -103,7 +105,7 @@ export async function saveDataValues(api: D2Api, project: Project) {
103105

104106
return cocs.map(coc => {
105107
const key = [de.id, coc.id, info.attrCoc, period.id].join("-");
106-
const md5hash = md5(key);
108+
const md5hash = new MD5(key);
107109
const value = (parseInt(md5hash.slice(0, 8), 16) % 9) + 1;
108110

109111
const dataValue: DataValue = {

src/pages/report/TableBodyGrouped.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export default function TableBodyGrouped<Row extends Ref>(props: RowProps<Row>):
3737

3838
const useStyles = makeStyles({
3939
row: {
40-
borderBottom: "3px solid #E0E0E0",
40+
"& td": {
41+
borderBottom: "2px solid #C0C0C0",
42+
},
4143
},
4244
});

src/utils/dhis2.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import _ from "lodash";
2-
import md5 from "md5";
2+
// @ts-ignore
3+
import MD5 from "md5.js";
34

45
import { D2Api, Ref, Id, MetadataPayload, PostOptions } from "../types/d2-api";
56
import { runPromises } from "./promises";
@@ -67,7 +68,7 @@ const maxHashValue = _(uidStructure)
6768
/* Return pseudo-random UID from seed prefix/key */
6869
export function getUid(prefix: string, key: string): string {
6970
const seed = prefix + key;
70-
const md5hash = md5(seed);
71+
const md5hash: string = new MD5().update(seed).digest("hex");
7172
const nHashChars = Math.ceil(Math.log(maxHashValue) / Math.log(16));
7273
const hashInteger = parseInt(md5hash.slice(0, nHashChars), 16);
7374
const result = uidStructure.reduce(

yarn.lock

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4419,13 +4419,6 @@
44194419
resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-3.6.2.tgz#be6536931801f437eafcb9c0f6d6781f72308041"
44204420
integrity sha512-R/BdP7OxEMc44l2Ex5lSXHoIXTB2JLNa3y2QISIbr58U/YcsffyQrYW//hZSdrfxrjRZj3GcUoxMPGdO8gSYuw==
44214421

4422-
4423-
version "2.2.1"
4424-
resolved "https://registry.yarnpkg.com/@types/md5/-/md5-2.2.1.tgz#0e2d65d8f6cc91aafbc9be5a4c08fee9250406ce"
4425-
integrity sha512-bZB0jqBL7JETFqvRKyuDETFceFaVcLm2MBPP5LFEEL/SZuqLnyvzF37tXmMERDncC3oeEj/fOUw88ftJeMpZaw==
4426-
dependencies:
4427-
"@types/node" "*"
4428-
44294422
"@types/minimatch@*":
44304423
version "3.0.3"
44314424
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
@@ -6680,11 +6673,6 @@ char-regex@^1.0.2:
66806673
resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
66816674
integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==
66826675

6683-
6684-
version "0.0.2"
6685-
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
6686-
integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=
6687-
66886676
check-more-types@^2.24.0:
66896677
version "2.24.0"
66906678
resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600"
@@ -7365,11 +7353,6 @@ cross-spawn@^6.0.0:
73657353
shebang-command "^1.2.0"
73667354
which "^1.2.9"
73677355

7368-
7369-
version "0.0.2"
7370-
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
7371-
integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=
7372-
73737356
crypto-browserify@^3.11.0:
73747357
version "3.12.0"
73757358
resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
@@ -10774,7 +10757,7 @@ is-boolean-object@^1.0.1, is-boolean-object@^1.1.0:
1077410757
dependencies:
1077510758
call-bind "^1.0.0"
1077610759

10777-
is-buffer@^1.1.5, is-buffer@~1.1.6:
10760+
is-buffer@^1.1.5:
1077810761
version "1.1.6"
1077910762
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
1078010763
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
@@ -12693,7 +12676,7 @@ math-random@^1.0.1:
1269312676
resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c"
1269412677
integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==
1269512678

12696-
md5.js@^1.3.4:
12679+
md5.js@1.3.5, md5.js@^1.3.4:
1269712680
version "1.3.5"
1269812681
resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f"
1269912682
integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==
@@ -12702,15 +12685,6 @@ md5.js@^1.3.4:
1270212685
inherits "^2.0.1"
1270312686
safe-buffer "^5.1.2"
1270412687

12705-
md5@^2.2.1:
12706-
version "2.3.0"
12707-
resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f"
12708-
integrity sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==
12709-
dependencies:
12710-
charenc "0.0.2"
12711-
crypt "0.0.2"
12712-
is-buffer "~1.1.6"
12713-
1271412688
1271512689
version "2.0.14"
1271612690
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50"

0 commit comments

Comments
 (0)