1.0.0
This is the main class for the site.
Loads modules when a tab is shown for the first time.
This is useful when such modules require being visible in order to calculate metrics (width/height/text).
(HTMLElement)
The tab panel element.
Event handling for when the window is resized.
(any)
(any)
Returns the original document title.
This represents a text input that can auto complete using the search capability. It will render icons specific to certain Occam objects and people/accounts on the system.
Generally, you instantiate an AutoComplete using AutoComplete.load(element) instead of invoking this directly.
Extends EventComponent
Returns an instance of AutoComplete for the given element.
This will create an AutoComplete, if it doesn't exist, for this element.
This function will create the dropdown and attach it to the body.
This function returns the Object currently displayed in the field.
This function selects the value indicated by the given item element.
(any)
This function issues a search to fill the dropdown with possible objects.
This function opens the dropdown.
This function closes the dropdown.
This function will attach the change events that will perform the queries and update/show the dropdown.
This represents a dropdown menu used for navigation purposes or selecting an action from a list of possible actions.
Generally, you instantiate a Dropdown using Dropdown.load(element) instead of invoking this directly.
Extends EventComponent
This class contains useful functions mostly related to DOM exploration and ajax requests.
This will create a new element from a template.
This assumes the template has exactly one root child, which will be instantiated and returned.
(HTMLElement)
The template element.
HTMLElement
:
The new element.
This will change the tag for the given element.
(HTMLElement)
The existing element.
(string)
The new tag.
HTMLElement
:
The new element.
This does string formatting.
(any)
(any)
This will submit the given form.
(any)
(any)
(any)
XMLHttpRequest
:
The ajax request object.
This will submit the given form.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax request. Generally, the functions get() and post() are more convenient.
(string)
The HTTP method ("GET", "POST") to use.
(string)
The URL to request.
(string)
The data to send.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax request. Generally, the functions get() and post() are more convenient.
(string)
The HTTP method ("GET", "POST") to use.
(string)
The URL to request.
(string)
The data to send.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax GET request.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
(Object)
The query parameters to send along with the request.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax GET request.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
(Object)
The query parameters to send along with the request.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax GET request and expect JSON data back.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(Object)
The query parameters to send along with the request.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax GET request and expect JSON data back.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(Object)
The query parameters to send along with the request.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax POST request.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax POST request.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
XMLHttpRequest
:
The ajax request object.
This function returns the position of the given element within its parent.
Optionally, a filter can be provided, and it will get the index of the element among the list of sibling elements that match that filter.
(HTMLElement)
The element to query the index.
(string?)
The optional css selector to use to filter the
sibling elements.
number
:
The index of the element or -1 if the element doesn't
exist in the given filter.
This function returns the position of the given element within its parent.
Optionally, a filter can be provided, and it will get the index of the element among the list of sibling elements that match that filter.
(any)
(any)
number
:
The index of the element or -1 if the element doesn't
exist in the given filter.
Returns an array of HTMLElement items that consist of the parents of the given element. These will be the ancestors in order from closest to the document root at the end.
If a parentSelector is given, the parents will be retrieved up until the ancestor that matches the given selector.
If a filter is given, the parent list will be truncated to only those that match the given filter.
(HTMLElement)
The element to initialize the query.
(string?)
The css selector to match against to stop
the function.
(string?)
The css selector to match against to filter the
results.
Array
:
A list containing zero or more HTMLElement items.
Returns an array of HTMLElement items that consist of the parents of the given element. These will be the ancestors in order from closest to the document root at the end.
If a parentSelector is given, the parents will be retrieved up until the ancestor that matches the given selector.
If a filter is given, the parent list will be truncated to only those that match the given filter.
(HTMLElement)
The element to initialize the query.
(string?)
The css selector to match against to stop
the function.
(string?)
The css selector to match against to filter the
results.
Array
:
A list containing zero or more HTMLElement items.
Converts an HSL color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].
Array
:
The RGB representation.
Converts an HSL color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].
Array
:
The RGB representation.
Returns the standard key code string for the given event.
(KeyboardEvent)
The keyboard event to pull the key information out of.
String
:
The canonical key string.
This class contains useful functions mostly related to DOM exploration and ajax requests.
This will create a new element from a template.
This assumes the template has exactly one root child, which will be instantiated and returned.
(HTMLElement)
The template element.
HTMLElement
:
The new element.
This will change the tag for the given element.
(HTMLElement)
The existing element.
(string)
The new tag.
HTMLElement
:
The new element.
This does string formatting.
(any)
(any)
This will submit the given form.
(any)
(any)
(any)
XMLHttpRequest
:
The ajax request object.
This will submit the given form.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax request. Generally, the functions get() and post() are more convenient.
(string)
The HTTP method ("GET", "POST") to use.
(string)
The URL to request.
(string)
The data to send.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax request. Generally, the functions get() and post() are more convenient.
(string)
The HTTP method ("GET", "POST") to use.
(string)
The URL to request.
(string)
The data to send.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax GET request.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
(Object)
The query parameters to send along with the request.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax GET request.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
(Object)
The query parameters to send along with the request.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax GET request and expect JSON data back.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(Object)
The query parameters to send along with the request.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax GET request and expect JSON data back.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(Object)
The query parameters to send along with the request.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax POST request.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
XMLHttpRequest
:
The ajax request object.
This will issue an ajax POST request.
(string)
The URL to request.
(ajaxCallback)
The callback function when the request is successful.
(string)
The type of response to ask for as the Accept parameter.
If this is "json" or "application/json", the callback
will automatically receive parsed JSON and fail if the
JSON is unacceptable.
XMLHttpRequest
:
The ajax request object.
This function returns the position of the given element within its parent.
Optionally, a filter can be provided, and it will get the index of the element among the list of sibling elements that match that filter.
(HTMLElement)
The element to query the index.
(string?)
The optional css selector to use to filter the
sibling elements.
number
:
The index of the element or -1 if the element doesn't
exist in the given filter.
This function returns the position of the given element within its parent.
Optionally, a filter can be provided, and it will get the index of the element among the list of sibling elements that match that filter.
(any)
(any)
number
:
The index of the element or -1 if the element doesn't
exist in the given filter.
Returns an array of HTMLElement items that consist of the parents of the given element. These will be the ancestors in order from closest to the document root at the end.
If a parentSelector is given, the parents will be retrieved up until the ancestor that matches the given selector.
If a filter is given, the parent list will be truncated to only those that match the given filter.
(HTMLElement)
The element to initialize the query.
(string?)
The css selector to match against to stop
the function.
(string?)
The css selector to match against to filter the
results.
Array
:
A list containing zero or more HTMLElement items.
Returns an array of HTMLElement items that consist of the parents of the given element. These will be the ancestors in order from closest to the document root at the end.
If a parentSelector is given, the parents will be retrieved up until the ancestor that matches the given selector.
If a filter is given, the parent list will be truncated to only those that match the given filter.
(HTMLElement)
The element to initialize the query.
(string?)
The css selector to match against to stop
the function.
(string?)
The css selector to match against to filter the
results.
Array
:
A list containing zero or more HTMLElement items.
Converts an HSL color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].
Array
:
The RGB representation.
Converts an HSL color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].
Array
:
The RGB representation.
Returns the standard key code string for the given event.
(KeyboardEvent)
The keyboard event to pull the key information out of.
String
:
The canonical key string.
This represents a navigation list which is used to navigate within documentation pages.
Extends EventComponent
(any)
Returns an instance of NavigationList for the given element.
This will create a NavigationList, if it doesn't exist, for this element.
Initializes all navigation lists found within the given element.
(HTMLElement)
The root element to search for appropriate elements within.
This represents a dropdown selection and typically wraps a <select>
element
on the page.
Generally, you instantiate an Selector using Selector.load(element) instead of invoking the constructor directly.
Extends EventComponent
Returns an instance of Selector for the given element.
This will create a Selector, if it doesn't exist, for this element.
Clears out the selector and replaces it with a loading spinner.
Clears out the selector and replaces it with a loading spinner.
Clears items.
Returns the list of items in the dropdown as an element array.
Returns the list item that is currently selected.
HTMLElement
:
The
<button>
element representing the item.
This function will select the given list item by the given reference.
You can pass an integer index that represents the position. Index 0 is the first item in the list.
You can also pass in the item element.
Finally, you can pass in a dictionary object that contains data to
identify the entry, such as { name: "foo", type: "bar" }
If it cannot find the item, it will return null.
(any)
HTMLElement
:
The '
Returns a dictionary object representing the data of the given item.
(any)
This function reveals the dropdown list.
Updates an existing item based on the given data.
(any)
(any)
HTMLElement
:
The updated item element.
Adds an item to the list.
(any)
(any)
Disables this component.
Enables this component.
This function initializes the selector and binds interactive events.
(any)
Binds the interactive events for a dropdown item.
(any)
This represents a dropdown selection for changing a button's behavior
and typically wraps a div containing some number of <button>
or <input>
elements on the page.
Generally, you instantiate a ButtonSelector using ButtonSelector.load(element) instead of invoking the constructor directly.
Extends EventComponent
Returns an instance of ButtonSelector for the given element.
This will create a ButtonSelector, if it doesn't exist, for this element.
Returns the list of items in the dropdown as an element array.
Returns the list item that is currently selected.
HTMLElement
:
The
<button>
element representing the item.
This function reveals the dropdown list.
Disables this component.
Enables this component.
This function will select the given list item by the given reference.
You can pass an integer index that represents the position. Index 0 is the first item in the list.
If it cannot find the item, it will return null.
(any)
HTMLElement
:
The '
This function initializes the selector and binds interactive events.
(any)
Binds the interactive events for a dropdown item.
(any)
Represents a calendar widget which is used primarily for the Object history page.
Extends EventComponent
(any)
Returns an instance of Calendar for the given element.
This will create a Calendar, if it doesn't exist, for this element.
(HTMLElement)
The main element for the calendar.
Instantiates all Calendar elements within the given element.
(any)
Initializes the widget.
Redraws the widget.
Redraws the header of the widget.
Redraws the legend.
Redraws the month element.
Redraws the day elements.
(any)
Draws event listing.
(any)
(any)
Returns the current option set for the given key.
(any)
This represents the actions tied to the object header (the main banner with the object name and dropdowns.
Extends EventComponent
This function initializes the header UI components and binds interactive events.
(any)
This represents an object lookup.
(any)
Returns an instance of Locator for the given element.
This will create a Locator, if it doesn't exist, for this element.
(HTMLElement)
The main element for the locator panel;
Attempts to determine if the object can be found and then redirect to the same page while discovering it.
Represents the earth for the purposes of visualizing object location.
The earth is a sphere. I am officially part of the globehead conspiracy.
(any)
(any)
Updates the projection to fit the given space.
(any)
(any)
Initializes the globe structure and data.
Initializes the graticule (grid lines) around the globe.
Redraws the globe.
Internal function that will draw the graticule.
A graticule is the projected lines around the sphere.
Toggles rotation.
(any)
Enables a timer to rotate the globe.
This class represents a tooltip. This can display helpful text on links or buttons that might not have text displayed for it.
These are automatically created for anything that has a title attribute.
Generally one uses the Tooltip.load() function to instantiate a tooltip, or, even better, just lets it get instantiated for any element with a title attribute automatically.
Extends EventComponent
(HTMLElement)
The element to attach the tooltip events to.
Finds all elements with a title attribute and instantiates a Tooltip object for each of them.
Only looks for elements within the given element.
(HTMLElement)
The element to search within.
Instantiates a Tooltip, if it hasn't already, for the given element.
(HTMLElement)
The element to instantiate a Tooltip around.
Reveals the tooltip and optionally replaces the message with the given string.
When message is given, the normal behavior of the tooltip (to reveal on mouseover) is supressed until the tooltip goes away. When message isn't given, it will pull the text from the 'title' attribute.
(string)
The attribute containing the tooltip message to show.
Clears the tooltip from view.
Binds the DOM events for this Tooltip object.
This class instantiates a terminal emulator at the given element.
Extends EventComponent
(any)
(any)
(any)
(any)
(any)
This class module manages any open WebSocket connections.
Generally, there is a single open websocket connection that is shared among all page components. This module routes requests from the server to the correct component.
This method will open the main websocket on the current domain.
This method handles websocket connections. The parameter 'event' contains the websocket event.
(any)
This method handles websocket disconnection. The parameter 'event' contains the websocket event.
(any)
This method handles websocket messages incoming. The parameter 'message' contains the message from the server.
(any)
This method captures any errors of the websocket.
(any)
This method adds the given item to the routing table such that it will invoke the callback whenever it sees a websocket message with 'item' as a tag.
(any)
(any)
(any)
The amount of time between a disconnect and attempting to reconnect
The maximum amount of time between a reconnection attempt and the next.
The handle for the actual websocket.
A map between unique tags and messages.
This class represents flash popups. This can display helpful messages upon actions being taken or errors occurring.
Extends EventComponent
This represents a tagged input element.
Extends EventComponent
(any)
Returns an instance of TagInput for the given element.
This will create a TagInput, if it doesn't exist, for this element.
This class handles any tab strip on the website.
Extends EventComponent
(any)
This function will give you the Tabs component that represents the current element.
If you give it an element that is within a tab-panel, it will return the Tabs instance for the tabs element that corresponds to that tab-panel element.
Returns null if there is no such tabstrip.
(any)
Returns the visible width of the tab-strip.
This does not include the dropdown button, if it is visible, nor any sidebar buttons.
Determines if (and acts to make sure) the dropdown button is visible.
Ensures that the dropdown button, if it exists, is shown.
(any)
Ensures that the dropdown button, if it exists, is hidden.
(any)
Ensures that the dropdown menu, if it exists, is shown.
(any)
Ensures that the dropdown menu, if it exists, is hidden.
(any)
Ensures that the sidebar button, if it exists, is shown.
(any)
Ensures that the sidebar button, if it exists, is depressed.
(any)
This method is the event callback that will reveal the bound tab.
(any)
(any)
This method returns the unique index for this tab strip.
This function selects the given tab by its index or the element.
The first tab is at index 0.
(any)
(any
= false
)
(any
= false
)
This method sets the width of the tab to a static value based on its current form.
(any)
This method retrieves the document title that should be used for the current tab.
This method updates the document title to reflect the current tab.
This method returns the number of tabs (not including sidebar tabs.)
This method will return the index of the currently selected tab.
This method will ensure that tab events are bound to this tabstrip.
(any)
(any)
This method adds events to the dropdown menu item.
(any)
This method adds a tab at the given index with the given name. If no index is given, the tab is appended to the end of the tabstrip (the right-hand side assuming a left-to-right rendering)
(any)
(any)
(any)
This method replaces the tab at the given index with the one passed in.
(any)
(any)
This method removes the tab at the given index or via the passed in element.
(any)
This method returns the element of the tab at the given index.
(any)
This method returns a reference to the tab panels element.
This method returns the element of the tab-panel at the given index.
(any)
This method will merge these tabs to a parent tabstrip.
It will merge with a tabstrip that is up the chain with the attribute 'data-allow-merge'.
Generally, this will be done automatically when it sees a 'data-merge' attribute.
This method merges the tabs from the given Tabs instance with the current one.
The previously merged items will be cleared.
If you pass null, the previously merged items will be cleared only.
(any)
This class handles the index page at the root of the site ('/').
Extends EventComponent
(HTMLElement)
The element to look for the index page.
Finds all elements with a title attribute and instantiates a Tooltip object for each of them.
Only looks for elements within the given element.
(HTMLElement)
The element to search within.
Instantiates a Tooltip, if it hasn't already, for the given element.
(HTMLElement)
The element to instantiate a Tooltip around.
The gallery is a series of images which are represented by a series of thumb images (smaller images). When somebody clicks on the thumb, the larger image is displayed above.
By default, a slideshow is started where the images cycle through in the thumbnail order every few seconds (configured using SLIDESHOW_INTERVAL).
A particular image may be displayed on page load when targetted in the URL using the hash syntax: "/foo/bar#gallery-image-3" will select the 4th image. This targetting also allows the gallery to be used when javascript is disabled through the use of css ":target" pseudo selector. This is why styling is done on both :target and .active, and why this module has to set the style of the opacity to 0.0 for all elements since the CSS-only way of doing things always reveals the first image, in case no hash is given in the URL.
When a particular image is selected in this manner, the slideshow feature is disabled. Also, when somebody clicks on a particular image, it is assumed they want to look at it, so the slideshow is similarly disabled.
Generally you use the Gallery.load method to instantiate a Gallery component.
Extends EventComponent
(HTMLElement)
The element that contains the image gallery.
This class implements the search results viewer and facet panel.
Extends EventComponent
(any)
The time in milliseconds before allowing a search. Any searches queued during the timeout will delay the search.
This class handles the file listing and navigation.
It also handles file input configuration management for things such as selecting which files to use as input.
Extends EventComponent
(any)
Loads the given directory by URL.
This will load and replace the file listing panel.
(any)
(any)
Loads the given file by URL.
The type and name fields will be used to generate the appropriately labeled tab in the file browser.
(any)
(any)
(any)
Binds interactive events to the component.
Queues an upload of the given file entry, interpreted as a directory.
The entry will be a FileSystemDirectoryEntry which is, as of this implementation of this function, non-standard.
(any)
(any)
Queues an upload of the given File.
(any)
(any)
Consumes and uploads the file provided by the given file metadata.
This can either be a File, a DataTransferItem, or a FileSystemEntry. Browser support dictates that fallbacks are used which include each of these potential types of file metadata structures.
It attempts to eventually get a standard File structure before invoking uploadFile. Also, for directory support, it will call uploadDirectory which will recursively call this function indirectly through calls to uploadFileList for entries in that directory.
(any)
(any
= ""
)
Consume and upload the files represented in the given list.
The list is assumed to be either an array of FileSystemEntry structions or a DataTransferItemList of some kind.
The uploadFileListItem function will disambiguate for each potential type of file entry and appropriately fallback when some functionality is not available.
(any)
(any
= ""
)
Asynchronously creates a new file.
(any)
(any)
(any
= true
)
(any
= null
)
Asynchronously creates a new directory.
(any)
(any)
This method binds events for "new" file/group rows in the file list.
(any)
This method updates the document title to reflect the current tab.
This class manages the various run panes throughout the site.
An instance of the class is created for the "View" or "Run" tab, of course, but also for the "Build" tab, any open file tabs, and any preview pane.
It is responsible for queuing runs or individual jobs and managing any widget events and widget configurations.
Extends EventComponent
(any)
Returns the RunList component associated with this runner.
Focus on the content of the given run list item.
(any)
Asynchronously cancels a run or job
(any)
Loads the build indicated by the given run list item.
(any)
Loads the left-hand panel for the given run list item.
(any)
Returns the current object we are using as input.
Opens the configuration panel for the current running widget.
Closes the configuration panel for the current running widget.
Opens or closes the configuration panel for the current running widget.
Creates a view for the given task or partial task and queues it for run.
(any)
Spawns a task for a browser-based widget.
(any)
Starts a server-side task.
(any)
Establishes events for the run button.
This class represents a VM builder widget that allows for the selection of the running object and potentially each providing object and backend.
Extends EventComponent
(any)
Runs the object as specified by the form.
(any
= null
)
Retrieves the task information currently reflected by the form.
Binds events to the form elements.
Retrieves the data that represents the object of the given item.
(any)
Updates the given task form item with the given object.
(any)
(any)
Retrieves the element representing the given item in the task.
(any)
HTMLElement
:
The element at the given index, if it exists, null otherwise.
Binds events specific to object selection.
This class retrieves information about a particular Task object.
(any)
This class represents a Job in the job queue.
Extends EventComponent
(any)
The time in milliseconds between polling for updates in a run.
This class represents any running interactive object.
Extends EventComponent
(any)
The object of the object that is running.
The object being viewed within this object.
The task manifest, if available, for the running object.
Initializes the preview pane.
Handles the "updateTask" event.
(any)
Normalizes task file and url fields.
(any)
Sends the task to the widget.
Handles an "updateConfiguration" message. TODO: this is likely best being an 'updateInput' message??
(any)
Handles an "updateInput" message.
(any)
Handles an "updateToolbar" message.
(any)
Handles an "updateFile" message.
(any)
Handles an "updateData" message.
(any)
Handles an "updateSize" message.
This event is triggered when the widget requests a resize.
(any)
Handles an "updateStatus" message.
(any)
Sends an "updateStatus" message that says we are ready.
TODO: make this a general function that you pass the status.
Binds events for this iframe and widget.
Sets up events for iframe communication.
This class represents a run list, which is the list of queued or running jobs or tasks.
This panel appears on the "View" or "Run" and usually has an entry for "Queue" which can queue a new task. It also appears on each file tab.
This list is also reused for the job viewer to list the jobs for a node in a workflow.
Extends EventComponent
(any)
The HTMLElement that represents this list.
Hides the run list.
Shows the run list.
Shows/Hides the run list.
(any)
Selects the given item in the list.
(any)
Returns the index of the currently selected item.
Retrieves information about the given item in the list.
(any)
This class manages the viewer object selector.
The Runner class still manages the runtime of these viewers.
Extends EventComponent
(any)
This class represents any Workflow component.
A workflow pane consists of at least a Workflow widget and possibly a set of sidebars for selecting objects, viewing configurations, and viewing job logs.
Extends EventComponent
(any)
The time in milliseconds between polling for updates in a run.
The default workflow options.
This function gets references to the tab strip for configurations.
This function shows the object selection sidebar, if obscured.
This function hides the object selection sidebar, if shown.
This function shows the configuration sidebar, if obscured.
This function hides the configuration sidebar, if shown.
This function sets up the dynamic interactions with the sidebar.
Unselects any selected ports.
Unselects any selected wires.
Disconnects the given wire between the given ports.
(any)
(any)
(any)
Returns the current pan X coordinate.
Returns the current pan Y coordinate.
Forces a layout calculation.
Redraws the workflow.
Retrieves an instance of the Palette.
The Palette will yield a way to define interactable elements for creating new nodes to the workflow.
Retrieves the node list.
Retrieves the node at the given index.
(any)
Removes everything from this workflow.
This is the main class for instantiating a Workflow widget.
Extends EventComponent
(HTMLElement)
The workflow element to instantiate within.
(object?)
The optional set of options. See Workflow.defaults.
(object?)
The optional initial serialized graph data.
The time in milliseconds between polling for updates in a run.
The default workflow options.
This function gets references to the tab strip for configurations.
This function shows the object selection sidebar, if obscured.
This function hides the object selection sidebar, if shown.
This function shows the configuration sidebar, if obscured.
This function hides the configuration sidebar, if shown.
This function sets up the dynamic interactions with the sidebar.
Unselects any selected ports.
Unselects any selected wires.
Disconnects the given wire between the given ports.
(any)
(any)
(any)
Returns the current pan X coordinate.
Returns the current pan Y coordinate.
Forces a layout calculation.
Redraws the workflow.
Retrieves an instance of the Palette.
The Palette will yield a way to define interactable elements for creating new nodes to the workflow.
Retrieves the node list.
Retrieves the node at the given index.
(any)
Removes everything from this workflow.
This class represents the SVG layer.
Extends EventComponent
(object)
The set of workflow widget options.
Returns the
Returns the width of the plane.
Updates the width of the plane.
(any)
Returns the height of the plane.
Updates the height of the plane.
(any)
Adds the given DOM (namely SVG) element to the SVG.
(HTMLElement)
The element to add.
Removes the given DOM (namely SVG) element from the SVG.
(HTMLElement)
The element to remove.
Extending this class allows a component to provide event handling and callbacks.
Sets a callback for the given event.
(string)
The name of the event.
(eventCallback)
The callback function.
Sets a callback for the given event.
(string)
The name of the event.
(eventCallback)
The callback function.
Removes a callback for the given event.
(string)
The name of the event.
(eventCallback)
The callback function.
Returns the @eventCallback of the given event name if it has been registered.
(string)
The name of the event.
eventCallback
:
Returns the @eventCallback of the given event name if it has been registered.
(string)
The name of the event.
eventCallback
:
Extending this class allows a component to provide event handling and callbacks.
Sets a callback for the given event.
(string)
The name of the event.
(eventCallback)
The callback function.
Sets a callback for the given event.
(string)
The name of the event.
(eventCallback)
The callback function.
Removes a callback for the given event.
(string)
The name of the event.
(eventCallback)
The callback function.
Returns the @eventCallback of the given event name if it has been registered.
(string)
The name of the event.
eventCallback
:
Returns the @eventCallback of the given event name if it has been registered.
(string)
The name of the event.
eventCallback
:
A generic event callback.
Type: Function
(data)
Any event data.
A generic event callback.
Type: Function
(data)
event data.
This represents a DOM surface. Each component within the World can be moved, with some rules.
Essentially, this class manages the interaction between a person and the widget in terms of handling mouse and touch events. This class registers event handlers and will pan, zoom, and move components around the overall visualization.
To add a component, just create a World based on an element, and then invoke the add() member with an instance of a MovableComponent, which itself is wrapping an element that is within the main element given to this constructor.
Extends EventComponent
(HTMLElement)
The element containing all components.
(object)
The options governing the possible interactions.
Returns the world's root element.
Returns the world's panning element.
The current zoom. 1.0 is the default zoom.
Set the current zoom.
(any)
The current horizontal pan position of the world.
The current vertical pan position of the world.
Retrieves the world-relative X coordinate for the center.
Retrieves the world-relative Y coordinate for the center.
Returns a list of components that are currently selected.
Adds the given component to the active display.
(MovableComponent)
The component to add.
Removes the given component from the display.
(MovableComponent)
The component to remove.
Moves the world such that the given world coordinate is at the center.
(any)
(any)
Moves the given component to the given position.
If the component is collidable, it may not be able to move since another object is already located in that spot. Therefore, it will return false so that the move may be reverted.
(any)
(any)
(any)
bool
:
Returns true when the move is clean, and false when it collides.
Moves all components currented selected by the given relative position.
(any)
(any)
Redraws the surface.
Selects all nodes.
Clears the current selection.
When the surface is dragged for selection.
(any)
When the surface is no longer dragged for a selection.
(any)
When the surface is dragged for a pan.
(any)
Handles mouse wheel events.
(any)
Handles mousedown events.
(any)
This function handles any keydown event.
(any)
This function handles any keypress event.
(any)
This represents the Quadtree which manages the collision space.
(any)
(any)
Adds the given component to the quadtree.
(StaticComponent)
The component to add.
Updates the position of the given component within the quadtree.
(StaticComponent)
The component to update.
Removes the component from the quadtree.
(StaticComponent)
The component to remove.
Returns the set of components that are completely within the given region.
(number)
The left-most point of the region.
(number)
The top-most point of the region.
(number)
The width of the region.
(number)
The height of the region.
Array
:
The list of components, empty if none found.
Returns the set of components that intersect the given region, even if only partially.
(number)
The left-most point of the region.
(number)
The top-most point of the region.
(number)
The width of the region.
(number)
The height of the region.
Array
:
The list of components, empty if none found.
This represents a connection between two Ports.
Extends EventComponent
(Port)
The Port that serves as the starting point.
(Port)
The Port that serves as the endpoint.
(object)
The workflow widget options.
The direction denoting right to left. As in, heading left.
The direction denoting left to right. As in, heading right.
The direction denoting down to up. As in, heading upward.
The direction denoting up to down. As in, heading downward.
Based on the current status of the Wire, select or unselect it.
Whether or not this Wire is currently selected.
Selects the Wire.
Unselects the Wire.
Returns the starting Port.
Returns the ending Port.
Returns the <li>
element that retains metadata about the initial connection.
Returns the <li>
element that retains metadata about the initial connection.
Returns the index of this Wire at the starting Port.
Returns the index of this Wire at the ending Port.
Returns the <path>
element within the SVG plane.
Returns the starting x coordinate.
Returns the starting y coordinate.
Returns the endpoint x coordinate.
Returns the endpoint y coordinate.
Returns the starting wire length.
Returns the endpoint wire length.
The initial direction of the wire.
The ending direction of the wire.
Redraws the wire.
Disconnects this wire.
Destroys this wire.
This represents a component that reflects a "port" for a workflow node.
A port is a possible connection between nodes. It represents a relationship between nodes. Ports may be 'inputs' or 'outputs', in that they are tagged as such. In these cases, it reflects a semantic relationship and may be used this way to indicate the movement of work or data throughout the graph.
When you connect a node to another, the person will create a Wire between each port. Each node will have their own Port, represented visually by a dot. A wire may be created by dragging from one node to another, for instance.
The Port has a name and type. The types may be used to semantically relate different ports or nodes. For instance, it can be established that some ports only allow connections from a Port with the same type (or set of possible types)
Extends EventComponent
(any)
(any)
(any)
Returns the Node this Port belongs to.
Returns the index of this Port.
Number
:
The index. The first port is at index 0.
Returns the element that represents this Port.
HTMLElement
:
The representative element.
Returns the direction of the port. That is, the side of the node it is on (left, right, top, bottom).
Sets the side that the port is facing.
(string)
The direction. Either "left", "right", "top" or "bottom".
Gets the Y position of the Port relative to the Node.
Gets the X position of the Port relative to the Node.
Based on the current status, select or unselect this Port.
Whether or not this Port is currently selected.
Selects this Port.
Unselects this Port.
Redraws the wires for this Port.
When the port can be moved to different sides, do so when appropriate.
Returns the list of Wire objects involved with this Port.
Returns the number of Wire objects connected to this Port.
Returns the maximum allowed Wire objects that can connect to this Port.
Number
:
The maximum wires allowed. If -1, then there is no limit.
Appends the given Wire to this Port as a starting point.
(any)
Appends the given Wire to this Port as an endpoint.
(any)
Removes the given wire.
(any)
Get the port's connection type.
string
:
Either "input", "output", or "port" for a general port.
Get the port's type.
Update the port's type.
(any)
Get the port name.
Update the port's name.
(any)
Whether or not this port is currently visible.
Sets the visibility of this port.
(any)
Updates the Port and its DOM representation based on the given JSON data.
(any)
Removes this port completely.
This represents a node in the workflow graph.
Extends MovableComponent
(any)
Returns the index of this Node.
Number
:
The index. The first node is at index 0.
Nodes can be selected.
Whether or not the component is currently movable.
Nodes can be selected as part of regions.
Nodes can be collided.
Get the node type.
Update the node's type.
(any)
Get the node name.
Update the node's name.
(any)
Get the node's icon.
Update the node's icon.
(any)
Returns the visibility of this Node.
Sets the visibility of this Node.
(any)
Returns all of the user-defined metadata for this node.
Resets the given node metadata data to the given object.
(any)
Retrieve a particular metadata value for this node.
(any)
Set a particular metadata value for this node.
(any)
(any)
Destroy this node which means disconnecting everything.
Retrieves a comprehensive list of all Ports, including inputs, outputs, and general ports.
Array
:
The list of Port objects.
Based on the current status, select or unselect this Node.
Whether or not this Node is currently selected.
Selects this Node.
Unselects this Node.
Marks this Node as being 'viewed'.
Clears this Node as being 'viewed'.
Marks this Node as being 'highlighted'.
Clears this Node as being 'highlighted'.
Reorganizes the ports on the DOM.
Redraws the node and the attached wires.
Retrieves the list of general ports.
Retrieves the list of input ports.
Retrieves the list of output ports.
Retrieves the list of general ports that are currently hidden.
Retrieves the list of input ports that are currently hidden.
Retrieves the list of output ports that are currently hidden.
Reveals the dropdown for any hidden general ports, of any.
(any)
Reveals the dropdown for any hidden input ports, of any.
(any)
Reveals the dropdown for any hidden output ports, of any.
(any)
Hides any dropdown that is currently displayed.
Updates a job related to this node.
Will add the job if the given id is unique.
This will render the job status graphically.
(any)
Ensures that the "reveal port" buttons are visible when they are valid.
This represents a set of jobs associated with a particular node.
(HTMLElement)
The element for the node.
(Object)
The configuration of the donut.
This represents a visual component that can be moved.
Extends StaticComponent
(HTMLElement)
The element to wrap.
Whether or not the component is currently movable.
Moves the component to the specified place.
(any)
(any)
Returns the X coordinate of the component.
Returns the Y coordinate of the component.
Handles click events on the element.
(any)
Handles when the element should be moved.
(any)
Handles when the element should be done moving.
(any)
This represents a visual component that cannot be moved.
Extends EventComponent
(HTMLElement)
The element to wrap.
Whether or not this component can be selected.
Whether or not this component can be region selected.
Whether or not this component can be collided.
Retrieves the current bound element.
Retrieves the current x position.
Retrieves the current x position.
Retrieves the current width of the component.
Retrieves the current height of the component.
Retrieves the bounding box for this component.
This class handles a configuration form.
Extends EventComponent
(any)
(any)
This method will pull out the data from the configuration form and return it as an object.
This method returns a collection of all of the datapoint elements.
Adds the given data point to the given key.
(any)
(any)
(any)
(any)
(any)
This method will bind events that are triggered when values change. For instance, when values will disable or change the visibility of other fields.
(any)
Returns the id of the object this configuration belongs to.
Returns the revision of the object this configuration belongs to.
Returns the connection index within the workflow this configuration is attached to.
Returns the configuration index within the object this configuration belongs to.
This class handles the configuration panel that appears in the workflow editor.
This panel contains one or more Configuration forms which can be viewed or edited per node of the workflow.
Extends EventComponent
(any)
Creates the panel for the given object.
(any)
(any)
(any)
This class manages theme editing and selection.
Extends EventComponent
(HTMLElement)
The element that displays the theme editor.
Finds all elements that have the theme editor or selection panel and instantiates them.
Only looks for elements within the given element.
(HTMLElement)
The element to search within.
Instantiates a ThemeManager, if it hasn't already, for the given element.
(HTMLElement)
The element to instantiate a Tooltip around.
ThemeManager
:
The instantiated ThemeManager.
Binds the DOM events for this ThemeManager instance.
This class handles functionality related to Occam objects. This class can pull down information and metadata and post updates to the Occam backend, if that is allowed by the object.
Objects have queues of pending actions which need to be ACK'd before continuing. That way actions are invoked in the correct order. An object's revision is updated whenever an action is acknowledged. Some actions require an object to be up-to-date in the backend worker, and thus must wait until the queue is empty. For instance, running the object in the browser. Basically, these actions are just in the queue as well... but we should somehow indicate that the actions are delayed.
(any)
(any)
(any)
(any)
(any)
(any)
(any)
(any)
This constant sets the number of preview panes that can be loading at a time. This will help limit the load on the server and client when loading a whole page of widgets.
This is the amount of time in milliseconds to wait for a widget to give a "loaded" event. We will remove the progress indicator and allow interaction only when receiving that message. Otherwise, after the timeout, we will display an error notification.
This implements behaviors for the people/collection page.
Extends EventComponent
(any)
This implements behaviors for the objects/new modal.
Extends EventComponent
(any)
This implements behaviors for the objects/new modal.
Extends EventComponent
(any)
This implements behaviors for the objects/new modal.
Extends EventComponent
(any)
This implements behaviors for the objects/new modal.
Extends EventComponent
(any)
This class represents an object list, which is used for displaying the list of dependencies or resources on the details page.
Extends EventComponent
(any)
Returns an instance of ObjectList for the given element.
This will create an ObjectList, if it doesn't exist, for this element.
Loads all object lists found within the given element.
(any)
Attaches events to the element.
Attaches events to a list item.
(any)
Updates the item element to reflect the given information.
(any)
(any)
Removes all entries in the list.
Removes the list item by either index or element.
(any)
Returns the number of items currently in the list.
Replaces a list item with the given element.
(any)
(any)
Retrieves the list element for the given index.
Returns null when the item cannot be found.
(any)
Retrieves the information represented by the given index.
(any)
This class module holds useful functionality for keeping track of the browser history and state.
This can coordinate among elements on the page such that the browser back and forward buttons do not do a full page refresh, but rather update the page when the content already exists.
This function pushes the given module state to the current state.
When the location changes, the data will be preserved. When the page is reloaded via the back button or other mechanism, the page can be updated based on the state instead of loading it again from the server.
This works well for smaller modules, such as tabs, where the state (which tab is selected) can be preserved and restored as page navigation happens.
Performs the given state changes to the current page. Generally called internally. Not meant to be called directly.
(any)
This method returns the browser's current url. It is window.location.pathname;
This method returns the path from the current object.
This changes the current location (address bar) without navigating.
By default, this will push the navigation state as well such that the back button, etc, will preserve the state and a new state will then be made as a clone of the current state.
(string)
The URL to change the address bar to.
(any)
This is the callback that is fired when a person presses the back or forward buttons in their browser. The given event will have the index of the "state" in our history. This function will iterate through the history to recreate the page state.
(any)
Sets up the navigation state stack.
Initializes based on elements found within the given element.
(any)
Watches an iframe for navigation and updates our own location.
(any)
This class handles a configuration form.