Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
nexedi
slapos
Commits
0d01172b
Commit
0d01172b
authored
13 years ago
by
Romain Courteaud
Browse files
Options
Download
Email Patches
Plain Diff
Do not display the frightening meaningless "Destroyed" status
parent
b6af0592
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SoftwareInstance_getInstancePackingListLine.xml
...ifib_slap/SoftwareInstance_getInstancePackingListLine.xml
+2
-2
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SoftwareInstance_getStatus.xml
...em/portal_skins/vifib_slap/SoftwareInstance_getStatus.xml
+9
-3
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
No files found.
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SoftwareInstance_getInstancePackingListLine.xml
View file @
0d01172b
...
...
@@ -80,7 +80,7 @@ state_list.extend(portal.getPortalTransitInventoryStateList())\n
state_list.extend(portal.getPortalCurrentInventoryStateList())\n
\n
packing_list_line = portal.portal_catalog.getResultValue(\n
portal_type=
\'Sale Packing List Line\'
,\n
portal_type=
portal_type
,\n
simulation_state=state_list,\n
aggregate_uid=software_instance.getUid(),\n
default_resource_uid=service_uid_list,\n
...
...
@@ -95,7 +95,7 @@ return packing_list_line\n
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
service_relative_url=None
</string>
</value>
<value>
<string>
service_relative_url=None
, portal_type="Sale Packing List Line"
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
This diff is collapsed.
Click to expand it.
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SoftwareInstance_getStatus.xml
View file @
0d01172b
...
...
@@ -56,7 +56,11 @@ if context.getPortalType() == "Sale Order Line":\n
\n
sale_packing_list_line = context.SoftwareInstance_getInstancePackingListLine()\n
if sale_packing_list_line is None:\n
return \'Destroyed\'\n
sale_packing_list_line = context.SoftwareInstance_getInstancePackingListLine(portal_type="Sale Order Line")\n
if sale_packing_list_line is None:\n
# Let\'s hope the sale order is not indexed yet\n
return \'Looking for a free partition\'\n
\n
service_url = sale_packing_list_line.getResource()\n
\n
portal_preferences = context.getPortalObject().portal_preferences\n
...
...
@@ -66,6 +70,8 @@ if service_url == portal_preferences.getPreferredInstanceSetupResource():\n
return \'Destroyed\'\n
elif simulation_state in (\'confirmed\', \'started\'):\n
return \'Instanciation in progress\'\n
elif simulation_state in (\'ordered\', ):\n
return \'Looking for a free partition\'\n
return \'Stopped\'\n
elif service_url == portal_preferences.getPreferredInstanceCleanupResource():\n
if simulation_state == \'delivered\':\n
...
...
@@ -80,8 +86,8 @@ elif service_url == portal_preferences.getPreferredInstanceHostingResource():\n
return \'Stop in progress\'\n
elif simulation_state == \'delivered\':\n
return \'Stopped\'\n
else:
\n
return \'Un
known
\'\n
\n
return \'Un
able to calculate the status...
\'\n
</string>
</value>
</item>
<item>
...
...
This diff is collapsed.
Click to expand it.
master/bt5/vifib_slap/bt/revision
View file @
0d01172b
590
\ No newline at end of file
591
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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