-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Docs: introduce product identifier #21670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
de0a497
10c4f8b
c822b0e
bfb16e8
7dadd35
73c83b0
b70640b
d27c7b2
58a6da5
fc1a475
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,14 +43,14 @@ func (t *Template) RenderDocumentation(product Product, lang string) ([]byte, er | |
| } | ||
|
|
||
| var modbusRender string | ||
| modbusData := make(map[string]interface{}) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warum brauchts das?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plan ist auf der Produkt-Seite in der Doku die einzelnen Parameter tabellarisch zu erklären. Bei den Modbus-Geräten haben wir ja implizite Parameter erzeugt, die durch die Modbus Eigenschaft erzeugt werden. Dafür braucht es die Modbus Infos (Defaults, ...) des Geräts. Quasi das Äquivalent zur
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Die werden doch aber- falls modbus- weiter unten eh angelegt?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was meinst du damit? Modbus ist ja immer eine Sonderbehandlung in der Darstellung. Unterschiedliche Optionen/Spielarten aus denen der Nutzer auswählen muss und so. Wenns um die konkrete Zeile geht. Die hab ich nur weiter nach vorne geschoben, damit die Daten nicht nur in
|
||
| if modbusChoices := t.ModbusChoices(); len(modbusChoices) > 0 { | ||
| if i, _ := t.ParamByName(ParamModbus); i > -1 { | ||
| modbusTmpl, err := template.New("yaml").Funcs(sprig.FuncMap()).Parse(documentationModbusTmpl) | ||
| if err != nil { | ||
| panic(err) | ||
| } | ||
|
|
||
| modbusData := make(map[string]interface{}) | ||
| t.ModbusValues(RenderModeDocs, modbusData) | ||
|
|
||
| out := new(bytes.Buffer) | ||
|
|
@@ -91,6 +91,7 @@ func (t *Template) RenderDocumentation(product Product, lang string) ([]byte, er | |
|
|
||
| data := map[string]interface{}{ | ||
| "Template": t.Template, | ||
| "ProductIdentifier": product.Identifier(), | ||
| "ProductBrand": product.Brand, | ||
| "ProductDescription": product.Description.String(lang), | ||
| "ProductGroup": t.GroupTitle(lang), | ||
|
|
@@ -102,6 +103,7 @@ func (t *Template) RenderDocumentation(product Product, lang string) ([]byte, er | |
| "AdvancedParams": hasAdvancedParams, | ||
| "Usages": t.Usages(), | ||
| "Modbus": modbusRender, | ||
| "ModbusData": modbusData, | ||
| } | ||
|
|
||
| out := new(bytes.Buffer) | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.