Skip to content

Commit 4c2bca3

Browse files
authored
Merge pull request #402 from perftools/waterfall-date_format
2 parents e729eaf + 77ff720 commit 4c2bca3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/Controller/RunController.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public function index(Request $request, Response $response): void
7575
'paging' => $paging,
7676
'base_url' => 'home',
7777
'runs' => $result['results'],
78-
'date_format' => $this->config('date.format'),
7978
'search' => $search,
8079
'has_search' => implode('', $search) !== '',
8180
'title' => $title,
@@ -125,7 +124,6 @@ public function view(Request $request, Response $response): void
125124
'wall_time' => $timeChart,
126125
'memory' => $memoryChart,
127126
'watches' => $watchedFunctions,
128-
'date_format' => $this->config('date.format'),
129127
]);
130128
}
131129

@@ -242,7 +240,6 @@ public function url(Request $request): void
242240
'runs' => $runs['results'],
243241
'url' => $request->get('url'),
244242
'chart_data' => $chartData,
245-
'date_format' => $this->config('date.format'),
246243
'search' => array_merge($search, ['url' => $request->get('url')]),
247244
]);
248245
}
@@ -290,7 +287,6 @@ public function compare(Request $request): void
290287
'head_run' => $headRun,
291288
'candidates' => $candidates,
292289
'url_params' => $request->get(),
293-
'date_format' => $this->config('date.format'),
294290
'comparison' => $comparison,
295291
'paging' => $paging,
296292
'search' => [
@@ -346,7 +342,6 @@ public function callgraph(Request $request): void
346342

347343
$this->render('runs/callgraph.twig', [
348344
'profile' => $profile,
349-
'date_format' => $this->config('date.format'),
350345
]);
351346
}
352347

src/ServiceContainer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ private function slimApp(): void
8383
'autoescape' => 'html',
8484
];
8585

86+
// set global variables to templates
87+
$view->appendData([
88+
'date_format' => $c['config']['date.format'],
89+
]);
90+
8691
return $view;
8792
};
8893

0 commit comments

Comments
 (0)