GithubHelp home page GithubHelp logo

datim-approvals's Introduction

Repo Owner: Ben Guaraldi @benguaraldi

datim-approvals's People

Contributors

jakub-bao avatar markionium avatar awnage avatar maggiedemeke avatar benguaraldi avatar myanghua avatar lownin avatar

Watchers

Morten Hansen avatar John Francis Mukulu avatar Hendrik de Graaf avatar Bjorn Sandvik avatar Viet Nguyen avatar James Cloos avatar  avatar Jan Henrik Øverland avatar David Katuscak avatar Bob Jolliffe avatar  avatar Jason Pickering avatar Jiju K Jose avatar Abyot Asalefew Gizaw avatar Jen Jones Arnesen avatar Lars Kristian Roland Wærstad avatar  avatar Stian Sandvold avatar Ola Hodne Titlestad avatar  avatar Ignacio Foche avatar  avatar Zubair Asghar avatar Olav avatar Steven Hicks avatar Petter Nielsen avatar  avatar Cecilia Persson avatar Sarah Searle avatar

datim-approvals's Issues

Random test errors

I've started having a bunch of random errors...

image

probably some race conditions....

Mechanism Submit function

User Story: Partner user should be able to Submit pending mechanism to Agency...

Let's do this via REACT Router as a a separate page.

Improve form design

Check MER Tide project and what it would take to redesign the forms using react

Better `no results`

In case there is no results available we should be more user friendly

image
(new app only)

Prod deployment

Since we have an alpha-version of approvals.
Try to deploy it to prod...

Missing Tests

Uff.. I think we getting close to finish.
Missing tests to implement:

Workflow:

  • Inter-Agency Recall Submitted Mechanism by self
  • Global Return Submitted Mechanism by Inter-Agency
  • Global Accept Mechanism
  • Global Recall Accepted Mechanism

Status:
Status in List for Pending, Accepted, Submitted mechanism for ALL user types

Form rendering issues

Now with displaying various different forms we've started having issues... let's fix them:

image

Form render not init issue....

Weird error. If you run scripts slowly the form doesn't get initialized...

If you run them very quickly it is just fine..

after some digging...

If the dataset is not initialized STELLA will re-initialize automatically.

If it has the dataset => fail

Investigate and solve rapid requests by the approvals app

Here is a recent analysis of the DATIM server logs:

# A tibble: 13,913 x 5
   endpoint                                 Referrer                                                        Status      n hit_rate
   <chr>                                    <chr>                                                            <dbl>  <int>    <dbl>
 1 /dhis-web-commons-stream/ping.action     https://www.datim.org/dhis-web-dataentry/index.action              204 476642   0.285 
 2 /api/system/info                         https://www.datim.org/api/apps/Data-Approval/index.html?v=1.5.2    200 192419   0.115 
 3 /api/system/info                         https://www.datim.org/api/apps/Data-Approval/index.html?v=1.5.1    302 150905   0.0903
 4 /api/dataValues                          https://www.datim.org/dhis-web-dataentry/index.action              201 141482   0.0846
 5 /dhis-web-commons/security/login.action  https://www.datim.org/api/apps/Data-Approval/index.html?v=1.5.1    200 115367   0.0690
 6 /api/system/info                         https://www.datim.org/api/apps/Data-Approval/index.html?v=1.5.2    302  86900   0.0520
 7 /dhis-web-commons/security/login.action  https://www.datim.org/api/apps/Data-Approval/index.html?v=1.5.2    200  73036   0.0437

This is from a 24 hour period and note that the app is for some reason, making numerous and very rapid requests to two end points: 1) login.action and 2) api/system/info. Combined, these add up to almost 37% of the hits on the server in one day, which is well not good.

This actually places a significant load on the Tomcat server, since both of these requests (unlike the `ping.action) actually get through to the Tomcat server.

There is no good reason for this to happen, but the actual cause of it is unclear. We need to get to the bottom of this as soon as possible and prevent the app from making rapid and repeated requests to the server.

If the user is not logged in (due to their session being deactivated) then the app should simply stop working and not continue to do anything.

Requests to the api/system/info are OK, but should not be regarded as absolutely critical, since people are able to get this information from the "About" menu. If we are not able to prevent this from making a request or two, then we should just remove this functionality entirely.

@benguaraldi please elevate this issue as high as you can with the development team, as it is putting a very high load on the server.

FYI @nhobby @mdezalia @Markionium

Vendor.js not included in app compile from 4535 branch

When running gulp build-prod on https://github.com/pepfar-datim/datim-approvals/tree/4535, app compiles without errors, but /vendor/vendor.js was not included in zip file. This script loads angular, so without it, the app does not install properly.

App compiled successfully with vendor.js script on https://github.com/pepfar-datim/datim-approvals/tree/3332 and only relevant changes were to remove angular component on 4535: b2d263d

@benguaraldi @jakub-bao

Limit drop-down choices

If I am an Agency User from India. I shouldn't see Botswana in drop-down menu.

If there is only one OU choice make it selected by default.

View Mechanism Form

Let's add the feature which displays mechanism form content before submitting it...

visual clue on mechanism state...

something like a generated picture saying in which status it is....

pending - > submitted by partner -> accepted by agency-> submitted by agency-> accepted by global

Progress Info

We have this stepper on mechanism detail page...

image

However, the problem is that lower levels (partner, agency) are not supposed to see what's happening with their mechanism after being accepted by level above... (DHIS2 rule)

e.g. all partner can see is this:

image

let's make their stepper shorter.

Form Overflow...

The forms are weirdly rendered and it's hard to fit them into

Let's see if there's not float right or something...

image

DHIS2 is not defined

i found a way to reproduce one of the random test errors..

chrome dev tools -> custom network throttling -> latency 400ms, download 1000kbs, upload 200kbs

it would help me reproduce this error:

image

Test failures...

the tests are great but here and there we have a random failure.

it would be great to explore why is that and fix those so we can rely on the tests 100% and no need to re-run them on false error

Recall vs. Return button

It seems like the API recognizes two actions unapprove & unaccept. However, in reality they do the same thing (remove 1 SQL record).

Let's merge them into one button or two separate buttons but don't display both at the same time => confusing

Add TypeScript support

Since this is not a small project.
It would be awesome to use TypeScript inside REACT.
It will help to keep the app more organized and save time by catching compile time errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.