usnistgov / oar-pdr

The NIST Open Access to Research (OAR) Public Data Repository (PDR) system software
11 stars 10 forks source link

ODD-940: Data Cart code restructuring #166

Closed chuanlin2018 closed 3 years ago

chuanlin2018 commented 3 years ago

This PR basically do the code restructure of data cart. The data cart page was split into three parts: cart controls, bundle plan and tree table. A new datacart class was created and most of cart related functions were moved from cart services into datacart class.

This PR changed the download all behavior - instead of popping up a new data cart window, now creating a new tab.

This PR fixed the status sync between tabs -

  1. When files added to the cart in the landing page, they automatically showed up in the global data cart page if it's opened already (without refreshing the page).
  2. Any file downloaded in data cart page, the status in the landing page will be updated automatically (without refreshing the page).

This PR also added a new feature: display bundle download progress in the landing page. There will be one progress bar for each data cart (global data cart, download all data carts). Each progress bar can be manually closed once the download is completed or the tab is closed. The title of the progress bar is either "Global Data Cart" or the first 20 characters of the collection title.

To test, download the branch and run it in local docker as usual.

RayPlante commented 3 years ago

I did a rebase with integration (instead of a merge of integration) which is why the change history looks funny. I'm not sure this was a good idea.

chuanlin2018 commented 3 years ago

The fix foe server-side error checked in. Please check again.

By the way, I wiped out local oar-docker folder and re-clone the integration branch and updated the tag name of pubpdr to fix/ODD940-clean-up. The build still faile:

... make tests/man.test make[3]: Entering directory '/root/jq-dev' Changes to the manual.yml require docs to be enabled to run the tests Makefile:1839: recipe for target 'tests/man.test' failed make[3]: Leaving directory '/root/jq-dev' make[3]: [tests/man.test] Error 1 make[2]: [check-am] Error 2 Makefile:1644: recipe for target 'check-am' failed make[2]: Leaving directory '/root/jq-dev' Makefile:1151: recipe for target 'check-recursive' failed make[1]: Leaving directory '/root/jq-dev' make[1]: [check-recursive] Error 1 Makefile:1647: recipe for target 'check' failed make: [check] Error 2 ERROR: Service 'nerdmbase' failed to build: The command '/bin/sh -c git clone http://github.com/stedolan/jq.git jq-dev && cd jq-dev && git checkout 6306ac89667cf35f47ddc40aa0630546c57e387f && git submodule update --init && autoreconf -fi && ./configure --prefix=/usr/local --with-oniguruma=builtin && make -j8 && make check && make install' returned a non-zero code: 2

chuanlin2018 commented 3 years ago

getDialogWidth() now returns a default value if inBrowser=false.

RayPlante commented 3 years ago

@chuanlin2018 BTW, can you fix these conflicts?

chuanlin2018 commented 3 years ago

Followed your instruction. It failed at following step:

lnc9$ git merge --continue fatal: There is no merge in progress (MERGE_HEAD missing).

When I started over it seemed everything was up to date. So I just go ahead push the fix to usnistgov. Please check. Thanks.

RayPlante commented 3 years ago

I was going from memory just before heading into a meeting, so I was a little fuzzy on that step. However, the messages that appear when the merge fails due to conflicts are pretty clear about what to do next (as are the messages when you then run "git status").

The PR now says we are clear of conflicts; now just waiting on Travis. Thanks!

Ray

From: chuanlin2018 notifications@github.com Sent: Friday, January 29, 2021 2:38 PM To: usnistgov/oar-pdr oar-pdr@noreply.github.com Cc: Plante, Raymond L. (Fed) raymond.plante@nist.gov; Review requested review_requested@noreply.github.com Subject: Re: [usnistgov/oar-pdr] ODD-940: Data Cart code restructuring (#166)

Followed your instruction. It failed at following step:

lnc9$ git merge --continue fatal: There is no merge in progress (MERGE_HEAD missing).

When I started over it seemed everything was up to date. So I just go ahead push the fix to usnistgov. Please check. Thanks.

- You are receiving this because your review was requested. Reply to this email directly, view it on GitHubhttps://github.com/usnistgov/oar-pdr/pull/166#issuecomment-770007576, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAH245A7NUAPMN3YSIBKKFLS4MFCLANCNFSM4V7QIZNQ.

chuanlin2018 commented 3 years ago

Great!