feature: display filament weight metadata in gcode-files list
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
1 parent
ddbab8538a
commit
5e09f52a79
3 files changed
+14
-10
No files matched your search
@@ -98,6 +98,7 @@
|
||||
"ObjectHeight": "Object Height",
|
||||
"LayerHeight": "Layer Height",
|
||||
"FilamentUsage": "Filament Usage",
|
||||
"FilamentWeight": "Filament Weight",
|
||||
"PrintTime": "Print Time",
|
||||
"Slicer": "Slicer"
|
||||
},
|
||||
|
||||
+12
-10
@@ -198,6 +198,7 @@
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'object_height').visible">{{ item.object_height ? item.object_height.toFixed(2)+' mm' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'layer_height').visible">{{ item.layer_height ? item.layer_height.toFixed(2)+' mm' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_total').visible">{{ item.filament_total ? item.filament_total.toFixed()+' mm' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_weight_total').visible">{{ item.filament_weight_total ? item.filament_weight_total.toFixed()+' g' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'estimated_time').visible">{{ formatPrintTime(item.estimated_time) }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'slicer').visible">{{ item.slicer ? item.slicer : '--' }}<br /><small v-if="item.slicer_version">{{ item.slicer_version}}</small></td>
|
||||
</tr>
|
||||
@@ -534,16 +535,17 @@
|
||||
}),
|
||||
headers() {
|
||||
const headers = [
|
||||
{ text: '', value: '', align: 'left', configable: false, visible: true, filterable: false },
|
||||
{ text: this.$t('Files.Name'), value: 'filename', align: 'left', configable: false, visible: true },
|
||||
{ text: '', value: 'status', align: 'left', configable: false, visible: true },
|
||||
{ text: this.$t('Files.Filesize'), value: 'size', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.LastModified'), value: 'modified', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.ObjectHeight'), value: 'object_height', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.LayerHeight'), value: 'layer_height', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.FilamentUsage'), value: 'filament_total', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.PrintTime'), value: 'estimated_time', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.Slicer'), value: 'slicer', align: 'right', configable: true, visible: true },
|
||||
{ text: '', value: '', align: 'left', configable: false, visible: true, filterable: false },
|
||||
{ text: this.$t('Files.Name'), value: 'filename', align: 'left', configable: false, visible: true },
|
||||
{ text: '', value: 'status', align: 'left', configable: false, visible: true },
|
||||
{ text: this.$t('Files.Filesize'), value: 'size', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.LastModified'), value: 'modified', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.ObjectHeight'), value: 'object_height', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.LayerHeight'), value: 'layer_height', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.FilamentUsage'), value: 'filament_total', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.FilamentWeight'), value: 'filament_weight_total', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.PrintTime'), value: 'estimated_time', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.Slicer'), value: 'slicer', align: 'right', configable: true, visible: true },
|
||||
]
|
||||
|
||||
headers.forEach((header) => {
|
||||
|
||||
@@ -87,6 +87,7 @@ export default {
|
||||
let newData = {
|
||||
estimated_time: safeDefault(payload.estimated_time),
|
||||
filament_total: safeDefault(payload.filament_total),
|
||||
filament_weight_total: safeDefault(payload.filament_weight_total),
|
||||
first_layer_height: safeDefault(payload.first_layer_height),
|
||||
first_layer_bed_temp: safeDefault(payload.first_layer_bed_temp),
|
||||
first_layer_extr_temp: safeDefault(payload.first_layer_extr_temp),
|
||||
|
||||
Reference in new issue
Block a user