Merge lp:~robru/uci-engine/experimentation into lp:uci-engine

Proposed by Robert Bruce Park on 2015-04-02
Status: Rejected
Rejected by: Robert Bruce Park on 2015-04-14
Proposed branch: lp:~robru/uci-engine/experimentation
Merge into: lp:uci-engine
Diff against target: 85 lines (+45/-1)
3 files modified
tests/test_webui.py (+2/-0)
webui/tickets/static/tickets/webui.js (+40/-0)
webui/tickets/static/tickets/webuiforms.js (+3/-1)
To merge this branch: bzr merge lp:~robru/uci-engine/experimentation
Reviewer Review Type Date Requested Status
Robert Bruce Park (community) Disapprove on 2015-04-14
Review via email: mp+255120@code.launchpad.net

Commit Message

Add silo assignment/reconfigure support.

To post a comment you must log in.
lp:~robru/uci-engine/experimentation updated on 2015-04-02
927. By Robert Bruce Park on 2015-04-02

Initial attempt at silo assign/reconfigure links.

Ursula Junque (ursinha) wrote :

Hey Robert :) I have a couple of questions below, forgive me for the potentially silly questions, I'm catching up to review this to you. Do you have a deployment on bootstack where you are testing this?

Robert Bruce Park (robru) wrote :

Hi Ursula! Thanks for taking a look. Yeah I did manage to get this deployed on bootstack and so this code sort of "looks right" when I run it but I really need some guidance on if I'm doing things correctly.

Robert Bruce Park (robru) wrote :

Rejecting because we decided in Austin not to proceed with "CI Engine as Spreadsheet Replacement"

review: Disapprove

Unmerged revisions

927. By Robert Bruce Park on 2015-04-02

Initial attempt at silo assign/reconfigure links.

926. By Robert Bruce Park on 2015-03-03

Ah, there's that

925. By Robert Bruce Park on 2015-03-03

Reorder steps here.

924. By Robert Bruce Park on 2015-03-03

Allow editing the assignable state.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_webui.py'
2--- tests/test_webui.py 2015-01-13 17:44:27 +0000
3+++ tests/test_webui.py 2015-04-02 18:12:47 +0000
4@@ -342,6 +342,8 @@
5 bug = get_element_by_css('input[name="bug_id"]')
6 write_textfield(bug, '')
7 submit = get_element_by_css('input[type="submit"]')
8+ assignable = get_element_by_css('input[name="assignable"]')
9+ set_checkbox_value(assignable, True)
10 click_button(submit, wait=True)
11
12 # The ticket has a new title and cleared bug reference.
13
14=== modified file 'webui/tickets/static/tickets/webui.js'
15--- webui/tickets/static/tickets/webui.js 2015-01-09 12:45:26 +0000
16+++ webui/tickets/static/tickets/webui.js 2015-04-02 18:12:47 +0000
17@@ -414,6 +414,46 @@
18 workflow_inner_div = workflow_wrapper.appendChild(
19 Y.Node.create("<div class='workflow'></div>"));
20
21+ // Create links for assigning and reconfiguring.
22+ console.log(data);
23+
24+ // Let's play "how many places can we hard-code this rubbish?"
25+ var KNOWN_DISTROS = {
26+ "vivid": "ubuntu",
27+ "trusty": "ubuntu",
28+ "utopic": "ubuntu",
29+ "14.09": "ubuntu-rtm",
30+ };
31+ var sources = "";
32+ data.subticket.forEach(function(subticket) {
33+ if (!subticket.merge_proposals) {
34+ sources += subticket.sourcepackage.name + " ";
35+ }
36+ });
37+ var merges = "";
38+ data.subticket.forEach(function(subticket) {
39+ subticket.merge_proposals.forEach(function(mp) {
40+ merges += mp.lp_url + " ";
41+ });
42+ });
43+ var parameters = {
44+ "REQUEST_ID": data.uuid,
45+ "DISTRIBUTION": KNOWN_DISTROS[data.series],
46+ "SERIES": data.series,
47+ "LANDERS": data.citrain_overlay.landers,
48+ "SOURCES": sources.trim(),
49+ "MERGE_PROPOSALS": merges.trim(),
50+ "SYNC_REQUEST": data.citrain_overlay.sync_request,
51+ };
52+
53+ var paramstr = encodeURIComponent(Object.keys(parameters).map(function(key) {
54+ return key + '=' + encodeURIComponent(parameters[key]);
55+ }).join('&'));
56+
57+ workflow_wrapper.appendChild('<p><a href="https://ci-train.ubuntu.com/securityRealm/commenceLogin?from=/job/prepare-silo/parambuild%3F' + paramstr + '" target="_blank">Assign silo</a></p>');
58+ workflow_wrapper.appendChild('<p><a href="http://ci-train.staging.ubuntu.com/securityRealm/commenceLogin?from=/job/prepare-silo/parambuild%3F' + paramstr + '" target="_blank">Assign silo in staging</a></p>');
59+ workflow_wrapper.appendChild('<p><a href="https://ci-train.ubuntu.com/securityRealm/commenceLogin?from=/job/ubuntu-landing-000-0-reconfigure/parambuild%3F' + paramstr + '" target="_blank">Reconfigure Silo</a></p>');
60+
61 // Build and render the ticket status datatable.
62 var dt_status = Y.webui.get_ticket_status_datatable(data);
63 dt_status.render(workflow_inner_div);
64
65=== modified file 'webui/tickets/static/tickets/webuiforms.js'
66--- webui/tickets/static/tickets/webuiforms.js 2014-12-19 21:01:56 +0000
67+++ webui/tickets/static/tickets/webuiforms.js 2015-04-02 18:12:47 +0000
68@@ -122,7 +122,7 @@
69 _mangleFormAssignable: function (form_data) {
70 if (form_data['assignable']) {
71 form_data['current_workflow_step'] = 'Silo creating';
72- form_data['status'] = 'In progress';
73+ form_data['status'] = 'New';
74 };
75 delete form_data['assignable'];
76 return form_data;
77@@ -306,6 +306,8 @@
78 type: 'TextareaField'},
79 {name: 'comments', label: 'Comments:',
80 type: 'TextareaField'},
81+ {name: 'assignable', label: 'Ready to assign:',
82+ type: 'CheckboxField'},
83 {name: 'edit-button', type: 'SubmitButton',
84 value: 'Update!'}
85 ]

Subscribers

People subscribed via source and target branches