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(reports): Add new CSV report type #2133

Merged
merged 6 commits into from Jan 7, 2022
Merged

feat(reports): Add new CSV report type #2133

merged 6 commits into from Jan 7, 2022

Conversation

NicolasToussaint
Copy link
Member

Description

Add a new CSV Report type.
The following fields are exported:

  • FileName
  • SPDXID
  • LicenseConcluded
  • LicenseComment
  • LicenseInfoInFile
  • FileCopyrightText

Changes

  • A new report entry was added to the drop-down action list
    image
  • A new SpdxTwoCommaSeparatedValuesAgentPlugin was introduced, see src/spdx2/ui/SpdxTwoCommaSeparatedValuesAgentPlugin.php

How to test

  1. Trigger new scan
  2. Browse to new upload, open Action dorp down action list, choose Export CSV Report
FileName,SPDXID,LicenseConcluded,LicenseComment,LicenseInfoInFile,FileCopyrightText
PackageName: clementine-player-master.tar.gz - PackageFileName: clementine-player-master.tar.gz
clementine-player-master.tar.gz/clementine-player-master.tar/3rdparty/libmygpo-qt/qjsonwrapper/Json.cpp,SPDXRef-item1125366,"MIT",,"MIT","Copyright 2014, Uwe L. Korn <uwelk@xhochy.com>"                                     
clementine-player-master.tar.gz/clementine-player-master.tar/3rdparty/libmygpo-qt/qjsonwrapper/Json.h,SPDXRef-item1125365,"MIT",,"MIT","Copyright 2014, Uwe L. Korn <uwelk@xhochy.com>"                                     
clementine-player-master.tar.gz/clementine-player-master.tar/3rdparty/libprojectm/ConfigFile.h,SPDXRef-item1125700,"MIT",,"MIT","Copyright (c) 2004 Richard J. Wagner"                                     
clementine-player-master.tar.gz/clementine-player-master.tar/3rdparty/libprojectm/glew.c,SPDXRef-item1125708,"BSD-3-Clause",,"BSD-3-Clause","Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>;Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>;Copyright (C) 2002, Lev Povalahev All rights reserved."                                     

image

@GMishx GMishx removed their assignment Jan 3, 2022
Signed-off-by: Toussaint Nicolas <nicolas1.toussaint@orange.com>
Signed-off-by: Toussaint Nicolas <nicolas1.toussaint@orange.com>
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. Needs test.

src/www/ui/async/AjaxShowJobs.php Outdated Show resolved Hide resolved
Co-authored-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Signed-off-by: Toussaint Nicolas <nicolas1.toussaint@orange.com>
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.

Tested, working as expected.

@GMishx GMishx added ready and removed needs test labels Jan 5, 2022
@GMishx GMishx merged commit b046579 into master Jan 7, 2022
@GMishx GMishx deleted the contrib/spdx2csv branch January 7, 2022 08:35
@pastel001
Copy link

how can i generate a spdx2csv format report by rest api?
rest api response is reportFormat must be from [dep5,spdx2,spdx2tv,readmeoss,unifiedreport,clixml]

@GMishx
Copy link
Member

GMishx commented Jun 23, 2022

how can i generate a spdx2csv format report by rest api? rest api response is reportFormat must be from [dep5,spdx2,spdx2tv,readmeoss,unifiedreport,clixml]

Looks like we missed adding it to the API. Can you please create an issue so we add the report format to REST API as well?

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

5 participants