CEC-4854 Trunk-based deploy pipeline (#412)
* CEC-4855: fix manifest deselect (#410) * fix manifest deselect * adjusted blackduck pipeline to run the latest detect version * added blackduck_rapid pipeline to run synopsys detect rapid scans * adjusted deploy pipeline to trun-based model, adjusted test pipeline to use main branch * test image builds * clean up * CEC-4563: add cancel and include results in promise (#411) * splited build and deploy order according to each environment, test builds * clean up * clean up * CEC-4635: prevent false 0 calculation (#413) * prevent false 0 calculation * refactor switch statement --------- Co-authored-by: Tristan Timblin <ttimblin@fiskerinc.com>
This commit is contained in:
@@ -127,8 +127,16 @@ export const CarUpdatesProvider = ({ children }) => {
|
||||
};
|
||||
|
||||
const getDownloadProgress = (status) => {
|
||||
if (status.package_total > 0)
|
||||
const disabled = status.status === "install_succeeded";
|
||||
if (disabled) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
const calculated = status.package_total > 0;
|
||||
if (calculated) {
|
||||
return Math.floor((100 * status.package_current) / status.package_total);
|
||||
}
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user