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
Boxiang Sun
slapos.core
Commits
44e1fb21
Commit
44e1fb21
authored
Jul 03, 2019
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Allow to attach Computer Network to a Project
parent
55afac7d
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1097 additions
and
8 deletions
+1097
-8
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_computer_network_view_js.js
...ule/rjs_gadget_erp5_page_slap_computer_network_view_js.js
+18
-3
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_computer_network_view_js.xml
...le/rjs_gadget_erp5_page_slap_computer_network_view_js.xml
+3
-3
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_html.html
...gadget_erp5_page_slap_transfer_computer_network_html.html
+26
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_html.xml
..._gadget_erp5_page_slap_transfer_computer_network_html.xml
+365
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_js.js
...rjs_gadget_erp5_page_slap_transfer_computer_network_js.js
+181
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_js.xml
...js_gadget_erp5_page_slap_transfer_computer_network_js.xml
+361
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_appcache.xml
...mplateItem/web_page_module/rjs_gadget_slapos_appcache.xml
+4
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_viewAsHateoas.xml
...s/slapos_hal_json_style/ComputerNetwork_viewAsHateoas.xml
+1
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_viewAsHateoas/my_source_project_title.xml
...ComputerNetwork_viewAsHateoas/my_source_project_title.xml
+134
-0
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
...jio/bt/template_keep_last_workflow_history_only_path_list
+2
-0
master/bt5/slapos_jio/bt/template_path_list
master/bt5/slapos_jio/bt/template_path_list
+2
-0
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_computer_network_view_js.js
View file @
44e1fb21
...
...
@@ -135,6 +135,17 @@
"
hidden
"
:
0
,
"
type
"
:
"
GadgetField
"
},
"
my_source_project
"
:
{
"
description
"
:
"
The name of a document in ERP5
"
,
"
title
"
:
"
Current Project
"
,
"
default
"
:
gadget
.
state
.
doc
.
source_project_title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
0
,
"
key
"
:
""
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
listbox
"
:
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
...
...
@@ -166,7 +177,10 @@
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
my_title
"
],
[
"
my_reference
"
],
[
'
my_monitoring_status
'
]]
[[
"
my_title
"
],
[
"
my_reference
"
]]
],
[
"
right
"
,
[[
'
my_monitoring_status
'
],
[
"
my_source_project
"
]]
],
[
"
bottom
"
,
[[
"
listbox
"
]]
...
...
@@ -178,8 +192,8 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}}),
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
page
:
"
slap_delete_network
"
}})
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
page
:
"
slap_delete_network
"
}})
,
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
page
:
"
slap_transfer_computer_network
"
}})
]);
})
.
push
(
function
(
url_list
)
{
...
...
@@ -187,6 +201,7 @@
selection_url
:
url_list
[
1
],
page_title
:
"
Computer Network :
"
+
gadget
.
state
.
doc
.
title
,
delete_url
:
url_list
[
2
],
transfer_url
:
url_list
[
3
],
save_action
:
true
};
if
(
!
gadget
.
state
.
editable
)
{
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_computer_network_view_js.xml
View file @
44e1fb21
...
...
@@ -216,7 +216,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
superrafael
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
4.51644.49478.39304
</string>
</value>
<value>
<string>
97
6.54433.31362.16861
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
15
54343320.18
</float>
<float>
15
62167951.36
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_html.html
0 → 100644
View file @
44e1fb21
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS Add Text Document
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_erp5_page_slap_transfer_computer_network.js"
></script>
</head>
<body>
<form
class=
"save_form ui-body-c"
novalidate
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"form_view"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_html.xml
0 → 100644
View file @
44e1fb21
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_js.js
0 → 100644
View file @
44e1fb21
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
'
notifySubmit
'
,
function
()
{
return
this
.
triggerSubmit
();
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
})
.
push
(
function
(
doc
)
{
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
url
)
{
// This is horrible
return
gadget
.
jio_putAttachment
(
doc
.
relative_url
,
url
+
doc
.
relative_url
+
"
/ComputerNetwork_createMovement
"
,
doc
);
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Computer Network is transferred.
'
,
status
:
'
success
'
})
.
push
(
function
()
{
// Workaround, find a way to open document without break gadget.
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
jio_key
"
:
doc
.
relative_url
,
"
page
"
:
"
slap_controller
"
}});
});
});
});
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
return
this
.
element
.
querySelector
(
'
button[type="submit"]
'
).
click
();
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
getSetting
(
"
me
"
);
})
.
push
(
function
(
setting
)
{
return
gadget
.
jio_get
(
setting
);
})
.
push
(
function
(
me
)
{
var
i
,
destination_project_list
=
'
"NULL",
'
;
for
(
i
in
me
.
assignment_destination_project_list
)
{
destination_project_list
+=
'
"
'
+
me
.
assignment_destination_project_list
[
i
]
+
'
",
'
;
}
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_view
'
),
gadget
.
jio_get
(
options
.
jio_key
),
gadget
.
jio_allDocs
({
query
:
'
portal_type:"Project" AND validation_state:"validated" AND relative_url:(
'
+
destination_project_list
+
'
)
'
,
sort_on
:
[[
'
reference
'
,
'
ascending
'
]],
select_list
:
[
'
reference
'
,
'
title
'
]
})
]);
})
.
push
(
function
(
result
)
{
var
doc
=
result
[
1
],
site_list
=
[[
""
,
""
]],
project_list
=
[[
""
,
""
]],
i
,
value
,
project_len
=
result
[
2
].
data
.
total_rows
;
for
(
i
=
0
;
i
<
project_len
;
i
+=
1
)
{
project_list
.
push
([
result
[
2
].
data
.
rows
[
i
].
value
.
title
?
result
[
2
].
data
.
rows
[
i
].
value
.
title
:
result
[
2
].
data
.
rows
[
i
].
value
.
reference
,
result
[
2
].
data
.
rows
[
i
].
id
]);
}
return
result
[
0
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_title
"
:
{
"
description
"
:
"
The name of a document in ERP5
"
,
"
title
"
:
"
Title
"
,
"
default
"
:
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
0
,
"
key
"
:
"
title
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
"
description
"
:
"
The name of a document in ERP5
"
,
"
title
"
:
"
Reference
"
,
"
default
"
:
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
0
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_source_project
"
:
{
"
description
"
:
"
The name of a document in ERP5
"
,
"
title
"
:
"
Current Project
"
,
"
default
"
:
doc
.
source_project_title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
0
,
"
key
"
:
"
source_project_title
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_destination_project
"
:
{
"
description
"
:
"
The name of a document in ERP5
"
,
"
title
"
:
"
Future Project
"
,
"
default
"
:
""
,
"
items
"
:
project_list
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
destination_project
"
,
"
hidden
"
:
0
,
"
type
"
:
"
ListField
"
},
"
my_relative_url
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Parent Relative Url
"
,
"
default
"
:
options
.
jio_key
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
relative_url
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
my_title
"
],
[
"
my_reference
"
],
[
"
my_source_project
"
],
[
"
my_destination_project
"
],
[
"
my_relative_url
"
]]
]]
}
});
})
.
push
(
function
()
{
return
gadget
.
getSetting
(
'
document_title
'
);
})
.
push
(
function
(
document_title
)
{
return
gadget
.
updateHeader
({
page_title
:
"
Transfer Computer Network
"
,
submit_action
:
true
});
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_js.xml
0 → 100644
View file @
44e1fb21
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_appcache.xml
View file @
44e1fb21
...
...
@@ -374,6 +374,8 @@ gadget_erp5_page_slap_transfer_computer.html\n
gadget_erp5_page_slap_transfer_computer.js\n
gadget_erp5_page_slap_transfer_hosting_subscription.html\n
gadget_erp5_page_slap_transfer_hosting_subscription.js\n
gadget_erp5_page_slap_transfer_computer_network.html\n
gadget_erp5_page_slap_transfer_computer_network.js\n
gadget_erp5_page_slap_trial_request_message.html\n
gadget_erp5_page_slap_trial_request_message.js\n
gadget_erp5_page_slap_upgrade_decision_view.html\n
...
...
@@ -575,7 +577,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.53
195.17162.2817
7
</string>
</value>
<value>
<string>
976.53
590.39649.88
7
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -593,7 +595,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15621
17196.29
</float>
<float>
15621
73473.25
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_viewAsHateoas.xml
View file @
44e1fb21
...
...
@@ -96,6 +96,7 @@
<string>
my_title
</string>
<string>
my_reference
</string>
<string>
my_news
</string>
<string>
my_source_project_title
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_viewAsHateoas/my_source_project_title.xml
0 → 100644
View file @
44e1fb21
<?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
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_source_project_title
</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>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<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>
items
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Current Project
</string>
</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: here.Item_getCurrentProjectValue().title
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
View file @
44e1fb21
...
...
@@ -128,6 +128,8 @@ web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_hosting_subscription_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_hosting_subscription_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_js
web_page_module/rjs_gadget_erp5_page_slap_trial_request_message_html
web_page_module/rjs_gadget_erp5_page_slap_trial_request_message_js
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_html
...
...
master/bt5/slapos_jio/bt/template_path_list
View file @
44e1fb21
...
...
@@ -132,6 +132,8 @@ web_page_module/rjs_gadget_erp5_page_slap_ticket_list_js
web_page_module/rjs_gadget_erp5_page_slap_ticket_view_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_hosting_subscription_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_hosting_subscription_js
web_page_module/rjs_gadget_erp5_page_slap_trial_request_message_html
...
...
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