]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7836 Remove link to download the Task logs in the UI
authorStas Vilchik <vilchiks@gmail.com>
Mon, 22 Aug 2016 07:57:41 +0000 (09:57 +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/TaskCancelButton.js
server/sonar-web/src/main/js/apps/background-tasks/components/TaskLogsLink.js [deleted file]
server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.js

index 4ef215963b0b037d2c92b94f382052ecbb3224cf..0f1c813fe4822fe2e04cf10ea7a6379da3065ed4 100644 (file)
@@ -26,7 +26,6 @@ import TaskDay from './TaskDay';
 import TaskDate from './TaskDate';
 import TaskExecutionTime from './TaskExecutionTime';
 import TaskCancelButton from './TaskCancelButton';
-import TaskLogsLink from './TaskLogsLink';
 import { STATUSES } from './../constants';
 
 export default class Task extends React.Component {
@@ -64,15 +63,6 @@ export default class Task extends React.Component {
           <TaskDate date={task.executedAt} baseDate={task.submittedAt} format="LTS"/>
           <TaskExecutionTime task={task}/>
 
-          <td className="thin nowrap text-right">
-            {task.logs && (
-                <TaskLogsLink task={task}/>
-            )}
-            {task.status === STATUSES.PENDING && (
-                <TaskCancelButton task={task} onCancelTask={onCancelTask}/>
-            )}
-          </td>
-
           <td className="thin nowrap">
             {!component && (
                 <a
@@ -82,6 +72,9 @@ export default class Task extends React.Component {
                     title={`Show only "${task.componentName}" tasks`}
                     data-toggle="tooltip"/>
             )}
+            {task.status === STATUSES.PENDING && (
+                <TaskCancelButton task={task} onCancelTask={onCancelTask}/>
+            )}
           </td>
         </tr>
     );
index d6469deba438257866a3c8693acca90fd03b5c51..4255f9f9ab8a0e7897a0d0b5ad4fcf9b54b53471 100644 (file)
@@ -29,7 +29,7 @@ const TaskCancelButton = ({ task, onCancelTask }) => {
   return (
       <a
           onClick={handleClick}
-          className="icon-delete"
+          className="spacer-left icon-delete"
           title={translate('background_tasks.cancel_task')}
           data-toggle="tooltip"
           href="#"/>
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskLogsLink.js b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskLogsLink.js
deleted file mode 100644 (file)
index e05dfb1..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 TaskLogsLink = ({ task }) => {
-  const url = `${window.baseUrl}/api/ce/logs?taskId=${task.id}`;
-
-  return (
-      <a
-          target="_blank"
-          href={url}>
-        {translate('background_tasks.logs')}
-      </a>
-  );
-};
-
-export default TaskLogsLink;
index 86586ebb64a64074b0315c147b8e7f4d23bea23b..0cb1ddf0822ae1ee083942a5c5ed642a23d410a2 100644 (file)
@@ -57,7 +57,6 @@ export default class Tasks extends React.Component {
             <th>{translate('background_tasks.table.finished')}</th>
             <th>{translate('background_tasks.table.duration')}</th>
             <th>&nbsp;</th>
-            <th>&nbsp;</th>
           </tr>
           </thead>
           <tbody>