Merge lp:~black-ice-wizard/psiphon/sprint3-610181 into lp:psiphon

Proposed by Cheskidov Vladimir
Status: Merged
Approved by: Adam P
Approved revision: 123
Merged at revision: 127
Proposed branch: lp:~black-ice-wizard/psiphon/sprint3-610181
Merge into: lp:psiphon
Diff against target: 172 lines (+77/-2)
5 files modified
trunk/sql/upgrade-2.6.sql (+4/-0)
trunk/tools/psiphon_install.sh (+1/-1)
trunk/www/includes/lang.php (+13/-0)
trunk/www/propagator-proxies.php (+45/-0)
trunk/www/proxies.php (+14/-1)
To merge this branch: bzr merge lp:~black-ice-wizard/psiphon/sprint3-610181
Reviewer Review Type Date Requested Status
Adam P Approve
Review via email: mp+34381@code.launchpad.net
To post a comment you must log in.
122. By Nurlan <ubuntu@ubuntu-desktop>

db update for tiket 610181

Revision history for this message
Adam P (adam+) wrote :

Problems:

1. In both the Admin and Propagator proxy lists, the propagator_notes should be shown in a textarea like the proxy notes are shown in the Admin proxy list. (Right now newlines aren't shown, for example, which makes the notes looked jammed together and messy.)

2. There should be Selenium tests added for this functionality.

3. This isn't a show-stopper, but: In the Proxy list, the notes text areas overlaps the table's vertical grid line. It would be nice if this could be fixed.

review: Needs Fixing
123. By Nurlan <ubuntu@ubuntu-desktop>

Some small fixes

Revision history for this message
Cheskidov Vladimir (black-ice-wizard) wrote :

Our testers have a ticket (Automated
testing<https://bugs.launchpad.net/psiphon/+bug/457334>),
in which they should do tests on all Psiphon functional.
So I did not add the tests in my ticket.

For other items I have done everything

2010/9/2 Adam P <email address hidden>

> Review: Needs Fixing
> Problems:
>
> 1. In both the Admin and Propagator proxy lists, the propagator_notes
> should be shown in a textarea like the proxy notes are shown in the Admin
> proxy list. (Right now newlines aren't shown, for example, which makes the
> notes looked jammed together and messy.)
>
> 2. There should be Selenium tests added for this functionality.
>
> 3. This isn't a show-stopper, but: In the Proxy list, the notes text areas
> overlaps the table's vertical grid line. It would be nice if this could be
> fixed.
> --
>
> https://code.launchpad.net/~black-ice-wizard/psiphon/sprint3-610181/+merge/34381<https://code.launchpad.net/%7Eblack-ice-wizard/psiphon/sprint3-610181/+merge/34381>
> You are the owner of lp:~black-ice-wizard/psiphon/sprint3-610181.
>

Revision history for this message
Adam P (adam+) wrote :

Looks good. We won't require Selenium tests from now on, since your testers are changing the way it's done with that Automated Testing item.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'trunk/sql/upgrade-2.6.sql'
2--- trunk/sql/upgrade-2.6.sql 1970-01-01 00:00:00 +0000
3+++ trunk/sql/upgrade-2.6.sql 2010-09-03 04:54:41 +0000
4@@ -0,0 +1,4 @@
5+--
6+-- Modifications to table proxy(add propagator notes field)
7+--
8+ALTER TABLE proxy ADD COLUMN propagator_notes text NOT NULL AFTER notes;
9
10=== modified file 'trunk/tools/psiphon_install.sh'
11--- trunk/tools/psiphon_install.sh 2010-06-01 17:50:42 +0000
12+++ trunk/tools/psiphon_install.sh 2010-09-03 04:54:41 +0000
13@@ -271,7 +271,7 @@
14 echo "Enter current password for mysql root (enter for none)"
15
16 cat sql/create_db.sql sql/grant.new.sql sql/structure.2.3.sql sql/init.sql \
17-sql/upgrade-2.4.sql sql/upgrade-2.5.sql sql/jsf.sql sql/youtube.sql | mysql -uroot -p
18+sql/upgrade-2.4.sql sql/upgrade-2.5.sql sql/upgrade-2.6.sql sql/jsf.sql sql/youtube.sql | mysql -uroot -p
19
20 rm sql/grant.new.sql
21
22
23=== modified file 'trunk/www/includes/lang.php'
24--- trunk/www/includes/lang.php 2010-08-09 18:56:53 +0000
25+++ trunk/www/includes/lang.php 2010-09-03 04:54:41 +0000
26@@ -3778,6 +3778,19 @@
27 'es' => "Notas del servidor proxy",
28 ),
29
30+ 'propagator_proxy_notes' => array(
31+ 'en' => "Propagator Proxy Notes",
32+ 'fa' => "Propagator Proxy Notes",
33+ 'ru' => "Propagator Proxy Notes",
34+ 'uz' => "Propagator Proxy Notes",
35+ 'tk' => "Propagator Proxy Notes",
36+ 'cn' => "Propagator Proxy Notes",
37+ 'ar' => "Propagator Proxy Notes",
38+ 'vt' => "Propagator Proxy Notes",
39+ 'fr' => "Propagator Proxy Notes",
40+ 'es' => "Propagator Proxy Notes",
41+ ),
42+
43 'bad_login_url' => array(
44 'en' => "Login URL contains illegal characters. Allowed characters are 'a-z', '0-9' and '/'",
45 'fa' => "یو ار ال ورود کاراکترهای غیرمجاز دارد. کارا کترهای مجاز اینها هستند: 'a-z', '0-9' and '/'",
46
47=== modified file 'trunk/www/propagator-proxies.php'
48--- trunk/www/propagator-proxies.php 2010-07-07 20:45:44 +0000
49+++ trunk/www/propagator-proxies.php 2010-09-03 04:54:41 +0000
50@@ -43,16 +43,32 @@
51
52 $title = msg("proxies_management");
53
54+while ($_POST[id]=(int)$_POST[id])
55+{
56+ $propagator_notes = trim($_POST['propagator_notes']);
57+
58+ $query = "UPDATE proxy SET propagator_notes = :propagator_notes WHERE id = :id";
59+ db_query_execute($config, $query, convert_null_array(array( ":propagator_notes" => $propagator_notes, ":id" => $_POST['id'])));
60+
61+ break;
62+}
63+
64+
65 include($_SERVER[DOCUMENT_ROOT]."/header.php");
66
67
68 ?>
69+<form name="frm" method="post" action="<?=getenv("SCRIPT_NAME")?>">
70+<input name="csrf_token" value="<?=$record_user['csrf_token']?>" type="hidden">
71+
72 <table cellpadding="2" cellspacing="0" border="0" class="brd">
73
74 <tr>
75 <th><?=msg("proxy_name")?></th>
76 <th><?=msg("proxy_hostname")?>/<?=msg("proxy_ip")?></th>
77 <th><?=msg("proxy_login_url")?></th>
78+<th><?=msg("propagator_proxy_notes")?></th>
79+<th></th>
80 </tr>
81
82 <?
83@@ -66,6 +82,8 @@
84
85 $result = db_query_execute($config, $query, convert_null_array($query_params));
86
87+$_p=$_s="";
88+
89 while ($record = escape_html(db_fetch_result($config, $result)))
90 {
91 echo "<tr>";
92@@ -73,6 +91,31 @@
93 echo "<td>{$record['name']}</td>\n";
94 echo "<td>{$record['hostname']}</td>\n";
95 echo "<td>".make_home_url($config, $record[id])."</td>\n";
96+ if ($_GET[edit]!=$record[id]) {
97+ if (strlen($record['propagator_notes']) == 0)
98+ {
99+ echo "<td>{$_p}".escape_html($record['propagator_notes'])."{$_s}</td>\n";
100+ }
101+ else
102+ {
103+ $rows = (int)substr_count($record['propagator_notes'], "\n");
104+ echo "<td>{$_p}<textarea rows=\"".$rows."\" cols=\"60\" wrap=\"off\" style=\"width:98%\" readonly>".escape_html($record['propagator_notes'])."</textarea></td>\n";
105+ }
106+
107+ echo "<td><a href=\"".getenv("SCRIPT_NAME")."?edit={$record[id]}\">{$_p}".msg("edit")."{$_s}</a> &nbsp;";
108+ echo "</td>\n";
109+ }
110+ else {
111+ echo "<td>";
112+ echo "<textarea name=\"propagator_notes\" rows=\"10\" cols=\"60\" wrap=\"off\" style=\"width:100%\">".escape_html($record['propagator_notes'])."</textarea>";
113+ echo "</td>\n";
114+
115+
116+ echo "<td>";
117+ echo "<input type=\"submit\" value=\"".msg("update")."\"> &nbsp; <a href=\"".getenv("SCRIPT_NAME")."\">".msg("cancel")."</a>";
118+ echo "<input type=\"hidden\" name=\"id\" value=\"{$record["id"]}\">";
119+ echo "</td>\n";
120+ }
121
122 echo "</tr>\n";
123 }
124@@ -80,6 +123,8 @@
125
126 </table>
127
128+</form>
129+
130 <?
131 include($_SERVER[DOCUMENT_ROOT]."/footer.php");
132 ?>
133
134=== modified file 'trunk/www/proxies.php'
135--- trunk/www/proxies.php 2010-06-09 20:50:02 +0000
136+++ trunk/www/proxies.php 2010-09-03 04:54:41 +0000
137@@ -189,6 +189,8 @@
138 <th><?=msg("proxy_hostname")?>/<?=msg("proxy_ip")?></th>
139 <th><?=msg("proxy_login_url")?></th>
140 <th><?=msg("proxy_notes")?></th>
141+<th><?=msg("propagator_proxy_notes")?></th>
142+
143 <!--<th><?=msg("last_user_request")?></th>
144 <th><?=msg("average_daily_requests")?></th>-->
145 <th><a href="<?=getenv("SCRIPT_NAME")?>?add=1"><?=msg("add")?></a></th>
146@@ -292,7 +294,17 @@
147 else
148 {
149 $rows = (int)substr_count($record['notes'], "\n");
150- echo "<td>{$_p}<textarea rows=\"".$rows."\" cols=\"60\" wrap=\"off\" style=\"width:100%\" readonly>".escape_html($record['notes'])."</textarea></td>\n";
151+ echo "<td>{$_p}<textarea rows=\"".$rows."\" cols=\"60\" wrap=\"off\" style=\"width:98%\" readonly>".escape_html($record['notes'])."</textarea></td>\n";
152+ }
153+
154+ if (strlen($record['propagator_notes']) == 0)
155+ {
156+ echo "<td>{$_p}".escape_html($record['propagator_notes'])."{$_s}</td>\n";
157+ }
158+ else
159+ {
160+ $rows = (int)substr_count($record['propagator_notes'], "\n");
161+ echo "<td>{$_p}<textarea rows=\"".$rows."\" cols=\"60\" wrap=\"off\" style=\"width:98%\" readonly>".escape_html($record['propagator_notes'])."</textarea></td>\n";
162 }
163 // echo "<td>{$_p}{$last_user_request}{$_s}</td>\n";
164 // echo "<td>{$_p}{$average_daily_requests}{$_s}</td>\n";
165@@ -314,6 +326,7 @@
166 echo "<td>";
167 echo "<textarea name=\"notes\" rows=\"10\" cols=\"60\" wrap=\"off\" style=\"width:100%\">".escape_html($record['notes'])."</textarea>";
168 echo "</td>\n";
169+ echo "<td>{$record['propagator_notes']}</td>\n";
170 // echo "<td>{$last_user_request}</td>";
171 // echo "<td>{$average_daily_requests}</td>";
172 echo "<td>";

Subscribers

People subscribed via source and target branches