Commit 3ccf6f5a authored by space-nuko's avatar space-nuko

Add webui link

parent 563d0487
...@@ -202,6 +202,10 @@ def update_config_states_table(state_name): ...@@ -202,6 +202,10 @@ def update_config_states_table(state_name):
else: else:
webui_commit_date = "<unknown>" webui_commit_date = "<unknown>"
remote = f"""<a href="{html.escape(webui_remote)}" target="_blank">{html.escape(webui_remote or '')}</a>"""
commit_link = make_commit_link(webui_commit_hash, webui_remote)
date_link = make_commit_link(webui_commit_hash, webui_remote, webui_commit_date)
current_webui = config_states.get_webui_config() current_webui = config_states.get_webui_config()
style_remote = "" style_remote = ""
...@@ -214,9 +218,6 @@ def update_config_states_table(state_name): ...@@ -214,9 +218,6 @@ def update_config_states_table(state_name):
if current_webui["commit_hash"] != webui_commit_hash: if current_webui["commit_hash"] != webui_commit_hash:
style_commit = STYLE_PRIMARY style_commit = STYLE_PRIMARY
commit_link = make_commit_link(webui_commit_hash, webui_remote)
date_link = make_commit_link(webui_commit_hash, webui_remote, webui_commit_date)
code += f"""<h2>Config Backup: {config_name}</h2> code += f"""<h2>Config Backup: {config_name}</h2>
<div><b>Filepath:</b> {filepath}</div> <div><b>Filepath:</b> {filepath}</div>
<div><b>Created at:</b> {created_date}</div>""" <div><b>Created at:</b> {created_date}</div>"""
...@@ -233,7 +234,7 @@ def update_config_states_table(state_name): ...@@ -233,7 +234,7 @@ def update_config_states_table(state_name):
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td><label{style_remote}>{webui_remote}</label></td> <td><label{style_remote}>{remote}</label></td>
<td><label{style_branch}>{webui_branch}</label></td> <td><label{style_branch}>{webui_branch}</label></td>
<td><label{style_commit}>{commit_link}</label></td> <td><label{style_commit}>{commit_link}</label></td>
<td><label{style_commit}>{date_link}</label></td> <td><label{style_commit}>{date_link}</label></td>
...@@ -270,6 +271,8 @@ def update_config_states_table(state_name): ...@@ -270,6 +271,8 @@ def update_config_states_table(state_name):
ext_commit_date = "<unknown>" ext_commit_date = "<unknown>"
remote = f"""<a href="{html.escape(ext_remote)}" target="_blank">{html.escape(ext_remote or '')}</a>""" remote = f"""<a href="{html.escape(ext_remote)}" target="_blank">{html.escape(ext_remote or '')}</a>"""
commit_link = make_commit_link(ext_commit_hash, ext_remote)
date_link = make_commit_link(ext_commit_hash, ext_remote, ext_commit_date)
style_enabled = "" style_enabled = ""
style_remote = "" style_remote = ""
...@@ -287,9 +290,6 @@ def update_config_states_table(state_name): ...@@ -287,9 +290,6 @@ def update_config_states_table(state_name):
if current_ext.commit_hash != ext_commit_hash: if current_ext.commit_hash != ext_commit_hash:
style_commit = STYLE_PRIMARY style_commit = STYLE_PRIMARY
commit_link = make_commit_link(ext_commit_hash, ext_remote)
date_link = make_commit_link(ext_commit_hash, ext_remote, ext_commit_date)
code += f""" code += f"""
<tr> <tr>
<td><label{style_enabled}><input class="gr-check-radio gr-checkbox" type="checkbox" disabled="true" {'checked="checked"' if ext_enabled else ''}>{html.escape(ext_name)}</label></td> <td><label{style_enabled}><input class="gr-check-radio gr-checkbox" type="checkbox" disabled="true" {'checked="checked"' if ext_enabled else ''}>{html.escape(ext_name)}</label></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment