Giter VIP home page Giter VIP logo

bitemp-explorer's People

Contributors

dmcassel avatar fxue avatar kmcostel avatar lrhruska avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitemp-explorer's Issues

Make search work for any sys/val time properties

Currently the code expects to find properties called "sysStart", "sysEnd", "valStart", and "valEnd". Modify the search code so that it uses the range indexes specified for the axis creation for the specific temporal collection.

Axes set up for start + 5 or 10 years

setupXAxis() in bitemp_graph.js specifies a range of sysStart through sysStart + 10 years. setupYAxis() specifies valStart through valStart + 5 years. Most likely this is because some of the End years are infinity (year 9999). Fix this so that the range is sysStart through sysEnd, excluding any infinity dates. Fall back on sysStart + 10 years if all sysEnd dates are infinity. Apply the fix to the X and Y axes.

Display system time and valid times

Dependency: #8

On the Search page, display an area that shows the system time range on the horizontal axis and the valid time range on the vertical axis.

  • the range of system and valid times must be based on the range of date/times in the currently specified temporal collection (see #8)

Prevent bars from getting out of order

On the search page, we can drag bars on the graph to represent the system and value times we want to query. Currently it is possible to drag the start-time bar past the end-time bar, and vice versa. This results in an error, because the times are expected to be in order.

Modify the bar dragging such that it does not allow the user to drag a bar past its companion bar.

Create a document

Provide the ability for the user to create a new temporal document (ie, a document with a new URI, not just editing an existing document). This functionality will be on index.html.

  • present the list of available temporal collections to the user
  • user selects a temporal collection
  • identify the axes required for documents in that collection
  • provide an input box for the document URI
  • provide a textarea for document content
  • pre-populate the text area with the appropriate axis JSON properties or XML elements (sysStart, sysEnd, valStart, valEnd)
  • provide Save and Cancel buttons
  • after successful Save, update the display to show this new logical document
  • after a failed Save, display an error message to the user

Before beginning work, present your ideas for the UI to Dave.

Create a search page

Create a new page at /search.html.

  • provide a drop list labeled "Temporal Collection"
  • populate the Temporal Collection drop list with values from GET /manage/v2/databases/{id|name}/temporal/collections
    • the database will be the default database for the application server that the client is talking to
  • provide a search button
    • when clicked, run a query with the specified temporal collection, returning one page of results (10)
    • this will be a call to /v1/search
  • for each result, display the following:
    • document URI
    • system time span
    • valid time span

Eliminate synchronous AJAX calls

To keep the UI responsive, avoid making synchronous AJAX calls. In other words, restructure code so that we can remove "async: false". The way to do this is to have any work that depends on the AJAX call done (or called) by the success function.

Modify code to work for different strings representing the timestamps (index page)

Currently, our project is hard-coded to take the specific JSON properties "sysEnd", "valStart" etc.

Modify our code to work (in both XML and JSON) with timestamp property/element names such as "mySystemStart", "startValTime", "myTemporalValidEndTime" etc.

We can do this by making requests to the Management API (ask for the the axes on the current collection; ask for the properties of each axis) or by making an extension to get these in a single request.

Show bitemp triples

Not sure what this would look like, but it would be useful to illustrate bitemp triples somehow.

Create a deploy command

Right now, someone using the bitemp explorer has to use curl to deploy the extensions. Replace this with a node command.

  • create a deploy.js (will be run with "node deploy.js")
  • have deploy.js properly deploy the extensions in the ext directory
  • update the README's instructions
  • remove curl.exe (should not be in the repository)

To read a file:

JavaScript Workspace 2 buffer 10 has a typo

The code in this buffer looks like this:

cts.search(
  cts.orQuery((
  cts.notQuery(cts.collectionQuery("myTemporal")),   // not in temporal collection
  cts.collectionQuery("latest")))                     // in latest collection
);

cts.orQuery's parameter should be in brackets (an array) rather than parentheses.

Specify the data to display

On the logical document visualization, each box has a label based on the value of the physical document's JSON property "data". Allow the user to specify what single JSON property or XML element of the physical documents will be displayed in the boxes.

  • Add a text input, label ("Document Property"), and "Display" button
  • On button click, update the display to show the values of the specified document property.
  • If the property/element is not found, show a "No such property/element" message.

Specify a valid time search

Dependency: #9

A valid time search will be specified using either one or two horizontal bars, plus a drop-down to select an Allen or ISO operator.

  • Display all operators plus "None" in a drop-down
  • If the currently selected operator requires a date/time range, show two vertical bars
  • If the currently selected operator requires a single date/time, show one vertical bar
  • If the currently selected operator is "None", show no vertical bars
  • The user must be able to slide the bar(s) left and right
  • Based on the location of the bars and the currently selected operator, display the corresponding cts query.
  • On clicking the Search button (#8), include a valid time query if the operator is something other than "None"

Have index.html display based on a URL parameter

By default, index.html shows addr.json. Based on #5, the user can type a URL and see that logical document displayed. Add code to drive that functionality from a URL parameter, as "/?collection=foo.json". This will allow the search page (#8) to set up links to logical documents.

Editing a document works on Mac, but not Linux or Windows

#7 is complete for the user interface and works correctly on the Mac. However, the Node.js middle tier is not passing along the body of the PUT request when running on Windows or Linux. This results in a MarkLogic-level error:

Status 500: XDMP-NOMATCH: No matches for cts:element-reference(fn:QName("","sysStart"),("type=dateTime")) in document{}

Edit a document

Allow the user to modify the contents of a temporal document.

  • Add an "Edit" button below the chart
  • Click on a physical document box to select a physical document
  • When the button is clicked:
    • provide an editor for the content
    • populate the editor with the current contents of the physical document
    • display "Save" and "Cancel" buttons
    • on Save, PUT the updated content to /v1/documents
    • on Cancel, hide the editor and buttons

Improve layout of search page

  • Move reset bars to be closer to graph
  • Make graph and cts:Query tabs more apparent
  • Move 'Create a Document' button to search page, and delete from (old) index page

Specify a system time search

Dependency: #9

A system time search will be specified using either one or two vertical bars, plus a drop-down to select an Allen or ISO operator.

  • Display all operators plus "None" in a drop-down
  • If the currently selected operator requires a date/time range, show two vertical bars
  • If the currently selected operator requires a single date/time, show one vertical bar
  • If the currently selected operator is "None", show no vertical bars
  • The user must be able to slide the bar(s) left and right
  • Based on the location of the bars and the currently selected operator, display the corresponding cts query.
  • On clicking the Search button (#8), include a valid time query if the operator is something other than "None"

Delete a logical document

From the single-document display, allow the user to do a temporal delete of a document.

  • Add a "Delete" button below the chart
  • When the button is clicked, send a DELETE message to /v1/documents
  • On success, send a request for new data and update the display
  • On failure, show a message that the delete failed

Visually indicate the result of clicking on a physical document

In the graph on index.html, provide a visual indication after selecting a physical document. Display the URI of the document above the Edit/View/Delete buttons, with a label that says, "Selected URI:".

Clicking a document should also cause the outline of that document to have thicker lines. (I haven't checked whether d3 allows that, but it probably does.)

Remove Node.js layer

The current implementation uses a Node.js middle tier. For this visualization, we don't need that. Remove the Node layer and have the client-side JavaScript call the MarkLogic REST API directly.

Allow selection of a logical document to view

Change the logical document display to let the user specify the URI of a logical document.

  • add a text box and a button
  • when the button is clicked, send a request to MarkLogic to get the new data
  • clear out the old data and display the new
  • if there is no data, display a message indicating that the specified URI did not match any data

Reduce page load time

  • use .min versions for jQuery, jQuery UI, d3, moment
  • currently loading both jquery.min.js and jquery-1.10.2.js. Eliminate one of these and retest. (jquery.min.js is version 2.1.1, so we should probably keep that one)
  • move CSS links from body to head

Add ‘Create a Temporal Collection’ button

  • on the search page, add a button that allows a user to create a Temporal Collection
  • allow the user to enter their own axes
  • allow the user to enter their own system and valid timestamps (ex. “mySystem”, “myValid”, “sysStart”, “sysEnd”, “valStart”, “valEnd”)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.