Metrics: Add theme names

main
Igor Scheller 4 years ago committed by msquare
parent 9e73e7e181
commit 9dd2525e93

@ -72,6 +72,11 @@ class Controller extends BaseController
$userLocales = $this->formatStats($this->stats->languages(), 'locales', 'language', 'locale');
$userThemes = $this->formatStats($this->stats->themes(), 'available_themes', 'theme');
$themes = $this->config->get('available_themes');
foreach ($userThemes as $key => $theme) {
$userThemes[$key]['labels']['name'] = $themes[$theme['labels']['theme']];
}
$data = [
$this->config->get('app_name') . ' stats',
'info' => [

@ -12,7 +12,11 @@ class ControllerTest extends ApplicationFeatureTest
*/
public function testMetrics()
{
config(['api_key' => null, 'metrics' => ['work' => [60 * 60], 'voucher' => [1]]]);
config([
'api_key' => null,
'metrics' => ['work' => [60 * 60], 'voucher' => [1]],
'available_themes' => ['1' => 'Test'],
]);
/** @var Controller $controller */
$controller = app()->make(Controller::class);

Loading…
Cancel
Save