nEDM Interface

nEDM Experiment

nEDM Interface

Repository

Tutorials


Modules


Classes


Externals


Requires

Classes

nEDMDatabase
WebSocketListen

Members

(inner) db_info_is_called

Gets database information.
Source:

(private, inner) using_prefix

Updates the login/logout buttons and user status. Called during session changes
Source:

Methods

(private, inner) AddDBButtonToHeader($header_left) → {String|String}

Adds DB "flash" button to the header toolbar. This can be blinked to indicate DB activity.
Parameters:
Name Type Description
$header_left Object header portion on the left side
Source:
Returns:
  • adb - db name
    Type
    String
  • prettyname - db name, pretty version
    Type
    String

(inner) addLogMessage(msg)

Appends the message to the logging facility (available in status)
Parameters:
Name Type Description
msg string
Source:

(private, inner) BuildDBList(ev,, ui,)

Builds database list (subsystems)
Parameters:
Name Type Description
ev, Object jQuery event
ui, Object jQuery info
Source:

(private, inner) CheckUserStatus(callback(login_name))

Check current user status
Parameters:
Name Type Description
callback(login_name) function
Source:

(inner) database_status()

Build database status table. This is called on index.html
Source:

(private, inner) DatabaseStatus()

DatabaseStatus object. "Global" object designed to handle updating the interface according to updates to DBs.
Source:

(inner) dateFromKey(arr) → {Object}

Get Date object from array
Parameters:
Name Type Description
arr Array Array like ["name", YY, MM, DD, H, M, S] or [YY, MM, DD, H, M, S, "name"]
Source:
Returns:
Type
Object

(inner) get_current_db_name(pathname) → {String}

Get current db name, guessed from either the path of the page, or the passed in path
Parameters:
Name Type Description
pathname String (Optional)
Source:
Returns:
name of db (e.g. "nedm%2Fraspberries")
Type
String

(inner) get_database(name) → {nEDMDB}

Get database by name
Parameters:
Name Type Description
name String (Optional) - name of database *or* return from get_current_db_name
Source:
Returns:
database object (with updated interface)
Type
nEDMDB

(inner) globalSetting(key, valueopt) → {Object|String|Number}

Set and return global settings. Internally, these settings should be persistent when closing a browser.
Parameters:
Name Type Attributes Description
key String key to save global setting
value Object | String | Number <optional>
value to set. If not given, function reads out current value.
Source:
Returns:
current globalSetting associated with key. undefined if not found.
Type
Object | String | Number

(private, inner) HandleDatabaseChanges(msg,)

Handles aggregate database messages (changes feed) emits "db_update" events, which can be listened to (see on_db_updates)
Parameters:
Name Type Description
msg, Object Message from EventSource
Source:

(private, inner) HandleLocalStorage()

Turns on listening to aggregate DB changes. Called by a session change.
Source:

(inner) keyFromDate(date) → {Array}

Get Array from Date Object, not UTC
Parameters:
Name Type Description
date Object
Source:
Returns:
arr - [YY, MM, DD, H, M, S]
Type
Array

(inner) keyFromUTCDate(date) → {Array}

Get Array from Date Object, assumes Date is UTC
Parameters:
Name Type Description
date Object
Source:
Returns:
arr - [YY, MM, DD, H, M, S]
Type
Array

(inner) on_db_updates(callback)

Listen for changes from aggregate database
Parameters:
Name Type Description
callback module:lib/nedm.OnDBUpdates
Source:

(private, inner) RefreshUpdates()

Refreshes updates by removing aggregate feed running
Source:

(inner) registerUser(un, pw, tryLogin, callback(Boolean))

Signup on server
Parameters:
Name Type Description
un String username
pw String password
tryLogin Boolean try Login when a successful signup
callback(Boolean) function called with status of login.
Source:

(inner) remove_db_updates(callback)

Remove changes callback
Parameters:
Name Type Description
callback module:lib/nedm.OnDBUpdates
Source:
See:
  • on_db_updates

(private, inner) ResetLocalStorage()

Reset the local storage, and cancels feed if shutdown is true.
Source:

(inner) show_error_window(error, msg)

Show toastr error window
Parameters:
Name Type Description
error String Error type
msg String More detailed message
Source:

(private, inner) StartFeed()

Starts an actual feed
Source:

(inner) startWebSocketListener(url, prependopt)

Start websocket listener
Parameters:
Name Type Attributes Description
url String url and port name
prepend String <optional>
prepends to output log
Source:

(inner) stopWebSocketListener(url)

Stop websocket listener
Parameters:
Name Type Description
url String url and port name
Source:

(private, inner) UpdateDBStatus(ev,, ui,)

Updates showing the DB status as a toastr status
Parameters:
Name Type Description
ev, Object jQuery event
ui, Object jQuery info
Source:

(private, inner) UpdateHeader(ev,, ui,)

Updates header toolbar to show correct DB name. Also calls through to UpdateButtons
Parameters:
Name Type Description
ev, Object jQuery event
ui, Object jQuery info
Source:

(inner) validate(un, pw, callback(Boolean))

Login to server
Parameters:
Name Type Description
un String username
pw String password
callback(Boolean) function called with status of login.
Source:

Type Definitions

DBUpdateMessage

DB update callback message
Type:
  • Object
Properties:
Name Type Description
db String name of database
type String type of message
Source:

OnDBUpdates(msg)

DB update callback function
Parameters:
Name Type Description
msg module:lib/nedm.DBUpdateMessage
Source: