Skip to content

Commit

Permalink
chore(track_path): organize track path table layout (#164)
Browse files Browse the repository at this point in the history
* fix(track_path): table layout

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* chore: fix errors

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

---------

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
  • Loading branch information
iwatake2222 authored Feb 27, 2024
1 parent 3484862 commit 7d88242
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions report/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ def read_note_text(trace_data_dir, dest_dir, note_text_top_path, note_text_botto
if os.path.exists(caret_record_info_path):
with open(caret_record_info_path, encoding='UTF-8') as f_yaml:
caret_record_info = yaml.safe_load(f_yaml)
if not caret_record_info:
caret_record_info = {}
note_text_top = '<ul>\n'
note_text_top += f'<li>trace_start_datetime: {trace_datetime}</li>\n'
new_caret_record_info = {}
Expand Down
1 change: 0 additions & 1 deletion report/report_analysis/template_html_analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ <h2>Node Analysis Report</h2>
{% endfor %}
</ul>

<hr />
<hr />

<h2>Track of Response Time</h2>
Expand Down
4 changes: 3 additions & 1 deletion report/track_path/make_report_track_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def get_version_str_from_yaml(report_dir: str):
if os.path.exists(caret_record_info_path):
with open(caret_record_info_path, encoding='UTF-8') as f_yaml:
caret_record_info = yaml.safe_load(f_yaml)
if not caret_record_info:
caret_record_info = {}
autoware_version = caret_record_info.get('autoware_version', '')
pilot_auto_version = caret_record_info.get('pilot_auto_version', '')
env = caret_record_info.get('env', '')
Expand All @@ -113,7 +115,7 @@ def get_version_str_from_yaml(report_dir: str):
elif autoware_version == '' and pilot_auto_version:
version = version + ', ' + pilot_auto_version
if job_description:
version = version + ', ' + job_description
version = version + ', ' + job_description[:20]
if env:
version = version + ', ' + env
if route:
Expand Down
4 changes: 2 additions & 2 deletions report/track_path/template_track_path.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
{% set data_num = reportpath_version_dict.keys()|length %}
{% set table_heght = [(1 + data_num) * 3, 5* 3] | min %}
{% for target_path_name, stats in stats_path_dict.items() %}
<hr />
<h2 id="{{ target_path_name }}">{{ target_path_name }}</h2>
<iframe src="{{ filename_path_dict[target_path_name] }}" width="1200" height="420" scrolling="no"></iframe>
<div style="height: calc({{ table_heght }}em); overflow-y: scroll">
<table class="table table-hover table-bordered" style="word-break: break-word">
<thead>
<tr class="table-primary text-center">
<th>Version</th>
<th width="45%">Version</th>
<th>Link to report</th>
{% for value_name in stats.keys() | reverse %}
<th>{{ value_name}} [ms]</th>
Expand Down Expand Up @@ -57,6 +56,7 @@ <h2 id="{{ target_path_name }}">{{ target_path_name }}</h2>
</tbody>
</table>
</div>
<hr />
{% endfor %}
</div><!-- container -->

Expand Down

0 comments on commit 7d88242

Please sign in to comment.