Skip to content

Commit

Permalink
refactor: port plugin and app to app-platform (#327)
Browse files Browse the repository at this point in the history
* WIP: start porting plugin and app to app-platform

* chore: remove punycode peerdep

* chore: remove loglevel (for now)

* feat: WIP pivot table type (#335)

* chore: remove references to chart, use visualization instead

Now that the visualization can be also a pivot table, we should not use
chart when referring to the visualization.

* feat: add pivot table as possible visualization type

Make it the default one too (at least for now), since the AO does not
have the "type" property yet, otherwise the default (previously COLUMN)
would be used as type also for reportTable AOs.

* feat: allow for loading of reportTable AOs

Instead of always pass "chart" in the File Menu, change to "reportTable"
when Pivot table is selected as visualization type.
This does not always currently work due to FileMenu not refreshing the
file list (it needs to be fixed in FileMenu component).
The "apiObjectName" passed around is not computed from the visualization type,
instead of just being set to "chart".

* feat: load a different plugin for PIVOT_TABLE vis type

(Currently the pivot plugin is a copy of the chart one).

* chore: regenerate pot file

* fix: fix failing tests

* fix: typo in baseUrl reference

* chore: squash merge master into epic branch

commit a3dbb9f
Author: Jan Henrik Øverland <jan@dhis2.org>
Date:   Mon Nov 11 14:46:30 2019 +0100

    feat: use layout rules for add-to-layout ui (#362)

    * feat: generate add to layout button/menu based on rules

    * feat: refactor logic to use rules

    * upgrade @dhis2/analytics dep

    * tmp fix add to button tests

    * TODO fix tests

    * remove comment

    * replace local fn with analytics fn

    * todo: tmp commented out tests

    * remove folder

commit d6ba4a3
Author: Jan Henrik Øverland <jan@dhis2.org>
Date:   Mon Nov 11 14:09:50 2019 +0100

    refactor: use dimension menu from @dhis2/analytics (#364)

    * refactor: Use DimensionMenu and rules logic from @dhis2/analytics for all occurrences of such duplicated menus

    * refactor: upgraded @dhis2/analytics to v2.5.1

commit 204fe7a
Author: Jan Henrik Overland <janhenrik.overland@gmail.com>
Date:   Tue Nov 5 14:02:06 2019 +0100

    fix: use axisName instead of axisKey

commit dd8b563
Author: Martin <martin@moid.se>
Date:   Tue Nov 5 11:22:22 2019 +0100

    updated analytics repo (#363)

commit 8c0ed13
Author: Martin <martin@moid.se>
Date:   Tue Nov 5 11:20:18 2019 +0100

    fix: changed height to min-height for the axes area (#361)

commit 74edb3c
Author: Viktor Varland <viktor@dhis2.org>
Date:   Thu Oct 24 19:39:35 2019 +0200

    chore(deps): upgrade d2-i18n(-generate) deps (master) (#359)

    * chore(deps): upgrade d2-i18n(-generate) deps (master)

    * chore(deps): update i18n for packages

commit 4bcb913
Author: @dhis2-bot <apps@dhis2.org>
Date:   Thu Oct 24 12:22:35 2019 +0200

    chore(translations): sync Russian translations from transifex (master)

    Automatically merged to resolve the avalance

commit 2941ee9
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:24 2019 +0200

    chore(translations): sync Arabic translations from transifex (master)

    Automatically merged to resolve the avalance

commit 6067063
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:21 2019 +0200

    chore(translations): sync Danish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 5f8ec50
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:19 2019 +0200

    chore(translations): sync Spanish translations from transifex (master)

    Automatically merged to resolve the avalance

commit ee07b7b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:16 2019 +0200

    chore(translations): sync PersianAfghanistan translations from transifex (master)

    Automatically merged to resolve the avalance

commit 3e5ab95
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:14 2019 +0200

    chore(translations): sync French translations from transifex (master)

    Automatically merged to resolve the avalance

commit 754984e
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:11 2019 +0200

    chore(translations): sync Indonesian translations from transifex (master)

    Automatically merged to resolve the avalance

commit b0c23c8
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:07 2019 +0200

    chore(translations): sync Lao translations from transifex (master)

    Automatically merged to resolve the avalance

commit e1531d0
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:01 2019 +0200

    chore(translations): sync Burmese translations from transifex (master)

    Automatically merged to resolve the avalance

commit 9af084b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:58 2019 +0200

    chore(translations): sync Pushto translations from transifex (master)

    Automatically merged to resolve the avalance

commit 21f72cb
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:56 2019 +0200

    chore(translations): sync Portuguese translations from transifex (master)

    Automatically merged to resolve the avalance

commit e0d1207
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:53 2019 +0200

    chore(translations): sync PortugueseBrazil translations from transifex (master)

    Automatically merged to resolve the avalance

commit a9c2ace
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:51 2019 +0200

    chore(translations): sync Swedish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 8e8e467
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:49 2019 +0200

    chore(translations): sync TetumTetun translations from transifex (master)

    Automatically merged to resolve the avalance

commit cdce03b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:46 2019 +0200

    chore(translations): sync Tajik translations from transifex (master)

    Automatically merged to resolve the avalance

commit a63b9ec
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:44 2019 +0200

    chore(translations): sync Ukrainian translations from transifex (master)

    Automatically merged to resolve the avalance

commit c37f5a2
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:42 2019 +0200

    chore(translations): sync Urdu translations from transifex (master)

    Automatically merged to resolve the avalance

commit bbc8ebf
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:39 2019 +0200

    chore(translations): sync Vietnamese translations from transifex (master)

    Automatically merged to resolve the avalance

commit 8c5b0c7
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:36 2019 +0200

    chore(translations): sync Chinese translations from transifex (master)

    Automatically merged to resolve the avalance

* chore: add icon for PT vis type (#369)

* chore: squash merge master into epic branch

commit 7fa8693
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:29 2019 +0100

    chore(translations): sync Arabic translations from transifex (master)

    Automatically merged to resolve the avalance

commit c3c5753
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:27 2019 +0100

    chore(translations): sync Spanish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 84e30cf
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:25 2019 +0100

    chore(translations): sync PersianAfghanistan translations from transifex (master)

    Automatically merged to resolve the avalance

commit 613e818
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:22 2019 +0100

    chore(translations): sync French translations from transifex (master)

    Automatically merged to resolve the avalance

commit f0a73e7
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:19 2019 +0100

    chore(translations): sync Lao translations from transifex (master)

    Automatically merged to resolve the avalance

commit a251cc0
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:16 2019 +0100

    chore(translations): sync Burmese translations from transifex (master)

    Automatically merged to resolve the avalance

commit a9d70dd
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:13 2019 +0100

    chore(translations): sync Pushto translations from transifex (master)

    Automatically merged to resolve the avalance

commit bf94c6d
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:11 2019 +0100

    chore(translations): sync Portuguese translations from transifex (master)

    Automatically merged to resolve the avalance

commit 41c2f38
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:09 2019 +0100

    chore(translations): sync PortugueseBrazil translations from transifex (master)

    Automatically merged to resolve the avalance

commit 782e55a
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:06 2019 +0100

    chore(translations): sync Russian translations from transifex (master)

    Automatically merged to resolve the avalance

commit c6d5f76
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:03 2019 +0100

    chore(translations): sync Swedish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 3ed9dcb
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:00 2019 +0100

    chore(translations): sync TetumTetun translations from transifex (master)

    Automatically merged to resolve the avalance

commit 6b76689
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:30:56 2019 +0100

    chore(translations): sync Tajik translations from transifex (master)

    Automatically merged to resolve the avalance

commit f95ef04
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:30:54 2019 +0100

    chore(translations): sync Ukrainian translations from transifex (master)

    Automatically merged to resolve the avalance

commit ecbf268
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:30:51 2019 +0100

    chore(translations): sync Vietnamese translations from transifex (master)

    Automatically merged to resolve the avalance

commit e6c7fa6
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:13:48 2019 +0100

    chore(translations): sync Chinese translations from transifex (master)

    Automatically merged to resolve the avalance

commit c96ac09
Author: Martin <martin@moid.se>
Date:   Fri Nov 15 14:11:55 2019 +0100

    fix: changed incorrect prop types and tests (#372)

    * fix: changed incorrect prop types and tests

    * fix: upgraded to Analytics v2.6.2

commit 22c36e2
Author: Martin <martin@moid.se>
Date:   Fri Nov 15 13:06:07 2019 +0100

    fix: map is not vis type (#371)

    * fix: extracted map from vis type to a static item

    * fix: renamed chart to vis

    * refactor: removed legacy native type to use only vis type instead

    * fix: issue with 'selected' prop

    * fix: added missing comment from Analytics

    * fix: added prop types

    * fix: added more prop types

    * fix: removed unnecessary prop type

commit 91847d2
Author: Martin <martin@moid.se>
Date:   Thu Nov 14 15:57:02 2019 +0100

    Fix: Implement disallowed dims from Analytics UI rules (#370)

    * fix: using Analytics to calculate disallowed dimensions
    * fix: Analytics v2.6.0

commit 26d12c6
Author: Martin <martin@moid.se>
Date:   Thu Nov 14 11:30:20 2019 +0100

    fix: use shared vis types (#368)

    * use vis types from analytics
    * upgrades to and depends on @dhis2/analytics to v2.5.2
    * implemented layout rules for the "add to layout" button

commit a3dbb9f
Author: Jan Henrik Øverland <jan@dhis2.org>
Date:   Mon Nov 11 14:46:30 2019 +0100

    feat: use layout rules for add-to-layout ui (#362)

    * feat: generate add to layout button/menu based on rules

    * feat: refactor logic to use rules

    * upgrade @dhis2/analytics dep

    * tmp fix add to button tests

    * TODO fix tests

    * remove comment

    * replace local fn with analytics fn

    * todo: tmp commented out tests

    * remove folder

commit d6ba4a3
Author: Jan Henrik Øverland <jan@dhis2.org>
Date:   Mon Nov 11 14:09:50 2019 +0100

    refactor: use dimension menu from @dhis2/analytics (#364)

    * refactor: Use DimensionMenu and rules logic from @dhis2/analytics for all occurrences of such duplicated menus

    * refactor: upgraded @dhis2/analytics to v2.5.1

commit 204fe7a
Author: Jan Henrik Overland <janhenrik.overland@gmail.com>
Date:   Tue Nov 5 14:02:06 2019 +0100

    fix: use axisName instead of axisKey

commit dd8b563
Author: Martin <martin@moid.se>
Date:   Tue Nov 5 11:22:22 2019 +0100

    updated analytics repo (#363)

commit 8c0ed13
Author: Martin <martin@moid.se>
Date:   Tue Nov 5 11:20:18 2019 +0100

    fix: changed height to min-height for the axes area (#361)

commit 74edb3c
Author: Viktor Varland <viktor@dhis2.org>
Date:   Thu Oct 24 19:39:35 2019 +0200

    chore(deps): upgrade d2-i18n(-generate) deps (master) (#359)

    * chore(deps): upgrade d2-i18n(-generate) deps (master)

    * chore(deps): update i18n for packages

commit 4bcb913
Author: @dhis2-bot <apps@dhis2.org>
Date:   Thu Oct 24 12:22:35 2019 +0200

    chore(translations): sync Russian translations from transifex (master)

    Automatically merged to resolve the avalance

commit 2941ee9
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:24 2019 +0200

    chore(translations): sync Arabic translations from transifex (master)

    Automatically merged to resolve the avalance

commit 6067063
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:21 2019 +0200

    chore(translations): sync Danish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 5f8ec50
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:19 2019 +0200

    chore(translations): sync Spanish translations from transifex (master)

    Automatically merged to resolve the avalance

commit ee07b7b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:16 2019 +0200

    chore(translations): sync PersianAfghanistan translations from transifex (master)

    Automatically merged to resolve the avalance

commit 3e5ab95
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:14 2019 +0200

    chore(translations): sync French translations from transifex (master)

    Automatically merged to resolve the avalance

commit 754984e
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:11 2019 +0200

    chore(translations): sync Indonesian translations from transifex (master)

    Automatically merged to resolve the avalance

commit b0c23c8
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:07 2019 +0200

    chore(translations): sync Lao translations from transifex (master)

    Automatically merged to resolve the avalance

commit e1531d0
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:01 2019 +0200

    chore(translations): sync Burmese translations from transifex (master)

    Automatically merged to resolve the avalance

commit 9af084b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:58 2019 +0200

    chore(translations): sync Pushto translations from transifex (master)

    Automatically merged to resolve the avalance

commit 21f72cb
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:56 2019 +0200

    chore(translations): sync Portuguese translations from transifex (master)

    Automatically merged to resolve the avalance

commit e0d1207
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:53 2019 +0200

    chore(translations): sync PortugueseBrazil translations from transifex (master)

    Automatically merged to resolve the avalance

commit a9c2ace
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:51 2019 +0200

    chore(translations): sync Swedish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 8e8e467
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:49 2019 +0200

    chore(translations): sync TetumTetun translations from transifex (master)

    Automatically merged to resolve the avalance

commit cdce03b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:46 2019 +0200

    chore(translations): sync Tajik translations from transifex (master)

    Automatically merged to resolve the avalance

commit a63b9ec
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:44 2019 +0200

    chore(translations): sync Ukrainian translations from transifex (master)

    Automatically merged to resolve the avalance

commit c37f5a2
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:42 2019 +0200

    chore(translations): sync Urdu translations from transifex (master)

    Automatically merged to resolve the avalance

commit bbc8ebf
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:39 2019 +0200

    chore(translations): sync Vietnamese translations from transifex (master)

    Automatically merged to resolve the avalance

commit 8c5b0c7
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:36 2019 +0200

    chore(translations): sync Chinese translations from transifex (master)

    Automatically merged to resolve the avalance

* fix: solve problems after merge

* chore: update @dhis2/analytics for PT support

* chore: squash merge master into epic branch

commit 26a95e8
Author: Martin <martin@moid.se>
Date:   Thu Nov 21 10:25:25 2019 +0100

    fix: added icons to tooltip for warning and locked (#447)

    * added icons for warning and locked to dimension tooltip

commit 445f1d8
Author: Martin <martin@moid.se>
Date:   Thu Nov 21 10:13:48 2019 +0100

    fix: rules dim handling (#446)

    * fix: passing dimension id instead of whole dimension object

    * fix: updated imports to follow latest Analytics signature

    * fix: Updated Analytics dep to v2.6.9

commit b75967a
Author: Jan Henrik Øverland <jan@dhis2.org>
Date:   Thu Nov 21 08:14:04 2019 +0100

    fix: rename axis name constants (#445)

    * fix: rename axis name to axis id

    * fix: rename axis display name to axis name

    * fix: Updated Analytics dep to v2.6.8

commit 883304f
Author: Jan Henrik Øverland <jan@dhis2.org>
Date:   Wed Nov 20 16:52:43 2019 +0100

    fix: use locked dimensions rule from analytics (#444)

    * fix: use locked dimensions rule from Analytics in chip

    * fix: show locked in tooltip

    * fix: use axis constants

    * fix: Updated Analytics dep to v2.6.6

commit ded0ee9
Author: Martin <martin@moid.se>
Date:   Wed Nov 20 10:09:54 2019 +0100

    fix: use max items rule (#373)

    * feat: use max items rule

    * fix: use layout rules in DialogManager

    * fix: use rules logic for single value items

    * fix: Updated Analytics dep to v2.6.5

commit 7fa8693
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:29 2019 +0100

    chore(translations): sync Arabic translations from transifex (master)

    Automatically merged to resolve the avalance

commit c3c5753
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:27 2019 +0100

    chore(translations): sync Spanish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 84e30cf
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:25 2019 +0100

    chore(translations): sync PersianAfghanistan translations from transifex (master)

    Automatically merged to resolve the avalance

commit 613e818
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:22 2019 +0100

    chore(translations): sync French translations from transifex (master)

    Automatically merged to resolve the avalance

commit f0a73e7
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:19 2019 +0100

    chore(translations): sync Lao translations from transifex (master)

    Automatically merged to resolve the avalance

commit a251cc0
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:16 2019 +0100

    chore(translations): sync Burmese translations from transifex (master)

    Automatically merged to resolve the avalance

commit a9d70dd
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:13 2019 +0100

    chore(translations): sync Pushto translations from transifex (master)

    Automatically merged to resolve the avalance

commit bf94c6d
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:11 2019 +0100

    chore(translations): sync Portuguese translations from transifex (master)

    Automatically merged to resolve the avalance

commit 41c2f38
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:09 2019 +0100

    chore(translations): sync PortugueseBrazil translations from transifex (master)

    Automatically merged to resolve the avalance

commit 782e55a
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:06 2019 +0100

    chore(translations): sync Russian translations from transifex (master)

    Automatically merged to resolve the avalance

commit c6d5f76
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:03 2019 +0100

    chore(translations): sync Swedish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 3ed9dcb
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:31:00 2019 +0100

    chore(translations): sync TetumTetun translations from transifex (master)

    Automatically merged to resolve the avalance

commit 6b76689
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:30:56 2019 +0100

    chore(translations): sync Tajik translations from transifex (master)

    Automatically merged to resolve the avalance

commit f95ef04
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:30:54 2019 +0100

    chore(translations): sync Ukrainian translations from transifex (master)

    Automatically merged to resolve the avalance

commit ecbf268
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:30:51 2019 +0100

    chore(translations): sync Vietnamese translations from transifex (master)

    Automatically merged to resolve the avalance

commit e6c7fa6
Author: @dhis2-bot <apps@dhis2.org>
Date:   Tue Nov 19 09:13:48 2019 +0100

    chore(translations): sync Chinese translations from transifex (master)

    Automatically merged to resolve the avalance

commit c96ac09
Author: Martin <martin@moid.se>
Date:   Fri Nov 15 14:11:55 2019 +0100

    fix: changed incorrect prop types and tests (#372)

    * fix: changed incorrect prop types and tests

    * fix: upgraded to Analytics v2.6.2

commit 22c36e2
Author: Martin <martin@moid.se>
Date:   Fri Nov 15 13:06:07 2019 +0100

    fix: map is not vis type (#371)

    * fix: extracted map from vis type to a static item

    * fix: renamed chart to vis

    * refactor: removed legacy native type to use only vis type instead

    * fix: issue with 'selected' prop

    * fix: added missing comment from Analytics

    * fix: added prop types

    * fix: added more prop types

    * fix: removed unnecessary prop type

commit 91847d2
Author: Martin <martin@moid.se>
Date:   Thu Nov 14 15:57:02 2019 +0100

    Fix: Implement disallowed dims from Analytics UI rules (#370)

    * fix: using Analytics to calculate disallowed dimensions
    * fix: Analytics v2.6.0

commit 26d12c6
Author: Martin <martin@moid.se>
Date:   Thu Nov 14 11:30:20 2019 +0100

    fix: use shared vis types (#368)

    * use vis types from analytics
    * upgrades to and depends on @dhis2/analytics to v2.5.2
    * implemented layout rules for the "add to layout" button

commit a3dbb9f
Author: Jan Henrik Øverland <jan@dhis2.org>
Date:   Mon Nov 11 14:46:30 2019 +0100

    feat: use layout rules for add-to-layout ui (#362)

    * feat: generate add to layout button/menu based on rules

    * feat: refactor logic to use rules

    * upgrade @dhis2/analytics dep

    * tmp fix add to button tests

    * TODO fix tests

    * remove comment

    * replace local fn with analytics fn

    * todo: tmp commented out tests

    * remove folder

commit d6ba4a3
Author: Jan Henrik Øverland <jan@dhis2.org>
Date:   Mon Nov 11 14:09:50 2019 +0100

    refactor: use dimension menu from @dhis2/analytics (#364)

    * refactor: Use DimensionMenu and rules logic from @dhis2/analytics for all occurrences of such duplicated menus

    * refactor: upgraded @dhis2/analytics to v2.5.1

commit 204fe7a
Author: Jan Henrik Overland <janhenrik.overland@gmail.com>
Date:   Tue Nov 5 14:02:06 2019 +0100

    fix: use axisName instead of axisKey

commit dd8b563
Author: Martin <martin@moid.se>
Date:   Tue Nov 5 11:22:22 2019 +0100

    updated analytics repo (#363)

commit 8c0ed13
Author: Martin <martin@moid.se>
Date:   Tue Nov 5 11:20:18 2019 +0100

    fix: changed height to min-height for the axes area (#361)

commit 74edb3c
Author: Viktor Varland <viktor@dhis2.org>
Date:   Thu Oct 24 19:39:35 2019 +0200

    chore(deps): upgrade d2-i18n(-generate) deps (master) (#359)

    * chore(deps): upgrade d2-i18n(-generate) deps (master)

    * chore(deps): update i18n for packages

commit 4bcb913
Author: @dhis2-bot <apps@dhis2.org>
Date:   Thu Oct 24 12:22:35 2019 +0200

    chore(translations): sync Russian translations from transifex (master)

    Automatically merged to resolve the avalance

commit 2941ee9
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:24 2019 +0200

    chore(translations): sync Arabic translations from transifex (master)

    Automatically merged to resolve the avalance

commit 6067063
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:21 2019 +0200

    chore(translations): sync Danish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 5f8ec50
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:19 2019 +0200

    chore(translations): sync Spanish translations from transifex (master)

    Automatically merged to resolve the avalance

commit ee07b7b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:16 2019 +0200

    chore(translations): sync PersianAfghanistan translations from transifex (master)

    Automatically merged to resolve the avalance

commit 3e5ab95
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:14 2019 +0200

    chore(translations): sync French translations from transifex (master)

    Automatically merged to resolve the avalance

commit 754984e
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:11 2019 +0200

    chore(translations): sync Indonesian translations from transifex (master)

    Automatically merged to resolve the avalance

commit b0c23c8
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:07 2019 +0200

    chore(translations): sync Lao translations from transifex (master)

    Automatically merged to resolve the avalance

commit e1531d0
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:02:01 2019 +0200

    chore(translations): sync Burmese translations from transifex (master)

    Automatically merged to resolve the avalance

commit 9af084b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:58 2019 +0200

    chore(translations): sync Pushto translations from transifex (master)

    Automatically merged to resolve the avalance

commit 21f72cb
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:56 2019 +0200

    chore(translations): sync Portuguese translations from transifex (master)

    Automatically merged to resolve the avalance

commit e0d1207
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:53 2019 +0200

    chore(translations): sync PortugueseBrazil translations from transifex (master)

    Automatically merged to resolve the avalance

commit a9c2ace
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:51 2019 +0200

    chore(translations): sync Swedish translations from transifex (master)

    Automatically merged to resolve the avalance

commit 8e8e467
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:49 2019 +0200

    chore(translations): sync TetumTetun translations from transifex (master)

    Automatically merged to resolve the avalance

commit cdce03b
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:46 2019 +0200

    chore(translations): sync Tajik translations from transifex (master)

    Automatically merged to resolve the avalance

commit a63b9ec
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:44 2019 +0200

    chore(translations): sync Ukrainian translations from transifex (master)

    Automatically merged to resolve the avalance

commit c37f5a2
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:42 2019 +0200

    chore(translations): sync Urdu translations from transifex (master)

    Automatically merged to resolve the avalance

commit bbc8ebf
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:39 2019 +0200

    chore(translations): sync Vietnamese translations from transifex (master)

    Automatically merged to resolve the avalance

commit 8c5b0c7
Author: @dhis2-bot <apps@dhis2.org>
Date:   Wed Oct 23 15:01:36 2019 +0200

    chore(translations): sync Chinese translations from transifex (master)

    Automatically merged to resolve the avalance

* chore: fix some things

* chore: set ENV and use beta app-scripts

* chore: fix jest and cypress configs

* chore: re-add semicolon

* chore: re-add image import

* chore: clean up some things

* chore: add latest cli-style

* chore: update netlify.toml

* chore: clean up more files, move enzyme to workspace root

* ci: run tests on travis

* chore: remove unused jest transform pattern

* chore: update deploy-build to work with platform app

* chore: use plain yarn workspaces instead of lerna, remove unused root dependencies

* docs: update start script instructions

* docs: update cypress instructions

* chore: upgrade to released app-platform

* fix: change bad module reference, load schemas on startup
  • Loading branch information
amcgee committed Nov 28, 2019
1 parent 15ae8a8 commit cb169c7
Show file tree
Hide file tree
Showing 53 changed files with 4,676 additions and 9,206 deletions.
17 changes: 0 additions & 17 deletions .babelrc

This file was deleted.

16 changes: 16 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 1

update_configs:
- package_manager: 'javascript'
directory: '/'
update_schedule: 'daily'
version_requirement_updates: 'increase_versions'
target_branch: 'master'
automerged_updates:
- match:
dependency_name: '@dhis2/*'
dependency_type: 'all'
update_type: 'semver:minor'
- match:
dependency_type: 'all'
update_type: 'security:patch'
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { config } = require('@dhis2/cli-style')

module.exports = {
extends: [config.eslintReact],
plugins: [
"react-hooks"
],
rules: {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
}
}
7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

4 changes: 4 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
titleOnly: true
commitsOnly: false
titleAndCommits: false
allowMergeCommits: false
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ packages/app/i18n/en.pot

#maven
/target

# DHIS2 Platform
packages/*/.d2
packages/*/coverage
13 changes: 13 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { config } = require('@dhis2/cli-style')

const tasks = arr => arr.join(' && ')

module.exports = {
hooks: {
...config.husky.hooks,
'pre-commit': tasks([
// 'd2-style js check --staged',
// 'd2-style text check --staged',
]),
},
}
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { config } = require('@dhis2/cli-style')

module.exports = {
...require(config.prettier),
}
31 changes: 15 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
language: node_js
node_js:
- '8'
- '8'
env:
global:
- CC_TEST_REPORTER_ID=2a6f417bdfe1cdc8e2ec8d3347728fc81e64752286079db5ab17fd65c964b946
- secure: KQSX6TsA1fyPreY1GIxWW+XqNckxviIPVde5GDHkrrlfhR+pzTJQ2as3/j1QpTQ7LW3fESO3hfijueC4nKDyi0ZdNpd2+DDi19J0EVKDl2g5WfnAw8H82GE670P9ZPRREh0+SZ11sAf3Wlvs0RPItftSoYwyS8rwxGAaLWWiJoXObax6dpqw7IrKhK3yBf/ixdQKa+ZZ0pjt8KXkL9oPeqHf9Mx2Sh78OIEIcRlN+dznvEbF8QeVQ+8cM8e43N7jWkntsvnZ3TfuuiOf/tz/BQRxlKPkXG0eVDy6teISUrbe6e3faezEES64p/9ubHUALEEJi8ZfSJXL3m9nv48tHz1gSKhlp0/mfSHr58TFJLj1jgZ0SvE0hkVLdrCtbyhxq1cwYY7pXB9Qrd8JjtLPo2mT9sBOVDqjz1NUCyzO/Cl7f4wwR7OCYFD0q50+ARmfvTKWC+UzQHs0ahIeMzg5cGGBTm/kAawmcBQR+AZnsyOckM1enQTPKy60lWRZV2I7OrCrBspOJECUvH3edkPeAs1B/yfM1WduVWqykOXPwVN3Ww+dHdKAGfat3KNf5ZBEe7owO41m6J8fAqxkXXoxuiFH5id+/g0Yg+iumh7CAchpUefWdmyFDHamhcfoJfPAdKdgQ18psNFfFx+coF3R13Gx2tHUf8wwv6dIj+NT6vM=
global:
- CC_TEST_REPORTER_ID=2a6f417bdfe1cdc8e2ec8d3347728fc81e64752286079db5ab17fd65c964b946
- secure: KQSX6TsA1fyPreY1GIxWW+XqNckxviIPVde5GDHkrrlfhR+pzTJQ2as3/j1QpTQ7LW3fESO3hfijueC4nKDyi0ZdNpd2+DDi19J0EVKDl2g5WfnAw8H82GE670P9ZPRREh0+SZ11sAf3Wlvs0RPItftSoYwyS8rwxGAaLWWiJoXObax6dpqw7IrKhK3yBf/ixdQKa+ZZ0pjt8KXkL9oPeqHf9Mx2Sh78OIEIcRlN+dznvEbF8QeVQ+8cM8e43N7jWkntsvnZ3TfuuiOf/tz/BQRxlKPkXG0eVDy6teISUrbe6e3faezEES64p/9ubHUALEEJi8ZfSJXL3m9nv48tHz1gSKhlp0/mfSHr58TFJLj1jgZ0SvE0hkVLdrCtbyhxq1cwYY7pXB9Qrd8JjtLPo2mT9sBOVDqjz1NUCyzO/Cl7f4wwR7OCYFD0q50+ARmfvTKWC+UzQHs0ahIeMzg5cGGBTm/kAawmcBQR+AZnsyOckM1enQTPKy60lWRZV2I7OrCrBspOJECUvH3edkPeAs1B/yfM1WduVWqykOXPwVN3Ww+dHdKAGfat3KNf5ZBEe7owO41m6J8fAqxkXXoxuiFH5id+/g0Yg+iumh7CAchpUefWdmyFDHamhcfoJfPAdKdgQ18psNFfFx+coF3R13Gx2tHUf8wwv6dIj+NT6vM=
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
> ./cc-test-reporter
- chmod +x ./cc-test-reporter
- "./cc-test-reporter before-build"
- npm install --global @dhis2/deploy-build
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
> ./cc-test-reporter
- chmod +x ./cc-test-reporter
- './cc-test-reporter before-build'
script:
- npm run build
- npm run build && npm run test
after_script:
- "./cc-test-reporter after-build -d --exit-code $TRAVIS_TEST_RESULT"
- './cc-test-reporter after-build -d --exit-code $TRAVIS_TEST_RESULT'
deploy:
- provider: script
script: deploy-build
skip_cleanup: true
on:
all_branches: true
- provider: script
script: npx --package @dhis2/deploy-build deploy-build d2-ci build/app
skip_cleanup: true
on:
all_branches: true
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2004-2017, University of Oslo
Copyright (c) 2004-2019, University of Oslo
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
62 changes: 27 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Data visualizer app and plugin

This is a lerna repo that contains the data-visualizer-app. Eventually it will also contain the analytics plugins.
This is a yarn workspaces mono-repo that contains the data-visualizer-app. Eventually it will also contain the analytics plugins.

## Getting started

Expand All @@ -14,29 +14,10 @@ $ yarn build

### Development

The data-visualizer-app package is the only "app" in the repo. You can start it in 2 different ways:

From the repo root directory:

```
$ yarn start-app
```

Or from the package directory (packages/app):

```
$ cd packages/app
$ yarn start
```
To build the plugin and start the app on `localhost:3000`, run `yarn start` from the repo root directory.

The following npm scripts can all be run from the repo root directory and will execute on all packages

#### Lint

```
$ yarn lint
```

#### Unit tests

```
Expand All @@ -51,45 +32,55 @@ $ yarn coverage

#### Browser tests

We use Cypress for our browser tests. Currently the tests can only run against the dhis2 server localhost:8080.
There are plans to make this configurable. In order to run the tests, you need to define two environment variables:
We use Cypress for our browser tests.

Before running cypress, start the development server in another terminal session.
Ensure that you specify the correct DHIS2_BASE_URL.

```sh
> DHIS2_BASE_URL=http://localhost:8080 yarn start
```

There are plans to make this configurable. In order to run the tests, you need to define three environment variables:

```
CYPRESS_LOGIN_URL=http://localhost:8080 # This must match DHIS2_BASE_URL
CYPRESS_DHIS2_USERNAME=myusername
CYPRESS_DHIS2_PASSWORD=mypassword
```

Run tests interactively:

```
yarn cy:e2e:open
cd packages/app && yarn cy:e2e:open
```

Run tests in ci mode:

```
yarn cy:e2e:run
cd packages/app && yarn cy:e2e:run
```

#### Prettier and write changes
#### Linting and Formatting

Automatically fix all fixable code-style violations (prettier and eslint)

```
$ yarn prettier-write
$ yarn format
```

Run prettier and just report failing files (useful for ci)
Check all files for code-style violations (prettier and eslint)

```
$ yarn prettier-ci
$ yarn lint
```

### Build the all packages
### Build all packages

```
$ yarn build
```


#### Manual testing with Netlify

This repo is configured to deploy all branches to netlify. This makes it simple to share a running implementation with others (e.g., tester, product manager, ux, fellow developers) prior
Expand All @@ -98,19 +89,20 @@ to merging to master.
All netlfiy deployments run against play.dhis2.org/dev, so in order to use them, you must configure CORS for your particular branch:

1. Copy the URL of the deployment you want to enable, i.e. `https://dhis2-data-visualizer.netlify.com`
2. Visit the play/dev [system settings -- access](https://play.dhis2.org/dev/dhis-web-settings/index.html#/access) page
2. Visit the [system settings -- access](https://play.dhis2.org/dev/dhis-web-settings/index.html#/access) page on the DHIS2 instance you want to test against (i.e. `https://debug.dhis2.org/dev`)
3. Add the copied URL on a new line the in CORS Whitelist textbox **NOTE**: do NOT include a trailing slash
4. Back on [netlify](`https://dhis2-data-visualizer.netlify.com`), enter the DHIS2 instance URL in the Server input of the login dialog

The master branch is always available at:

```https://dhis2-data-visualizer.netlify.com```
`https://dhis2-data-visualizer.netlify.com`

Branches are available at (replace `/` and other special characters in `{branchname}` with `-`):

```https://{branchname}--dhis2-data-visualizer.netlify.com```
`https://{branchname}--dhis2-data-visualizer.netlify.com`

Pull requests (I.E. #209) are available at:

```https://deploy-preview-209--dhis2-data-visualizer.netlify.com```
`https://deploy-preview-209--dhis2-data-visualizer.netlify.com`

Netlify will also add a status check to each PR which links directly to the PR deployment.
1 change: 0 additions & 1 deletion __mocks__/styleMock.js

This file was deleted.

14 changes: 0 additions & 14 deletions config/jest/cssTransform.js

This file was deleted.

12 changes: 0 additions & 12 deletions config/jest/fileTransform.js

This file was deleted.

22 changes: 0 additions & 22 deletions config/polyfills.js

This file was deleted.

9 changes: 0 additions & 9 deletions config/shim.js

This file was deleted.

32 changes: 0 additions & 32 deletions jest.config.js

This file was deleted.

18 changes: 2 additions & 16 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,7 @@
# Directory to change to before starting a build.
# This is where we will look for package.json/.nvmrc/etc.
base = ""
publish = "packages/app/build/app"

# Directory (relative to root of your repo) that contains the deploy-ready
# HTML files and assets generated by the build.
publish = "packages/app/build"

# Default build command.
# && yarn manifest --manifest.activities.dhis=\"https://play.dhis2.org/dev\""
command = "echo BUILDING... && yarn build"

[[redirects]]
from = "/*"
to = "https://play.dhis2.org/dev/:splat"
status = 200

[redirects.headers]
# Use request forwarding and basic authentication as admin:district for now
Authorization = "Basic YWRtaW46ZGlzdHJpY3Q="
command = "echo BUILDING... && cd packages/plugin && yarn build && cd ../app && yarn build --standalone"

Loading

0 comments on commit cb169c7

Please sign in to comment.