Revision 7bde24ad
[#1457] Rafraichissement AJAX dans VigiBoard
Change le mécanisme de rafraichissement du tableau de VigiBoard pour
utiliser de l'AJAX.
Réutilise le fichier "loader.js" pour obtenir un sablier lors du
chargement (et donc suppression des copies dans VigiMap/VigiGraph).
Le script "loader.js" est enrichi pour pouvoir ajouter la notion d'un
calque qui est rendu semi-opaque lors de l'exécution de la requête.
Change-Id: Idc537cd8b4f257af9fcd6ac8c6334deadd9d042a
Refs: #1457.
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/1898
Tested-by: Build system <qa@vigilo-dev.si.c-s.fr>
Reviewed-by: Francois POIROTTE <francois.poirotte@c-s.fr>
vigiboard/tests/functional/test_search_form_supitemgroup.py | ||
---|---|---|
39 | 39 |
) |
40 | 40 |
|
41 | 41 |
# Il doit y avoir 2 lignes dans la réponse. |
42 |
rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
|
|
42 |
rows = self.get_rows(response)
|
|
43 | 43 |
print "There are %d rows in the result set" % len(rows) |
44 | 44 |
assert_equal(len(rows), 2) |
45 | 45 |
|
46 | 46 |
# Il doit y avoir plusieurs colonnes dans la réponse. |
47 |
cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
|
|
47 |
cols = self.get_cells(response)
|
|
48 | 48 |
print "There are %d columns in the result set" % len(cols) |
49 | 49 |
assert_true(len(cols) > 1) |
50 | 50 |
|
... | ... | |
58 | 58 |
) |
59 | 59 |
|
60 | 60 |
# Il doit y avoir 2 lignes dans la réponse. |
61 |
rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
|
|
61 |
rows = self.get_rows(response)
|
|
62 | 62 |
print "There are %d rows in the result set" % len(rows) |
63 | 63 |
assert_equal(len(rows), 2) |
64 | 64 |
|
65 | 65 |
# Il doit y avoir plusieurs colonnes dans la réponse. |
66 |
cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
|
|
66 |
cols = self.get_cells(response)
|
|
67 | 67 |
print "There are %d columns in the result set" % len(cols) |
68 | 68 |
assert_true(len(cols) > 1) |
69 | 69 |
|
... | ... | |
76 | 76 |
) |
77 | 77 |
|
78 | 78 |
# Il doit y avoir 2 lignes dans la réponse. |
79 |
rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
|
|
79 |
rows = self.get_rows(response)
|
|
80 | 80 |
print "There are %d rows in the result set" % len(rows) |
81 | 81 |
assert_equal(len(rows), 2) |
82 | 82 |
|
83 | 83 |
# Il doit y avoir plusieurs colonnes dans la réponse. |
84 |
cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
|
|
84 |
cols = self.get_cells(response)
|
|
85 | 85 |
print "There are %d columns in the result set" % len(cols) |
86 | 86 |
assert_true(len(cols) > 1) |
87 | 87 |
|
... | ... | |
96 | 96 |
) |
97 | 97 |
|
98 | 98 |
# Il doit y avoir 5 lignes dans la réponse. |
99 |
rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
|
|
99 |
rows = self.get_rows(response)
|
|
100 | 100 |
print "There are %d rows in the result set" % len(rows) |
101 | 101 |
assert_equal(len(rows), 5) |
102 | 102 |
|
103 | 103 |
# Il doit y avoir plusieurs colonnes dans la réponse. |
104 |
cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
|
|
104 |
cols = self.get_cells(response)
|
|
105 | 105 |
print "There are %d columns in the result set" % len(cols) |
106 | 106 |
assert_true(len(cols) > 1) |
107 | 107 |
|
... | ... | |
115 | 115 |
) |
116 | 116 |
|
117 | 117 |
# Il doit y avoir 5 lignes dans la réponse. |
118 |
rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
|
|
118 |
rows = self.get_rows(response)
|
|
119 | 119 |
print "There are %d rows in the result set" % len(rows) |
120 | 120 |
assert_equal(len(rows), 5) |
121 | 121 |
|
122 | 122 |
# Il doit y avoir plusieurs colonnes dans la réponse. |
123 |
cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
|
|
123 |
cols = self.get_cells(response)
|
|
124 | 124 |
print "There are %d columns in the result set" % len(cols) |
125 | 125 |
assert_true(len(cols) > 1) |
126 | 126 |
|
... | ... | |
134 | 134 |
extra_environ={'REMOTE_USER': 'access'}) |
135 | 135 |
|
136 | 136 |
# Il doit y avoir 1 seule ligne de résultats. |
137 |
rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
|
|
137 |
rows = self.get_rows(response)
|
|
138 | 138 |
print "There are %d rows in the result set" % len(rows) |
139 | 139 |
assert_equal(len(rows), 1) |
140 | 140 |
|
141 | 141 |
# Il doit y avoir 1 seule colonne dans la ligne de résultats. |
142 | 142 |
# (la colonne contient le texte "Il n'y a aucun événément", traduit) |
143 |
cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
|
|
143 |
cols = self.get_cells(response)
|
|
144 | 144 |
print "There are %d columns in the result set" % len(cols) |
145 | 145 |
assert_equal(len(cols), 1) |
146 | 146 |
|
... | ... | |
151 | 151 |
extra_environ={'REMOTE_USER': 'manager'}) |
152 | 152 |
|
153 | 153 |
# Il doit y avoir 1 seule ligne de résultats. |
154 |
rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
|
|
154 |
rows = self.get_rows(response)
|
|
155 | 155 |
print "There are %d rows in the result set" % len(rows) |
156 | 156 |
|
157 | 157 |
# Il doit y avoir 1 seule colonne dans la ligne de résultats. |
158 | 158 |
# (la colonne contient le texte "Il n'y a aucun événément", traduit) |
159 | 159 |
assert_equal(len(rows), 1) |
160 |
cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
|
|
160 |
cols = self.get_cells(response)
|
|
161 | 161 |
print "There are %d columns in the result set" % len(cols) |
162 | 162 |
assert_equal(len(cols), 1) |
163 | 163 |
|
... | ... | |
182 | 182 |
|
183 | 183 |
# Il doit y avoir 1 seule ligne dans la réponse. |
184 | 184 |
# (la réponse contient le texte "Il n'y a aucun événément", traduit) |
185 |
rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
|
|
185 |
rows = self.get_rows(response)
|
|
186 | 186 |
print "There are %d rows in the result set" % len(rows) |
187 | 187 |
assert_equal(len(rows), 1) |
188 | 188 |
|
189 | 189 |
# Il doit y avoir 1 seule colonne dans la réponse. |
190 |
cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
|
|
190 |
cols = self.get_cells(response)
|
|
191 | 191 |
print "There are %d columns in the result set" % len(cols) |
192 | 192 |
assert_equal(len(cols), 1) |
Also available in: Unified diff