* revision.json cache disable

* wip limit in the headers
* DÖNER is has no prio borders anymore, but is reverse ordered by modification time
This commit is contained in:
Dávid Danyi 2017-09-01 11:51:34 +02:00
parent 4704a6a0d1
commit 990dbfa565
6 changed files with 54 additions and 17 deletions

View File

@ -22,3 +22,11 @@ RewriteRule ^(.*)$ %{ENV:BASE}index.html [NC,L]
<LimitExcept GET POST PUT DELETE HEAD OPTIONS> <LimitExcept GET POST PUT DELETE HEAD OPTIONS>
Require all denied Require all denied
</LimitExcept> </LimitExcept>
<Files revision.json>
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</Files>

View File

@ -1,12 +1,18 @@
<div class="ui main fullwide-container"> <div class="ui main fullwide-container">
<div class="ui grid"> <div class="ui grid">
<div app-kanban-entry-item class="four wide column" <div app-kanban-entry-item class="four wide column"
rowHeading="INBOX" [kanbanEntries]="kanbanBoard.inbox"></div> rowHeading="INBOX"
[kanbanEntries]="kanbanBoard.inbox"></div>
<div app-kanban-entry-item class="four wide column" [ngClass]="inprogressWipClass" <div app-kanban-entry-item class="four wide column" [ngClass]="inprogressWipClass"
rowHeading="INPROGRESS" [kanbanEntries]="kanbanBoard.inProgress"></div> rowHeading="INPROGRESS"
[wipLimit]="inprogressWipLimit" [wipCount]="inprogressWipCount"
[kanbanEntries]="kanbanBoard.inProgress"></div>
<div app-kanban-entry-item class="four wide column" [ngClass]="verificationWipClass" <div app-kanban-entry-item class="four wide column" [ngClass]="verificationWipClass"
rowHeading="VERIFICATION" [kanbanEntries]="kanbanBoard.verification"></div> rowHeading="VERIFICATION"
[wipLimit]="verificationWipLimit" [wipCount]="verificationWipCount"
[kanbanEntries]="kanbanBoard.verification"></div>
<div app-kanban-entry-item class="four wide column" <div app-kanban-entry-item class="four wide column"
rowHeading="DÖNER" [kanbanEntries]="kanbanBoard.done"></div> rowHeading="DÖNER"
[kanbanEntries]="kanbanBoard.done"></div>
</div> </div>
</div> </div>

View File

@ -44,6 +44,18 @@ export class KanbanBoardComponent implements OnInit {
this.kanbanService.kanbanBoard = kanbanBoard; this.kanbanService.kanbanBoard = kanbanBoard;
} }
get inprogressWipLimit(): number {
return WIP_LIMIT_INPROGRESS;
}
get inprogressWipCount(): number {
return this.kanbanBoard.inProgress.filter(
(entry: KanbanEntry) => entry.labels.every(
label => label.toUpperCase() != 'BLOCKED'
)
).length;
}
/** /**
* Set 'over-wip' class on inprogress row if its over the wip limit * Set 'over-wip' class on inprogress row if its over the wip limit
* This excludes issues marked as BLOCKED with labels * This excludes issues marked as BLOCKED with labels
@ -52,12 +64,20 @@ export class KanbanBoardComponent implements OnInit {
*/ */
get inprogressWipClass() { get inprogressWipClass() {
return { return {
'over-wip': this.kanbanBoard.inProgress.filter( 'over-wip': this.inprogressWipCount > WIP_LIMIT_INPROGRESS,
};
}
get verificationWipLimit(): number {
return WIP_LIMIT_VERIFICATION;
}
get verificationWipCount(): number {
return this.kanbanBoard.verification.filter(
(entry: KanbanEntry) => entry.labels.every( (entry: KanbanEntry) => entry.labels.every(
label => label.toUpperCase() != 'BLOCKED' label => label.toUpperCase() != 'BLOCKED'
) )
).length > WIP_LIMIT_INPROGRESS, ).length;
};
} }
/** /**
@ -68,11 +88,7 @@ export class KanbanBoardComponent implements OnInit {
*/ */
get verificationWipClass() { get verificationWipClass() {
return { return {
'over-wip': this.kanbanBoard.verification.filter( 'over-wip': this.verificationWipCount > WIP_LIMIT_VERIFICATION,
(entry: KanbanEntry) => entry.labels.every(
label => label.toUpperCase() != 'BLOCKED'
)
).length > WIP_LIMIT_VERIFICATION,
}; };
} }

View File

@ -1,4 +1,9 @@
<h1>{{rowHeading}}</h1> <h1>
{{rowHeading}}
<ng-template [ngIf]="wipCount">
- {{wipCount}}/{{wipLimit}}
</ng-template>
</h1>
<div class="ui divided items"> <div class="ui divided items">
<div class="item {{kanbanEntry.issuePriority|lowercase}}" [ngClass]="entryClass(kanbanEntry)" *ngFor="let kanbanEntry of kanbanEntries"> <div class="item {{kanbanEntry.issuePriority|lowercase}}" [ngClass]="entryClass(kanbanEntry)" *ngFor="let kanbanEntry of kanbanEntries">
<div class="content"> <div class="content">

View File

@ -23,6 +23,8 @@ const labelColors = {
export class KanbanEntryItemComponent { export class KanbanEntryItemComponent {
@Input() kanbanEntries: Array<KanbanEntry>; @Input() kanbanEntries: Array<KanbanEntry>;
@Input() rowHeading: string = ""; @Input() rowHeading: string = "";
@Input() wipLimit: number = 0;
@Input() wipCount: number = 0;
constructor() {} constructor() {}

View File

@ -58,7 +58,7 @@ export class KanbanService {
* @returns {KanbanBoard} * @returns {KanbanBoard}
*/ */
private preprocessPriorities(kanbanBoard: KanbanBoard): KanbanBoard { private preprocessPriorities(kanbanBoard: KanbanBoard): KanbanBoard {
['inbox','inProgress','verification','done'].map(progress => { ['inbox','inProgress','verification'].map(progress => {
kanbanBoard[progress].map(entry => entry.isLastOfPriority = false); kanbanBoard[progress].map(entry => entry.isLastOfPriority = false);
['Trivial', ['Trivial',
'Minor', 'Minor',