69940: Processes - date format, back button and hiding empty fields

This commit is contained in:
Kristof De Langhe
2020-03-25 17:08:57 +01:00
committed by Art Lowel
parent 5e890aca2c
commit 6b53c448c8
4 changed files with 19 additions and 14 deletions

View File

@@ -1538,6 +1538,8 @@
"process.page.detail.arguments.empty" : "This process doesn't contain any arguments", "process.page.detail.arguments.empty" : "This process doesn't contain any arguments",
"process.page.detail.back" : "Back",
"process.page.detail.output" : "Process Output", "process.page.detail.output" : "Process Output",
"process.page.detail.output.alert" : "Work in progress - Process output is not available yet", "process.page.detail.output.alert" : "Work in progress - Process output is not available yet",

View File

@@ -5,24 +5,22 @@
<div>{{ process?.scriptName }}</div> <div>{{ process?.scriptName }}</div>
</ds-process-detail-field> </ds-process-detail-field>
<ds-process-detail-field id="process-arguments" [title]="'process.page.detail.arguments'"> <ds-process-detail-field *ngIf="process?.parameters && process?.parameters?.length > 0" id="process-arguments" [title]="'process.page.detail.arguments'">
<ds-alert *ngIf="files?.length === 0" [content]="'process.page.detail.arguments.empty'" [type]="AlertTypeEnum.Info"></ds-alert>
<div *ngFor="let argument of process?.parameters">{{ argument?.name }} {{ argument?.value }}</div> <div *ngFor="let argument of process?.parameters">{{ argument?.name }} {{ argument?.value }}</div>
</ds-process-detail-field> </ds-process-detail-field>
<div *ngVar="(filesRD$ | async)?.payload?.page as files"> <div *ngVar="(filesRD$ | async)?.payload?.page as files">
<ds-process-detail-field *ngIf="files" id="process-files" [title]="'process.page.detail.output-files'"> <ds-process-detail-field *ngIf="files && files?.length > 0" id="process-files" [title]="'process.page.detail.output-files'">
<ds-alert *ngIf="files?.length === 0" [content]="'process.page.detail.output-files.empty'" [type]="AlertTypeEnum.Info"></ds-alert> <div *ngFor="let file of files">
<div *ngIf="files?.length > 0"> <span><a [href]="file?._links?.content?.href">{{getFileName(file)}}</a></span>
<div *ngFor="let file of files"> <span>({{file?.sizeBytes | dsFileSize}})</span>
<span><a [href]="file?._links?.content?.href">{{getFileName(file)}}</a></span>
<span>({{file?.sizeBytes | dsFileSize}})</span>
</div>
</div> </div>
</ds-process-detail-field> </ds-process-detail-field>
</div> </div>
<ds-process-detail-field id="process-output" [title]="'process.page.detail.output'"> <!--<ds-process-detail-field id="process-output" [title]="'process.page.detail.output'">-->
<pre class="font-weight-bold text-secondary bg-light p-3">{{'process.page.detail.output.alert' | translate}}</pre> <!--<pre class="font-weight-bold text-secondary bg-light p-3">{{'process.page.detail.output.alert' | translate}}</pre>-->
</ds-process-detail-field> <!--</ds-process-detail-field>-->
<a class="btn btn-light mt-3" [routerLink]="'/processes'">{{'process.page.detail.back' | translate}}</a>
</div> </div>

View File

@@ -23,8 +23,8 @@
<td><a [routerLink]="['/processes/', process.processId]">{{process.processId}}</a></td> <td><a [routerLink]="['/processes/', process.processId]">{{process.processId}}</a></td>
<td><a [routerLink]="['/processes/', process.processId]">{{process.scriptName}}</a></td> <td><a [routerLink]="['/processes/', process.processId]">{{process.scriptName}}</a></td>
<td *ngVar="(getEpersonName(process.userId) | async) as ePersonName">{{ePersonName}}</td> <td *ngVar="(getEpersonName(process.userId) | async) as ePersonName">{{ePersonName}}</td>
<td>{{process.startTime}}</td> <td>{{process.startTime | date:dateFormat}}</td>
<td>{{process.endTime}}</td> <td>{{process.endTime | date:dateFormat}}</td>
<td>{{process.processStatus}}</td> <td>{{process.processStatus}}</td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -40,6 +40,11 @@ export class ProcessOverviewComponent implements OnInit {
pageSize: 20 pageSize: 20
}); });
/**
* Date format to use for start and end time of processes
*/
dateFormat = 'yyyy-MM-dd HH:mm:ss';
constructor(protected processService: ProcessDataService, constructor(protected processService: ProcessDataService,
protected ePersonService: EPersonDataService) { protected ePersonService: EPersonDataService) {
} }