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
Klaus Wölfel
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
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
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"EditorField"
module=
"Products.ERP5Form.EditorField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox_installation_status
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
<item>
<key>
<string>
line_too_long
</string>
</key>
<value>
<string>
A line was too long.
</string>
</value>
</item>
<item>
<key>
<string>
required_not_found
</string>
</key>
<value>
<string>
Input is required but no input given.
</string>
</value>
</item>
<item>
<key>
<string>
too_long
</string>
</key>
<value>
<string>
You entered too many characters.
</string>
</value>
</item>
<item>
<key>
<string>
too_many_lines
</string>
</key>
<value>
<string>
You entered too many lines.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
text_editor
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
text_editor
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
5
</int>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
text_editor
</string>
</key>
<value>
<string>
text_area
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Monitoring
</string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
40
</int>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.SoftwareRelease_getCurrentInstallationStateAsHtml(context.REQUEST.get(\'here\').getUid())
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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