Skip to content
Snippets Groups Projects
Unverified Commit c7106639 authored by Michal Procházka's avatar Michal Procházka Committed by GitHub
Browse files

Merge pull request #9 from BaranekD/legend

Added legends to charts, header is taken from config
parents 9c562fc6 6e1f701a
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
## [Unreleased]
[Added]
- Added legends to charts
- Instance name in header is taken from config file
[Fixed]
- set default value of lastDays and tab in index.php: no error logs when user open statistics for the first time
......
......@@ -104,7 +104,27 @@
"cs": "Služba"
},
"templates/statistics_header": {
"en": "SimpleSAMLphp Statistics",
"cs": "SimpleSAMLphp Statistiky"
"en": "AAI Statistics",
"cs": "AAI Statistiky"
},
"templates/identityProviders_legend": {
"en": "The chart and the table show number of logins from each identity provider in selected time range.",
"cs": "Graf s tabulkou ukazují počet přihlášení od každého poskytovatele identity ve zvoleném časovém rozmezí."
},
"templates/serviceProviders_legend": {
"en": "The chart and the table show number of logins to each service provider in selected time range. Only first access to the service is counted, following single sign-on accesses are not counted, because they are not going through the Proxy.",
"cs": "Graf s tabulkou ukazují přihlášení ke každé službě ve zvoleném časovém rozmezí. Počítá se pouze první přístup ke službě, protože další již nejdou přes Proxy."
},
"templates/summary_logins_info": {
"en": "The chart shows overall number of logins from identity providers for each day.",
"cs": "Graf zobrazuje počet přihlášení za každý den."
},
"templates/summary_idps_info": {
"en": "The chart shows number of logins from each identity provider in selected time range.",
"cs": "Graf zobrazuje počet přihlášení od každého poskytovatele identity ve zvoleném časovém rozmezí."
},
"templates/summary_sps_info": {
"en": "The chart shows number of logins to each service provider in selected time range. Only first access to the service is counted, following single sign-on accesses are not counted, because they are not going through the Proxy.",
"cs": "Graf zobrazuje počet přihlášení ke každé službě ve zvoleném časovém rozmezí. Počítá se pouze první přístup ke službě, následující přístupy neprocházejí přes Proxy."
}
}
......@@ -69,6 +69,9 @@ $lastDays = $this->data['lastDays'];
</div>
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_id_providers}'); ?></h2>
<div class="legend">
<div><?php echo $this->t('{proxystatistics:Proxystatistics:templates/identityProviders_legend}'); ?></div>
</div>
<div class="row">
<div class="col-md-8">
<div id="idpsChartDetail" ></div>
......
......@@ -69,6 +69,9 @@ $lastDays = $this->data['lastDays'];
</div>
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_service_providers}'); ?></h2>
<div class="legend">
<div><?php echo $this->t('{proxystatistics:Proxystatistics:templates/serviceProviders_legend}'); ?></div>
</div>
<div class="row">
<div class="col-md-8">
<div id="spsChartDetail" ></div>
......
......@@ -4,7 +4,17 @@ include dirname(__DIR__)."/lib/Auth/Process/DatabaseCommand.php";
* @author Pavel Vyskočil <vyskocilpavel@muni.cz>
* @author Dominik Baránek <0Baranek.dominik0@gmail.com>
*/
$this->data['header'] = $this->t('{proxystatistics:Proxystatistics:templates/statistics_header}');
const CONFIG_FILE_NAME = 'config.php';
const INSTANCE_NAME = 'instance_name';
$config = SimpleSAML_Configuration::getConfig(CONFIG_FILE_NAME);
$instanceName = $config->getString(INSTANCE_NAME, null);
if (!is_null($instanceName)) {
$this->data['header'] = $instanceName . ' ' . $this->t('{proxystatistics:Proxystatistics:templates/statistics_header}');
} else {
$this->data['header'] = $this->t('{proxystatistics:Proxystatistics:templates/statistics_header}');
SimpleSAML\Logger::warning('Missing configuration: config.php - instance_name is not set.');
}
$this->data['jquery'] = array('core' => TRUE, 'ui' => TRUE, 'css' => TRUE);
$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="' . SimpleSAML\Module::getModuleUrl('proxystatistics/statisticsproxy.css') . '" />';
......
......@@ -105,6 +105,11 @@ $lastDays = $this->data['lastDays'];
</div>
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_logins}'); ?></h2>
<div class="legend-logins">
<div>
<?php echo $this->t('{proxystatistics:Proxystatistics:templates/summary_logins_info}'); ?>
</div>
</div>
<div id="loginsDashboard" >
<div id="line_div"></div>
<div id="control_div"></div>
......@@ -113,10 +118,20 @@ $lastDays = $this->data['lastDays'];
<div class="row tableMaxHeight">
<div class="col-md-6 graph">
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_id_providers}'); ?></h2>
<div class="legend">
<div id="summaryIdp">
<?php echo $this->t('{proxystatistics:Proxystatistics:templates/summary_idps_info}'); ?>
</div>
</div>
<div id="idpsChart" ></div>
</div>
<div class="col-md-6">
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_service_providers}'); ?></h2>
<div class="legend">
<div>
<?php echo $this->t('{proxystatistics:Proxystatistics:templates/summary_sps_info}'); ?>
</div>
</div>
<div id="spsChart" ></div>
</div>
</div>
......
......@@ -43,6 +43,10 @@ table{
font-weight: normal;
}
#summaryIdp {
padding-bottom: 20px;
}
.tabset_tabs {
padding-left: 20px;
}
......@@ -50,3 +54,12 @@ table{
.timeRange {
padding-left: 40px;
}
.legend-logins {
padding-left: 40px;
}
.legend {
padding-left: 40px;
padding-bottom: 20px;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment