From eb1c46e9a8be665912e671cacf351d15a0f63f9d Mon Sep 17 00:00:00 2001
From: Rigel Kent <sendmemail@rigelk.eu>
Date: Mon, 6 Jan 2020 14:28:29 +0100
Subject: [PATCH] Enhance variable width column for id column in jobs list

---
 .../+admin/system/jobs/jobs.component.html    | 24 +++++++++----------
 .../+admin/system/jobs/jobs.component.scss    | 16 +++++++++++++
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/client/src/app/+admin/system/jobs/jobs.component.html b/client/src/app/+admin/system/jobs/jobs.component.html
index af07a32a1c..b0f68eadd0 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.html
+++ b/client/src/app/+admin/system/jobs/jobs.component.html
@@ -27,23 +27,23 @@
 >
   <ng-template pTemplate="header">
     <tr>
-      <th i18n style="max-width: 60px;">ID</th>
-      <th i18n style="max-width: 120px;">Type</th>
-      <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
-      <th i18n>State</th>
+      <th class="job-id" i18n>ID</th>
+      <th class="job-type" i18n>Type</th>
+      <th class="job-date" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
+      <th class="job-state" i18n>State</th>
     </tr>
   </ng-template>
 
   <ng-template pTemplate="body" let-expanded="expanded" let-job>
     <tr class="expander" [pRowToggler]="job">
-      <td style="max-width: 60px;">{{ job.id }}</td>
-      <td style="max-width: 120px;">{{ job.type }}</td>
-      <td>{{ job.createdAt }}</td>
-      <td *ngIf="job.state === 'delayed'" class="text-muted"><span class="glyphicon glyphicon-repeat"></span> <span i18n>Delayed.</span></td>
-      <td *ngIf="job.state === 'waiting'" class="text-warning"><span class="glyphicon glyphicon-hourglass"></span> <span i18n>Will start soon...</span></td>
-      <td *ngIf="job.state === 'active'" class="text-warning"><span class="glyphicon glyphicon-cog"></span> <span i18n>Running...</span></td>
-      <td *ngIf="job.state === 'completed'" class="text-success"><span class="glyphicon glyphicon-ok"></span> <span i18n>Finished</span></td>
-      <td *ngIf="job.state === 'failed'" class="text-danger"><span class="glyphicon glyphicon-remove"></span> <span i18n>Failed</span></td>
+      <td class="job-id" [title]="job.id">{{ job.id }}</td>
+      <td class="job-type">{{ job.type }}</td>
+      <td class="job-date">{{ job.createdAt }}</td>
+      <td class="job-state" *ngIf="job.state === 'delayed'" class="text-muted"><span class="glyphicon glyphicon-repeat"></span> <span i18n>Delayed.</span></td>
+      <td class="job-state" *ngIf="job.state === 'waiting'" class="text-warning"><span class="glyphicon glyphicon-hourglass"></span> <span i18n>Will start soon...</span></td>
+      <td class="job-state" *ngIf="job.state === 'active'" class="text-warning"><span class="glyphicon glyphicon-cog"></span> <span i18n>Running...</span></td>
+      <td class="job-state" *ngIf="job.state === 'completed'" class="text-success"><span class="glyphicon glyphicon-ok"></span> <span i18n>Finished</span></td>
+      <td class="job-state" *ngIf="job.state === 'failed'" class="text-danger"><span class="glyphicon glyphicon-remove"></span> <span i18n>Failed</span></td>
     </tr>
   </ng-template>
 
diff --git a/client/src/app/+admin/system/jobs/jobs.component.scss b/client/src/app/+admin/system/jobs/jobs.component.scss
index d07d5078bc..4cb706d2dc 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.scss
+++ b/client/src/app/+admin/system/jobs/jobs.component.scss
@@ -1,6 +1,22 @@
 @import '_variables';
 @import '_mixins';
 
+.job-id {
+  max-width: 30vw !important;
+}
+
+.job-type {
+  width: 150px !important;
+}
+
+.job-date {
+  width: 170px !important;
+}
+
+.job-state {
+  max-width: 60px;
+}
+
 .admin-sub-header {
   align-items: flex-end;
 
-- 
GitLab