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

As an administrator, I want to deploy the ui from a release and be able to change the back-end API urls #63

Closed
tloubrieu-jpl opened this issue Jun 30, 2021 · 5 comments · Fixed by #101
Assignees
Labels
B12.1 i&t.skip p.should-have requirement the current issue is a requirement
Milestone

Comments

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Jun 30, 2021

Motivation

...so that I can actually use the release package

Additional Details

The js files are minified and it is not easily editable.

Acceptance Criteria

Given a release package, e.g. https://github.com/NASA-PDS/pds-doi-ui/releases/tag/v0.3.0
When I perform the deployment procedure, see https://github.com/NASA-PDS/pds-doi-ui/releases/tag/v0.3.0
Then I expect to be able to edit a configuration file where I can set the back-end API url in a single string

Engineering Details

@tloubrieu-jpl
Copy link
Member Author

@jordanpadams @eddiesarevalo The ticket does not need to be urgently processed since the deployment procedure will work by using git clone before this ticket is solved

@tloubrieu-jpl
Copy link
Member Author

Note @eddiesarevalo that would also help to have a single string to update in the configuration, since now Config.js is:
const Config = {
api:{
reserveUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois',
getDoiByLidvidUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois/',
getDoiByDoiUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois',
getDoiByPds4LabelUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois',
releaseDoiUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois/',
baseUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois/'
}
}

which is a lot a redundant string. Coud you also update that as part of this ticket ?

Thanks,

Thomas

@jordanpadams jordanpadams changed the title As aa administrator, I want to deploy the ui from a release and be able to change the back-end API urls As an administrator, I want to deploy the ui from a release and be able to change the back-end API urls Jul 1, 2021
@jordanpadams jordanpadams added this to the 15.Michael.Johnson milestone Oct 13, 2021
@jordanpadams
Copy link
Member

@eddiesarevalo think we can squeeze this into the work you are already doing?

eddiesarevalo added a commit that referenced this issue Nov 8, 2021
-Added a config file that can be changed by an administrator post build and deployment.
-The config file will be packaged with the build files. This can be changed with a normal text editor to point to a different API at any point post deployment.
@eddiesarevalo
Copy link
Member

Note @eddiesarevalo that would also help to have a single string to update in the configuration, since now Config.js is: const Config = { api:{ reserveUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois', getDoiByLidvidUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois/', getDoiByDoiUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois', getDoiByPds4LabelUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois', releaseDoiUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois/', baseUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois/' } }

which is a lot a redundant string. Coud you also update that as part of this ticket ?

Thanks,

Thomas

These two are different. I'm not sure if they will change in the future:
getDoiByIdentifier: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.2/doi',
releaseDoiUrl: 'http://localhost:8085/PDS_APIs/pds_doi_api/0.2/doi/',

@tloubrieu-jpl
Copy link
Member Author

Hi @eddiesarevalo ,

I don't think we should have different configuration.

The difference is getDoiByIdentifier is followed by ?parameter=value... and releaseDoiUrl is followed by '/'

but the base url should be the same. Does that work ?

tloubrieu-jpl pushed a commit that referenced this issue Nov 9, 2021
-Added a config file that can be changed by an administrator post build and deployment.
-The config file will be packaged with the build files. This can be changed with a normal text editor to point to a different API at any point post deployment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B12.1 i&t.skip p.should-have requirement the current issue is a requirement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants