API Docs for:
Show:

Landscape Class

Module: views.landscape
Parent Module: views

Collect annotation data about landscape integration for easy consumption.

For now this inspects the current database and computes data.

TODO: take set of [a/c] | [d] models and do incremental updates.

Methods

getLandscapeBadge

(
  • model
  • intent
  • hint
)
Object

Given a model and an intent return an object with the properties of a badge. If the object shouldn't have a badge undefined is returned.

Parameters:

  • model Model

    to render badge for.

  • intent String

    'security' || 'reboot'.

  • hint String

    image postfix to use ex _round.

Returns:

Object: {link: {String}, sprite:{String}}.

getLandscapeURL

(
  • model
  • intent
)
String

Get the landscape url for a given service with respect to the models in the db we've been passed. This depends on the 'db' attribute of this object being set.

Parameters:

  • model Model

    to get URL for.

  • intent String

    (optional) can be 'security' or 'reboot'.

Returns:

String: URL to access model entity in landscape.

slash

() String

Ensure a trailing slash on a string.

Returns:

String: string with trailing slash.

update

() chainable

Collect annotation information from units to services and from services to environemnt.

Properties

_allowAdHocAttrs

Boolean protected

Defined in app/views/landscape.js:41

Available since 3.5.0

This tells Y.Base that it should create ad-hoc attributes for config properties passed to Model's constructor. This makes it possible to instantiate a model and set a bunch of attributes without having to subclass Y.Model and declare all those attributes first.

Default: true