Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
Léo-Paul Géneau
slapos.core
Commits
cec12a0b
Commit
cec12a0b
authored
Aug 05, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Computer_viewCurrentUsage also show software installation status
parent
5bc8a596
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
419 additions
and
1 deletion
+419
-1
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Computer_viewCurrentUsage.xml
...m/portal_skins/slapos_cloud/Computer_viewCurrentUsage.xml
+1
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Computer_viewCurrentUsage/listbox.xml
..._skins/slapos_cloud/Computer_viewCurrentUsage/listbox.xml
+4
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Computer_viewCurrentUsage/listbox_installation_status.xml
...Computer_viewCurrentUsage/listbox_installation_status.xml
+307
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getCurrentInstallationStateAsHtml.xml
...oud/SoftwareRelease_getCurrentInstallationStateAsHtml.xml
+106
-0
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Computer_viewCurrentUsage.xml
View file @
cec12a0b
...
...
@@ -99,6 +99,7 @@
<string>
my_busy_computer_partition_list_status
</string>
<string>
my_busy_computer_partition_list_owner_title
</string>
<string>
my_busy_computer_partition_list_instance_title
</string>
<string>
listbox_installation_status
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Computer_viewCurrentUsage/listbox.xml
View file @
cec12a0b
...
...
@@ -118,6 +118,10 @@
<string>
usage
</string>
<string>
Usage
</string>
</tuple>
<tuple>
<string>
installation_status
</string>
<string>
Status
</string>
</tuple>
</list>
</value>
</item>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Computer_viewCurrentUsage/listbox_installation_status.xml
0 → 100644
View file @
cec12a0b
This diff is collapsed.
Click to expand it.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getCurrentInstallationStateAsHtml.xml
0 → 100644
View file @
cec12a0b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
from DateTime import DateTime\n
portal = context.getPortalObject()\n
import json\n
\n
memcached_dict = context.getPortalObject().portal_memcached.getMemcachedDict(\n
key_prefix=\'slap_tool\',\n
plugin_path=\'portal_memcached/default_memcached_plugin\')\n
\n
error_style = \'background-color: red; display: block; height: 2em; width: 2em; float: left; margin: 5px;\'\n
access_style = \'background-color: green; display: block; height: 2em; width: 2em; float: left; margin: 5px;\'\n
\n
software_installation = portal.portal_catalog.getResultValue(\n
portal_type=\'Software Installation\',\n
validation_state=\'validated\',\n
url_string=context.getUrlString(),\n
default_aggregate_uid=computer_uid\n
)\n
if not software_installation or software_installation.getSlapState() == "destroy_requested":\n
return \'<span" style="%s" title="Information not available">
</a>
\' % error_style\n
\n
try:\n
d = memcached_dict[software_installation.getReference()]\n
except KeyError:\n
return "
<a
href=
\'%s\'
style=
\'%s\'
></a>
" % (software_installation.getRelativeUrl(),\n
error_style)\n
else:\n
d = json.loads(d)\n
result = d[\'text\']\n
date = DateTime(d[\'created_at\'])\n
limit_date = DateTime() - 0.084\n
if result.startswith(\'#error \') or (date - limit_date)
< 0:
\n
access_style =
error_style\n
\n
return
"<a
href=
\'%s\'
style=
\'%s\'
title=
\'%s
at
%s\'
></a>
" % (\n
software_installation.getRelativeUrl(),\n
access_style, result, d[\'created_at\'])\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
computer_uid
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SoftwareRelease_getCurrentInstallationStateAsHtml
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/bt/revision
View file @
cec12a0b
320
\ No newline at end of file
321
\ No newline at end of file
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