8000 [Workflow] Add a link to mermaid.live from the profiler · symfony/web-profiler-bundle@2d55212 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d55212

Browse files
committed
[Workflow] Add a link to mermaid.live from the profiler
1 parent 1138025 commit 2d55212

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

Resources/views/Collector/workflow.html.twig

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,20 +137,22 @@
137137
{{ source('@WebProfiler/Script/Mermaid/mermaid-flowchart-v2.min.js') }}
138138
const isDarkMode = document.querySelector('body').classList.contains('theme-dark');
139139
mermaid.initialize({
140-
flowchart: { useMaxWidth: false },
140+
flowchart: {
141+
useMaxWidth: true,
142+
},
141143
securityLevel: 'loose',
142-
'theme': 'base',
143-
'themeVariables': {
144+
theme: 'base',
145+
themeVariables: {
144146
darkMode: isDarkMode,
145-
'fontFamily': 'var(--font-family-system)',
146-
'fontSize': 'var(--font-size-body)',
147+
fontFamily: 'var(--font-family-system)',
148+
fontSize: 'var(--font-size-body)',
147149
// the properties below don't support CSS variables
148-
'primaryColor': isDarkMode ? 'lightsteelblue' : 'aliceblue',
149-
'primaryTextColor': isDarkMode ? '#000' : '#000',
150-
'primaryBorderColor': isDarkMode ? 'steelblue' : 'lightsteelblue',
151-
'lineColor': isDarkMode ? '#939393' : '#d4d4d4',
152-
'secondaryColor': isDarkMode ? 'lightyellow' : 'lightyellow',
153-
'tertiaryColor': isDarkMode ? 'lightSalmon' : 'lightSalmon',
150+
primaryColor: isDarkMode ? 'lightsteelblue' : 'aliceblue',
151+
primaryTextColor: isDarkMode ? '#000' : '#000',
152+
primaryBorderColor: isDarkMode ? 'steelblue' : 'lightsteelblue',
153+
lineColor: isDarkMode ? '#939393' : '#d4d4d4',
154+
secondaryColor: isDarkMode ? 'lightyellow' : 'lightyellow',
155+
tertiaryColor: isDarkMode ? 'lightSalmon' : 'lightSalmon',
154156
}
155157
});
156158
@@ -275,6 +277,7 @@
275277
click {{ nodeId }} showNodeDetails{{ collector.hash(name) }}
276278
{% endfor %}
277279
</pre>
280+
<a href="{{ collector.buildMermaidLiveLink(name) }}">View on mermaid.live</a>
278281

279282
<h3>Calls</h3>
280283
<table>

0 commit comments

Comments
 (0)
0