FOSSology  4.4.0
Open Source License Compliance by Open Source Software
fossdash-config.php File Reference

fossdash configuration functions. More...

Go to the source code of this file.

Functions

 FossdashConfigInit ($sysconfdir, &$SysConf)
 Initialize the fossdash configuration after bootstrap(). More...
 
 Create_fossdashconfig ()
 Create the fossdashconfig table. More...
 
 Populate_fossdashconfig ()
 Populate the fossdashconfig table with core variables.
 
 check_fossdash_url ($url)
 Check if the fossdash url is valid. More...
 
 check_cron_job_inteval ($cron_interval)
 Check if the cron job schedule interval is valid. More...
 
 check_fossology_instance_name ($instance_name)
 Check if the fossology instance name is valid. More...
 
 check_fossdash_cleaning ($cleaning_days)
 Check if cleaning_days is valid or not. More...
 
 check_username ($uname)
 Check if given uname is valid or not. More...
 
 check_password ($password)
 Check if given password is valid or not. More...
 
 check_fossdash_config ($config_str)
 Check if given config string does not contains any DB update or drop related commands. More...
 

Detailed Description

fossdash configuration functions.

Definition in file fossdash-config.php.

Function Documentation

◆ check_cron_job_inteval()

check_cron_job_inteval (   $cron_interval)

Check if the cron job schedule interval is valid.

Parameters
string$cron_intervalcron job interval
Returns
1: yes , 0: no

Definition at line 260 of file fossdash-config.php.

◆ check_fossdash_cleaning()

check_fossdash_cleaning (   $cleaning_days)

Check if cleaning_days is valid or not.

Parameters
string$cleaning_daysNumber of days after which successfully pushed metrics are cleaned up
Returns
1: yes , 0: no

Definition at line 283 of file fossdash-config.php.

◆ check_fossdash_config()

check_fossdash_config (   $config_str)

Check if given config string does not contains any DB update or drop related commands.

Parameters
string$config_strconfig for fossdash metrics
Returns
1: yes , 0: no

Definition at line 316 of file fossdash-config.php.

◆ check_fossdash_url()

check_fossdash_url (   $url)

Check if the fossdash url is valid.

Parameters
string$urlThe url which will be checked
Returns
1: the url is valid, 0: invalid

Definition at line 246 of file fossdash-config.php.

◆ check_fossology_instance_name()

check_fossology_instance_name (   $instance_name)

Check if the fossology instance name is valid.

Parameters
string$instance_namefossology instance name
Returns
1: yes , 0: no

Definition at line 272 of file fossdash-config.php.

◆ check_password()

check_password (   $password)

Check if given password is valid or not.

Parameters
string$unamepassword for influxDB
Returns
1: yes , 0: no

Definition at line 305 of file fossdash-config.php.

◆ check_username()

check_username (   $uname)

Check if given uname is valid or not.

Parameters
string$unameusername for influxDB
Returns
1: yes , 0: no

Definition at line 294 of file fossdash-config.php.

◆ Create_fossdashconfig()

Create_fossdashconfig ( )

Create the fossdashconfig table.

Returns
0 if table already exists. 1 if it was created

Definition at line 71 of file fossdash-config.php.

◆ FossdashConfigInit()

FossdashConfigInit (   $sysconfdir,
$SysConf 
)

Initialize the fossdash configuration after bootstrap().

This function also opens a database connection (global PG_CONN).

fossdash configuration variables are in below place:

  • Database fossdashconfig table
Parameters
string$sysconfdirPath to SYSCONFDIR
[out]array&$SysConfConfiguration variable array (updated by this function)

If the fossdashconfig table doesn't exist then create it. Write records for the core variables into fossdashconfig table.

Definition at line 30 of file fossdash-config.php.