view.py
Functions and variables used in pipeline/views.py.
generate_colsfields(fields, url_prefix_dict, not_orderable_col=None, not_searchable_col=None)
¶
Generate data to be included in context for datatables.
Example of url_prefix_dict format: api_col_dict = { 'source.name': reverse('vast_pipeline:source_detail', args=[1])[:-2], 'source.run.name': reverse('vast_pipeline:run_detail', args=[1])[:-2] }
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fields | list | List of fields to include as columns. | required |
url_prefix_dict | dict | Dict containing the url prefix to form href links in the datatables. | required |
not_orderable_col | list | List of columns that should be set to be not orderable in the final table. | None |
not_searchable_col | list | List of columns that should be set to be not searchable in the final table. | None |
Returns:
Name | Type | Description |
---|---|---|
colsfields | list | List containing JSON object. |
Source code in vast_pipeline/utils/view.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
|
get_skyregions_collection(run_id=None)
¶
Produce Sky region geometry shapes JSON object for d3-celestial.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
run_id | int | Run ID to filter on if not None. | None |
Returns:
Name | Type | Description |
---|---|---|
skyregions_collection | dict | Dictionary representing a JSON obejct |
Dict[str, Any] | containing the sky regions. |
Source code in vast_pipeline/utils/view.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
|
Created: March 2, 2022