API Docs for:
Show:

App Class

Defined in: app/app.js:25
Module: app

The main app class.

Methods

_buildServiceView

() private

Defined in app/app.js:541

_prefetch_service

() private

Defined in app/app.js:514

activateHotkeys

()

Defined in app/app.js:150

Activate the keyboard listeners. Only called by the main index.html, not by the tests' one.

behaviors.timestamp.callback

()

Defined in app/app.js:132

Wait for the DOM to be built before rendering timestamps.

check_user_credentials

(
  • req
  • res
  • next
)

Defined in app/app.js:683

Ensure that the current user has authenticated.

Parameters:

  • req Object

    The request.

  • res Object

    ???

  • next Object

    The next route handler.

destructor

()

Defined in app/app.js:430

Release resources and inform subcomponents to do the same.

enableBehaviors

()

Defined in app/app.js:447

Hook up all of the declared behaviors.

getModelURL

(
  • model
  • [intent]
)

Defined in app/app.js:875

Object routing support

This utility helps map from model objects to routes defined on the App object. See the routes Attribute for additional information.

Parameters:

  • model Object

    The model to determine a route URL for.

  • [intent] Object optional

    the name of an intent associated with a route. When more than one route can match a model, the route without an intent is matched when this attribute is missing. If intent is provided as a string, it is matched to the intent attribute specified on the route. This is effectively a tag.

initializer

(
  • cfg
)

Defined in app/app.js:234

Parameters:

  • cfg Object

    Application configuration data.

keyCodeToString

(
  • keyCode
)
String

Defined in app/app.js:200

Transform a numeric keyCode value to its string version. Example: 16 returns 'shift'.

Parameters:

  • keyCode Number

    The numeric value of a key.

Returns:

String: The string version of the given keyCode.

loadService

()

Defined in app/app.js:843

Model interactions -> move to db layer

logout

(
  • req
)
Undefined

Defined in app/app.js:644

Log the current user out and show the login screen again.

Parameters:

  • req Object

    The request.

Returns:

Undefined: Nothing.

on_database_changed

()

Defined in app/app.js:459

On database changes update the view.

onEnvironmentNameChange

()

Defined in app/app.js:790

Display the Environment Name.

The environment name can arrive asynchronously. Instead of updating the display from the environment view (a separtion of concerns violation), we update it here.

onEnvPermissionDenied

(
  • evt
)
Undefined private

Defined in app/app.js:729

Notify with an error when the user tries to change the environment without permission.

Parameters:

  • evt Object

    An event object (with "title" and "message" attributes).

Returns:

Undefined: Mutates only.

onLogin

(
  • evt
)
private

Defined in app/app.js:749

Hide the login mask and redispatch the router.

When the environment gets a response from a login attempt, it fires a login event, to which this responds.

Parameters:

  • evt Object

    An event object (with a "data.result" attribute).

onProviderTypeChange

()

Defined in app/app.js:775

Display the provider type.

The provider type arrives asynchronously. Instead of updating the display from the environment code (a separation of concerns violation), we update it here.

show_charm

()

Defined in app/app.js:603

show_charm_collection

()

Defined in app/app.js:593

show_environment

()

Defined in app/app.js:814

show_environment.callback

()

Defined in app/app.js:830

Let the component framework know that the view has been rendered.

show_login

() Undefined

Defined in app/app.js:626

Show the login screen.

Returns:

Undefined: Nothing.

show_notifications_overview

()

Defined in app/app.js:615

show_notifications_view

()

Defined in app/app.js:661

notifications is a preserved view that remains rendered on all main views. We manually create an instance of this view and insert it into the App's view metadata.

show_service

()

Defined in app/app.js:565

show_service_config

()

Defined in app/app.js:572

show_service_constraints

()

Defined in app/app.js:586

show_service_relations

()

Defined in app/app.js:579

show_unit

()

Defined in app/app.js:488

showRootView

()

Defined in app/app.js:805

Shows the root view of the application erasing all namespaces

Attributes

behaviors

Defined in app/app.js:122

Data driven behaviors

Placeholder for real behaviors associated with DOM Node data-* attributes.