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
Gabriel Monnerat
slapos.core
Commits
895bdd3b
Commit
895bdd3b
authored
Mar 23, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support cancelled order lines mapping to destroyed state.
parent
68743900
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SoftwareInstance_getStatus.xml
...em/portal_skins/vifib_slap/SoftwareInstance_getStatus.xml
+13
-2
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_getStatus.xml
View file @
895bdd3b
...
@@ -50,7 +50,9 @@
...
@@ -50,7 +50,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
"""Dirty script to return Software Instance state"""\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
"""Dirty script to return Software Instance state"""\n
if context.getPortalType() == "Sale Order Line":\n
if context.getPortalType() == "Sale Order Line":\n
return "Under Approval"\n
return "Under Approval"\n
\n
\n
...
@@ -58,6 +60,13 @@ sale_packing_list_line = context.SoftwareInstance_getInstancePackingListLine()\n
...
@@ -58,6 +60,13 @@ sale_packing_list_line = context.SoftwareInstance_getInstancePackingListLine()\n
if sale_packing_list_line is None:\n
if sale_packing_list_line is None:\n
sale_packing_list_line = context.SoftwareInstance_getInstancePackingListLine(portal_type="Sale Order Line")\n
sale_packing_list_line = context.SoftwareInstance_getInstancePackingListLine(portal_type="Sale Order Line")\n
if sale_packing_list_line is None:\n
if sale_packing_list_line is None:\n
if context.getPortalObject().portal_catalog.countResults(\n
portal_type=\'Sale Order Line\',\n
simulation_state=\'cancelled\',\n
default_aggregate_uid=context.getUid(),\n
default_resource_uid=context.restrictedTraverse(context.getPortalObject().portal_preferences.getPreferredInstanceSetupResource()).getUid()\n
)[0][0] >
0:\n
return \'Destroyed\'\n
# Let\'s hope the sale order is not indexed yet\n
# Let\'s hope the sale order is not indexed yet\n
return \'Looking for a free partition\'\n
return \'Looking for a free partition\'\n
\n
\n
...
@@ -90,7 +99,9 @@ elif service_url == portal_preferences.getPreferredInstanceHostingResource():\n
...
@@ -90,7 +99,9 @@ elif service_url == portal_preferences.getPreferredInstanceHostingResource():\n
return \'Stopped\'\n
return \'Stopped\'\n
\n
\n
return \'Unable to calculate the status...\'\n
return \'Unable to calculate the status...\'\n
</string>
</value>
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
...
...
master/bt5/vifib_slap/bt/revision
View file @
895bdd3b
668
669
\ 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