Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(85)

Unified Diff: app/views/topology/landscape.js

Issue 7417043: Add Landscape bottom-bar controls
Patch Set: Add Landscape bottom-bar controls Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/views/service.js ('k') | app/views/topology/topology.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/views/topology/landscape.js
=== added file 'app/views/topology/landscape.js'
--- app/views/topology/landscape.js 1970-01-01 00:00:00 +0000
+++ app/views/topology/landscape.js 2013-02-27 21:45:03 +0000
@@ -0,0 +1,50 @@
+'use strict';
+
+/**
+ * Provide the LandscapeModule class.
+ *
+ * @module topology
+ * @submodule topology.landscape
+ */
+
+YUI.add('juju-topology-landscape', function(Y) {
+ var views = Y.namespace('juju.views'),
+ models = Y.namespace('juju.models'),
+ d3ns = Y.namespace('d3');
+
+ /**
+ * Handle Landscape integration within a Topology.
+ *
+ * @class LandscapeModule
+ */
+ var LandscapeModule = Y.Base.create('LandscapeModule', d3ns.Module, [], {
+ /**
+ * Update Landscape links as needed.
+ *
+ * @method update
+ * @return {undefined} Nothing.
+ */
+ update: function() {
+ var topo = this.get('component');
+ var db = topo.get('db');
+ var env = db.environment;
+ var container = this.get('container');
+
+ views.utils.updateLandscapeBottomBar(topo.get('landscape'), env, env,
+ container, 'environment');
+ }
+ }, {
+ ATTRS: {}
+
+ });
+ views.LandscapeModule = LandscapeModule;
+}, '0.1.0', {
+ requires: [
+ 'node',
+ 'event',
+ 'd3-components',
+ 'juju-models',
+ 'juju-env',
+ 'juju-view-utils'
+ ]
+});
« no previous file with comments | « app/views/service.js ('k') | app/views/topology/topology.js » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b