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.
Updates the element to remvoe the waiting status.
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)
Renders the current editor content to the preview pane.
Retrieves the html of the rendered markdown.
Brings up the preview pane.
Internal method that attaches interaction events to relevant elements.
Retrieves markdown from the given HTML.
(String)
The HTML to parse into markdown.
String
:
The rough markdown equivalent of the given HTML.
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.
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.
Returns an array of strings that correspond to the value of the input.
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)
Shows the given sidebar.
(any)
Hides the given sidebar.
(any)
This method is the event callback that will reveal the bound tab.
(any)
(any)
Invalidates an asynchronously loadable tab.
When this is called on the index or element of the tab, when the tab is
switched to next, the content will refresh. If force
is set to true
,
the tab will be refreshed even if it is currently selected.
(number)
The index of the tab.
(bool
= false
)
When
true
, refresh if the tab is active.
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)
Performs a JSON service search with the provided query parameters.
(any)
Performs a JSON search with the provided query parameters.
(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)
Rebinds the file listing events if the file list changes.
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)
(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)
Prepares and loads the Configuration panel.
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)
(any
= false
)
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.
Override the on to send the 'start' event right away.
(any)
(any)
Will call the callback with the job's network manifest.
(any)
Will call the callback with the job's task manifest.
(any)
Opens a log socket and calls the given callback for when the log is updated.
Opens a two-way connection with the running job.
(any)
Opens a log socket and calls the given callback for each new event.
(any)
This class represents any running interactive object.
Extends EventComponent
(any)
(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.
(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)
Handles jobs listing pages.
This is mainly on the /system/jobs page. It shows a table of the pending or running jobs. That page has a sidebar that allows filtering the jobs based on the job status or the target.
(any)
Installs the event handlers for the sidebar forms, etc.
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.
Saves the workflow.
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.
Disables hover events on the currently hovered port.
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.
Returns whether or not the workflow has changed since it was saved.
Sets the dirtiness of the workflow.
Will force it to a boolean value.
(any)
Forces a layout calculation.
Redraws the workflow.
(any
= false
)
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.
Saves the workflow.
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.
Disables hover events on the currently hovered port.
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.
Returns whether or not the workflow has changed since it was saved.
Sets the dirtiness of the workflow.
Will force it to a boolean value.
(any)
Forces a layout calculation.
Redraws the workflow.
(any
= false
)
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 whether or not the port is a ghost port.
Ghost ports are fake ports that are attached to a dummy node that is being dragged for a new wire.
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 target information.
Sets the node target information or removes it if null.
(any)
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)
Adds a port to this node.
(any)
(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)
Loads all the configurations it finds within the given element.
(any)
Loads a representation of the given element.
(any)
(any)
Returns the configuration value data for this form.
Returns the schema represented by this configuration form.
Returns the HTMLElement representing the <occam-configuration>
tag.
HTMLElement
:
The represented
<occam-configuration>
element.
Returns, if any, the URL used to load the configuration.
Asynchronously loads the configuration from its attached URL.
Causes a download of the configuration schema.
(any
= "schema.json"
)
Causes a download of the configuration value, as currently represented.
(any
= "configuration.json"
)
Internal method called upon construction that binds interactive events.
Adds interactive events to the element representing a configuration item.
The element
should point to a <li>
with the configuration-item
class.
Adds interactive events to 'date', 'time', and 'datetime' fields.
(any)
Adds interactive events to 'color' fields.
(any)
Adds interactive events to the element for editing the configuration item.
The element
should point to a <li>
with the configuration-item
class.
Adds interactive events for an input of a particular item.
(HTMLElement)
The input element of whatever kind.
Internal method to update the positioning of the 'units' text.
(HTMLElement)
The input element to use.
Removes the item from an editable configuration.
This presumes the item is from an editable view. This is usually true by having such items call this method from, say, a remove button event.
(any)
Adds interactive events to support array configuration items.
Adds interactive events to array items and their actions.
Adds interactive events for items that represent groups of items.
Adds validations to the given input element, if provided.
The element
should point to some kind of <input>
element or other
element that has a value. Generally it will have a configuration-input
class attached.
(HTMLElement)
The containing item element for the input.
(HTMLElement)
The input element to bind.
Adds interactive events that fulfill any enabledBy/revealedBy/disabledBy/hiddenBy action.
If the data-enabledBy
attribute exists, this will have a base64 encoded
JSON string that describes the keys and values that will enable the
option. This means the input is initially disabled.
Updates the item with respect to an updated schema.
The item's input regions will be updated to reflect the new schema parameters. Any values will be removed and the item will reflect its form if it was empty and new.
(String)
The item's new type.
Determines the parent group item that contains the given item.
If the parent would be the root, this returns null instead of returning
that root group element since that group is not within a <li>
.
(any)
(HTMLElement | null)
:
The containing
<li>
element for this item or null.
Determines the key for the given item element.
(any)
Returns the form name that encodes the given key.
(any)
Retrieves the item element that represents the provided key.
(String)
The configuration key to lookup.
(any)
(HTMLElement | null)
:
The configuration item's
<li>
or null.
Disables the given item and its inputs via its base <li>
element.
Enables the given item and its inputs via its base <li>
element.
Reveals the given item.
Hides the given item.
Adds interactive events to the navigation bar elements.
Gives the default value for the given input element or null if none.
(HTMLElement)
The containing input element.
(string | null)
:
The default value or null if none.
Updates the value of the given item element or key.
(any)
(any)
(any
= true
)
Submits new data to the configuration form, if present.
Submits new schema data to the configuration schema form, if present.
Returns the item element for the given key.
(String)
The key for the item to look up.
(HTMLElement | null)
:
The item
<li>
element for the key or null.
Gives the realized value for the given input element or null if none.
When defaultValue
is not specified, the default value of the item is
given when the input is considered empty. Otherwise, the provided value
is used as the default value in that case.
You can pass null
to defaultValue
to detect an empty input as it will
then return null
only in that case. null
is never a valid default
value within an Occam configuration.
(HTMLElement)
The containing input element or group.
(number | string | Array | null)
:
The value of the field or null if none.
Retrieves the interactive input for the given configuration item element.
If there is more than one, it will return the first one.
(any)
Retrieves all interactive inputs for the given configuration item element.
(any)
Retrieves the type
field for the given configuration item.
Returns the configuration schema for the given item element.
object
:
The schema describing this item or group.
Returns the validation schema for the given input.
(any)
Validates the given input element.
(HTMLElement)
The containing item element for the input.
(HTMLElement)
The input element to validate.
boolean
:
Returns
true
if the field validates and
false
otherwise.
Renders the given error message for the given item.
The element
should point to the item itself. Typically this is the
<li>
with the configuration-item
class.
If the validation does not exist, but is given, it will be added to the validation list in a way where it will be destroyed when the errors are cleared.
(HTMLElement)
The input element containing the error.
(Object)
A description of the validation.
Clears any evidence of an error for the given item element.
Returns the description section of an item.
(HTMLElement | null)
:
The description element or null if there is not one.
Closes any open item description for the given item element.
Opens any existing item description sub-element for the given item element.
Returns the editor section of an item, if one exists.
(HTMLElement | null)
:
The editor element or null if there is not one.
Closes any open item editor for the given item element.
Opens any existing item editor sub-element for the given item element.
Collapses the given element, if possible.
Expands the given element, if possible.
Collapses all collapsable regions.
This class handles validation of configuration values.
Runs a validation expression and returns the result.
(any)
(any)
Runs a test against the given value.
(any)
(any)
(any)
test - The code to run.
(any)
value - The value to use.
Determines whether or not the given value is an integer.
That value might be a string with an encoding of an integer or some expression that results in an integer value.
(any)
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 method returns the url to this object.
(any
= {}
)
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)
Performs the search for object templates indicated by the input query.
This implements behaviors for the object selector modal.
Extends EventComponent
(any)
This implements behaviors for the objects/add-io modal.
Extends EventComponent
(any)
This implements behaviors for the objects/add-dependency modal.
Extends EventComponent
(any)
This implements behaviors for the objects/new modal.
Extends EventComponent
(any)
Performs the search for object templates indicated by the input query.
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)
Populates the object listing with the result of a search.
(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 logical index for the given element.
This is the index of the item within the actual object metadata, if available. Since sub-listings might exist which filter the objects into categorical sets, the index of an item may not be its position within the document. That is, the second item in a list might have an index greater than 1.
It determines the index by inspecting the data key.
(HTMLElement)
The object list element.
number
:
The index of the element or -1 if it is unknown.
Updates the index referenced by the given object list element.
This goes through and updates the fields within the tags such that they now refer to the given index.
(HTMLElement)
The object list element.
(number)
The new index.
Disables the object list (and any sub-list)
(bool
= false
)
When true, it is called from the parent list.
Enables the object list (and any sub-list)
(bool
= false
)
When true, it is called from the parent list.
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.