Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
1533bb64
Commit
1533bb64
authored
Apr 02, 1998
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added version info to Control Panel
parent
9d44f7aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
4 deletions
+48
-4
lib/python/App/ApplicationManager.py
lib/python/App/ApplicationManager.py
+33
-4
lib/python/App/appMain.dtml
lib/python/App/appMain.dtml
+15
-0
No files found.
lib/python/App/ApplicationManager.py
View file @
1533bb64
__doc__
=
"""System management components"""
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
7
$'
[
11
:
-
2
]
import
sys
,
os
,
time
,
Globals
import
sys
,
os
,
time
,
string
,
Globals
from
Globals
import
HTMLFile
from
OFS.ObjectManager
import
ObjectManager
from
CacheManager
import
CacheManager
...
...
@@ -113,5 +113,34 @@ class ApplicationManager(ObjectManager,SimpleItem.Item,CacheManager):
if
r
is
not
None
:
return
r
return
MessageDialog
(
message
=
'Documented: %s'
%
product
)
def
version_list
(
self
):
# Return a list of currently installed products/versions
path_join
=
os
.
path
.
join
isdir
=
os
.
path
.
isdir
exists
=
os
.
path
.
exists
split
=
string
.
split
strip
=
string
.
strip
join
=
string
.
join
product_dir
=
path_join
(
SOFTWARE_HOME
,
'lib/python/Products'
)
product_names
=
os
.
listdir
(
product_dir
)
product_names
.
sort
()
info
=
[]
for
product_name
in
product_names
:
package_dir
=
path_join
(
product_dir
,
product_name
)
if
not
isdir
(
package_dir
):
continue
version_txt
=
path_join
(
package_dir
,
'version.txt'
)
if
not
exists
(
version_txt
):
continue
file
=
open
(
version_txt
,
'r'
)
data
=
file
.
readline
()
file
.
close
()
v
=
split
(
strip
(
data
),
'-'
)
if
len
(
v
)
!=
4
:
continue
if
v
[
0
]
==
'OFSP'
:
v
[
0
]
=
'Principia'
info
.
append
(
'%s %s.%s.%s'
%
(
v
[
0
],
v
[
1
],
v
[
2
],
v
[
3
]))
return
info
lib/python/App/appMain.dtml
View file @
1533bb64
...
...
@@ -43,6 +43,21 @@ database packing, and "undoing" previous changes to your site.
<font size="-1"><!--#var db_name--></font>
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>Version Info</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<font size="-1">
<!--#if version_list-->
<!--#in version_list-->
<!--#var sequence-item-->
<BR>
<!--#/in-->
<!--#/if-->
</font>
</TD>
</TR>
</TABLE>
...
...
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