Bladeren bron

Switch to executions page if replica is currently executing CORWEB-19

Switch to tasks page if migration is currently executing.
This happens when selecting a replica / migration from replicas / migrations list.
Sergiu Miclea 8 jaren geleden
bovenliggende
commit
018da80258
2 gewijzigde bestanden met toevoegingen van 10 en 2 verwijderingen
  1. 5 1
      src/components/MigrationList/MigrationList.js
  2. 5 1
      src/components/ReplicaList/ReplicaList.js

+ 5 - 1
src/components/MigrationList/MigrationList.js

@@ -91,7 +91,11 @@ class MigrationList extends Reflux.Component {
   }
   }
 
 
   migrationDetail(e, item) {
   migrationDetail(e, item) {
-    Location.push('/migration/' + item.id + "/")
+    if (item.status === 'RUNNING') {
+      Location.push('/migration/tasks/' + item.id + "/")
+    } else {
+      Location.push('/migration/' + item.id + "/")
+    }
   }
   }
 
 
   renderItem(item) {
   renderItem(item) {

+ 5 - 1
src/components/ReplicaList/ReplicaList.js

@@ -90,7 +90,11 @@ class ReplicaList extends Reflux.Component {
   }
   }
 
 
   replicaDetail(e, item) {
   replicaDetail(e, item) {
-    Location.push('/replica/' + item.id + "/")
+    if (item.status === 'RUNNING') {
+      Location.push('/replica/executions/' + item.id + "/")
+    } else {
+      Location.push('/replica/' + item.id + "/")
+    }
   }
   }
 
 
   renderItem(item) {
   renderItem(item) {