@appscode/design-system 1.0.43-alpha.227 → 1.0.43-alpha.228
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -255,15 +255,23 @@ onBeforeUnmount(() => {
|
|
|
255
255
|
const longRunningTaskStatus = computed(() => {
|
|
256
256
|
let successTaskCount = 0;
|
|
257
257
|
let failedTaskCount = 0;
|
|
258
|
+
|
|
259
|
+
// get count of success and failed task
|
|
258
260
|
tasks.value.forEach((task) => {
|
|
259
261
|
if (task?.status === "Success") successTaskCount++;
|
|
260
262
|
else if (task?.status === "Failed") failedTaskCount++;
|
|
261
263
|
});
|
|
262
264
|
|
|
263
265
|
if (tasks.value.length === 0) return "NotStarted";
|
|
266
|
+
// if all the task has been successful
|
|
264
267
|
else if (successTaskCount === tasks.value.length) {
|
|
265
268
|
return "Success";
|
|
266
|
-
}
|
|
269
|
+
}
|
|
270
|
+
// if all the task has been completed and some tasks are failed
|
|
271
|
+
else if (
|
|
272
|
+
failedTaskCount &&
|
|
273
|
+
successTaskCount + failedTaskCount === tasks.value.length
|
|
274
|
+
) {
|
|
267
275
|
return "Failed";
|
|
268
276
|
} else return "Pending";
|
|
269
277
|
});
|