| Index: server/static/rpcexplorer/rpc-service.html
|
| diff --git a/server/static/rpcexplorer/rpc-service.html b/server/static/rpcexplorer/rpc-service.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b5f9559dd87e5b6ad781ac8eacffa8e4971262ab
|
| --- /dev/null
|
| +++ b/server/static/rpcexplorer/rpc-service.html
|
| @@ -0,0 +1,49 @@
|
| +<!--
|
| + ~ // Copyright 2016 The Chromium Authors. All rights reserved.
|
| + ~ // Use of this source code is governed by a BSD-style license that can be
|
| + ~ // found in the LICENSE file.
|
| + ~
|
| + -->
|
| +
|
| +<link rel="import" href="/static/common/third_party/polymer/polymer.html">
|
| +
|
| +<link rel="import" href="rpc-descriptor-util.html">
|
| +
|
| +<!-- The `rpc-service` is a service page -->
|
| +<dom-module id="rpc-service">
|
| + <template>
|
| + <p>Methods:</p>
|
| + <ul>
|
| + <template is="dom-repeat" items="[[serviceDesc.method]]">
|
| + <li>
|
| + <a href="#/services/[[service]]/[[item.name]]">[[item.name]]</a>
|
| + <span class="text-muted comment">[[item.source_code_info.leading_comments]]</span>
|
| + </li>
|
| + </template>
|
| + </ul>
|
| + </template>
|
| +
|
| + <script>
|
| + 'use strict';
|
| +
|
| + Polymer({
|
| + is: 'rpc-service',
|
| + properties: {
|
| + description: Object, // FileDescriptorSet message
|
| + service: String,
|
| + serviceDesc: {
|
| + type: Object, // ServiceDescriptorProto message
|
| + computed: '_resolveServiceDesc(description, service)'
|
| + }
|
| + },
|
| +
|
| + _resolveServiceDesc: function(desc, service) {
|
| + var searchResult = rpcExplorer.descUtil.resolve(desc, service);
|
| + if (!searchResult || searchResult.type != 'service') {
|
| + return null;
|
| + }
|
| + return searchResult.desc;
|
| + }
|
| + });
|
| + </script>
|
| +</dom-module>
|
|
|