blob: 93009fb901ad746ed6741eaf54983f45e6c13d40 [file] [log] [blame]
<head>
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="library-view" extends="observatory-element">
<template>
<div class="alert alert-success">Library {{ library['name'] }}</div>
<div class="alert alert-info">Scripts</div>
<table class="table table-hover">
<tbody>
<tr template repeat="{{ script in library['scripts']}}">
<td>
{{ script['kind'] }}
</td>
<td>
<a href="{{ app.locationManager.currentIsolateScriptLink(script['id'], script['name']) }}">{{ script['name'] }}</a>
</td>
</tr>
</tbody>
</table>
<div class="alert alert-info">Imported Libraries</div>
<table class="table table-hover">
<tbody>
<tr template repeat="{{ lib in library['libraries'] }}">
<td>
<a href="{{ app.locationManager.currentIsolateObjectLink(lib['id'])}}">
{{ lib['url'] }}
</a>
</td>
</tr>
</tbody>
</table>
<div class="alert alert-info">Variables</div>
<table class="table table-hover">
<tbody>
<tr template repeat="{{ variable in library['variables'] }}">
<td>
<template if="{{ variable['final'] }}">
final
</template>
<template if="{{ variable['const'] }}">
const
</template>
<template if="{{ (variable['declared_type']['name'] == 'dynamic' && !variable['final'] && !variable['const']) }}">
var
</template>
<template if="{{ (variable['declared_type']['name'] != 'dynamic') }}">
<a href="{{ app.locationManager.currentIsolateClassLink(variable['declared_type']['id']) }}">
{{ variable['declared_type']['user_name'] }}
</a>
</template>
<a href="{{ app.locationManager.currentIsolateObjectLink(variable['id'])}}">
{{ variable['user_name'] }}
</a>
</td>
<td>
<template if="{{ (variable['value']['type'] == 'null') }}">
{{ "null" }}
</template>
<template if="{{ (variable['value']['type'] != 'null') }}">
<a href="{{ app.locationManager.currentIsolateObjectLink(variable['value']['id'])}}">
{{ variable['value']['preview'] }}
</a>
</template>
</td>
</tr>
</tbody>
</table>
<div class="alert alert-info">Functions</div>
<table class="table table-hover">
<tbody>
<tr template repeat="{{ func in library['functions'] }}">
<td>
<a href="{{ app.locationManager.currentIsolateObjectLink(func['id'])}}">
{{ func['user_name'] }}
</a>
</td>
</tr>
</tbody>
</table>
<div class="alert alert-info">Classes</div>
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Internal Name</th>
</tr>
</thead>
<tbody>
<tr template repeat="{{ cls in library['classes'] }}">
<td>
<a href="{{ app.locationManager.currentIsolateClassLink(cls['id']) }}">
{{ cls['user_name'] }}
</a>
</td>
<td>
<a href="{{ app.locationManager.currentIsolateClassLink(cls['id']) }}">
{{ cls['name'] }}
</a>
</td>
</tr>
</tbody>
</table>
</template>
<script type="application/dart" src="library_view.dart"></script>
</polymer-element>