]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7848 Display task UUID in background page UI
authorStas Vilchik <vilchiks@gmail.com>
Mon, 22 Aug 2016 08:36:08 +0000 (10:36 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 23 Aug 2016 09:42:54 +0000 (11:42 +0200)
server/sonar-web/src/main/js/apps/background-tasks/components/Task.js
server/sonar-web/src/main/js/apps/background-tasks/components/TaskId.js [new file with mode: 0644]
server/sonar-web/src/main/js/apps/background-tasks/components/TaskType.js
server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.js
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 0f1c813fe4822fe2e04cf10ea7a6379da3065ed4..a2084647461a326f098393234a141c72f6b19ee0 100644 (file)
@@ -22,6 +22,7 @@ import shallowCompare from 'react-addons-shallow-compare';
 
 import TaskStatus from './TaskStatus';
 import TaskComponent from './TaskComponent';
+import TaskId from './TaskId';
 import TaskDay from './TaskDay';
 import TaskDate from './TaskDate';
 import TaskExecutionTime from './TaskExecutionTime';
@@ -57,6 +58,7 @@ export default class Task extends React.Component {
         <tr>
           <TaskStatus task={task}/>
           <TaskComponent task={task} types={types}/>
+          <TaskId task={task}/>
           <TaskDay task={task} prevTask={prevTask}/>
           <TaskDate date={task.submittedAt} baseDate={task.submittedAt} format="LTS"/>
           <TaskDate date={task.startedAt} baseDate={task.submittedAt} format="LTS"/>
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskId.js b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskId.js
new file mode 100644 (file)
index 0000000..1cf2489
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+import React from 'react';
+
+import { translate } from '../../../helpers/l10n';
+
+const TaskId = ({ task }) => {
+  return (
+      <td className="thin nowrap">
+        <div className="note">
+          {task.id}
+        </div>
+      </td>
+  );
+};
+
+export default TaskId;
index 3877801818c903552dc4011488415f61213c9d09..ed10f60f62b0085f85eccf32123460a57e2ef944 100644 (file)
@@ -23,7 +23,7 @@ import { translate } from '../../../helpers/l10n';
 
 const TaskType = ({ task }) => {
   return (
-      <span className="note spacer-left">
+      <span className="note nowrap spacer-left">
         {'['}
         {translate('background_task.type', task.type)}
         {']'}
index 0cb1ddf0822ae1ee083942a5c5ed642a23d410a2..d6a9633354f4ff628a1daa4153a943c7ae77b274 100644 (file)
@@ -49,13 +49,14 @@ export default class Tasks extends React.Component {
         <table className={className}>
           <thead>
           <tr>
+            <th>{translate('background_tasks.table.status')}</th>
+            <th>{translate('background_tasks.table.task')}</th>
+            <th>{translate('background_tasks.table.id')}</th>
             <th>&nbsp;</th>
-            <th>&nbsp;</th>
-            <th>&nbsp;</th>
-            <th>{translate('background_tasks.table.submitted')}</th>
-            <th>{translate('background_tasks.table.started')}</th>
-            <th>{translate('background_tasks.table.finished')}</th>
-            <th>{translate('background_tasks.table.duration')}</th>
+            <th className="text-right">{translate('background_tasks.table.submitted')}</th>
+            <th className="text-right">{translate('background_tasks.table.started')}</th>
+            <th className="text-right">{translate('background_tasks.table.finished')}</th>
+            <th className="text-right">{translate('background_tasks.table.duration')}</th>
             <th>&nbsp;</th>
           </tr>
           </thead>
index bd87b30126a50459d8abfe6c925b5793b8e5a3d1..c8ffe407419bfccb9eae18683efd4916a73fce0b 100644 (file)
@@ -2963,6 +2963,9 @@ background_tasks.date_filter.ALL=Any Date
 background_tasks.date_filter.TODAY=Today
 background_tasks.date_filter.CUSTOM=Custom
 
+background_tasks.table.status=Status
+background_tasks.table.task=Task
+background_tasks.table.id=ID
 background_tasks.table.submitted=Submitted
 background_tasks.table.started=Started
 background_tasks.table.finished=Finished