Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #7

Merged
merged 94 commits into from
Apr 17, 2023
Merged

Dev #7

merged 94 commits into from
Apr 17, 2023

Commits on Dec 19, 2022

  1. refactor: put all dashboard codes and data under the dashboard folder.

    Restructing the project requires the following fixes:
    - fixed the docker build context.
    - fixed the app's data path.
    asiripanich committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    6622769 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2022

  1. feat: use e-mission-server as the base image of the dashboard.

    Other changes include:
    - restructured the project.
    asiripanich committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    054132c View commit details
    Browse the repository at this point in the history
  2. doc: fix comments

    asiripanich committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    04ff895 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2022

  1. Configuration menu
    Copy the full SHA
    6cf3d74 View commit details
    Browse the repository at this point in the history
  2. gitignore .DS_Store

    asiripanich committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    68be7c7 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2022

  1. Configuration menu
    Copy the full SHA
    ef9442e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d1a909 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    94661fa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    330ca39 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    18c9bcf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    70d5716 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a4b016a View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2023

  1. Configuration menu
    Copy the full SHA
    ed6fb9b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a78b1d8 View commit details
    Browse the repository at this point in the history
  3. feat(home): Add plots and boxes. (#1)

    The following elements have been added:
    - sign-ups trend plot,
    - trips trend plot,
    - number of users box,
    - number of trips box, and
    - number of active users box.
    asiripanich committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    cad1661 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2023

  1. refactor(data): clean up.

    asiripanich committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    b51dfba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ca8ac39 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ae92042 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2023

  1. Configuration menu
    Copy the full SHA
    fa0980d View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2023

  1. Configuration menu
    Copy the full SHA
    892d9c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    502cfef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4e927a5 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2023

  1. Configuration menu
    Copy the full SHA
    8c40599 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2023

  1. Configuration menu
    Copy the full SHA
    873523c View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2023

  1. Configuration menu
    Copy the full SHA
    d479406 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2023

  1. Configuration menu
    Copy the full SHA
    b918107 View commit details
    Browse the repository at this point in the history
  2. Basic functionality to generate random tokens and QR codes

    - I have NOT tested this in the docker environment
        - The scripts work fine on my laptop in a conda environment
    - the two new packages are related to generating QR codes
    
    There is one script to generate random tokens and one to generate QR codes from
    the tokens
    
    Note that the scripts are written as scripts with the appropriate argument parsing
    These are not checked in anywhere else, so feel free to change the structure if needed.
    Hopefully we won't need too many changes, since I do have functions for most of
    the actual functionality.
    
    I have put the new files into the `opadmindash` directory - you should be able
    to import them once you put them into the PYTHONPATH.
    
    I didn't think that it was a great idea to put them into the `pages` directory,
    which is where all the new code lives
    shankari committed Jan 27, 2023
    Configuration menu
    Copy the full SHA
    bd532d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cf36118 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3bf03b3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ea8585e View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. Configuration menu
    Copy the full SHA
    554e1e7 View commit details
    Browse the repository at this point in the history
  2. Added tokens data table

    AlirezaRa94 committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    0f63d2e View commit details
    Browse the repository at this point in the history
  3. Fixed some minor bugs.

    AlirezaRa94 committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    947f489 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c0a2152 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Configuration menu
    Copy the full SHA
    09d7d30 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. Configuration menu
    Copy the full SHA
    024fec3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    03bbf1f View commit details
    Browse the repository at this point in the history
  3. Merge pull request #12 from e-mission/push-page

    Push page
    AlirezaRa94 authored Feb 1, 2023
    Configuration menu
    Copy the full SHA
    54236ae View commit details
    Browse the repository at this point in the history
  4. Merge pull request #9 from e-mission/token-feat

    Token feat
    AlirezaRa94 authored Feb 1, 2023
    Configuration menu
    Copy the full SHA
    69849d8 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #10 from e-mission/map-feat

    map-feat
    AlirezaRa94 authored Feb 1, 2023
    Configuration menu
    Copy the full SHA
    ec9c012 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fa5f468 View commit details
    Browse the repository at this point in the history
  7. fix: Extract UUIDs as hex. as_uuid() method no longer works with th…

    …e data generated using a newer version of e-mission-server.
    asiripanich committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    6562338 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2023

  1. Configuration menu
    Copy the full SHA
    2c264ca View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2023

  1. Configuration menu
    Copy the full SHA
    2be8241 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. Configuration menu
    Copy the full SHA
    1ddaee2 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Configuration menu
    Copy the full SHA
    148d2fa View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. Configuration menu
    Copy the full SHA
    a73c632 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2023

  1. Merge pull request #13 from e-mission/dynamic_config

    Dynamic config
    AlirezaRa94 authored Feb 22, 2023
    Configuration menu
    Copy the full SHA
    95b6a15 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2023

  1. Configuration menu
    Copy the full SHA
    80f16be View commit details
    Browse the repository at this point in the history
  2. Added config-fake file.

    AlirezaRa94 committed Feb 28, 2023
    Configuration menu
    Copy the full SHA
    3089bc9 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2023

  1. Merge pull request #15 from e-mission/authentication

    Authentication
    AlirezaRa94 authored Mar 3, 2023
    Configuration menu
    Copy the full SHA
    e285a01 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. Configuration menu
    Copy the full SHA
    4cb5512 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c09f0ab View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0dddd3d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1681195 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3ba50a8 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2023

  1. Merge pull request #17 from e-mission/token_enhancement

    Token enhancement
    AlirezaRa94 authored Mar 7, 2023
    Configuration menu
    Copy the full SHA
    bf21494 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #16 from e-mission/basic_auth

    Implemented Dash basic authentication.
    AlirezaRa94 authored Mar 7, 2023
    Configuration menu
    Copy the full SHA
    7103f35 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Configuration menu
    Copy the full SHA
    f6a5f7a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a62595e View commit details
    Browse the repository at this point in the history
  3. Resolved the conflict.

    AlirezaRa94 committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    1d52e0f View commit details
    Browse the repository at this point in the history
  4. Merge pull request #19 from e-mission/hide_no_access

    Hiding tabs for users with no access.
    AlirezaRa94 authored Mar 14, 2023
    Configuration menu
    Copy the full SHA
    cc465c8 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. Configuration menu
    Copy the full SHA
    418d671 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

  1. Configuration menu
    Copy the full SHA
    d703fa5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    178c961 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd05f4a View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. Configuration menu
    Copy the full SHA
    238d567 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    318ff0c View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Configuration menu
    Copy the full SHA
    ccf0693 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f44f8f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b02745b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dbae8f9 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. Configuration menu
    Copy the full SHA
    f6fac50 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. Merge pull request #22 from e-mission/documentation

    Documentation & Updating Readme
    AlirezaRa94 authored Mar 22, 2023
    Configuration menu
    Copy the full SHA
    d6cae38 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    29d9e52 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4829fbd View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. Configuration menu
    Copy the full SHA
    f0a5fe7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9c6035a View commit details
    Browse the repository at this point in the history
  3. Some minor changes

    AlirezaRa94 committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    185e5e9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e4c533e View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2023

  1. 2 Configuration menu
    Copy the full SHA
    62307f8 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2023

  1. Configuration menu
    Copy the full SHA
    6f37359 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8a3c37d View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. Configuration menu
    Copy the full SHA
    fdd3c5d View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2023

  1. Convert all files to unix format to make code reviews easier in the f…

    …uture
    
    Before this
    
    ```
    $ find . -name \*.py | xargs file
    ./globals.py:                      ASCII text
    ./utils/decode_jwt.py:             Python script text executable, ASCII text, with CRLF line terminators
    ./utils/constants.py:              ASCII text, with CRLF line terminators
    ./utils/generate_qr_codes.py:      Python script text executable, ASCII text
    ./utils/permissions.py:            Python script text executable, ASCII text, with CRLF line terminators
    ./utils/cognito_utils.py:          Python script text executable, ASCII text, with CRLF line terminators
    ./utils/db_utils.py:               Python script text executable, ASCII text, with CRLF line terminators
    ./utils/generate_random_tokens.py: Python script text executable, ASCII text
    ./globalsUpdater.py:               Python script text executable, ASCII text
    ./app.py:                          Python script text executable, ASCII text
    ./config-fake.py:                  ASCII text, with CRLF line terminators
    ./pages/home.py:                   Python script text executable, ASCII text
    ./pages/tokens.py:                 Python script text executable, ASCII text
    ./pages/map.py:                    Python script text executable, ASCII text
    ./pages/settings.py:               Python script text executable, ASCII text
    ./pages/push_notification.py:      Python script text executable, ASCII text
    ./pages/data.py:                   Python script text executable, ASCII text
    ./app_sidebar_collapsible.py:      Python script text executable, ASCII text, with CRLF line terminators
    ```
    
    Auto-fix using
    
    ```
    $ find . -name \*.py | xargs file | grep "with CRLF" | cut -d ":" -f 1 | xargs dos2unix
    dos2unix: converting file ./utils/decode_jwt.py to Unix format...
    dos2unix: converting file ./utils/constants.py to Unix format...
    dos2unix: converting file ./utils/permissions.py to Unix format...
    dos2unix: converting file ./utils/cognito_utils.py to Unix format...
    dos2unix: converting file ./utils/db_utils.py to Unix format...
    dos2unix: converting file ./config-fake.py to Unix format...
    dos2unix: converting file ./app_sidebar_collapsible.py to Unix format...
    ```
    
    After the change
    
    ```
    $ find . -name \*.py | xargs file
    ./globals.py:                      ASCII text
    ./utils/decode_jwt.py:             Python script text executable, ASCII text
    ./utils/constants.py:              ASCII text
    ./utils/generate_qr_codes.py:      Python script text executable, ASCII text
    ./utils/permissions.py:            Python script text executable, ASCII text
    ./utils/cognito_utils.py:          Python script text executable, ASCII text
    ./utils/db_utils.py:               Python script text executable, ASCII text
    ./utils/generate_random_tokens.py: Python script text executable, ASCII text
    ./globalsUpdater.py:               Python script text executable, ASCII text
    ./app.py:                          Python script text executable, ASCII text
    ./config-fake.py:                  Python script text executable, ASCII text
    ./pages/home.py:                   Python script text executable, ASCII text
    ./pages/tokens.py:                 Python script text executable, ASCII text
    ./pages/map.py:                    Python script text executable, ASCII text
    ./pages/settings.py:               Python script text executable, ASCII text
    ./pages/push_notification.py:      Python script text executable, ASCII text
    ./pages/data.py:                   Python script text executable, ASCII text
    ./app_sidebar_collapsible.py:      Python script text executable, ASCII text
    ```
    shankari committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    18c97c0 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #26 from e-mission/fix_crlf

    Convert all files to unix format to make code reviews easier in the f…
    shankari authored Apr 14, 2023
    Configuration menu
    Copy the full SHA
    3f58def View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2023

  1. One more crlf fix

    Follow up to 18c97c0
    from #26
    
    Also convert the docker-compose-prod.yml to unix endings
    No other changes
    shankari committed Apr 15, 2023
    Configuration menu
    Copy the full SHA
    7808f3e View commit details
    Browse the repository at this point in the history
  2. Merge pull request #27 from e-mission/fix_more_crlf

    One more crlf fix
    shankari authored Apr 15, 2023
    Configuration menu
    Copy the full SHA
    b7433e8 View commit details
    Browse the repository at this point in the history
  3. Check in a simple docker-compose to run the app behind an nginx proxy

    So that we can test the reverse proxy configuration fixes in dev
    
    This fixes #24 (comment)
    
    The `docker-compose` (except for `nginx`) should be kept consistent with the
    production `docker-compose-prod.yml` with the exception of `DASH_DEBUG_MODE`,
    which is set to true so that we can debug errors in the setup more easily
    
    Testing done:
    - Built and ran the docker-compose
    - Accessing http://localhost:8060/admin gives the same error as
    #24 (comment)
    
    ```
    Uncaught ReferenceError: DashRenderer is not defined
        <anonymous> http://localhost:8060/admin/:58
    ```
    shankari committed Apr 15, 2023
    Configuration menu
    Copy the full SHA
    712cb98 View commit details
    Browse the repository at this point in the history
  4. Set the relative path prefix to /admin/

    This internally sets the `requests_pathname_prefix`, which allows us to load
    all the assets (including the javascript files) correctly. This is a partial
    fix for #24
    that implements the first step in
    #24 (comment)
    shankari committed Apr 15, 2023
    Configuration menu
    Copy the full SHA
    e19dd49 View commit details
    Browse the repository at this point in the history
  5. Change all the hrefs to relative paths

    This fixes
    #24 (comment)
    #24 (comment)
    #24 (comment)
    
    Since there are not a lot of hrefs and they are all in the same file
    #24 (comment)
    
    ```
    $ grep -r href . | grep -v .git
    ./utils/cognito_utils.py:                dbc.Button('Login with AWS Cognito', id='login-button', href=CognitoConfig.AUTH_URL, style={
    ./app_sidebar_collapsible.py:                    href=dash.get_relative_path("/"),
    ./app_sidebar_collapsible.py:                    href=dash.get_relative_path("/data"),
    ./app_sidebar_collapsible.py:                    href=dash.get_relative_path("/tokens"),
    ./app_sidebar_collapsible.py:                    href=dash.get_relative_path("/map"),
    ./app_sidebar_collapsible.py:                    href=dash.get_relative_path("/push_notification"),
    ./app_sidebar_collapsible.py:                    href=dash.get_relative_path("/settings"),
    ```
    shankari committed Apr 15, 2023
    Configuration menu
    Copy the full SHA
    d6cfdd2 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #28 from e-mission/support_reverse_proxy

    Support and test the reverse proxy configuration
    shankari authored Apr 15, 2023
    Configuration menu
    Copy the full SHA
    ac266f3 View commit details
    Browse the repository at this point in the history
  7. Hack to use the timeseries calls to retrieve the data

    This is a hack to get the dashboard to work.
    It retrieves data using the timeseries interfaces and performs the projections
    using pandas locally.
    
    It is *not* complete.
    
    Notably:
    - the projections are not the same as the original projections
    - the projections do not take the dynamic config into account
    - we still use `edb` for some calls - notably the ones to get the uuid table;
      we should add decorations to the timeseries to support them going forward
    shankari committed Apr 15, 2023
    Configuration menu
    Copy the full SHA
    8bba028 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #30 from e-mission/outline_for_ali_to_fill_in

    Hack to use the timeseries calls to retrieve the data
    shankari authored Apr 15, 2023
    Configuration menu
    Copy the full SHA
    834be13 View commit details
    Browse the repository at this point in the history