You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by GitBox <gi...@apache.org> on 2018/10/15 21:14:06 UTC

[GitHub] rdelval closed pull request #43: Custom executor UI fix

rdelval closed pull request #43: Custom executor UI fix
URL: https://github.com/apache/aurora/pull/43
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java b/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java
index 800abfdb9..d90f3d75c 100644
--- a/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java
@@ -171,7 +171,7 @@ public Response getTasksWithoutConfigs(TaskQuery query) {
     List<ScheduledTask> tasks = Lists.transform(
         getTasks(query),
         task -> {
-          task.getAssignedTask().getTask().unsetExecutorConfig();
+          task.getAssignedTask().getTask().getExecutorConfig().unsetData();
           return task;
         });
 
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
index 91cd9ec54..7bfe4928e 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
@@ -353,9 +353,12 @@ public void testGetTasksWithoutConfigs() throws Exception {
 
     control.replay();
 
+    TaskConfig taskConfig = defaultTask(true);
+    taskConfig.getExecutorConfig().unsetData();
+
     ImmutableList<ScheduledTask> expected = IScheduledTask.toBuildersList(makeDefaultScheduledTasks(
         10,
-        defaultTask(true).setExecutorConfig(null)));
+        taskConfig));
 
     Response response = assertOkResponse(thrift.getTasksWithoutConfigs(new TaskQuery()));
     assertEquals(expected, response.getResult().getScheduleStatusResult().getTasks());
diff --git a/ui/src/main/js/components/TaskListItemActions.js b/ui/src/main/js/components/TaskListItemActions.js
index 781a86dbd..f5efdf173 100644
--- a/ui/src/main/js/components/TaskListItemActions.js
+++ b/ui/src/main/js/components/TaskListItemActions.js
@@ -1,9 +1,17 @@
 import React from 'react';
 
+import { isThermos } from 'utils/Task';
+
 export default function ({ task }) {
-  return (<div className='task-list-item-host'>
-    <a href={`http://${task.assignedTask.slaveHost}:1338/task/${task.assignedTask.taskId}`}>
-      {task.assignedTask.slaveHost}
-    </a>
-  </div>);
+  if (isThermos(task.assignedTask.task)) {
+    return (<div className='task-list-item-host'>
+      <a href={`http://${task.assignedTask.slaveHost}:1338/task/${task.assignedTask.taskId}`}>
+        {task.assignedTask.slaveHost}
+      </a>
+    </div>);
+  } else {
+    return (<div className='task-list-item-host'>
+      <strong>{task.assignedTask.slaveHost}</strong>
+    </div>);
+  }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services