-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
app/assets/app/components/details/activity-log/activity-log.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.smui-activity-log-toggle { | ||
width: 100%; | ||
} | ||
|
||
.smui-activity-log-table { | ||
width: 100%; | ||
margin-top: 5px; | ||
margin-bottom: 10px; | ||
font-size: smaller; | ||
} | ||
|
||
.smui-activity-log-entry>td { | ||
padding-top: 5px; | ||
} | ||
|
||
.smui-activity-log-detail-row { | ||
padding-left: 20px; | ||
} |
39 changes: 39 additions & 0 deletions
39
app/assets/app/components/details/activity-log/activity-log.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<div class="card"> | ||
<div class="card-body smui-no-bottom-padding"> | ||
<div class="row"> | ||
<div class="col"> | ||
<small class="smui-activity-log-toggle"> | ||
<i class="fa fa-chevron-down" aria-hidden="true"></i> RULE ACTIVITY LOG | ||
</small> | ||
<button (click)="loadInputRuleActivityLog()">LOAD</button> | ||
<ng-container *ngIf="inputRuleActivityLog !== null"> | ||
<table class="smui-activity-log-table"> | ||
<ng-container *ngFor="let logEntry of inputRuleActivityLog"> | ||
<tr class="smui-activity-log-entry"> | ||
<td width="25%"> | ||
{{ logEntry.dateTime }} | ||
</td> | ||
<td width="40%"> | ||
{{ logEntry.inputSummary }} | ||
</td> | ||
<td width="35%"> | ||
<i class="fa fa-user-o" aria-hidden="true"></i> {{ logEntry.hasOwnProperty('userInfo') ? logEntry.userInfo : '' }} | ||
</td> | ||
</tr> | ||
<tr *ngIf="logEntry.hasOwnProperty('rulesSummary')"> | ||
<td colspan="3" width="100%" class="smui-activity-log-detail-row"> | ||
<i class="fa fa-database" aria-hidden="true"></i> RULES: {{ logEntry.rulesSummary }} | ||
</td> | ||
</tr> | ||
<tr *ngIf="logEntry.hasOwnProperty('commentSummary')"> | ||
<td colspan="3" width="100%" class="smui-activity-log-detail-row"> | ||
<i class="fa fa-commenting-o" aria-hidden="true"></i> {{ logEntry.commentSummary }} | ||
</td> | ||
</tr> | ||
</ng-container> | ||
</table> | ||
</ng-container> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
app/assets/app/components/details/activity-log/activity-log.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Component, Input, EventEmitter } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'smui-activity-log', | ||
templateUrl: './activity-log.component.html', | ||
styleUrls: ['./activity-log.component.css'] | ||
}) | ||
export class DetailActivityLog { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export class ActivityLogEntry { | ||
dateTime: string; | ||
userInfo?: string; | ||
inputSummary: string; | ||
rulesSummary?: string; | ||
commentSummary?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Http } from '@angular/http'; | ||
import 'rxjs/add/operator/toPromise'; | ||
|
||
import { ActivityLogEntry } from '../models/index'; | ||
|
||
@Injectable() | ||
export class ActivityLogService { | ||
private readonly baseUrl = 'api/v1'; | ||
|
||
constructor(public http: Http) { } | ||
|
||
getInputRuleActivityLog(searchInputId: string): Promise<Array<ActivityLogEntry>> { | ||
return this.http | ||
.get(baseUrl + '/log/rule-activity-log?searchInputId=' + searchInputId) | ||
.toPromise() | ||
.then(res => { | ||
return res.json() as ActivityLogEntry[]; | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters