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

feat: add new database microservice API URL to the frontend #815

Merged
merged 7 commits into from
May 24, 2024

Conversation

rhodinemma
Copy link
Collaborator

Description

The PR creates provision for the database API and modifies the database page functionality to interact with the database microservice API

Type of change.

  • New feature (non-breaking change which adds functionality)

Trello Ticket ID

https://trello.com/c/aBnLDgou

How Can This Been Tested?

Run this branch locally and checkout the http://localhost:3000/projects/<projectID>/databases/, validate the functionalities below

  • Retrieving a list of databases for that user
  • Creating a database
  • Viewing details for a single database
  • Modifying the database's password
  • Disabling/Enabling a database
  • Deleting a database

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Screenshots

Screenshot 2024-05-22 at 7 56 14 PM

Copy link

codeclimate bot commented May 22, 2024

Code Climate has analyzed commit 22661c7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 33.3% (70% is the threshold).

This pull request will bring the total coverage in the repository to 35.3% (0.0% change).

View more on Code Climate.

Copy link
Collaborator

@Mubangizi Mubangizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rhodinemma, please merge into microservice branch, not develop 🙏

@Mubangizi
Copy link
Collaborator

Mubangizi commented May 23, 2024

I have tried testing this out but I can't seem to create any database, the page just reloads and nothing happens, any idea on what could be causing this?

Copy link
Collaborator

@Mubangizi Mubangizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For matters of configuration and independency, please create a database_axios instance and have it handle the database API requests.
Having the backend axios instance handle database requests might become problematic in future.

You can base off this to see how that can be done.

Then you can do further modifications to some of the functions like handleGetRequest

src/pages/DBSettingsPage/index.jsx Outdated Show resolved Hide resolved
@rhodinemma rhodinemma changed the base branch from develop to microservice May 23, 2024 07:36
@rhodinemma
Copy link
Collaborator Author

rhodinemma commented May 23, 2024

I have tried testing this out but I can't seem to create any database, the page just reloads and nothing happens, any idea on what could be causing this?

That screenshot in the PR ain't magic...i was testing with my local database API instance.
i haven't had time but from our last conversation i requested you to validate the deployment of the database API since it didn't have the latest changes since you are the one who setup the deployment 👍🏾

@rhodinemma rhodinemma requested a review from Mubangizi May 23, 2024 08:33
@khalifan-kfan
Copy link
Collaborator

https://github.com/crane-cloud/frontend/blob/774834dd4d4315b7b1140d175b305135cef6d48c/.github/workflows/microservice.yml#L62

@rhodinemma please pick new changes from the microservice branch and add the environment variable in the file like shown in the link above to help with the deployments

@rhodinemma
Copy link
Collaborator Author

https://github.com/crane-cloud/frontend/blob/774834dd4d4315b7b1140d175b305135cef6d48c/.github/workflows/microservice.yml#L62

@rhodinemma please pick new changes from the microservice branch and add the environment variable in the file like shown in the link above to help with the deployments

okay please, thank you

@Mubangizi
Copy link
Collaborator

I have tried testing this out but I can't seem to create any database, the page just reloads and nothing happens, any idea on what could be causing this?

That screenshot in the PR ain't magic...i was testing with my local database API instance. i haven't had time but from our last conversation i requested you to validate the deployment of the database API since it didn't have the latest changes since you are the one who setup the deployment 👍🏾

Okay, so when should we look into this?

@rhodinemma
Copy link
Collaborator Author

I have tried testing this out but I can't seem to create any database, the page just reloads and nothing happens, any idea on what could be causing this?

That screenshot in the PR ain't magic...i was testing with my local database API instance. i haven't had time but from our last conversation i requested you to validate the deployment of the database API since it didn't have the latest changes since you are the one who setup the deployment 👍🏾

Okay, so when should we look into this?

today 👍🏾

Copy link
Collaborator

@Mubangizi Mubangizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhodinemma rhodinemma merged commit 7759928 into microservice May 24, 2024
2 checks passed
@rhodinemma rhodinemma deleted the ft/database-microservice-api branch May 24, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants