Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Unified Diff: runtime/bin/vmservice/client/lib/src/elements/library_view.html

Issue 199363002: Rework library and class view pages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: edits Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/vmservice/client/lib/src/elements/library_view.html
diff --git a/runtime/bin/vmservice/client/lib/src/elements/library_view.html b/runtime/bin/vmservice/client/lib/src/elements/library_view.html
index b54eb2172f9966cd1767f8a53a638413debb9cbb..e842bd382d7c0cfa4d423da2f237982825a0ce47 100644
--- a/runtime/bin/vmservice/client/lib/src/elements/library_view.html
+++ b/runtime/bin/vmservice/client/lib/src/elements/library_view.html
@@ -1,5 +1,7 @@
<head>
<link rel="import" href="class_ref.html">
+ <link rel="import" href="curly_block.html">
+ <link rel="import" href="eval_box.html">
<link rel="import" href="field_ref.html">
<link rel="import" href="function_ref.html">
<link rel="import" href="instance_ref.html">
@@ -10,6 +12,21 @@
</head>
<polymer-element name="library-view" extends="observatory-element">
<template>
+ <style>
+ .content {
+ padding-left: 10%;
+ font: 400 14px 'Montserrat', sans-serif;
+ }
+ h1 {
+ font: 400 18px 'Montserrat', sans-serif;
+ }
+ .memberHeader, .member {
+ vertical-align: top;
+ padding: 3px 0 3px 1em;
+ font: 400 14px 'Montserrat', sans-serif;
+ }
+ </style>
+
<nav-bar>
<top-nav-menu></top-nav-menu>
<isolate-nav-menu isolate="{{ library.isolate }}"></isolate-nav-menu>
@@ -17,68 +34,108 @@
<nav-refresh callback="{{ refresh }}"></nav-refresh>
</nav-bar>
- <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>
- <script-ref ref="{{ script }}"></script-ref>
- </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>
- <library-ref ref="{{ lib }}"></library-ref>
- </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><field-ref ref="{{ variable }}"></field-ref></td>
- <td><instance-ref ref="{{ variable['value'] }}"></instance-ref></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>
- <function-ref ref="{{ func }}"></function-ref>
- </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>
- <class-ref ref="{{ cls }}"></class-ref>
- </td>
- <td>
- <class-ref ref="{{ cls }}" internal></class-ref>
- </td>
- </tr>
- </tbody>
- </table>
+ <div class="content">
+ <h1>
+ <template if="{{ library.name.isEmpty }}">
+ unnamed library
+ </template>
+ <template if="{{ library.name.isNotEmpty }}">
+ library {{ library.name }}
+ </template>
+ </h1>
+ <table>
+ <tr>
+ <td class="memberHeader">url</td>
+ <td class="member">{{ library['url'] }}</td>
+ </tr>
+ <template if="{{ library['imports'].length > 0 }}">
+ <tr>
+ <td class="memberHeader">imports</td>
+ <td class="member">
+ <template repeat="{{ import in library['imports'] }}">
+ <library-ref ref="{{ import }}"></library-ref>
+ </template>
+ </td>
+ </tr>
+ </template>
+ <template if="{{ library.name != library.vmName }}">
+ <tr>
+ <td class="memberHeader">vm name</td>
+ <td class="member">{{ library.vmName }}></td>
+ </tr>
+ </template>
+ </table>
+ </div>
+
+ <hr>
+
+ <div class="content">
+ <template if="{{ library['scripts'].isNotEmpty }}">
+ scripts ({{ library['scripts'].length }})
+ <curly-block>
+ <table>
+ <tr template repeat="{{ script in library['scripts'] }}">
+ <td class="member">
+ <script-ref ref="{{ script }}"></script-ref>
+ </td>
+ </tr>
+ </table>
+ </curly-block><br>
+ </template>
+
+ <template if="{{ library['classes'].isNotEmpty }}">
+ classes ({{ library['classes'].length }})
+ <curly-block>
+ <table>
+ <tr template repeat="{{ cls in library['classes'] }}">
+ <td class="member">
+ <class-ref ref="{{ cls }}"></class-ref>
+ </td>
+ </tr>
+ </table>
+ </curly-block><br>
+ </template>
+
+ <template if="{{ library['variables'].isNotEmpty }}">
+ variables ({{ library['variables'].length }})
+ <curly-block>
+ <table>
+ <tr template repeat="{{ field in library['variables'] }}">
+ <td class="member">
+ <field-ref ref="{{ field }}"></field-ref>
+ </td>
+ <td class="member">
+ <template if="{{ field['value'] != null }}">
+ <instance-ref ref="{{ field['value'] }}"></instance-ref>
+ </template>
+ </td>
+ </tr>
+ </table>
+ </curly-block><br>
+ </template>
+
+ <template if="{{ library['functions'].isNotEmpty }}">
+ functions ({{ library['functions'].length }})
+ <curly-block>
+ <table>
+ <tr template repeat="{{ function in library['functions'] }}">
+ <td class="member">
+ <function-ref ref="{{ function }}">
+ </function-ref>
+ </td>
+ </tr>
+ </table>
+ </curly-block><br>
+ </template>
+ </div>
+
+ <hr>
+ <div class="content">
+ <eval-box callback="{{ eval }}"></eval-box>
+ </div>
+ <br><br><br><br>
+ <br><br><br><br>
</template>
<script type="application/dart" src="library_view.dart"></script>
</polymer-element>

Powered by Google App Engine
This is Rietveld 408576698