Config UI: move generic meters to top (#12281)
This commit is contained in:
parent
01017789fe
commit
6f9c3384a4
5 changed files with 23 additions and 9 deletions
|
|
@ -44,6 +44,16 @@
|
|||
:disabled="!isNew"
|
||||
class="form-select w-100"
|
||||
>
|
||||
<option
|
||||
v-for="option in genericOptions"
|
||||
:key="option.name"
|
||||
:value="option.template"
|
||||
>
|
||||
{{ option.name }}
|
||||
</option>
|
||||
<option v-if="genericOptions.length" disabled>
|
||||
──────────
|
||||
</option>
|
||||
<option
|
||||
v-for="option in templateOptions"
|
||||
:key="option.name"
|
||||
|
|
@ -52,6 +62,7 @@
|
|||
{{ option.name }}
|
||||
</option>
|
||||
</select>
|
||||
{{ templateName }}
|
||||
</FormRow>
|
||||
<p v-if="loadingTemplate">Loading ...</p>
|
||||
<Modbus
|
||||
|
|
@ -198,7 +209,10 @@ export default {
|
|||
return this.type || this.selectedType;
|
||||
},
|
||||
templateOptions() {
|
||||
return this.products;
|
||||
return this.products.filter((p) => p.group !== "generic");
|
||||
},
|
||||
genericOptions() {
|
||||
return this.products.filter((p) => p.group === "generic");
|
||||
},
|
||||
templateParams() {
|
||||
const params = this.template?.Params || [];
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
template: sunspec-battery-control
|
||||
products:
|
||||
- description:
|
||||
de: Sunspec Batterie (Model 802)
|
||||
en: Sunspec Battery (Model 802)
|
||||
de: SunSpec Batterie (Model 802)
|
||||
en: SunSpec Battery (Model 802)
|
||||
capabilities: ["battery-control"]
|
||||
group: generic
|
||||
params:
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ template: sunspec-hybrid
|
|||
covers: ["sunspec-hybrid-inverter"]
|
||||
products:
|
||||
- description:
|
||||
de: Hybridwechselrichter
|
||||
en: Hybrid Inverter
|
||||
de: SunSpec Hybridwechselrichter
|
||||
en: SunSpec Hybrid Inverter
|
||||
group: generic
|
||||
params:
|
||||
- name: usage
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
template: sunspec-inverter-control
|
||||
products:
|
||||
- description:
|
||||
de: Sunspec Batterie (Model 124)
|
||||
en: Sunspec Battery (Model 124)
|
||||
de: SunSpec Batterie (Model 124)
|
||||
en: SunSpec Battery (Model 124)
|
||||
capabilities: ["battery-control"]
|
||||
group: generic
|
||||
params:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
template: sunspec-inverter
|
||||
products:
|
||||
- description:
|
||||
de: Wechselrichter
|
||||
en: Inverter
|
||||
de: SunSpec Wechselrichter
|
||||
en: SunSpec Inverter
|
||||
group: generic
|
||||
params:
|
||||
- name: usage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue