OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Juju GUI, which lets users view and manage Juju | 2 This file is part of the Juju GUI, which lets users view and manage Juju |
3 environments within a graphical interface (https://launchpad.net/juju-gui). | 3 environments within a graphical interface (https://launchpad.net/juju-gui). |
4 Copyright (C) 2012-2013 Canonical Ltd. | 4 Copyright (C) 2012-2013 Canonical Ltd. |
5 | 5 |
6 This program is free software: you can redistribute it and/or modify it under | 6 This program is free software: you can redistribute it and/or modify it under |
7 the terms of the GNU Affero General Public License version 3, as published by | 7 the terms of the GNU Affero General Public License version 3, as published by |
8 the Free Software Foundation. | 8 the Free Software Foundation. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, but WITHOUT | 10 This program is distributed in the hope that it will be useful, but WITHOUT |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 @method _generateConfigs | 164 @method _generateConfigs |
165 @param {Y.Model} model of the service. | 165 @param {Y.Model} model of the service. |
166 @return {Object} an object containing the configuration objects. | 166 @return {Object} an object containing the configuration objects. |
167 */ | 167 */ |
168 _generateConfigs: function(model) { | 168 _generateConfigs: function(model) { |
169 var configs = { | 169 var configs = { |
170 configBase: { | 170 configBase: { |
171 db: this.topo.get('db'), | 171 db: this.topo.get('db'), |
172 env: this.topo.get('env'), | 172 env: this.topo.get('env'), |
173 events: { | 173 events: { |
174 '.close': {'click': 'destroy'} | 174 '.close': {'click': 'destroy'}, |
| 175 '.close-slot': {'click': 'hideSlot'} |
175 } | 176 } |
176 }, | 177 }, |
177 configService: { | 178 configService: { |
178 events: { | 179 events: { |
179 '.tab': {'click': 'showViewlet'} | 180 '.tab': {'click': 'showViewlet'} |
180 }, | 181 }, |
181 viewletEvents: { | 182 viewletEvents: { |
182 '.toggle-settings-help': { click: 'toggleSettingsHelp' }, | 183 '.toggle-settings-help': { click: 'toggleSettingsHelp' }, |
183 '.toggle-expose': { click: 'toggleExpose' }, | 184 '.toggle-expose': { click: 'toggleExpose' }, |
184 '.config-file .fakebutton': { click: 'handleFileClick'}, | 185 '.config-file .fakebutton': { click: 'handleFileClick'}, |
185 '.config-file input[type=file]': { change: 'handleFileChange'}, | 186 '.config-file input[type=file]': { change: 'handleFileChange'}, |
186 'button.confirm': { click: 'saveConfig'}, | 187 'button.confirm': { click: 'saveConfig'}, |
187 '.num-units-control': { | 188 '.num-units-control': { |
188 'keydown': 'modifyUnits', | 189 'keydown': 'modifyUnits', |
189 'blur': 'resetUnits' | 190 'blur': 'resetUnits' |
190 }, | 191 }, |
191 '.unit-details': { click: 'showUnit'}, | 192 'a[data-unit]': { click: 'showUnitDetails'}, |
192 '.destroy-service-icon': {'click': 'onDestroyIcon'}, | 193 '.destroy-service-icon': {'click': 'onDestroyIcon'}, |
193 '.initiate-destroy': {'click': 'onInitiateDestroy'}, | 194 '.initiate-destroy': {'click': 'onInitiateDestroy'}, |
194 '.cancel-destroy': {'click': 'onCancelDestroy'}, | 195 '.cancel-destroy': {'click': 'onCancelDestroy'}, |
195 '.status-unit-header': {'click': 'toggleUnitHeader'}, | 196 '.status-unit-header': {'click': 'toggleUnitHeader'}, |
196 '.toggle-select-all': {'click': 'toggleSelectAllUnits'}, | 197 '.toggle-select-all': {'click': 'toggleSelectAllUnits'}, |
197 // Constraints viewlet events. | 198 // Constraints viewlet events. |
198 '.save-constraints': {click: 'saveConstraints'} | 199 '.save-constraints': {click: 'saveConstraints'} |
199 }, | 200 }, |
200 viewletList: ['overview', 'units', 'unit', 'config', | 201 viewletList: ['overview', 'units', 'unit', 'config', |
201 'constraints'], | 202 'constraints'], |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 }, '0.1.0', { | 347 }, '0.1.0', { |
347 requires: ['juju-templates', | 348 requires: ['juju-templates', |
348 'juju-view-utils', | 349 'juju-view-utils', |
349 'juju-models', | 350 'juju-models', |
350 'juju-topology', | 351 'juju-topology', |
351 'base-build', | 352 'base-build', |
352 'handlebars-base', | 353 'handlebars-base', |
353 'node', | 354 'node', |
354 'view'] | 355 'view'] |
355 }); | 356 }); |
OLD | NEW |