Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
78935336
Commit
78935336
authored
Feb 13, 2023
by
Vladimir Mandic
Committed by
GitHub
Feb 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add version to extensions table
parent
3715ece0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
modules/extensions.py
modules/extensions.py
+6
-0
modules/ui_extensions.py
modules/ui_extensions.py
+3
-5
No files found.
modules/extensions.py
View file @
78935336
...
...
@@ -2,6 +2,7 @@ import os
import
sys
import
traceback
import
time
import
git
from
modules
import
paths
,
shared
...
...
@@ -25,6 +26,7 @@ class Extension:
self
.
status
=
''
self
.
can_update
=
False
self
.
is_builtin
=
is_builtin
self
.
version
=
''
repo
=
None
try
:
...
...
@@ -40,6 +42,10 @@ class Extension:
try
:
self
.
remote
=
next
(
repo
.
remote
()
.
urls
,
None
)
self
.
status
=
'unknown'
head
=
repo
.
head
.
commit
ts
=
time
.
asctime
(
time
.
gmtime
(
repo
.
head
.
commit
.
committed_date
))
self
.
version
=
f
'{head.hexsha[:7]} ({ts})'
except
Exception
:
self
.
remote
=
None
...
...
modules/ui_extensions.py
View file @
78935336
...
...
@@ -80,6 +80,7 @@ def extension_table():
<tr>
<th><abbr title="Use checkbox to enable the extension; it will be enabled or disabled when you click apply button">Extension</abbr></th>
<th>URL</th>
<th><abbr title="Extension version">Version</abbr></th>
<th><abbr title="Use checkbox to mark the extension for update; it will be updated when you click apply button">Update</abbr></th>
</tr>
</thead>
...
...
@@ -87,11 +88,7 @@ def extension_table():
"""
for
ext
in
extensions
.
extensions
:
remote
=
""
if
ext
.
is_builtin
:
remote
=
"built-in"
elif
ext
.
remote
:
remote
=
f
"""<a href="{html.escape(ext.remote or '')}" target="_blank">{html.escape("built-in" if ext.is_builtin else ext.remote or '')}</a>"""
remote
=
f
"""<a href="{html.escape(ext.remote or '')}" target="_blank">{html.escape("built-in" if ext.is_builtin else ext.remote or '')}</a>"""
if
ext
.
can_update
:
ext_status
=
f
"""<label><input class="gr-check-radio gr-checkbox" name="update_{html.escape(ext.name)}" checked="checked" type="checkbox">{html.escape(ext.status)}</label>"""
...
...
@@ -102,6 +99,7 @@ def extension_table():
<tr>
<td><label><input class="gr-check-radio gr-checkbox" name="enable_{html.escape(ext.name)}" type="checkbox" {'checked="checked"' if ext.enabled else ''}>{html.escape(ext.name)}</label></td>
<td>{remote}</td>
<td>{ext.version}</td>
<td{' class="extension_status"' if ext.remote is not None else ''}>{ext_status}</td>
</tr>
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment