xref: /openbmc/openbmc-tools/dbus-vis/index.html (revision c403b03712808a0fa8deca1a90327dea67f8937e)
1b65280ffSSui Chen<!DOCTYPE html>
2b65280ffSSui Chen<!-- Caution: Electron does not allow inline scripts or styles! -->
3b65280ffSSui Chen<html>
4b65280ffSSui Chen  <head>
5b65280ffSSui Chen    <meta charset="UTF-8">
6b65280ffSSui Chen    <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
7b65280ffSSui Chen    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
8b65280ffSSui Chen    <meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
9b65280ffSSui Chen    <title>DBus &amp; IPMI Request Visualizer</title>
10b65280ffSSui Chen  </head>
11b65280ffSSui Chen  <body>
12b65280ffSSui Chen    <div id="div_title"><span>
13b65280ffSSui Chen    <b>DBus &amp; IPMI Request Visualizer</b>
14b65280ffSSui Chen    </span>
15b65280ffSSui Chen    </div>
16b65280ffSSui Chen    <div id="title_mode_select">
17b65280ffSSui Chen      <span>
18b65280ffSSui Chen        <input type="radio" id="radio_open_file" name="mode" value="open_file"></input>
19b65280ffSSui Chen        <label for="radio_open_file">Open an existing file</label>
20b65280ffSSui Chen        <input type="radio" id="radio_capture" name="mode" value="capture"></input>
21b65280ffSSui Chen        <label for="radio_capture">Capture on a BMC</label>
22b65280ffSSui Chen      </span>
23b65280ffSSui Chen    </div>
24b65280ffSSui Chen    <div id="title_open_file">
25b65280ffSSui Chen      <span><b>File name: </b></span>
26b65280ffSSui Chen      <span id="file_name"></span>
27b65280ffSSui Chen      <button id="btn_open_file">Open file</button>
28b65280ffSSui Chen      <br />
29b65280ffSSui Chen    </div>
30b65280ffSSui Chen    <div id="title_capture">
31b65280ffSSui Chen      <span><b>Capture: </b></span>
32b65280ffSSui Chen      <input type="text" id="text_hostname" value=""></input>
33b65280ffSSui Chen      <button id="btn_start_capture">Start Capture</button>
34b65280ffSSui Chen      <button id="btn_stop_capture">Stop Capture</button>
35b65280ffSSui Chen      <select id="select_capture_mode">
36b65280ffSSui Chen        <option value="live">Live</option>
37b65280ffSSui Chen        <option value="staged">Staged (IPMI detailed)</option>
38b65280ffSSui Chen        <option value="staged2">Staged (DBus + IPMI)</option>
39b65280ffSSui Chen      </select>
40b65280ffSSui Chen    </div>
41b65280ffSSui Chen    <div id="title_capture_info">
42b65280ffSSui Chen      <div id="capture_info">Info will appear here</div>
43b65280ffSSui Chen    </div>
44b65280ffSSui Chen
45b65280ffSSui Chen    <hr/>
46b65280ffSSui Chen
47b65280ffSSui Chen    <div id="div_group_by">
48b65280ffSSui Chen    <span id="span_group_by_dbus">
49b65280ffSSui Chen        Group DBus Requests by:
50b65280ffSSui Chen        <input type="checkbox" id="dbus_column1" value="Type">Type</input>
51b65280ffSSui Chen        <input type="checkbox" id="dbus_column2" value="Serial">Serial</input>
52b65280ffSSui Chen        <input type="checkbox" id="dbus_column3" value="Sender">Sender</input>
53b65280ffSSui Chen        <input type="checkbox" id="dbus_column4" value="Destination">Destination</input>
54b65280ffSSui Chen        <input type="checkbox" id="dbus_column5" value="Path"checked>Path</input>
55b65280ffSSui Chen        <input type="checkbox" id="dbus_column6" value="Interface" checked>Interface</input>
56b65280ffSSui Chen        <input type="checkbox" id="dbus_column7" value="Member">Member</input>
57b65280ffSSui Chen    </span>
58b65280ffSSui Chen    <span id="span_group_by_ipmi">
59b65280ffSSui Chen        Group IPMI Requests by:
60b65280ffSSui Chen        <input type="checkbox" id="c1" value="NetFN" checked>NetFN</input>
61b65280ffSSui Chen        <input type="checkbox" id="c2" value="CMD"     checked>CMD</input>
62b65280ffSSui Chen    </span>
63b65280ffSSui Chen    <div id="span_group_by_boost_asio_handler">
64b65280ffSSui Chen        Group Asio Handlers by:
65b65280ffSSui Chen        <input type="checkbox" id="bah1" value="Layout Level" checked>Layout Level</input>
66b65280ffSSui Chen        <input type="checkbox" id="bah2" value="Description">Description</input>
67b65280ffSSui Chen        <input type="checkbox" id="bah3" value="Description1">Description w/ addresses removed</input>
68b65280ffSSui Chen    </div>
69b65280ffSSui Chen    </div>
70b65280ffSSui Chen
71b65280ffSSui Chen    <div id="div_canvas">
72b65280ffSSui Chen        <div id="blocker">
73b65280ffSSui Chen            <div id="blocker_caption">AAAAA</div>
74b65280ffSSui Chen        </div>
75b65280ffSSui Chen        <div id="welcome_screen">
76b65280ffSSui Chen            <div id="welcome_screen_content">
77b65280ffSSui Chen                <br/><span>Welcome! Please <button id="btn_open_file2">Open file</button> to get timeline view/s.<span>
78b65280ffSSui Chen                <br/>
79b65280ffSSui Chen                <br/>Supported file types:
80b65280ffSSui Chen                <ol>
81b65280ffSSui Chen                    <li>DBus pcap file</li>
82b65280ffSSui Chen                    <li>Boost ASIO handler log file</li>
83b65280ffSSui Chen                </ol>
84b65280ffSSui Chen                One file from each type (2 files in total) can be viewed simultaneously.
85b65280ffSSui Chen            </div>
86b65280ffSSui Chen            <hr />
87b65280ffSSui Chen            <div id="dbus_pcap_status_content">
88b65280ffSSui Chen              dbus-pcap status goes here
89b65280ffSSui Chen            </div>
90b65280ffSSui Chen            <div id="dbus_pcap_error_content">
91b65280ffSSui Chen              The <b>dbus-pcap</b> script is not found; dbus-vis needs <b>dbus-pcap</b> for parsing PCAP files.<br/><br/>
92b65280ffSSui Chen              Click to down <b>dbus-pcap</b> from: <br/>
93b65280ffSSui Chen                https://raw.githubusercontent.com/openbmc/openbmc-tools/08ce0a5bad2b5c970af567c2e9888d444afe3946/dbus-pcap/dbus-pcap<br/><br/>
94b65280ffSSui Chen              <button id="btn_download_dbus_pcap">Download to dbus-vis folder</button>
95b65280ffSSui Chen            </div>
96b65280ffSSui Chen            <div id="scapy_error_content">
97b65280ffSSui Chen              The <b>scapy</b> Python module is not installed. dbus-vis depends on dbus-pcap, which in turn depends on the scapy Python module.
98b65280ffSSui Chen
99b65280ffSSui Chen              Please install it using either of the following commands:<br/>
100b65280ffSSui Chen              <br/>
101b65280ffSSui Chen              python3 -m pip install scapy<br/>
102b65280ffSSui Chen              sudo apt install python3-scapy<br/>
103b65280ffSSui Chen              <br/>
104b65280ffSSui Chen              After installation, refresh dbus-vis with Ctrl+R.
105b65280ffSSui Chen            </div>
106b65280ffSSui Chen        </div>
107b65280ffSSui Chen        <canvas id="my_canvas_dbus" width="1400" height="600"></canvas>
108b65280ffSSui Chen        <canvas id="my_canvas_ipmi" width="1400" height="200"></canvas>
109b65280ffSSui Chen        <canvas id="my_canvas_boost_asio_handler" width="1400" height="200"></canvas>
110b65280ffSSui Chen    </div>
111b65280ffSSui Chen
112b65280ffSSui Chen    <div id="div_navi_and_replay">
113b65280ffSSui Chen      <div>
114b65280ffSSui Chen        <span>
115b65280ffSSui Chen        Navigation Control:
116b65280ffSSui Chen        <button id="btn_zoom_in">Zoom In</button>
117b65280ffSSui Chen        <button id="btn_zoom_out">Zoom Out</button>
118b65280ffSSui Chen        <button id="btn_pan_left">&lt;&lt;</button>
119b65280ffSSui Chen        <button id="btn_pan_right">&gt;&gt;</button>
120b65280ffSSui Chen        <button id="btn_zoom_reset">Reset</button>
121b65280ffSSui Chen        </span>
122b65280ffSSui Chen      </div>
123b65280ffSSui Chen      <div>Keyboard: [Left]/[right] arrow keys to pan; [Up]/[down] arrow keys to zoom in/out; Hold [shift] to move faster<br/>Mouse: [Left click]: highlight an interval; [wheel up/down]: zoom in/out; click overflow triangles to warp to out-of-viewport requests
124b65280ffSSui Chen      </div>
125b65280ffSSui Chen      <div id="highlight_hint">Click highlighted region to zoom into the region</div>
126b65280ffSSui Chen      <div>
127b65280ffSSui Chen        <input type="checkbox" id="cb_debuginfo">Show Debug Info</input>
128b65280ffSSui Chen      </div>
129b65280ffSSui Chen      <br/>
130b65280ffSSui Chen      <div id="ipmi_replay">
131b65280ffSSui Chen        <span>Generate replay commands for the </span><span id="highlight_count">0</span><span> highlighted IPMI requests:</span>
132b65280ffSSui Chen        <br/>
133b65280ffSSui Chen        <span>For replaying through "ipmitool" on host or BMC:
134b65280ffSSui Chen        <button id="gen_replay_ipmitool1">Individual calls</button>
135b65280ffSSui Chen        <button id="gen_replay_ipmitool2">exec command list</button></span>
136b65280ffSSui Chen        <br/>
137b65280ffSSui Chen        <span>For replaying through "busctl" on BMC:
138b65280ffSSui Chen        <button id="gen_replay_ipmid_legacy">Legacy Interface (for btbridged)</button>
139b65280ffSSui Chen        <button id="gen_replay_ipmid_new">New Interface (for kcsbridged / netipmid)</button></span>
140b65280ffSSui Chen        <textarea rows="10" cols="150" id="ipmi_replay_output"></textarea>
141b65280ffSSui Chen      </div>
142b65280ffSSui Chen    </div> <!-- navi and replay -->
143b65280ffSSui Chen    <br/>
144b65280ffSSui Chen
145*c403b037SSui Chen    <div id="highlighted_messages" class="info_panel">
146*c403b037SSui Chen      <div id="highlighted_messages_header" class="info_panel_header">Info of selected range</div>
147*c403b037SSui Chen      <div id="highlighted_messages_content" class="info_panel_content"></div>
148*c403b037SSui Chen    </div>
149*c403b037SSui Chen
150b65280ffSSui Chen    <!-- You can also require other files to run in this process -->
151b65280ffSSui Chen    <script src="./timeline_view.js"></script>
152b65280ffSSui Chen    <script src="./dbus_timeline_vis.js"></script>
153b65280ffSSui Chen    <script src="./ipmi_timeline_vis.js"></script>
154b65280ffSSui Chen    <script src="./boost_handler_timeline_vis.js"></script>
155b65280ffSSui Chen    <script src="./ipmi_parse.js"></script>
156b65280ffSSui Chen    <script src="./ipmi_capture.js"></script>
157b65280ffSSui Chen    <script src="./renderer.js"></script>
158b65280ffSSui Chen    <script src="./dbus_pcap_loader.js"></script>
159*c403b037SSui Chen    <script src="./info_panel.js"></script>
160b65280ffSSui Chen    <script src="./initialization.js"></script>
161b65280ffSSui Chen    <link rel="stylesheet" href="./dbus_vis.css">
162b65280ffSSui Chen  </body>
163b65280ffSSui Chen</html>
164