Skip to content

Commit

Permalink
Merge branch 'master' into HUB-149/unambiguous-date
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp authored May 31, 2024
2 parents caf1a9e + 6e5ae5f commit 013f362
Show file tree
Hide file tree
Showing 41 changed files with 13,868 additions and 12,485 deletions.
66 changes: 0 additions & 66 deletions .ebextensions/proxy.config

This file was deleted.

10 changes: 8 additions & 2 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
Expand All @@ -23,7 +26,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: c-hive/gha-yarn-cache@v1
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
sed -i "s|AUTOINJECTED_GH_ACTIONS|$ECR_REGISTRY/$ECR_REPOSITORY:$SHA_TAG|g" Dockerrun.aws.json
cat Dockerrun.aws.json
zip -r deploy.zip .ebextensions Dockerrun.aws.json
zip -r deploy.zip .platform Dockerrun.aws.json
- name: Deploy to Staging
if: steps.build-image.outputs.version == 'staging'
Expand All @@ -101,7 +101,7 @@ jobs:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: app-hub
environment_name: staging
environment_name: staging-v2
version_label: app-hub-staging-${{ github.run_id }}_${{ github.run_number}}
region: ${{ env.AWS_REGION }}
deployment_package: deploy.zip
Expand All @@ -113,7 +113,7 @@ jobs:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: app-hub
environment_name: prod
environment_name: prod-v2
version_label: app-hub-prod-${{ github.run_id }}_${{ github.run_number}}
region: ${{ env.AWS_REGION }}
deployment_package: deploy.zip
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
steps:
- uses: actions/labeler@v2
with:
repo-token: '${{ secrets.GH_TOKEN }}'
repo-token: '${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}'
1 change: 1 addition & 0 deletions .platform/nginx/conf.d/client_max_body_size.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 20M;
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
# [2.34.0](https://github.com/dhis2/app-hub/compare/v2.33.1...v2.34.0) (2024-02-16)


### Features

* show version download count ([#739](https://github.com/dhis2/app-hub/issues/739)) ([1135152](https://github.com/dhis2/app-hub/commit/1135152227e31e83c0a65fdafaf2acbbafb3a272))

## [2.33.1](https://github.com/dhis2/app-hub/compare/v2.33.0...v2.33.1) (2024-02-14)


### Bug Fixes

* support DHIS2 version 2.41 ([d268981](https://github.com/dhis2/app-hub/commit/d268981444bdd35d73fae3ec2dcfd2c54b71ba5a))

# [2.33.0](https://github.com/dhis2/app-hub/compare/v2.32.2...v2.33.0) (2023-08-01)


### Bug Fixes

* add docs for slack arguments ([de11f5b](https://github.com/dhis2/app-hub/commit/de11f5bb899f6ecf616c9b81076961c95b7e62f5))
* debug log ([5188baf](https://github.com/dhis2/app-hub/commit/5188baf7dfb569e989e590b5d46b633fc02243aa))
* **slackmessager:** update review now link ([4b9875d](https://github.com/dhis2/app-hub/commit/4b9875dba49b60370ff86023244121da8da9e121))
* slackwebhookmessager rename ([d86ba80](https://github.com/dhis2/app-hub/commit/d86ba80fc6fbc4d6e317b4ca4371c52056a45f1b))


### Features

* **notifications:** add slack webhook for new apps ([2f222ee](https://github.com/dhis2/app-hub/commit/2f222ee7a89c3259889d956444cbd2ba91aaa8f6))

## [2.32.2](https://github.com/dhis2/app-hub/compare/v2.32.1...v2.32.2) (2023-05-16)


### Bug Fixes

* **addappmedia:** fix adding media after knex upgrade ([2e8ff4c](https://github.com/dhis2/app-hub/commit/2e8ff4ca545763b575c8893d5ed804e77bb2d53a))
* **dependencies:** upgrade to knex@2 ([39f43ac](https://github.com/dhis2/app-hub/commit/39f43acfef3b7011c580662fbc22ba4aed6ef56f))
* **deps:** update hapi-sentry ([192e56e](https://github.com/dhis2/app-hub/commit/192e56e76453dd3ad31dc335b131b7a423745665))
* **deps:** update jwt deps ([cc6cef4](https://github.com/dhis2/app-hub/commit/cc6cef46f95ea40fdab550f95171da25c71906ee))
* upgrade hapi deps ([1a3a6b6](https://github.com/dhis2/app-hub/commit/1a3a6b60f2f7d0b08eb87d10f8771a37a08b9f6f))

## [2.32.1](https://github.com/dhis2/app-hub/compare/v2.32.0...v2.32.1) (2023-04-18)


### Bug Fixes

* add 2.40 to available versions ([53513ec](https://github.com/dhis2/app-hub/commit/53513ec805a64aaf84dc4ef21e535d9f752431cc))

# [2.32.0](https://github.com/dhis2/app-hub/compare/v2.31.5...v2.32.0) (2023-03-20)


### Features

* **appversions:** add endpoint for getting a single app-version ([b5ec694](https://github.com/dhis2/app-hub/commit/b5ec6941704d3d47b8ff09344c29654473df931b))

## [2.31.5](https://github.com/dhis2/app-hub/compare/v2.31.4...v2.31.5) (2023-02-07)


### Bug Fixes

* **deps:** update deps, downgrade react@16 ([4ae4806](https://github.com/dhis2/app-hub/commit/4ae4806eec78a0d8dec6175e9ab772b9e3e46968))
* increase nginx client_max_body_size ([8ece671](https://github.com/dhis2/app-hub/commit/8ece6713801c3a0217d3d5b0836a734c296ae6e3))
* prop-types import ([aa4107a](https://github.com/dhis2/app-hub/commit/aa4107a1f19da32319b53fad0446d6e6d83f9d90))

## [2.31.4](https://github.com/dhis2/app-hub/compare/v2.31.3...v2.31.4) (2022-11-30)


Expand Down
2 changes: 2 additions & 0 deletions client/default.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module.exports = {
},
ui: {
dhisVersions: [
'2.41',
'2.40',
'2.39',
'2.38',
'2.37',
Expand Down
8 changes: 4 additions & 4 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "2.31.4",
"version": "2.34.0",
"description": "The App Hub Client",
"repository": "https://github.com/dhis2/app-hub",
"author": "Birk Johansson <[email protected]>",
Expand All @@ -18,7 +18,7 @@
"dependencies": {
"@auth0/auth0-react": "^1.6.0",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/ui": "^6.20.0",
"@dhis2/ui": "^8.9.0",
"classnames": "^2.3.1",
"copy-text-to-clipboard": "^3.0.1",
"core-js": "^3.16.4",
Expand All @@ -27,8 +27,8 @@
"jwt-decode": "^2.1.0",
"lodash": "^4.17.19",
"query-string": "^7.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "16.14.0",
"react-dom": "16.14.0",
"react-markdown": "^8.0.3",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.1",
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/AppIcon/AppIcon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropTypes } from '@dhis2/prop-types'
import PropTypes from 'prop-types'
import React from 'react'
import styles from './AppIcon.module.css'

Expand Down
5 changes: 3 additions & 2 deletions client/src/components/Versions/Versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { usePagination, useQuery } from 'src/api'

const { defaultAppChannel } = config.ui

const useChannels = appId => {
const useChannels = (appId) => {
const [availableChannels, setAvailableChannels] = useState([
defaultAppChannel,
])
Expand Down Expand Up @@ -38,7 +38,7 @@ const useChannels = appId => {
return { availableChannels, channelsFilter, setChannelsFilter }
}

const Versions = ({ appId, renderDeleteVersionButton }) => {
const Versions = ({ appId, renderDeleteVersionButton, showDownloadCount }) => {
const { availableChannels, channelsFilter, setChannelsFilter } =
useChannels(appId)

Expand Down Expand Up @@ -102,6 +102,7 @@ const Versions = ({ appId, renderDeleteVersionButton }) => {
<VersionsTable
versions={versions}
renderDeleteVersionButton={renderDeleteVersionButton}
showDownloadCount={showDownloadCount}
/>
) : (
<em className={styles.noVersions}>
Expand Down
20 changes: 16 additions & 4 deletions client/src/components/Versions/VersionsTable/VersionsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { renderDhisVersionsCompatibility } from 'src/lib/render-dhis-versions-co

const { appChannelToDisplayName } = config.ui

const useCreateGetDownloadUrl = url => {
const useCreateGetDownloadUrl = (url) => {
const [token, setToken] = useState()
const { getAccessTokenSilently } = useAuth0()

Expand All @@ -30,12 +30,16 @@ const useCreateGetDownloadUrl = url => {
}, [url, getAccessTokenSilently])

return useCallback(
url => (token ? url.concat(`?token=${token}`) : url),
(url) => (token ? url.concat(`?token=${token}`) : url),
[token]
)
}

const VersionsTable = ({ versions, renderDeleteVersionButton }) => {
const VersionsTable = ({
versions,
renderDeleteVersionButton,
showDownloadCount,
}) => {
const getDownloadUrl = useCreateGetDownloadUrl()

return (
Expand All @@ -46,11 +50,14 @@ const VersionsTable = ({ versions, renderDeleteVersionButton }) => {
<TableCellHead>Channel</TableCellHead>
<TableCellHead>DHIS2 version compatibility</TableCellHead>
<TableCellHead>Upload date</TableCellHead>
{showDownloadCount && (
<TableCellHead>Downloads</TableCellHead>
)}
<TableCellHead></TableCellHead>
</TableRowHead>
</TableHead>
<TableBody>
{versions.map(version => (
{versions.map((version) => (
<TableRow key={version.id}>
<TableCell>{version.version}</TableCell>
<TableCell className={styles.channelNameCell}>
Expand All @@ -74,6 +81,11 @@ const VersionsTable = ({ versions, renderDeleteVersionButton }) => {
)}
</span>
</TableCell>
{showDownloadCount && (
<TableCell>
<span>{version.downloadCount}</span>
</TableCell>
)}
<TableCell>
<a
download
Expand Down
1 change: 1 addition & 0 deletions client/src/pages/UserApp/VersionsCard/VersionsCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const VersionsCard = ({ app, mutate }) => {
appId={app.id}
versions={versions}
renderDeleteVersionButton={renderDeleteVersionButton}
showDownloadCount={true}
/>
<Link
className={styles.newVersionButton}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"format:server": "yarn workspace client format"
},
"devDependencies": {
"@dhis2/cli-style": "^10.4.1",
"@dhis2/cli-style": "^10.5.1",
"concurrently": "^6.2.1",
"cross-env": "^7.0.3"
},
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true
},
"version": "2.31.4"
"version": "2.34.0"
}
1 change: 1 addition & 0 deletions server/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
extends: [config.eslint],

parserOptions: {
ecmaVersion: 2020,
ecmaFeatures: {
globalReturn: true,
experimentalObjectRestSpread: true,
Expand Down
Loading

0 comments on commit 013f362

Please sign in to comment.