| OLD | NEW |
| 1 <head> | 1 <head> |
| 2 <link rel="import" href="observatory_element.html"> | 2 <link rel="import" href="observatory_element.html"> |
| 3 <link rel="import" href="service_ref.html"> | 3 <link rel="import" href="service_ref.html"> |
| 4 </head> | 4 </head> |
| 5 <polymer-element name="instance-ref" extends="service-ref"> | 5 <polymer-element name="instance-ref" extends="service-ref"> |
| 6 <template> | 6 <template> |
| 7 <div> | 7 <style> |
| 8 <template if="{{ (ref['type'] == 'null') }}"> | 8 .memberList { |
| 9 unexpected null | 9 margin-left: 3em; |
| 10 border-spacing: 0; |
| 11 border-collapse: collapse; |
| 12 } |
| 13 .member { |
| 14 vertical-align: top; |
| 15 padding: 0 1em; |
| 16 } |
| 17 </style> |
| 18 <div> |
| 19 <template if="{{ isUnexpectedRef(ref['type']) }}"> |
| 20 unexpected reference type <{{ ref['type'] }}> |
| 21 </template> |
| 22 |
| 23 <template if="{{ isNullRef(ref['type']) }}"> |
| 24 {{ name }} |
| 25 </template> |
| 26 |
| 27 <template if="{{ (isStringRef(ref['type']) || |
| 28 isBoolRef(ref['type']) || |
| 29 isIntRef(ref['type'])) }}"> |
| 30 <a href="{{ url }}">{{ name }}</a> |
| 31 </template> |
| 32 |
| 33 <template if="{{ isInstanceRef(ref['type']) }}"> |
| 34 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a> { |
| 35 <a on-click="{{ toggleExpand }}">...</a> |
| 36 <template if="{{ expanded }}"> |
| 37 <table class="memberList"> |
| 38 <tr template repeat="{{ field in ref['fields'] }}"> |
| 39 |
| 40 <td class="member">{{ field['decl']['user_name'] }}</td> |
| 41 <td class="member"> |
| 42 <instance-ref app="{{ app }}" ref="{{ field['value'] }}"></insta
nce-ref> |
| 43 </td> |
| 44 </tr> |
| 45 </table> |
| 46 </template> |
| 47 } |
| 48 </template> |
| 49 |
| 50 <template if="{{ isListRef(ref['type']) }}"> |
| 51 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['le
ngth']}})</a> { |
| 52 <a on-click="{{ toggleExpand }}">...</a> |
| 53 <template if="{{ expanded }}"> |
| 54 <table class="memberList"> |
| 55 <tr template repeat="{{ element in ref['elements'] }}"> |
| 56 <td class="member">[{{ element['index']}}]</td> |
| 57 <td class="member"> |
| 58 <instance-ref app="{{ app }}" ref="{{ element['value'] }}"></ins
tance-ref> |
| 59 </td> |
| 60 </tr> |
| 61 </table> |
| 62 </template> |
| 63 } |
| 64 </template> |
| 65 |
| 66 </div> |
| 10 </template> | 67 </template> |
| 11 <template if="{{ (ref['type'] == '@Null') }}"> | 68 <script type="application/dart" src="instance_ref.dart"></script> |
| 12 {{ name }} | |
| 13 </template> | |
| 14 <template if="{{ (ref['type'] != 'null') && ref['type'] != '@Null' }}"> | |
| 15 <a href="{{ url }}">{{ name }} </a> | |
| 16 </template> | |
| 17 </div> | |
| 18 </template> | |
| 19 <script type="application/dart" src="instance_ref.dart"></script> | |
| 20 </polymer-element> | 69 </polymer-element> |
| OLD | NEW |