mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-24 22:46:09 +00:00
Refactor JSON and SDK fields (#3968)
This commit is contained in:
@@ -19,8 +19,8 @@ const workflow = toRef(props, 'workflow');
|
||||
const { durationAsNumber } = useDate();
|
||||
|
||||
const durationRaw = computed(() => {
|
||||
const start = (step.value ? step.value?.start_time : workflow.value?.start_time) || 0;
|
||||
const end = (step.value ? step.value?.end_time : workflow.value?.end_time) || 0;
|
||||
const start = (step.value ? step.value?.started : workflow.value?.started) || 0;
|
||||
const end = (step.value ? step.value?.finished : workflow.value?.finished) || 0;
|
||||
|
||||
if (end === 0 && start === 0) {
|
||||
return undefined;
|
||||
@@ -43,5 +43,5 @@ const duration = computed(() => {
|
||||
|
||||
return durationAsNumber(durationElapsed.value || 0);
|
||||
});
|
||||
const started = computed(() => (step.value ? step.value?.start_time : workflow.value?.start_time) !== undefined);
|
||||
const started = computed(() => (step.value ? step.value?.started : workflow.value?.started) !== undefined);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user