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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 getter: function() { | 454 getter: function() { |
455 // full_name | 455 // full_name |
456 var tmp = [this.get('series'), this.get('package_name')], | 456 var tmp = [this.get('series'), this.get('package_name')], |
457 owner = this.get('owner'); | 457 owner = this.get('owner'); |
458 if (owner) { | 458 if (owner) { |
459 tmp.unshift('~' + owner); | 459 tmp.unshift('~' + owner); |
460 } | 460 } |
461 return tmp.join('/'); | 461 return tmp.join('/'); |
462 } | 462 } |
463 }, | 463 }, |
464 /** | |
465 Does this charm have an icon file. Helper used for template rendering | |
466 decisions. | |
467 | |
468 */ | |
469 hasIcon: { | 464 hasIcon: { |
470 /** | 465 /** |
| 466 Does this charm have an icon file. Helper used for template rendering |
| 467 decisions. |
| 468 |
471 @method hasIcon.valueFn | 469 @method hasIcon.valueFn |
472 @return {Boolean} Does the Charm have an icon file. | 470 @return {Boolean} Does the Charm have an icon file. |
473 | 471 |
474 */ | 472 */ |
475 valueFn: function() { | 473 valueFn: function() { |
476 return this.get('files').indexOf('icon.svg') !== -1 ? true : false; | 474 return this.get('files').indexOf('icon.svg') !== -1 ? true : false; |
477 } | 475 } |
478 }, | 476 }, |
479 is_approved: {}, | 477 is_approved: {}, |
480 is_subordinate: {}, | 478 is_subordinate: {}, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 valueFn: function() { | 510 valueFn: function() { |
513 var categories = this.get('categories'); | 511 var categories = this.get('categories'); |
514 if (categories.length > 0) { | 512 if (categories.length > 0) { |
515 return categories[0]; | 513 return categories[0]; |
516 } else { | 514 } else { |
517 return null; | 515 return null; |
518 } | 516 } |
519 } | 517 } |
520 }, | 518 }, |
521 maintainer: {}, | 519 maintainer: {}, |
522 /** | 520 /* |
523 API related metdata information for this charm object. | 521 API related metdata information for this charm object. |
524 | 522 |
525 This includes information such as related charms calculated by the | 523 This includes information such as related charms calculated by the |
526 back end, but are not directly part of the charms representation. | 524 back end, but are not directly part of the charms representation. |
527 | 525 |
528 */ | 526 */ |
529 metadata: {}, | 527 metadata: {}, |
530 name: {}, | 528 name: {}, |
531 /** | 529 /** |
532 * options is the parsed YAML object from config.yaml in a charm. Do not | 530 * options is the parsed YAML object from config.yaml in a charm. Do not |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 ATTRS: {} | 696 ATTRS: {} |
699 }); | 697 }); |
700 | 698 |
701 }, '0.1.0', { | 699 }, '0.1.0', { |
702 requires: [ | 700 requires: [ |
703 'model', | 701 'model', |
704 'model-list', | 702 'model-list', |
705 'juju-charm-id' | 703 'juju-charm-id' |
706 ] | 704 ] |
707 }); | 705 }); |
OLD | NEW |