Skip to content

Commit

Permalink
feat: adds status column to job files list
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Oct 20, 2024
1 parent 33076b2 commit 5b964e7
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 208 deletions.
1 change: 1 addition & 0 deletions src/components/widgets/filesystem/FileSystem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ export default class FileSystem extends Mixins(StateMixin, FilesMixin, ServicesM
if (this.currentRoot === 'gcodes') {
headers = [
...headers,
{ text: this.$t('app.general.table.header.status'), value: 'history.status', configurable: true },
{ text: this.$t('app.general.table.header.height'), value: 'object_height', configurable: true },
{ text: this.$t('app.general.table.header.first_layer_height'), value: 'first_layer_height', configurable: true },
{ text: this.$t('app.general.table.header.layer_height'), value: 'layer_height', configurable: true },
Expand Down
355 changes: 175 additions & 180 deletions src/components/widgets/filesystem/FileSystemBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,185 +80,178 @@
{{ item.name }}
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="object_height"
>
<span v-if="item.object_height !== undefined">
{{ $filters.getReadableLengthString(item.object_height) }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="first_layer_height"
>
<span v-if="item.first_layer_height !== undefined">
{{ item.first_layer_height }} mm
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="layer_height"
>
<span v-if="item.layer_height !== undefined">
{{ item.layer_height }} mm
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="filament_name"
>
<span v-if="item.filament_name !== undefined">
{{ item.filament_name }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="filament_type"
>
<span v-if="item.filament_type !== undefined">
{{ item.filament_type }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="filament_total"
>
<span v-if="item.filament_total !== undefined">
{{ $filters.getReadableLengthString(item.filament_total) }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="filament_weight_total"
>
<span v-if="item.filament_weight_total !== undefined">
{{ $filters.getReadableWeightString(item.filament_weight_total) }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="history.filament_used"
>
<span v-if="item.history && item.history.filament_used !== undefined">
{{ $filters.getReadableLengthString(item.history.filament_used) }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="nozzle_diameter"
>
<span v-if="item.nozzle_diameter !== undefined">
{{ item.nozzle_diameter }} mm
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="slicer"
>
<span v-if="item.slicer !== undefined">
{{ item.slicer }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="slicer_version"
>
<span v-if="item.slicer_version !== undefined">
{{ item.slicer_version }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="estimated_time"
>
<span v-if="item.estimated_time !== undefined">
{{ $filters.formatCounterSeconds(item.estimated_time) }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="history.print_duration"
>
<span v-if="item.history && item.history.print_duration !== undefined">
{{ $filters.formatCounterSeconds(item.history.print_duration) }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="history.total_duration"
>
<span v-if="item.history && item.history.total_duration !== undefined">
{{ $filters.formatCounterSeconds(item.history.total_duration) }}
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="first_layer_bed_temp"
>
<span v-if="item.first_layer_bed_temp !== undefined">
{{ item.first_layer_bed_temp }}<small>°C</small>
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="first_layer_extr_temp"
>
<span v-if="item.first_layer_extr_temp !== undefined">
{{ item.first_layer_extr_temp }}<small>°C</small>
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="chamber_temp"
>
<span v-if="item.chamber_temp !== undefined">
{{ item.chamber_temp }}<small>°C</small>
</span>
</file-row-item>

<file-row-item
v-if="root === 'gcodes'"
:headers="headers"
item-value="print_start_time"
>
<span v-if="item.print_start_time !== undefined && item.print_start_time !== null">
{{ $filters.formatDateTime(item.print_start_time * 1000) }}
</span>
</file-row-item>
<template v-if="root === 'gcodes'">
<file-row-item
:headers="headers"
item-value="history.status"
>
<span v-if="item.history && item.history.status !== undefined">
<job-history-item-status :job="item.history" />
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="object_height"
>
<span v-if="item.object_height !== undefined">
{{ $filters.getReadableLengthString(item.object_height) }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="first_layer_height"
>
<span v-if="item.first_layer_height !== undefined">
{{ item.first_layer_height }} mm
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="layer_height"
>
<span v-if="item.layer_height !== undefined">
{{ item.layer_height }} mm
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="filament_name"
>
<span v-if="item.filament_name !== undefined">
{{ item.filament_name }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="filament_type"
>
<span v-if="item.filament_type !== undefined">
{{ item.filament_type }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="filament_total"
>
<span v-if="item.filament_total !== undefined">
{{ $filters.getReadableLengthString(item.filament_total) }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="filament_weight_total"
>
<span v-if="item.filament_weight_total !== undefined">
{{ $filters.getReadableWeightString(item.filament_weight_total) }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="history.filament_used"
>
<span v-if="item.history && item.history.filament_used !== undefined">
{{ $filters.getReadableLengthString(item.history.filament_used) }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="nozzle_diameter"
>
<span v-if="item.nozzle_diameter !== undefined">
{{ item.nozzle_diameter }} mm
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="slicer"
>
<span v-if="item.slicer !== undefined">
{{ item.slicer }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="slicer_version"
>
<span v-if="item.slicer_version !== undefined">
{{ item.slicer_version }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="estimated_time"
>
<span v-if="item.estimated_time !== undefined">
{{ $filters.formatCounterSeconds(item.estimated_time) }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="history.print_duration"
>
<span v-if="item.history && item.history.print_duration !== undefined">
{{ $filters.formatCounterSeconds(item.history.print_duration) }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="history.total_duration"
>
<span v-if="item.history && item.history.total_duration !== undefined">
{{ $filters.formatCounterSeconds(item.history.total_duration) }}
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="first_layer_bed_temp"
>
<span v-if="item.first_layer_bed_temp !== undefined">
{{ item.first_layer_bed_temp }}<small>°C</small>
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="first_layer_extr_temp"
>
<span v-if="item.first_layer_extr_temp !== undefined">
{{ item.first_layer_extr_temp }}<small>°C</small>
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="chamber_temp"
>
<span v-if="item.chamber_temp !== undefined">
{{ item.chamber_temp }}<small>°C</small>
</span>
</file-row-item>

<file-row-item
:headers="headers"
item-value="print_start_time"
>
<span v-if="item.print_start_time !== undefined && item.print_start_time !== null">
{{ $filters.formatDateTime(item.print_start_time * 1000) }}
</span>
</file-row-item>
</template>

<file-row-item
:headers="headers"
Expand Down Expand Up @@ -290,11 +283,13 @@ import type { AppTableHeader } from '@/types'
import FilesMixin from '@/mixins/files'
import FileRowItem from './FileRowItem.vue'
import JobHistoryItemStatus from '@/components/widgets/history/JobHistoryItemStatus.vue'
import { SupportedImageFormats, SupportedVideoFormats } from '@/globals'
@Component({
components: {
FileRowItem
FileRowItem,
JobHistoryItemStatus
}
})
export default class FileSystemBrowser extends Mixins(FilesMixin) {
Expand Down
Loading

0 comments on commit 5b964e7

Please sign in to comment.