Variables¶
From the site administration (/admin) one can modify several default variables that will impact both the look and functionment of the platform.
Colors¶
Under “Custom_Config” the “Colors” section allows to modify existing colors or to add new ones. These colors can then be associated to a period or a KPI to modify colors in plots. The model has a descriptive label and a color in hexadecimal form, like “#FFFFFF” (# is compulsory).
Cell Classes Values¶
Still under “Custom_Config”, in the “Cell Classes Values” section it is possible to define colors, fonts, dimensions, and alignment which can be associated to a cell or row in the tabular report. In this case colors are defined without the initial “#” character.
Custom Configs¶
Under “Custom_Config->Custom Configs” one can modify system variables:
- GET_ALL_MONTHS If the value is 1, select all (available) months for the years included in LAST_YEAR_PERIOD. If the value is 0, only select the last imported month and the same month in the previous years. Default is 0.
- LAST_YEAR_PERIOD For how many years to import data. Default is 3.
- HIDE_FROM_WHO_LEVELS Up to which level to consider the “from who hierarchy”. Possible values are: 0 - hides everything, 1 - only show areas, 2 - areas and countries, 3 - areas, countries, and business units, 4 - show all levels. Default is 4.
- HIDE_CURRENCY If value is 1, hides the currency choice in the right menu and in the choice of the filters while generating a dashboard. Default is 0.
- SHOW_SINGLE_CUMULATE_PERIOD If 1, show the choice of cumulating values for year; if 0, hides it. Default is 1.
- DEFAULT_TO_FIXED_JS How many decimal digits to use in interactive graphs if not explicitly set.
- ENCRIPTION_TIME Validity time of the cryptography token. Default is 20ms.
- HIDE_HEATMAP If 1 hides the button of the table heatmap. Default is 0
- TMP_DIR Path of the directory, which must be accessible both for reading and writing, used to store temporary data. Default è /tmp
- IMPORT_VERSION_ENABLED If 1, file versioning is enabled. Default is 0.
- GRAPH_FILTERS If 1, show filters above plots. If 0, hide filters. Default is 0.
- WARNING_ON_CURRENCY_IMPORT If 1, gives a warning if there are more currencies in a single import file.
- CSV_SEPARATOR Separator to use in the CSV export. Default is “,” (comma).
- ROOT_LEVEL_NAME What to show as root level in plots.
- MAP_DATA A json that shows how to color the map that is poened as default dashboard. The color is defined in palette.base_color
- SITE_READONLY_MODE_ENABLED If 1, returns the only roles defined as “is_readonly_role”; therefore it is not possible to modify the database. Default is 0.
- REFRESH_CACHE_VALIDITY_SECONDS Validity period of the key for the cache refresh (in seconds). Default is 1200.
- REFRESH_CACHE_KEY Public key used to refresh the cache.
- REFRESH_CACHE_CRYPTO_KEY Private key used to refresh the cache.
- NO_AUTHENTICATION_REQUIRED_ZONE_IP_LIST Ip for which no authentication is required, e.g. localhost [‘127.0.0.1’]
- CURRENT_SERVER_PORT Current port, e.g. 80
- LIMIT_USERS_IGNORE_ADMIN If 1, the user limit does not include admin.
- DISABLE_USER_REGISTRATION_LIMIT If 1, disable check onm inscription number.
- LOGGER_LEVEL_ACTIVE Log level, from 1 to 5.
- AUTH_FORCE_USER_PASSWORD_RESET If 1, forces password reset.
- MAX_ADMIN_USER_REGISTRATIONS Maximum number of admin users. Default is 10.
- MAX_USER_REGISTRATIONS Maximum number of users.Default is 50.
- RELOAD_CACHE_ON_UPLOAD If 1, automatically refresh cache after an upload.
- DEBUG_QUERY If 1, ignore cache (all data are taken from the database). Default is 0.
- OFFLINE If 1, the site is shown as offline. Only the given message is shown.
- MAX_WAY_1_1_ROWS Maximum number of rows of an import file. If a file goes over the limit, rows in excess are discarded, but no warning is given.
- CONFIRMING If 1, file is being confirmed.The text shows <period>,<from_who_id>. In this caseit is not possible to import other files. Set to 0 to go on with the import.
- UPLOADING If 1, a file is being imported.
- DWH_EXCEL_FILE_GENERATOR_LOG Log of the datawarehouse (dwh).
- HIDE_DATA_AVAL If 1, hide data availability in tables. Default is 1.
- HIDE_FULL_DATA If 1, hide full data in tables. Default is 1.
- HIDE_ENVELOPE If 1, hide envelope in tables. Default is 1.
- SHOW_MANUAL If 0, then hide, if 1 hide videos, if 2 hide manual, if 3 hide all, if 4 show all.
- DELETE_IMPORT_HISTORY_DATA_ON_CONFIRM If 1, after every import confirm that all the history import data rows will be deleted.
- UPDATE_AGREGG_KPI_VALUES_CREATE_COLUMNS If 1, an update is running.
- GDRP_X Show GDPR text.
- FORMAT_DATE Format date for day drill down level. Default is %d-%m-%Y
- BAR_TEXT_DEFAULT If none, hide text on plots. If block, show them.
- FROM_WHO_LEVELS_DATA_AVAL From who level which is shown in data availability: 1- all, [1,2] all e area, Default = [4]
- GET_CELL_LABEL If 1, take for the excel export the cell display value; otherwise, take cell_value.
- IMPORT_DATA_TYPE_ENABLED If 1, Enable the import data type filter.
- DEFAULT_PERIOD_FREQUENCY_TYPE_ID Set the default value for the Period Frequency Type used by Dashboard filter: 1 Month, 2 Quarter, 3 Semester, 4 Year. If the selected value is disabled or the value is not set, than the first enabled frequency type will be used.
- HIDE_EMPTY_GRAPHS Hide graphs and table if empty. Default 0 (false)
- FULL_AXIS_LABELS Show full label for axis
- IMPORT_VERSION_ENABLED show a filter to choose the right version of data and filters.
- IS_FAVOURITE_ENABLED Show the “Add to favourites” button
- DISABLED_PREVIEW 1 if the preview of graphs in dashboard generator is disabled, 0 if is enabled
- PERIODS_TO_CLOSE_DELTA default is 0. Indicates the number of days before period end date after the period is closed. Remember to set the cronjob close_old_periods. Users can’t import on that period after the deadline
Django Settings¶
Modifying the file “.env.agregg” it is possible to change the default colors of plots and tables and to set all the labels of the site.
Folder where the software is installed:
AGREGG_DIR = 'H:/Dev/agregg/'
In the following path put an image “<images_name>_logo_white.png”, which will be used as a preview image, and an icon “favicon_<images_name>.ico”, which will be used as icon. Create the Power Point template “template-slide_<images_name>.pptx” in the folder “export_files”:
IMAGES_NAME = 'img_logo'
# path
/static/images/favicon_<images_name>.ico
/static/images/<images_name>_logo_white.png
Create files “style_<images_name>.scss” and “agregg/variables_<images_name>.scss” in the folder “static/css” where one imports:
@import 'agregg/variables_<images_name>';
@import 'style';
To change the name of the site in the header:
SITE_NAME = 'AgrEGG'
To modify colors redefine the “COLORS” array
COLORS = ["#10a1cd","#68c67a", "#523972", "#273238", "#0082ae", "#075871","#726eac"]
To modify colors of tables, of the negative and positive segments of waterfall plots, and the standard gray color used by some plots or some drill down types, modify PALETTE:
PALETTE = {"base_color":"#075871","positive":"#556B2F", "negative":"#DC143C", "gray": "#666666"}
To modify names of the labels in the business unit hierarchy and the label of the left menu modify the following elements:
BU_NAME = 'Branch'
BUS_NAME = 'Branches'
COUNTRY_NAME = 'Company'
COUNTRIES_NAME = 'Companies'
AREA_NAME = 'Country'
AREAS_NAME = 'Countries'
RIGHT_MENU_NAME = 'Companies'
If one wants to redefine the “base.html” from which the site inherits its template, create a new file and change the variable “BASE_TEMPLATE”
BASE_TEMPLATE = 'base.html'
To set e-mail options modify these entries in settings.py:
EMAIL_USE_SSL = True
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtps.aruba.it'
EMAIL_HOST_PASSWORD = '' #my password
EMAIL_HOST_USER = 'noreply@agregg.cloud' #my username
EMAIL_PORT = 465
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
To enable the GDPR request modify the relative entry in the file “settings.py”:
ENABLED_GDPR = True
To enable the two file step verification on manual import in the file “settings.py”:
ENABLED_FILE_VALIDATION_STEPS = True
Other settings are:
AGREGG_RSA_TIME_ENCRYPTION_ENABILITY = 2000 REQUEST_PROCESS_BASE_URL : Url of the cloud converter to convert from svg to emf. Default is http://cloudconverter.agregg.cloud/ IMPORT_DATA_TYPE_DEFAULT Set the default value for import data type filter. 1 means Year to date, 2 Single period. If not set 1 will be used. PERIOD_EXCHANGE If 1, the currency exchange period is the same of the selected period period; if 0, uses the last available exchange rate. FORCE_CURRENCY_CHECK : If True in the import che currency must be the same of the By whom Hierarchy currency SHOW_TOTAL_AT_START_IN_TABLES : If True the total in the tables will be on first row. ENABLE_KPI_FILTER_ITEM_ORDER : If True after the creation of a filter item all the item will be reordered by name. PUBLIC_URL : Website url, for example: https://agregg.cloud/ . The default is http://localhost:8000/