]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: frontend/task.service: format task title for progress tasks
authorRicardo Dias <rdias@suse.com>
Mon, 15 Jul 2019 14:11:07 +0000 (15:11 +0100)
committerRicardo Dias <rdias@suse.com>
Wed, 17 Jul 2019 10:50:50 +0000 (11:50 +0100)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.ts

index 9af1a50a6493927d3fb074e643f5d9fbcdb67922..c2190432ca02f5a4bd888431ecf7385c26cdb19f 100644 (file)
@@ -369,6 +369,18 @@ export class TaskMessageService {
   }
 
   _getTaskTitle(task: Task) {
+    if (task.name && task.name.startsWith('progress/')) {
+      // we don't fill the failure string because, at least for now, all
+      // progress module tasks will be considered successful
+      return this.newTaskMessage(
+        new TaskMessageOperation(
+          task.name.replace('progress/', ''),
+          '',
+          task.name.replace('progress/', '')
+        ),
+        (_metadata) => ''
+      );
+    }
     return this.messages[task.name] || this.defaultMessage;
   }