Skip to content
Snippets Groups Projects
Commit 6e1f701a authored by Dominik Baránek's avatar Dominik Baránek
Browse files

Added legends to charts, header is taken from config

parent 9c562fc6
No related branches found
No related tags found
1 merge request!9Added legends to charts, header is taken from config
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
[Added]
- Added legends to charts
- Instance name in header is taken from config file
[Fixed] [Fixed]
- set default value of lastDays and tab in index.php: no error logs when user open statistics for the first time - 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 @@ ...@@ -104,7 +104,27 @@
"cs": "Služba" "cs": "Služba"
}, },
"templates/statistics_header": { "templates/statistics_header": {
"en": "SimpleSAMLphp Statistics", "en": "AAI Statistics",
"cs": "SimpleSAMLphp Statistiky" "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']; ...@@ -69,6 +69,9 @@ $lastDays = $this->data['lastDays'];
</div> </div>
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_id_providers}'); ?></h2> <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="row">
<div class="col-md-8"> <div class="col-md-8">
<div id="idpsChartDetail" ></div> <div id="idpsChartDetail" ></div>
......
...@@ -69,6 +69,9 @@ $lastDays = $this->data['lastDays']; ...@@ -69,6 +69,9 @@ $lastDays = $this->data['lastDays'];
</div> </div>
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_service_providers}'); ?></h2> <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="row">
<div class="col-md-8"> <div class="col-md-8">
<div id="spsChartDetail" ></div> <div id="spsChartDetail" ></div>
......
...@@ -4,7 +4,17 @@ include dirname(__DIR__)."/lib/Auth/Process/DatabaseCommand.php"; ...@@ -4,7 +4,17 @@ include dirname(__DIR__)."/lib/Auth/Process/DatabaseCommand.php";
* @author Pavel Vyskočil <vyskocilpavel@muni.cz> * @author Pavel Vyskočil <vyskocilpavel@muni.cz>
* @author Dominik Baránek <0Baranek.dominik0@gmail.com> * @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['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') . '" />'; $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']; ...@@ -105,6 +105,11 @@ $lastDays = $this->data['lastDays'];
</div> </div>
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_logins}'); ?></h2> <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="loginsDashboard" >
<div id="line_div"></div> <div id="line_div"></div>
<div id="control_div"></div> <div id="control_div"></div>
...@@ -113,10 +118,20 @@ $lastDays = $this->data['lastDays']; ...@@ -113,10 +118,20 @@ $lastDays = $this->data['lastDays'];
<div class="row tableMaxHeight"> <div class="row tableMaxHeight">
<div class="col-md-6 graph"> <div class="col-md-6 graph">
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_id_providers}'); ?></h2> <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 id="idpsChart" ></div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/graphs_service_providers}'); ?></h2> <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 id="spsChart" ></div>
</div> </div>
</div> </div>
......
...@@ -43,6 +43,10 @@ table{ ...@@ -43,6 +43,10 @@ table{
font-weight: normal; font-weight: normal;
} }
#summaryIdp {
padding-bottom: 20px;
}
.tabset_tabs { .tabset_tabs {
padding-left: 20px; padding-left: 20px;
} }
...@@ -50,3 +54,12 @@ table{ ...@@ -50,3 +54,12 @@ table{
.timeRange { .timeRange {
padding-left: 40px; 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