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
Lisa Casino
slapos.core
Commits
ea9a752a
Commit
ea9a752a
authored
Jul 29, 2014
by
Alain Takoudjou
Committed by
Rafael Monnerat
Nov 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now use Publication date on Software Releases for sorting
parent
3d4bcf71
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
7 deletions
+130
-7
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareProduct_getSortedSoftwareReleaseList.xml
...os_cloud/SoftwareProduct_getSortedSoftwareReleaseList.xml
+13
-3
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_view.xml
...teItem/portal_skins/slapos_cloud/SoftwareRelease_view.xml
+1
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_view/my_effective_date.xml
...s/slapos_cloud/SoftwareRelease_view/my_effective_date.xml
+96
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_viewUsableNetworkList/listbox.xml
...s_cloud/SoftwareRelease_viewUsableNetworkList/listbox.xml
+12
-0
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSSoftwareProduct.py
...lapos_cloud/TestTemplateItem/testSlapOSSoftwareProduct.py
+7
-3
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/SoftwareProduct_getSortedSoftwareReleaseList.xml
View file @
ea9a752a
...
...
@@ -52,6 +52,8 @@
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
from DateTime import DateTime\n
\n
portal = context.getPortalObject()\n
\n
if software_product_reference is None:\n
...
...
@@ -81,12 +83,20 @@ if len(product_list) > 1:\n
raise NotImplementedError(\'Several Software Product with the same title.\')\n
\n
software_release_list = product_list[0].getAggregateRelatedValueList()\n
\n
def sortkey(software_release):\n
publication_date = software_release.getEffectiveDate()\n
if publication_date:\n
if (publication_date - DateTime()) > 0:\n
return DateTime(\'1900/05/02\')\n
return publication_date\n
return software_release.getCreationDate()\n
\n
software_release_list = sorted(\n
software_release_list,\n
key=lambda software_release: software_release.getCreationDate(),\n
reverse=True,\n
key=sortkey, reverse=True,\n
)\n
\n
\n
return [software_release for software_release in software_release_list\n
if software_release.getValidationState() in\n
["published"]\n
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_view.xml
View file @
ea9a752a
...
...
@@ -115,6 +115,7 @@
<string>
my_crawling_scope
</string>
<string>
my_crawling_depth
</string>
<string>
my_update_frequency
</string>
<string>
my_effective_date
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_view/my_effective_date.xml
0 → 100644
View file @
ea9a752a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default_now
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_effective_date
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default_now
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_effective_date
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Document_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_viewUsableNetworkList/listbox.xml
View file @
ea9a752a
...
...
@@ -15,8 +15,10 @@
<string>
hide_rows_on_no_search_criterion
</string>
<string>
list_method
</string>
<string>
portal_types
</string>
<string>
search
</string>
<string>
search_columns
</string>
<string>
select
</string>
<string>
sort_columns
</string>
<string>
title
</string>
</list>
</value>
...
...
@@ -130,6 +132,10 @@
</list>
</value>
</item>
<item>
<key>
<string>
search
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
search_columns
</string>
</key>
<value>
...
...
@@ -145,6 +151,12 @@
<key>
<string>
select
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
sort_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
...
...
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSSoftwareProduct.py
View file @
ea9a752a
...
...
@@ -149,7 +149,8 @@ class TestSoftwareReleaseListFromSoftwareProduct(testSlapOSMixin):
software_release1
=
self
.
_makeSoftwareRelease
(
new_id
)
software_release1
.
edit
(
aggregate_value
=
software_product
.
getRelativeUrl
(),
url_string
=
'http://example.org/1-%s.cfg'
%
new_id
url_string
=
'http://example.org/1-%s.cfg'
%
new_id
,
effective_date
=
(
DateTime
()
+
5
)
)
software_release1
.
publish
()
software_release2
=
self
.
_makeSoftwareRelease
(
self
.
generateNewId
())
...
...
@@ -185,14 +186,16 @@ class TestSoftwareReleaseListFromSoftwareProduct(testSlapOSMixin):
software_release2
.
publish
()
software_release2
.
edit
(
aggregate_value
=
software_product
.
getRelativeUrl
(),
url_string
=
'http://example.org/2-%s.cfg'
%
new_id
url_string
=
'http://example.org/2-%s.cfg'
%
new_id
,
effective_date
=
(
DateTime
()
-
2
)
)
# Newest software release
software_release1
=
self
.
_makeSoftwareRelease
(
new_id
)
software_release1
.
publish
()
software_release1
.
edit
(
aggregate_value
=
software_product
.
getRelativeUrl
(),
url_string
=
'http://example.org/1-%s.cfg'
%
new_id
url_string
=
'http://example.org/1-%s.cfg'
%
new_id
,
effective_date
=
DateTime
()
)
self
.
tic
()
...
...
@@ -280,6 +283,7 @@ class TestSlapOSUpgradeHostingSubscription(BaseTestSlapOSMixin):
True
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
hosting_subscription
,
'destroy_requested'
)
self
.
tic
()
self
.
assertEqual
(
hosting_subscription
.
HostingSubscription_isUpgradable
(),
False
)
\ No newline at end of file
master/bt5/slapos_cloud/bt/revision
View file @
ea9a752a
318
\ No newline at end of file
319
\ 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