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

Side by Side Diff: app/views/topology/service.js

Issue 13273047: Rename BrowserCharm model to just Charm
Patch Set: Rename BrowserCharm model to just Charm Created 11 years, 6 months ago
Left:
Right:
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 unified diff | Download patch
« no previous file with comments | « app/views/charm.js ('k') | app/views/viewlets/inspector-header.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 Y.Array.each(dropXY, function(_, index) { 749 Y.Array.each(dropXY, function(_, index) {
750 ghostAttributes.coordinates[index] = 750 ghostAttributes.coordinates[index] =
751 (dropXY[index] - translation[index]) / scale; 751 (dropXY[index] - translation[index]) / scale;
752 }); 752 });
753 if (dragData.dataType === 'charm-token-drag-and-drop') { 753 if (dragData.dataType === 'charm-token-drag-and-drop') {
754 // The charm data was JSON encoded because the dataTransfer 754 // The charm data was JSON encoded because the dataTransfer
755 // mechanism only allows for string values. 755 // mechanism only allows for string values.
756 var charmData = Y.JSON.parse(dragData.charmData); 756 var charmData = Y.JSON.parse(dragData.charmData);
757 // Add the icon url to the ghost attributes for the ghost icon 757 // Add the icon url to the ghost attributes for the ghost icon
758 ghostAttributes.icon = dragData.iconSrc; 758 ghostAttributes.icon = dragData.iconSrc;
759 var charm = new models.BrowserCharm(charmData); 759 var charm = new models.Charm(charmData);
760 Y.fire('initiateDeploy', charm, ghostAttributes); 760 Y.fire('initiateDeploy', charm, ghostAttributes);
761 } 761 }
762 } 762 }
763 }, 763 },
764 764
765 /** 765 /**
766 * Clear any stateful actions (menus, etc.) when a clearState event is 766 * Clear any stateful actions (menus, etc.) when a clearState event is
767 * received. 767 * received.
768 * 768 *
769 * @method clearStateHandler 769 * @method clearStateHandler
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 'd3', 1533 'd3',
1534 'd3-components', 1534 'd3-components',
1535 'd3-statusbar', 1535 'd3-statusbar',
1536 'juju-view-service', 1536 'juju-view-service',
1537 'juju-templates', 1537 'juju-templates',
1538 'juju-models', 1538 'juju-models',
1539 'juju-env', 1539 'juju-env',
1540 'unscaled-pack-layout' 1540 'unscaled-pack-layout'
1541 ] 1541 ]
1542 }); 1542 });
OLDNEW
« no previous file with comments | « app/views/charm.js ('k') | app/views/viewlets/inspector-header.js » ('j') | no next file with comments »

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