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(api): Get Customise page data #2520

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Conversation

soham4abc
Copy link
Contributor

@soham4abc soham4abc commented Jul 4, 2023

Description

This PR introduces an endpoint to fetch data for the customize page from admin panel

THIS PR IS WIP and to be updated according to the requirements.

How to test

send a GET request to localhost/repo/api/v1/customise

Screenshots

Screenshot from 2023-07-04 20-50-06

closes #2519

@soham4abc soham4abc force-pushed the api/customise branch 3 times, most recently from fef250e to 54fa738 Compare July 4, 2023 15:45
@GMishx GMishx added needs code review needs test GSOC-23 Label to tag pull request which are part of the GSOC 2023 labels Jul 5, 2023
@github-actions github-actions bot added the has merge conflicts PR to be rebased label Jul 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

1 similar comment
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the has merge conflicts PR to be rebased label Jul 5, 2023
@soham4abc soham4abc force-pushed the api/customise branch 3 times, most recently from 0e69327 to 53167d2 Compare July 7, 2023 08:36
@soham4abc
Copy link
Contributor Author

image
Updated response for /customise endpoint.

Please do have a look @GMishx

@soham4abc
Copy link
Contributor Author

This PR also updates the Database schema to update description of vartypes in sysconfig table
@GMishx

src/www/ui/admin-config.php Outdated Show resolved Hide resolved
src/www/ui/api/Controllers/CustomiseController.php Outdated Show resolved Hide resolved
src/www/ui/api/Controllers/CustomiseController.php Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
src/www/ui/core-schema.dat Outdated Show resolved Hide resolved
@github-actions
Copy link

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

@soham4abc soham4abc force-pushed the api/customise branch 2 times, most recently from 70c5bd9 to b498603 Compare July 12, 2023 09:55
@github-actions github-actions bot removed the has merge conflicts PR to be rebased label Jul 12, 2023
@soham4abc soham4abc requested a review from GMishx July 12, 2023 09:56
@soham4abc soham4abc force-pushed the api/customise branch 3 times, most recently from 5609548 to 5def5e9 Compare July 12, 2023 12:50
@soham4abc
Copy link
Contributor Author

PR updated as per meeting discussions on 12/07/2023

@GMishx Please do have a look

src/lib/php/Dao/SysConfigDao.php Outdated Show resolved Hide resolved
src/lib/php/Dao/SysConfigDao.php Show resolved Hide resolved
src/lib/php/Dao/SysConfigDao.php Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
@soham4abc
Copy link
Contributor Author

Made the requested changes. Please do have a look @GMishx
Thank you!

@soham4abc soham4abc requested a review from GMishx July 31, 2023 08:07
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Changes looks good.

@GMishx GMishx merged commit 446ed09 into fossology:master Aug 8, 2023
14 checks passed
GMishx added a commit to siemens/fossology that referenced this pull request Aug 11, 2023
imishchuk-carbon added a commit to imishchuk-carbon/fossology that referenced this pull request Sep 27, 2023
* fix(clixml.php): Fixed the issue of PhP 8 Warning

Signed-off-by: srideep-banerjee <banerjee.srideep@gmail.com>

* fix(eyeButtonForPasswords): removed external css usage

* docs(README.md): adding more details about `docker-compose` cmd

Signed-off-by: Kamal Nayan <95926324+legendarykamal@users.noreply.github.com>

code refactoring

* fix(conf): replace two single quotes to one in escaped string

Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>

* fix(warnings): fix unified report warnings

Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>

* chore(deps): bump slim/psr7 from 1.4 to 1.4.1 in /src

Bumps [slim/psr7](https://github.com/slimphp/Slim-Psr7) from 1.4 to 1.4.1.
- [Release notes](https://github.com/slimphp/Slim-Psr7/releases)
- [Commits](slimphp/Slim-Psr7@1.4...1.4.1)

---
updated-dependencies:
- dependency-name: slim/psr7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(composer.json.in): update slim/psr7 in .in file

Update the dependency in composer.json.in file as well.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* fix(bulkReuse): consider folder level and package level bulk

Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>

* chore(css): change look for eye button

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* fix(user-add.php): Fixed email can be blank but required. The empty email checks and modified other email checks to function with an emtpy email field

This fixes issue fossology#2391

* fix(user-edit.php): Fixed editing emails allows for duplicate emails for multiple users. Added a check to see if the new email is unique or not

This fixes fossology#2397

* feat(delete-job-endpoint): Added a delete job endpoint to the Fossology API

It works based on Job ID and Job Queue ID. It also deletes Job Queues that depend ond the Job Queue to be deleted
This fixes fossology#1787

* chore(changlog): add changelog for 4.3.0-rc2

Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>

* fix(cd): fix release package building

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* fix(scanoss): check json-c version for buster

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(thirdpartyLicenses): update third notices

Update thrid party notices, notices and notices.spdx file.

Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>
Acked-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(changelog): add changelog for release 4.3.0

Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>

* feat(api): get main licenses assigned on an upload

Signed-off-by: dushimsam <dushsam@gmail.com>

* refactor(copyright): Refactored some redundant code. Resolved declutter turning text to lowercase. Renamed some variables to be more informative.

* feat(api): add pagination to license browser

* feat(api): openapi.yaml exposed through api

* feat(api): get the contents of the file

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): content negotiation on /openapi

Add content negotiation to generate JSON/YAML response on `/openapi`
endpoint.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): set the clearing decision for a particular item

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): add the new main license for the upload

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Remove a particular main license from an upload

* feat(scanner): support github in scanner

* fix(automation): update copyright

Signed-off-by: Gaurav Mishra <gmishx@gmail.com>

* feat(api): copyright info for file

* feat(api): delete copyright

* feat(api): update file copyright api added

* fix(api): fix linter issues

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(scanner): generate spdx report

1. Modularize code.
2. Generate SPDX reports for repo scans.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): handle three filters to get prev & next item

* feat(api): Get list of bulk-history API

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get clearing-history data API

* feat(api): REST API to get keywords and hightlight-entries from content

Signed-off-by: dushimsam <dushsam@gmail.com>

* chore(api): update api version

Update REST API version patch number to indicate changes done during
GSoC 2023. Future version updates will also consist of changes done over a
week.

At the same time, fix documentation issue denoted in fossology#2527

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): restore deleted copyrights

* feat(api): Get the clearing-progress info for an upload.

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): get licenses histogram

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): API to return total number of copyrights for a file

* feat(api): get all agents for the upload

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Update upload-summary API for additional info

Signed-off-by: dushimsam <dushsam@gmail.com>

* fix(clixml): fix deb package name

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): get the license tree-view of the upload and item

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get all licenses-admin acknowlegments

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): get edited licenses list

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): File info API implemented

* feat(api): get list of license decisions for an item

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get licenses reuse summary API

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(CycloneDX): Add new agent cyclonedx

* feat(api): get a list of scanned licenses for an upload

Signed-off-by: dushimsam <dushsam@gmail.com>

* chore(api): update version 20230728

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): conf info for upload

* feat(api): get all agents revisions

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Add, Edit & toggle admin license acknowledgement

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Add, edit & delete license decision

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get Customise page data

* refactor(browse): use join to fetch data from two tables

refactor query from content_move in folderDao

Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>

* chore(api): update API version 20230811

 fossology#2506
 fossology#2505
 fossology#2520
 fossology#2509
 fossology#2516

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): REST API to schedule the bulk-scan

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): get-all standard comments

Signed-off-by: dushimsam <dushsam@gmail.com>

* chore(pythondeps): preserve proxy env with su

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* fix(delagent): Use bcrypt to check password

Use `crypt()` from libcrypt to check bcrypt based new passwords.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* chore(UploadTreeProxy): optimize license file query

Replace the use of JOINs with `license_ref` and `license_candidate` by
getting license ID of 'No_license_found' and 'Void' licenses and filter
the IDs directly.

This results in removal of following join:
```
->  Nested Loop Left Join  (cost=0.85..5.82 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=3908)
      Filter: ((lr.rf_shortname <> ALL ('{No_license_found,Void}'::text[])) OR (lr.rf_pk IS NULL))
      Rows Removed by Filter: 1
      ->  Index Only Scan using lf_pfile_agent_rf_lf_idx on license_file lf  (cost=0.57..3.31 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=3908)
            Index Cond: (pfile_fk = ut.pfile_fk)
            Filter: (agent_fk = ANY ('{1897,1900}'::integer[]))
            Rows Removed by Filter: 19
            Heap Fetches: 35
      ->  Index Scan using rf_pkpk on license_ref lr  (cost=0.28..2.50 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=5711)
            Index Cond: (rf_pk = lf.rf_fk)
```

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(SETUP-V2): Support Multiple Versions (V1 & V2)

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get the summary statistics for all Jobs

Signed-off-by: dushimsam <dushsam@gmail.com>

* fix(cd): Fix release workflow for version

Fix following points for the release workflow:
1. Fetch all commits before compiling.
2. Change release upload
  a. Repository actions/upload-release-asset is now archived.
  b. Use alexellis/upload-assets instead.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* chore(gitpod): update gitpod scripts

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): Add, Edit, toggle standard-license comment

Signed-off-by: dushimsam <dushsam@gmail.com>

* doc(php): fix parameter docs

Signed-off-by: Marc-Etienne Vargenau <marc-etienne.vargenau@nokia.com>

* doc(php): fix parameter docs

Signed-off-by: Marc-Etienne Vargenau <marc-etienne.vargenau@nokia.com>

* feat(ununpack): support for Zstandard

Add support to unpack files compressed with Zstandard (ZST), LZ4, and
LZMA. See https://facebook.github.io/zstd/

Use `zstd` to extract `lz4` and `lzma` files as well.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): verify license as new or variant

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Merge a license into an existing one

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get the database contents for the overview of Foss. operations

* feat(api): Get disk space usage overview

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get PHP-Info for the Dasbhoard Overview

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get all server jobs for Admin Dashboard

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Suggest license from reference text

* perf(api): refactor /license/suggest for optimization

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>

* feat(api): Get database metrics overview for dashboard

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get active queries for Dashboard overview

Signed-off-by: dushimsam <dushsam@gmail.com>

* feat(api): Get scheduler options for a given operation

Signed-off-by: dushimsam <dushsam@gmail.com>

---------

Signed-off-by: srideep-banerjee <banerjee.srideep@gmail.com>
Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Signed-off-by: dushimsam <dushsam@gmail.com>
Signed-off-by: Gaurav Mishra <gmishx@gmail.com>
Signed-off-by: Marc-Etienne Vargenau <marc-etienne.vargenau@nokia.com>
Co-authored-by: srideep-banerjee <banerjee.srideep@gmail.com>
Co-authored-by: Simran Nigam <nigamsimran14@gmail.com>
Co-authored-by: Kamal Nayan <95926324+legendarykamal@users.noreply.github.com>
Co-authored-by: Shaheem Azmal M MD <shaheem.azmal@siemens.com>
Co-authored-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hero2323 <abdelrahmanjamal5565@gmail.com>
Co-authored-by: Shaheem Azmal M MD <shaheem.azmal@gmail.com>
Co-authored-by: dushimsam <dushsam@gmail.com>
Co-authored-by: mayank-pathakk <mayank234pathak@gmail.com>
Co-authored-by: soham4abc <sohambanerjee4abc@hotmail.com>
Co-authored-by: Gaurav Mishra <gmishx@gmail.com>
Co-authored-by: Anupam <ag.4ums@gmail.com>
Co-authored-by: Sushant Kumar <sushantmishra02102002@gmail.com>
Co-authored-by: Marc-Etienne Vargenau <marc-etienne.vargenau@nokia.com>
Ibrahim-Muhammad13 pushed a commit to Ibrahim-Muhammad13/fossology that referenced this pull request Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSOC-23 Label to tag pull request which are part of the GSOC 2023 ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customize
2 participants