OLD | NEW |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 /** | 3 /** |
4 * The database models. | 4 * The database models. |
5 * | 5 * |
6 * @module models | 6 * @module models |
7 */ | 7 */ |
8 | 8 |
9 YUI.add('juju-models', function(Y) { | 9 YUI.add('juju-models', function(Y) { |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 Dynamically calculate a display name that accounts for Juju Core name | 131 Dynamically calculate a display name that accounts for Juju Core name |
132 prefixes. | 132 prefixes. |
133 */ | 133 */ |
134 getter: function() { | 134 getter: function() { |
135 return this.get('id').replace('service-', ''); | 135 return this.get('id').replace('service-', ''); |
136 } | 136 } |
137 }, | 137 }, |
138 name: {}, | 138 name: {}, |
139 charm: {}, | 139 charm: {}, |
140 config: {}, | 140 config: {}, |
| 141 // Annotations on service are an empty dict |
| 142 // rather than undefined. This helps make |
| 143 // some checks in the code simpler to write. |
| 144 // Units still default to undefined as a way |
| 145 // to help support scale. |
| 146 annotations: {value: {}}, |
141 constraints: {}, | 147 constraints: {}, |
142 exposed: { | 148 exposed: { |
143 value: false | 149 value: false |
144 }, | 150 }, |
145 subordinate: { | 151 subordinate: { |
146 value: false | 152 value: false |
147 }, | 153 }, |
148 pending: { | 154 pending: { |
149 value: false | 155 value: false |
150 }, | 156 }, |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 'datasource-io', | 754 'datasource-io', |
749 'datasource-jsonschema', | 755 'datasource-jsonschema', |
750 'io-base', | 756 'io-base', |
751 'json-parse', | 757 'json-parse', |
752 'juju-delta-handlers', | 758 'juju-delta-handlers', |
753 'juju-endpoints', | 759 'juju-endpoints', |
754 'juju-view-utils', | 760 'juju-view-utils', |
755 'juju-charm-models' | 761 'juju-charm-models' |
756 ] | 762 ] |
757 }); | 763 }); |
OLD | NEW |