Skip to content

Commit e0985aa

Browse files
authored
mermaid theme changes
1 parent c03dd59 commit e0985aa

File tree

3 files changed

+9
-127
lines changed

3 files changed

+9
-127
lines changed

docs/html/_sources/development-logic.rst.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ Powermon Logic
55

66
.. mermaid::
77
:zoom:
8-
:config: {"theme": "base"}
8+
:config: {"theme": "base", 'themeVariables': {
9+
'lineColor': '#F8B229',
10+
'secondaryColor': '#006100',
11+
}}
912

1013
classDiagram
1114
direction LR

docs/html/development-logic.html

Lines changed: 1 addition & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,6 @@
1313
<script src="_static/documentation_options.js?v=5929fcd5"></script>
1414
<script src="_static/doctools.js?v=9bcbadda"></script>
1515
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
16-
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.esm.min.mjs"></script>
17-
<script type="module" src="https://cdn.jsdelivr.net/npm/@mermaid-js/[email protected]/dist/mermaid-layout-elk.esm.min.mjs"></script>
18-
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.esm.min.mjs";import elkLayouts from "https://cdn.jsdelivr.net/npm/@mermaid-js/[email protected]/dist/mermaid-layout-elk.esm.min.mjs";mermaid.registerLayoutLoaders(elkLayouts);mermaid.initialize({startOnLoad:false});</script>
19-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js"></script>
20-
<script type="module">
21-
import mermaid from "https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.esm.min.mjs";
22-
const load = async () => {
23-
await mermaid.run();
24-
const all_mermaids = document.querySelectorAll(".mermaid");
25-
const mermaids_to_add_zoom = 1 === -1 ? all_mermaids.length : 1;
26-
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
27-
if(mermaids_to_add_zoom > 0) {
28-
var svgs = d3.selectAll(".mermaid[data-zoom-id=id-905389ca-75e0-4f38-8925-742894cb8329] svg");
29-
if(all_mermaids.length !== mermaids_processed.length) {
30-
// try again in a sec, wait for mermaids to load
31-
setTimeout(load, 200);
32-
return;
33-
} else if(svgs.size() !== mermaids_to_add_zoom) {
34-
// try again in a sec, wait for mermaids to load
35-
setTimeout(load, 200);
36-
return;
37-
} else {
38-
svgs.each(function() {
39-
var svg = d3.select(this);
40-
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
41-
var inner = svg.select("g");
42-
var zoom = d3.zoom().on("zoom", function(event) {
43-
inner.attr("transform", event.transform);
44-
});
45-
svg.call(zoom);
46-
});
47-
}
48-
}
49-
};
50-
51-
window.addEventListener("load", load);
52-
</script>
5316

5417

5518
<!-- bundled in js (rollup iife) -->
@@ -208,94 +171,7 @@
208171

209172
<section id="powermon-logic">
210173
<h1>Powermon Logic<a class="headerlink" href="#powermon-logic" title="Link to this heading"></a></h1>
211-
<pre data-zoom-id="id-905389ca-75e0-4f38-8925-742894cb8329" class="mermaid">
212-
---
213-
config:
214-
theme: base
215-
216-
---
217-
classDiagram
218-
direction LR
219-
Device &quot;1&quot; --o &quot;1&quot; Port
220-
Device &quot;1&quot; --o &quot;1&quot; MqttBroker
221-
Device &quot;1&quot; --o &quot;*&quot; Command
222-
class Device{
223-
name
224-
device_id
225-
model
226-
manufacturer
227-
commands: list[Command]
228-
port: Port
229-
mqtt_broker: MqttBroker
230-
add_command(Command)
231-
run()
232-
}
233-
class Port{
234-
protocol: Protocol
235-
run_command(Command)
236-
send_and_receive(Command) &quot;called from run_command&quot;
237-
}
238-
class Protocol{
239-
protocol_id: str
240-
command_definitions: dict[int, CommandDefinition]
241-
add_command_definitions(command_definitions_config, result_type)
242-
get_command_definition(command: str) -&gt; CommandDefinition
243-
get_full_command(command: str) -&gt; bytes
244-
}
245-
Port &quot;1&quot; --o &quot;1&quot; Protocol
246-
class Command{
247-
code: str
248-
type: str
249-
override: dict
250-
outputs: list[Output]
251-
trigger: Trigger
252-
command_definition: CommandDefinition
253-
is_due() -&gt; bool
254-
build_result(raw_response: bytes, protocol: Protocol) -&gt; Result
255-
}
256-
Command &quot;1&quot; --o &quot;*&quot; Output
257-
Command &quot;1&quot; --o &quot;1&quot; Trigger
258-
Command &quot;1&quot; --o &quot;1&quot; CommandDefinition
259-
Command &quot;1&quot; --o &quot;1&quot; Result
260-
class CommandDefinition{
261-
code
262-
description
263-
help_text: str
264-
result_type: ResultType
265-
reading_definitions: list[ReadingDefinition]
266-
test_responses: list
267-
regex: str
268-
get_reading_definition(lookup: str|int) -&gt; ReadingDefinition
269-
}
270-
CommandDefinition&quot;1&quot; --o &quot;*&quot; ReadingDefinition
271-
class ReadingDefinition{
272-
index
273-
response_type: ResponseType
274-
description: str
275-
device_class: str
276-
state_class: str
277-
icon: str
278-
unit: str
279-
options: list | dict
280-
default: int | str
281-
format_template: str
282-
reading_from_raw_response(raw_value) -&gt; list[Reading]
283-
translate_raw_response(raw_value) &quot;calls reading_from_raw_response&quot;
284-
}
285-
class Result{
286-
result_type: ResultType
287-
command_definition: CommandDefinition
288-
raw_response: bytes
289-
readings: list[Reading]
290-
decode_responses(self, responses) -&gt; list[Reading]
291-
readings_from_response(response, reading_definition: ReadingDefinition) -&gt; list[Reading]
292-
}
293-
class Output{
294-
name: str
295-
process(Command, Result, mqtt_broker, device_info)
296-
multiple_from_config() -&gt; list[Output]
297-
}
298-
</pre><p>Notes:</p>
174+
<p>Notes:</p>
299175
</section>
300176

301177

docs_source/source/development-logic.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ Powermon Logic
55

66
.. mermaid::
77
:zoom:
8-
:config: {"theme": "base"}
8+
:config: {"theme": "base", 'themeVariables': {
9+
'lineColor': '#F8B229',
10+
'secondaryColor': '#006100',
11+
}}
912

1013
classDiagram
1114
direction LR

0 commit comments

Comments
 (0)