Add webui link

This commit is contained in:
space-nuko 2023-03-29 19:26:52 -05:00
parent 563d048780
commit 3ccf6f5ae8
1 changed files with 7 additions and 7 deletions

View File

@ -202,6 +202,10 @@ def update_config_states_table(state_name):
else:
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()
style_remote = ""
@ -214,9 +218,6 @@ def update_config_states_table(state_name):
if current_webui["commit_hash"] != webui_commit_hash:
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>
<div><b>Filepath:</b> {filepath}</div>
<div><b>Created at:</b> {created_date}</div>"""
@ -233,7 +234,7 @@ def update_config_states_table(state_name):
</thead>
<tbody>
<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_commit}>{commit_link}</label></td>
<td><label{style_commit}>{date_link}</label></td>
@ -270,6 +271,8 @@ def update_config_states_table(state_name):
ext_commit_date = "<unknown>"
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_remote = ""
@ -287,9 +290,6 @@ def update_config_states_table(state_name):
if current_ext.commit_hash != ext_commit_hash:
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"""
<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>