Skip to content

Conversation

maxhbr
Copy link
Member

@maxhbr maxhbr commented Jul 26, 2017

NOTE: this is work in progress and this PR should be here as place to aggregate discussion related to the feature

corresponding issue: #669
related PR: maxhbr#2

@maxhbr maxhbr added the WIP label Jul 26, 2017
@maxhbr maxhbr force-pushed the dev/addSPDX2ImportAgent_dist branch 2 times, most recently from fcf77d7 to 5fe3c4d Compare July 27, 2017 08:57
@maxhbr maxhbr self-assigned this Jul 27, 2017
@maxhbr maxhbr changed the title WIP: add SPDX2-Import agent WIP: add ReportImport agent Aug 7, 2017
@maxhbr maxhbr changed the title WIP: add ReportImport agent WIP: feat(reportImport): add ReportImport agent Aug 7, 2017
@maxhbr maxhbr force-pushed the dev/addSPDX2ImportAgent_dist branch 3 times, most recently from bff47f4 to a80526f Compare August 10, 2017 16:56
@maxhbr maxhbr force-pushed the dev/addSPDX2ImportAgent_dist branch from a80526f to 1ad23bd Compare August 11, 2017 14:22
@maxhbr
Copy link
Member Author

maxhbr commented Aug 11, 2017

Currently the UI look like:
2017-08-11_16 34 09

@maxhbr maxhbr force-pushed the dev/addSPDX2ImportAgent_dist branch 3 times, most recently from 1cdde79 to d7b50ca Compare August 17, 2017 19:30
@maxhbr
Copy link
Member Author

maxhbr commented Aug 17, 2017

NOTE: This PR currently also includes the changes from #889.

@shaheemazmalmmd
Copy link
Member

Can you please add this new agent to debian packages ??

@maxhbr
Copy link
Member Author

maxhbr commented Aug 22, 2017

@shaheemazmalmmd: I have made the corresponding changes (they are untested)

@shaheemazmalmmd
Copy link
Member

@maxhbr : There is a error while building a package.
dpkg-gencontrol: error: illegal package name 'fossology-reportImport': character 'I' not allowed dh_gencontrol: dpkg-gencontrol -pfossology-reportImport -ldebian/changelog -Tdebian/fossology-reportImport.substvars -Pdebian/fossology-reportImport returned exit code 255"

Can you please have a look into this

@maxhbr maxhbr force-pushed the dev/addSPDX2ImportAgent_dist branch from d93c29f to f134af2 Compare August 29, 2017 09:00
@maxhbr
Copy link
Member Author

maxhbr commented Aug 29, 2017

@shaheemazmalmmd the "illegal char"-problem should be fixed

@maxhbr
Copy link
Member Author

maxhbr commented Sep 4, 2017

@shaheemazmalmmd The code here has currently a bug which prevents the frontend arguments from beeing passed to the backend.

@maxhbr
Copy link
Member Author

maxhbr commented Sep 4, 2017

@shaheemazmalmmd @mcjaeger this branch is fixed again and should work

@mcjaeger mcjaeger self-assigned this Sep 21, 2017
@mcjaeger mcjaeger removed the WIP label Sep 21, 2017
@maxhbr maxhbr force-pushed the dev/addSPDX2ImportAgent_dist branch from fa31891 to da592c0 Compare September 21, 2017 14:05
maxhbr added a commit to maxhbr/fossology that referenced this pull request Sep 25, 2017
@mcjaeger
Copy link
Member

mcjaeger commented Oct 5, 2017

Hi, I think the point is true (given the links is displayed) let's skip the highlight, as this is not supported by the SPDX import format. regarding the radio buttono selection, it should be selected if there is a import and this import was set to already set decisions, this is the point?

regarding the error message issue with the missing copyright_ars table: So is this a serious issue in the way that the user does not see something in the UI or is it that the application throws an error message?

if ($oldRow['rf_pk'] == -1)
{
$oldRow['rf_pk'] = $licenseDao->insertUploadLicense($shortname, $rfText);
$oldRow['rf_pk'] = $licenseDao->insertUploadLicense($shortname, $rfText, $_SESSION['GroupId']);
Copy link
Member

Choose a reason for hiding this comment

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

You can use Auth::getGroupId for group id. Also you can use already initialized GroupId from Handle function as perm for saveInput.

self::PERMISSION => Auth::PERM_WRITE,
self::REQUIRES_LOGIN => TRUE
));
$this->userDao = $GLOBALS['container']->get('dao.user');
Copy link
Member

Choose a reason for hiding this comment

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

userDao is not used anywhere. you can remove this

@@ -0,0 +1,91 @@
<?php
/***********************************************************
* Copyright (C) 2015, Siemens AG
Copy link
Member

Choose a reason for hiding this comment

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

Please change the Year

@@ -0,0 +1,29 @@
# Copyright Siemens AG 2014
Copy link
Member

Choose a reason for hiding this comment

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

Please change the Year

Copy link
Member Author

Choose a reason for hiding this comment

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

This file was not changed enough to be worth updating the copyright year. It is just copied from one of the other agents.

@@ -0,0 +1,10 @@
<?php
/*
Copyright Siemens AG 2015
Copy link
Member

Choose a reason for hiding this comment

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

Please change the Year

Copy link
Member Author

Choose a reason for hiding this comment

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

This file is just a copy and thus should keep its header without changes

* @param $fileid
* @return array
*/
public function getHashesMap($fileid)
Copy link
Member

Choose a reason for hiding this comment

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

To return a empty array why is it required to pass $fileid ?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is specified in the interface ImportSource

echo "\nDEBUG: \$addCopyrightInformation is: " .$this->var_dump($this->addCopyrightInformation);
echo "\nDEBUG: \$concludeLicenseDecisionType is: " .$this->var_dump($this->concludeLicenseDecisionType);
echo "\n";
}
Copy link
Member

Choose a reason for hiding this comment

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

Comment or remove the DEBUG code. which always gets printed in agent log.

}
foreach ($removeLicenseIds as $licenseId)
{
echo "remove decision $licenseId from " . $pfile['uploadtree_pk'] . "\n";
Copy link
Member

Choose a reason for hiding this comment

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

Please remove if its used to debug.

@shaheemazmalmmd
Copy link
Member

@maxhbr : Seems like there is some issue with existing database on this branch.

To reproduce

-> install master branch upload 2 components to fossology and do some clearing.
-> Now install report import branch upload a component. (In my case i have uploaded zlib).

reportimport-1

-> Click on upload and import.
-> It schedules report import for previously uploaded component. Not the one which i have selected.

reportimport2

else
{

$jobMetaData = $this->runImport($uploadId, $_FILES['report'], $request);
Copy link
Member

Choose a reason for hiding this comment

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

Here the $uploadId will be always the value of first upload deom the hidden field. Adding this line $uploadId = intval(GetArrayVal("uploadselect", $_POST)); in else case will give the value of selected upload.

maxhbr and others added 21 commits October 12, 2017 18:29
- implement agent and ui
- adopt license-explorer and others
- allow to download the report which was uploaded by the user
- add new dependency (EasyRdf) to composer
* they get saved in the DB and also exported
* they are __not__ yet displayed by the copyright ui
@maxhbr maxhbr force-pushed the dev/addSPDX2ImportAgent_dist branch from 291a2b3 to 05a3061 Compare October 12, 2017 17:33
@maxhbr
Copy link
Member Author

maxhbr commented Oct 12, 2017

@shaheemazmalmmd The mentioned bug is fixed and the value of "uploadselect" is used. But there is still the bug that one is redirected to the job-view of the wrong upload (where no job was scheduled).

@mcjaeger mcjaeger merged commit 9e72e16 into fossology:master Oct 13, 2017
@mcjaeger
Copy link
Member

just for the files: I did a retest this morning using the vagrant deployment with the latest commit, everything looks fine.

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.

3 participants