From 990dbfa565f637de244e3e10c0b90427747042a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Danyi?= Date: Fri, 1 Sep 2017 11:51:34 +0200 Subject: [PATCH] =?UTF-8?q?*=20revision.json=20cache=20disable=20*=20wip?= =?UTF-8?q?=20limit=20in=20the=20headers=20*=20D=C3=96NER=20is=20has=20no?= =?UTF-8?q?=20prio=20borders=20anymore,=20but=20is=20reverse=20ordered=20b?= =?UTF-8?q?y=20modification=20time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htaccess | 10 +++++- .../kanban-board/kanban-board.component.html | 14 +++++--- .../kanban-board/kanban-board.component.ts | 36 +++++++++++++------ .../kanban-entry-item.component.html | 7 +++- .../kanban-entry-item.component.ts | 2 ++ src/app/kanban/shared/kanban.service.ts | 2 +- 6 files changed, 54 insertions(+), 17 deletions(-) diff --git a/htaccess b/htaccess index a1d332c..c749114 100644 --- a/htaccess +++ b/htaccess @@ -21,4 +21,12 @@ RewriteRule ^(.*)$ %{ENV:BASE}index.html [NC,L] Require all denied - \ No newline at end of file + + + + 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" + diff --git a/src/app/kanban/kanban-board/kanban-board.component.html b/src/app/kanban/kanban-board/kanban-board.component.html index d0d8679..435b752 100644 --- a/src/app/kanban/kanban-board/kanban-board.component.html +++ b/src/app/kanban/kanban-board/kanban-board.component.html @@ -1,12 +1,18 @@
+ rowHeading="INBOX" + [kanbanEntries]="kanbanBoard.inbox">
+ rowHeading="INPROGRESS" + [wipLimit]="inprogressWipLimit" [wipCount]="inprogressWipCount" + [kanbanEntries]="kanbanBoard.inProgress">
+ rowHeading="VERIFICATION" + [wipLimit]="verificationWipLimit" [wipCount]="verificationWipCount" + [kanbanEntries]="kanbanBoard.verification">
+ rowHeading="DÖNER" + [kanbanEntries]="kanbanBoard.done"> diff --git a/src/app/kanban/kanban-board/kanban-board.component.ts b/src/app/kanban/kanban-board/kanban-board.component.ts index ebf56a2..74921c8 100644 --- a/src/app/kanban/kanban-board/kanban-board.component.ts +++ b/src/app/kanban/kanban-board/kanban-board.component.ts @@ -44,6 +44,18 @@ export class KanbanBoardComponent implements OnInit { 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 * This excludes issues marked as BLOCKED with labels @@ -52,14 +64,22 @@ export class KanbanBoardComponent implements OnInit { */ get inprogressWipClass() { return { - 'over-wip': this.kanbanBoard.inProgress.filter( - (entry: KanbanEntry) => entry.labels.every( - label => label.toUpperCase() != 'BLOCKED' - ) - ).length > WIP_LIMIT_INPROGRESS, + '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( + label => label.toUpperCase() != 'BLOCKED' + ) + ).length; + } + /** * Set 'over-wip' class on verification row if its over the wip limit * This excludes issues marked as BLOCKED with labels @@ -68,11 +88,7 @@ export class KanbanBoardComponent implements OnInit { */ get verificationWipClass() { return { - 'over-wip': this.kanbanBoard.verification.filter( - (entry: KanbanEntry) => entry.labels.every( - label => label.toUpperCase() != 'BLOCKED' - ) - ).length > WIP_LIMIT_VERIFICATION, + 'over-wip': this.verificationWipCount > WIP_LIMIT_VERIFICATION, }; } diff --git a/src/app/kanban/kanban-entry-item/kanban-entry-item.component.html b/src/app/kanban/kanban-entry-item/kanban-entry-item.component.html index 7bfbb3a..e71ee85 100644 --- a/src/app/kanban/kanban-entry-item/kanban-entry-item.component.html +++ b/src/app/kanban/kanban-entry-item/kanban-entry-item.component.html @@ -1,4 +1,9 @@ -

{{rowHeading}}

+

+ {{rowHeading}} + + - {{wipCount}}/{{wipLimit}} + +

diff --git a/src/app/kanban/kanban-entry-item/kanban-entry-item.component.ts b/src/app/kanban/kanban-entry-item/kanban-entry-item.component.ts index ab0fdd0..78a57e0 100644 --- a/src/app/kanban/kanban-entry-item/kanban-entry-item.component.ts +++ b/src/app/kanban/kanban-entry-item/kanban-entry-item.component.ts @@ -23,6 +23,8 @@ const labelColors = { export class KanbanEntryItemComponent { @Input() kanbanEntries: Array; @Input() rowHeading: string = ""; + @Input() wipLimit: number = 0; + @Input() wipCount: number = 0; constructor() {} diff --git a/src/app/kanban/shared/kanban.service.ts b/src/app/kanban/shared/kanban.service.ts index 3650faf..dfe4029 100644 --- a/src/app/kanban/shared/kanban.service.ts +++ b/src/app/kanban/shared/kanban.service.ts @@ -58,7 +58,7 @@ export class KanbanService { * @returns {KanbanBoard} */ private preprocessPriorities(kanbanBoard: KanbanBoard): KanbanBoard { - ['inbox','inProgress','verification','done'].map(progress => { + ['inbox','inProgress','verification'].map(progress => { kanbanBoard[progress].map(entry => entry.isLastOfPriority = false); ['Trivial', 'Minor',