Datasets Viewer - sakura-team/sakura GitHub Wiki

This module allows to see, create and edit new datasets for a specific database. At its current state (implementation of scenario 1.2), it doesn't integrate the user's rights.

In terms of functionalities, at the current GUI state it allows to:

  • list the datasets of a specific database (which id is defined in the url)
  • visualize rows of a dataset, using pagination (the architecture works, but this should be checked when the api will give real data)
  • create a new dataset from scratch or from a file, and send the creation request to the hub (works too, but should also be checked when the api will really create a dataset)
  • add rows into a dataset (this is scenario 1.6, it's in progress)

In terms of libraries, it uses:

  • papaparse.js: a library for parsing data from a csv file. As this library is quite powerful, for now we let it find the csv separator, skip the empty lines and the comments, and read the file by chunks.
  • moment.js: a library for managing date formats. It is mainly used when creating a dataset from a file. For each dataset's column, if it's a date (user's choice), the GUI asks the user about a format. Then moment.js is used to display the conversion result on the data's first row. This gives the user the opportunity to verify and correct the format. The format is sent to the hub with the file chunks.