-
Notifications
You must be signed in to change notification settings - Fork 484
feat(reportImport): add ReportImport agent #882
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(reportImport): add ReportImport agent #882
Conversation
fcf77d7
to
5fe3c4d
Compare
bff47f4
to
a80526f
Compare
a80526f
to
1ad23bd
Compare
1cdde79
to
d7b50ca
Compare
NOTE: This PR currently also includes the changes from #889. |
Can you please add this new agent to debian packages ?? |
@shaheemazmalmmd: I have made the corresponding changes (they are untested) |
@maxhbr : There is a error while building a package. Can you please have a look into this |
d93c29f
to
f134af2
Compare
@shaheemazmalmmd the "illegal char"-problem should be fixed |
@shaheemazmalmmd The code here has currently a bug which prevents the frontend arguments from beeing passed to the backend. |
@shaheemazmalmmd @mcjaeger this branch is fixed again and should work |
fa31891
to
da592c0
Compare
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? |
src/www/ui/page/AdviceLicense.php
Outdated
if ($oldRow['rf_pk'] == -1) | ||
{ | ||
$oldRow['rf_pk'] = $licenseDao->insertUploadLicense($shortname, $rfText); | ||
$oldRow['rf_pk'] = $licenseDao->insertUploadLicense($shortname, $rfText, $_SESSION['GroupId']); |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the Year
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the Year
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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"; | ||
} |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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.
@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. -> Click on upload and import. |
else | ||
{ | ||
|
||
$jobMetaData = $this->runImport($uploadId, $_FILES['report'], $request); |
There was a problem hiding this comment.
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.
- 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
291a2b3
to
05a3061
Compare
@shaheemazmalmmd The mentioned bug is fixed and the value of |
just for the files: I did a retest this morning using the vagrant deployment with the latest commit, everything looks fine. |
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