Skip to content

Commit

Permalink
feat: add displaying/sorting of/by more gcode metadata (#519)
Browse files Browse the repository at this point in the history
adds displaying of and sorting by nozzle diameter, filament name and filament type metadata

Signed-off-by: Dominik Willner <[email protected]>
  • Loading branch information
dw-0 authored Jan 6, 2022
1 parent f81c253 commit 55df4da
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/panels/GcodefilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@
<td class="text-right" v-if="headers.find(header => header.value === 'modified').visible">{{ formatDate(item.modified) }}</td>
<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 === 'nozzle_diameter').visible">{{ item.nozzle_diameter ? item.nozzle_diameter.toFixed(2)+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_name').visible">{{ item.filament_name ? item.filament_name : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_type').visible">{{ item.filament_type ? item.filament_type : '--' }}</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(2)+' g' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'estimated_time').visible">{{ formatPrintTime(item.estimated_time) }}</td>
Expand Down Expand Up @@ -579,6 +582,9 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
{ 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.NozzleDiameter'), value: 'nozzle_diameter', align: 'right', configable: true, visible: true },
{ text: this.$t('Files.FilamentName'), value: 'filament_name', align: 'right', configable: true, visible: true },
{ text: this.$t('Files.FilamentType'), value: 'filament_type', 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 },
Expand Down
3 changes: 3 additions & 0 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@
"LastModified": "Zuletzt geändert",
"ObjectHeight": "Objekthöhe",
"LayerHeight": "Schichthöhe",
"NozzleDiameter": "Düsendurchmesser",
"Filament": "Filament",
"FilamentName": "Filament Name",
"FilamentType": "Filament Typ",
"FilamentUsage": "Filamentverbrauch",
"FilamentWeight": "Filamentgewicht",
"PrintTime": "Druckdauer",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@
"LastModified": "Last modified",
"ObjectHeight": "Object Height",
"LayerHeight": "Layer Height",
"NozzleDiameter": "Nozzle Diameter",
"Filament": "Filament",
"FilamentName": "Filament Name",
"FilamentType": "Filament Type",
"FilamentUsage": "Filament Usage",
"FilamentWeight": "Filament Weight",
"PrintTime": "Print Time",
Expand Down
3 changes: 3 additions & 0 deletions src/store/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ export const checkKlipperConfigModules = [
*/
export const allowedMetadata = [
'estimated_time',
'filament_name',
'filament_type',
'filament_total',
'filament_weight_total',
'nozzle_diameter',
'first_layer_bed_temp',
'first_layer_extr_temp',
'first_layer_height',
Expand Down

0 comments on commit 55df4da

Please sign in to comment.