Project

General

Profile

Revision 7bde24ad

ID7bde24ad0efba8190771833f96cf5524e54969fd
Parent cea946f5
Child b82c4c03

Added by Francois POIROTTE over 8 years ago

[#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 <>
Reviewed-by: Francois POIROTTE <>

View differences:

vigiboard/tests/functional/test_correvents_table.py
37 37
        response = self.app.get('/', extra_environ=environ)
38 38

  
39 39
        # Il doit y avoir 2 lignes de résultats.
40
        rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
40
        rows = self.get_rows(response)
41 41
        print "There are %d rows in the result set" % len(rows)
42 42
        assert_equal(len(rows), 2)
43 43

  
44 44
        # Il doit y avoir plusieurs colonnes dans la ligne de résultats.
45
        cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
45
        cols = self.get_cells(response)
46 46
        print "There are %d columns in the result set" % len(cols)
47 47
        assert_true(len(cols) > 1)
48 48

  
......
59 59
        response = self.app.get('/', extra_environ=environ)
60 60

  
61 61
        # Il doit y avoir 5 lignes de résultats.
62
        rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
62
        rows = self.get_rows(response)
63 63
        print "There are %d rows in the result set" % len(rows)
64 64
        assert_equal(len(rows), 5)
65 65

  
66 66
        # Il doit y avoir plusieurs colonnes dans la ligne de résultats.
67
        cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
67
        cols = self.get_cells(response)
68 68
        print "There are %d columns in the result set" % len(cols)
69 69
        assert_true(len(cols) > 1)
70 70

  
......
81 81
        response = self.app.get('/', extra_environ=environ)
82 82

  
83 83
        # Il doit y avoir 5 lignes de résultats.
84
        rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
84
        rows = self.get_rows(response)
85 85
        print "There are %d rows in the result set" % len(rows)
86 86
        assert_equal(len(rows), 5)
87 87

  
88 88
        # Il doit y avoir plusieurs colonnes dans la ligne de résultats.
89
        cols = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr/td')
89
        cols = self.get_cells(response)
90 90
        print "There are %d columns in the result set" % len(cols)
91 91
        assert_true(len(cols) > 1)
92 92

  
......
122 122
        response = self.app.get(url, extra_environ=environ, status=200)
123 123

  
124 124
        # Il doit y avoir 1 ligne de résultats.
125
        rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
125
        rows = self.get_rows(response)
126 126
        print "There are %d rows in the result set" % len(rows)
127 127
        assert_equal(len(rows), 1)
128 128

  
......
133 133
        response = self.app.get(url, extra_environ=environ, status=200)
134 134

  
135 135
        # Il doit y avoir 1 ligne de résultats.
136
        rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
136
        rows = self.get_rows(response)
137 137
        print "There are %d rows in the result set" % len(rows)
138 138
        assert_equal(len(rows), 1)
139 139

  
......
162 162
        response = self.app.get(url, extra_environ=environ, status=200)
163 163

  
164 164
        # Il doit y avoir 1 ligne de résultats.
165
        rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
165
        rows = self.get_rows(response)
166 166
        print "There are %d rows in the result set" % len(rows)
167 167
        assert_equal(len(rows), 1)
168 168

  
......
173 173
        response = self.app.get(url, extra_environ=environ, status=200)
174 174

  
175 175
        # Il doit y avoir 1 ligne de résultats.
176
        rows = response.lxml.xpath('//table[@class="vigitable"]/tbody/tr')
176
        rows = self.get_rows(response)
177 177
        print "There are %d rows in the result set" % len(rows)
178 178
        assert_equal(len(rows), 1)

Also available in: Unified diff