Gets all routes offered by the plugin. This method is called by TensorBoard when retrieving all the routes offered by the plugin. Returns: A dictionary mapping URL path to route that handles it.
(self)
| 123 | return http_util.Respond(request, response, "application/json") |
| 124 | |
| 125 | def get_plugin_apps(self): |
| 126 | """Gets all routes offered by the plugin. |
| 127 | |
| 128 | This method is called by TensorBoard when retrieving all the |
| 129 | routes offered by the plugin. |
| 130 | |
| 131 | Returns: |
| 132 | A dictionary mapping URL path to route that handles it. |
| 133 | """ |
| 134 | # Note that the methods handling routes are decorated with |
| 135 | # @wrappers.Request.application. |
| 136 | return { |
| 137 | "/tags": self._serve_tags, |
| 138 | "/meshes": self._serve_mesh_metadata, |
| 139 | "/data": self._serve_mesh_data, |
| 140 | } |
| 141 | |
| 142 | def is_active(self): |
| 143 | return False # `list_plugins` as called by TB core suffices |