* week number in graph is now a config parameter, defaults to 25

* urlhelper added to the layout
* footer changed to some stats
This commit is contained in:
Dávid Danyi 2017-09-15 15:37:34 +02:00
parent 5047caab1a
commit b45f0139e5
3 changed files with 9 additions and 3 deletions

View File

@ -9,6 +9,8 @@
return [ return [
'app.config' => [ 'app.config' => [
'numberOfWeeks' => 25,
'jira.user' => '', 'jira.user' => '',
'jira.password' => '', 'jira.password' => '',
'jira.query.filtered' => 'https://jirapducc.mo.ca.am.ericsson.se/rest/api/2/search?maxResults=1000&jql=filter=%s&fields=created,resolutiondate', 'jira.query.filtered' => 'https://jirapducc.mo.ca.am.ericsson.se/rest/api/2/search?maxResults=1000&jql=filter=%s&fields=created,resolutiondate',

View File

@ -118,7 +118,7 @@ class JiraCollectorService
private function prepareWeekHash(): array private function prepareWeekHash(): array
{ {
$hash = []; $hash = [];
for ($i = 0; $i > -30; $i-- ) { for ($i = 0; $i > -$this->config->get('numberOfWeeks', 25); $i-- ) {
$hashIndex = date("Y_W", strtotime("${i} week")); $hashIndex = date("Y_W", strtotime("${i} week"));
$hash[$hashIndex] = new WeekData(); $hash[$hashIndex] = new WeekData();
} }

View File

@ -12,6 +12,7 @@
.app { display: flex; min-height: 100vh; flex-direction: column; } .app { display: flex; min-height: 100vh; flex-direction: column; }
.app-content { flex: 1; } .app-content { flex: 1; }
.app-footer { padding-bottom: 1em; } .app-footer { padding-bottom: 1em; }
.right { float: right; }
.zf-green, h2 a { color: #68b604; } .zf-green, h2 a { color: #68b604; }
</style> </style>
<?=$this->section('stylesheets')?> <?=$this->section('stylesheets')?>
@ -27,9 +28,10 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="/"> <a class="navbar-brand" href="/">
<img src="/zf-logo.png" alt="Zend Expressive" /> <img src="<?=$this->serverurl('/zf-logo.png')?>" alt="Zend Expressive" />
</a> </a>
</div> </div>
<!--
<div class="collapse navbar-collapse"> <div class="collapse navbar-collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li> <li>
@ -44,6 +46,7 @@
</li> </li>
</ul> </ul>
</div> </div>
-->
</div> </div>
</nav> </nav>
</header> </header>
@ -61,7 +64,8 @@
<?=$this->section('footer')?> <?=$this->section('footer')?>
<?php else: ?> <?php else: ?>
<p> <p>
&copy; 2005 - <?=date('Y')?> by Zend Technologies Ltd. All rights reserved. Running on PHP<?=PHP_VERSION?>
<span class="right">Feasting on <b><?=ceil(memory_get_peak_usage()/1024/1024)?>MB</b> of your precious RAM</span>
</p> </p>
<?php endif ?> <?php endif ?>
</div> </div>