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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
0d01172b
Commit
0d01172b
authored
Mar 01, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not display the frightening meaningless "Destroyed" status
parent
b6af0592
Changes
3
Show 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
...
@@ -80,7 +80,7 @@ state_list.extend(portal.getPortalTransitInventoryStateList())\n
state_list.extend(portal.getPortalCurrentInventoryStateList())\n
state_list.extend(portal.getPortalCurrentInventoryStateList())\n
\n
\n
packing_list_line = portal.portal_catalog.getResultValue(\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
simulation_state=state_list,\n
aggregate_uid=software_instance.getUid(),\n
aggregate_uid=software_instance.getUid(),\n
default_resource_uid=service_uid_list,\n
default_resource_uid=service_uid_list,\n
...
@@ -95,7 +95,7 @@ return packing_list_line\n
...
@@ -95,7 +95,7 @@ return packing_list_line\n
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<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>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
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
...
@@ -56,7 +56,11 @@ if context.getPortalType() == "Sale Order Line":\n
\n
\n
sale_packing_list_line = context.SoftwareInstance_getInstancePackingListLine()\n
sale_packing_list_line = context.SoftwareInstance_getInstancePackingListLine()\n
if sale_packing_list_line is None:\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
service_url = sale_packing_list_line.getResource()\n
\n
\n
portal_preferences = context.getPortalObject().portal_preferences\n
portal_preferences = context.getPortalObject().portal_preferences\n
...
@@ -66,6 +70,8 @@ if service_url == portal_preferences.getPreferredInstanceSetupResource():\n
...
@@ -66,6 +70,8 @@ if service_url == portal_preferences.getPreferredInstanceSetupResource():\n
return \'Destroyed\'\n
return \'Destroyed\'\n
elif simulation_state in (\'confirmed\', \'started\'):\n
elif simulation_state in (\'confirmed\', \'started\'):\n
return \'Instanciation in progress\'\n
return \'Instanciation in progress\'\n
elif simulation_state in (\'ordered\', ):\n
return \'Looking for a free partition\'\n
return \'Stopped\'\n
return \'Stopped\'\n
elif service_url == portal_preferences.getPreferredInstanceCleanupResource():\n
elif service_url == portal_preferences.getPreferredInstanceCleanupResource():\n
if simulation_state == \'delivered\':\n
if simulation_state == \'delivered\':\n
...
@@ -80,8 +86,8 @@ elif service_url == portal_preferences.getPreferredInstanceHostingResource():\n
...
@@ -80,8 +86,8 @@ elif service_url == portal_preferences.getPreferredInstanceHostingResource():\n
return \'Stop in progress\'\n
return \'Stop in progress\'\n
elif simulation_state == \'delivered\':\n
elif simulation_state == \'delivered\':\n
return \'Stopped\'\n
return \'Stopped\'\n
else:
\n
\n
return \'Unknown
\'\n
return \'Unable to calculate the status...
\'\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
master/bt5/vifib_slap/bt/revision
View file @
0d01172b
590
591
\ No newline at end of file
\ 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