19 # SPDX-FileCopyrightText: © 2023 SCANOSS.COM
21 # SPDX-License-Identifier: GPL-2.0-only
35 private $scanOssDesc =
"Enables detection of both declared and undeclared open source components. SCANOSS Toolkit tracks new software versions and components in real time.";
37 public function __construct() {
38 $this->Name =
"agent_scanoss";
39 $this->Title = _(
"SCANOSS Toolkit <img src=\"images/info_16.png\" data-toggle=\"tooltip\" title=\"".$this->scanOssDesc.
"\" class=\"info-bullet\"/>");
40 $this->AgentName =
"scanoss";
42 parent::__construct();
52 $renderer = $GLOBALS[
'container']->get(
'twig.environment');
53 return $renderer->load(
'scanoss.html.twig')->render($vars);
62 return CheckARS($uploadId, $this->AgentName,
"SCANOSS Snippet and License scan",
"scanoss_ars");
71 $dbManager = $GLOBALS[
'container']->get(
'db.manager');
72 $latestPkgAgent = $dbManager->getSingleRow(
"SELECT agent_enabled FROM agent WHERE agent_name=$1 ORDER BY agent_ts LIMIT 1",array(
'scanoss'));
73 if (isset($latestPkgAgent) && !$dbManager->booleanFromDb($latestPkgAgent[
'agent_enabled']))
77 menu_insert(
"Agents::" . $this->Title, 0, $this->Name);
UI plugin of scanoss Agent.
AgentHasResults($uploadId=0)
renderContent(&$vars)
Render HTML from template.
CheckARS($upload_pk, $AgentName, $AgentDesc, $AgentARSTableName)
Check the ARS table to see if an agent has successfully scanned an upload.