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

Add result page. #239

Merged
merged 4 commits into from
Oct 11, 2023
Merged

Add result page. #239

merged 4 commits into from
Oct 11, 2023

Conversation

kyudori
Copy link
Contributor

@kyudori kyudori commented Oct 7, 2023

Description

LPVS Front-End Reseult Page.
Result Page provides PR informatin and detected file list.

Dashboard(last page) pages will be uploaded.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code cleanup/refactoring
  • Documentation update
  • This change requires a documentation update
  • CI system update
  • Test Coverage update

How Has This Been Tested?

  1. Update environment variables of docker-compose.yml file.
  2. Build the lpvs container : docker compose build
  3. Run containers: docker compose up
  4. See the lpvs home page with any browser: http://localhost:7896

For using social login with Naver, Kakao, and Google, fill the necessary information:

  • Update the application.properties located in src/main/resources:
    Enter client-id and client-secret. (Kakao doesn't require a client-secret.)
  • Update the .env file located in frontend:
    Enter your REST_API_KEY.

The values required to implement the login function can be obtained from the link below.
Naver: https://developers.naver.com/products/login/api/api.md
Kakao: https://developers.kakao.com/docs/latest/ko/kakaologin/common
Google: https://cloud.google.com/identity-platform/docs/web/google

result
1
image

Test Configuration:

  • Java: v11
  • LPVS Release: v1.1.0

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
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Basaeng and others added 2 commits October 6, 2023 19:29
Signed-off-by: jongmin Lee <[email protected]>
Co-authored-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: June Saehwan <[email protected]>
Signed-off-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: June Saehwan <[email protected]>
Co-authored-by: jongmin Lee <[email protected]>
Copy link
Member

@tiokim tiokim left a comment

Choose a reason for hiding this comment

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

PTAL

frontend/src/pages/History.jsx Show resolved Hide resolved
frontend/src/pages/Result.jsx Outdated Show resolved Hide resolved
@o-konoval
Copy link
Collaborator

I tried to check work of this PR.
I cloned this PR on my VM and follow steps for docker build and run-before filled data in application.properties.

There are PRs in DB:
mysql> select * from pull_requests;
+----+----------------------------+-------------+----------------------+-------------------------------------------------+-----------------------------------------+-----------------------------+-------------------+-------------------+------------+
| id | scan_date | user | repository_name | url | diff_url | status | pull_request_head | pull_request_base | sender |
+----+----------------------------+-------------+----------------------+-------------------------------------------------+-----------------------------------------+-----------------------------+-------------------+-------------------+------------+
| 1 | 2023-10-09 14:34:44.067000 | GitHub hook | userai-dev/dockerapp | userai-dev/dockerapp#35 | https://github.com/userai-dev/dockerapp | Scan completed | userai-dev | userai-dev | userai-dev |
| 2 | 2023-10-09 15:20:01.602000 | GitHub hook | userai-dev/dockerapp | userai-dev/dockerapp#36 | https://github.com/userai-dev/dockerapp | Error while posting results | userai-dev | userai-dev | userai-dev |
| 3 | 2023-10-09 15:21:30.574000 | GitHub hook | userai-dev/dockerapp | userai-dev/dockerapp#37 | https://github.com/userai-dev/dockerapp | Scan completed | userai-dev | userai-dev | userai-dev |
+----+----------------------------+-------------+----------------------+-------------------------------------------------+-----------------------------------------+-----------------------------+-------------------+-------------------+------------+
3 rows in set (0.00 sec)

But no information on FE:in My Pull Request&My Repo PR-however- PR was handled successfully:
lpvs-lpvs-1 | 2023-10-09 15:21:30.573 INFO 1 --- [ main] c.l.service.LPVSQueueProcessorService : PROCESS Webhook id = 3
lpvs-lpvs-1 | 2023-10-09 15:21:30.575 INFO 1 --- [ LPVS-ASYNC::2] com.lpvs.service.LPVSQueueService : GitHub Webhook processing...
lpvs-lpvs-1 | 2023-10-09 15:21:30.577 INFO 1 --- [ LPVS-ASYNC::2] com.lpvs.service.LPVSQueueService : com.lpvs.entity.LPVSQueue@510155fa

I filled fields by my Google account info-may be something missed -however I successfully authorized on localhost:7896.
I am sure that You do not have such problem- what may be wrong?

@tiokim
Copy link
Member

tiokim commented Oct 10, 2023

I tried to check work of this PR. I cloned this PR on my VM and follow steps for docker build and run-before filled data in application.properties.

There are PRs in DB: mysql> select * from pull_requests; +----+----------------------------+-------------+----------------------+-------------------------------------------------+-----------------------------------------+-----------------------------+-------------------+-------------------+------------+ | id | scan_date | user | repository_name | url | diff_url | status | pull_request_head | pull_request_base | sender | +----+----------------------------+-------------+----------------------+-------------------------------------------------+-----------------------------------------+-----------------------------+-------------------+-------------------+------------+ | 1 | 2023-10-09 14:34:44.067000 | GitHub hook | userai-dev/dockerapp | userai-dev/dockerapp#35 | https://github.com/userai-dev/dockerapp | Scan completed | userai-dev | userai-dev | userai-dev | | 2 | 2023-10-09 15:20:01.602000 | GitHub hook | userai-dev/dockerapp | userai-dev/dockerapp#36 | https://github.com/userai-dev/dockerapp | Error while posting results | userai-dev | userai-dev | userai-dev | | 3 | 2023-10-09 15:21:30.574000 | GitHub hook | userai-dev/dockerapp | userai-dev/dockerapp#37 | https://github.com/userai-dev/dockerapp | Scan completed | userai-dev | userai-dev | userai-dev | +----+----------------------------+-------------+----------------------+-------------------------------------------------+-----------------------------------------+-----------------------------+-------------------+-------------------+------------+ 3 rows in set (0.00 sec)

But no information on FE:in My Pull Request&My Repo PR-however- PR was handled successfully: lpvs-lpvs-1 | 2023-10-09 15:21:30.573 INFO 1 --- [ main] c.l.service.LPVSQueueProcessorService : PROCESS Webhook id = 3 lpvs-lpvs-1 | 2023-10-09 15:21:30.575 INFO 1 --- [ LPVS-ASYNC::2] com.lpvs.service.LPVSQueueService : GitHub Webhook processing... lpvs-lpvs-1 | 2023-10-09 15:21:30.577 INFO 1 --- [ LPVS-ASYNC::2] com.lpvs.service.LPVSQueueService : com.lpvs.entity.LPVSQueue@510155fa

I filled fields by my Google account info-may be something missed -however I successfully authorized on localhost:7896. I am sure that You do not have such problem- what may be wrong?

Have you set Github ID from the /user/setting page with your github account, userai-dev?

Copy link
Collaborator

@MoonkiHong MoonkiHong left a comment

Choose a reason for hiding this comment

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

Please take a look at my comment.

frontend/src/css/Result_style.css Show resolved Hide resolved
@o-konoval
Copy link
Collaborator

o-konoval commented Oct 10, 2023

Have you set Github ID from the /user/setting page with your github account, userai-dev?

Yes, I obtained GitHub ID and entered it in Profile during login on localhost:7896.
I re-check all again and unfortunately no changes.

Signed-off-by: June Saehwan <[email protected]>
Co-authored-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: jongmin Lee <[email protected]>
Copy link
Collaborator

@o-kopysov o-kopysov left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@m-rudyk m-rudyk left a comment

Choose a reason for hiding this comment

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

I have no objection, approved.

@tiokim
Copy link
Member

tiokim commented Oct 10, 2023

Yes, I obtained GitHub ID and entered it in Profile during login on localhost:7896. I re-check all again and unfortunately no changes.

Can you share your records of the member table too?

Copy link
Member

@tiokim tiokim left a comment

Choose a reason for hiding this comment

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

@kyudori Can you revert Home_style.css and Login_style.css files? There was no problem before, but it seems to have changed.

Signed-off-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: June Saehwan <[email protected]>
Co-authored-by: jongmin Lee <[email protected]>
@kyudori
Copy link
Contributor Author

kyudori commented Oct 10, 2023

@kyudori Can you revert Home_style.css and Login_style.css files? There was no problem before, but it seems to have changed.

Reverting Home_style.css and Login_style.css to previous commit.

Copy link
Member

@tiokim tiokim left a comment

Choose a reason for hiding this comment

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

LGTM

@tiokim tiokim merged commit 3ad808e into Samsung:main Oct 11, 2023
5 checks passed
@o-konoval
Copy link
Collaborator

o-konoval commented Oct 11, 2023

Yes, I obtained GitHub ID and entered it in Profile during login on localhost:7896. I re-check all again and unfortunately no changes.

Can you share your records of the member table too?

Thanks for supporting.
Yes, it looks like:
mysql> select * from member;

+----+------------------------------+--------+----------+----------+--------------+

| id | email | name | nickname | provider | organization |

+----+------------------------------+--------+----------+----------+--------------+

| 1 | [email protected] | Oleg K | NULL | google | NULL |

+----+------------------------------+--------+----------+----------+--------------+

1 row in set (0.00 sec)

@tiokim
Copy link
Member

tiokim commented Oct 11, 2023

+----+------------------------------+--------+----------+----------+--------------+

| id | email | name | nickname | provider | organization |

+----+------------------------------+--------+----------+----------+--------------+

| 1 | [email protected] | Oleg K | NULL | google | NULL |

+----+------------------------------+--------+----------+----------+--------------+

As you can see, the nickname and the organization are NULL. If you put your github id, userai-dev, to the nickname, you can see the appropriate web page.

@o-konoval
Copy link
Collaborator

Thanks a lot. Now it works- I was confused by GitHub ID value - I read that GitHub ID may be found by request to API- it is an unique number.

GitHub ID may be found in answer of request:
https://api.github.com/users/your_github_user_name
where instead of your_github_user_name you must use the desired GitHub username.

So if possible it would be great if instead GitHub ID on authorization page would be GitHub username or GitHub login- however may be it is my understanding of this term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants