diff options
author | 2017-02-27 10:59:38 -0800 | |
---|---|---|
committer | 2017-02-27 11:28:03 -0800 | |
commit | b83db97a812edc614e6891a4fd69eaf422debea3 (patch) | |
tree | 99f5156c675cd72cfe97af8c7c68a65d46e2ff47 | |
parent | 4044e78d0b378e18d1f98488ed484aa900d2f753 (diff) |
Migrate tf-audio-dashboard to webfiles.
Change: 148668422
9 files changed, 140 insertions, 27 deletions
diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/BUILD b/tensorflow/tensorboard/components/tf_audio_dashboard/BUILD new file mode 100644 index 0000000000..975ce6d902 --- /dev/null +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/BUILD @@ -0,0 +1,59 @@ +package(default_visibility = ["//tensorflow:internal"]) + +load("@io_bazel_rules_closure//closure:defs.bzl", "webfiles") +load("//tensorflow/tensorboard:defs.bzl", "tensorboard_ts_library") +load("//tensorflow/tensorboard:defs.bzl", "tensorboard_webcomponent_library") + +licenses(["notice"]) # Apache 2.0 + +webfiles( + name = "tf_audio_dashboard", + srcs = [ + "tf-audio-dashboard.html", + "tf-audio-grid.html", + "tf-audio-loader.html", + ], + path = "/tf-audio-dashboard", + deps = [ + "//tensorflow/tensorboard/components/tf_backend", + "//tensorflow/tensorboard/components/tf_dashboard_common", + "//tensorflow/tensorboard/components/tf_imports:lodash", + "@org_polymer", + "@org_polymer_paper_icon_button", + "@org_polymer_paper_styles", + ], +) + +filegroup( + name = "all_files", + srcs = glob(["**"]), + tags = ["notsan"], +) + +################################################################################ +# MARKED FOR DELETION + +tensorboard_webcomponent_library( + name = "legacy", + srcs = [ + "tf-audio-dashboard.html", + "tf-audio-grid.html", + "tf-audio-loader.html", + ], + destdir = "tf-audio-dashboard", + deps = [ + "//tensorflow/tensorboard/components:tf_imports", + "//tensorflow/tensorboard/components/tf_backend:legacy", + "//tensorflow/tensorboard/components/tf_dashboard_common:legacy", + "//third_party/javascript/polymer/v1/paper-icon-button:lib", + "//third_party/javascript/polymer/v1/paper-styles:lib", + "//third_party/javascript/polymer/v1/polymer:lib", + ], +) + +tensorboard_ts_library( + name = "legacy_ts", + srcs = [ + ], + deps = ["//tensorflow/tensorboard/components:common_deps"], +) diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/BUILD b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/BUILD new file mode 100644 index 0000000000..383ea8d1b6 --- /dev/null +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/BUILD @@ -0,0 +1,26 @@ +package(default_visibility = ["//tensorflow:internal"]) + +load("@io_bazel_rules_closure//closure:defs.bzl", "webfiles") + +licenses(["notice"]) # Apache 2.0 + +# bazel run //third_party/tensorflow/tensorboard/components/tf_audio_dashboard/demo +webfiles( + name = "demo", + srcs = ["index.html"], + path = "/tf-audio-dashboard/demo", + deps = [ + "//tensorflow/tensorboard/components/tf_audio_dashboard", + "//tensorflow/tensorboard/components/tf_audio_dashboard/demo/data", + "//tensorflow/tensorboard/components/tf_imports:d3", + "@org_polymer_iron_demo_helpers", + "@org_polymer_paper_styles", + "@org_polymer_webcomponentsjs", + ], +) + +filegroup( + name = "all_files", + srcs = glob(["**"]), + tags = ["notsan"], +) diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/BUILD b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/BUILD new file mode 100644 index 0000000000..c3824a923d --- /dev/null +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/BUILD @@ -0,0 +1,17 @@ +package(default_visibility = ["//tensorflow:internal"]) + +load("@io_bazel_rules_closure//closure:defs.bzl", "webfiles") + +licenses(["notice"]) # Apache 2.0 + +webfiles( + name = "data", + srcs = glob(["*"]), + path = "/tf-audio-dashboard/demo/data", +) + +filegroup( + name = "all_files", + srcs = glob(["**"]), + tags = ["notsan"], +) diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/audio_run_run1_tag_au1_2Faudio_2F0.json b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/audio_run_run1_tag_au1_2Faudio_2F0.json new file mode 100644 index 0000000000..7dfe32c711 --- /dev/null +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/audio_run_run1_tag_au1_2Faudio_2F0.json @@ -0,0 +1 @@ +[{"query": "index=0&tag=au1%2Faudio%2F0&run=run1", "step": 0, "wall_time": 1461795049.203407, "content_type": "audio/wav"}]
\ No newline at end of file diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/audio_run_run2_tag_au2_2Faudio_2F0.json b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/audio_run_run2_tag_au2_2Faudio_2F0.json new file mode 100644 index 0000000000..13f9c2de42 --- /dev/null +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/audio_run_run2_tag_au2_2Faudio_2F0.json @@ -0,0 +1 @@ +[{"query": "index=0&tag=au2%2Faudio%2F0&run=run2", "step": 0, "wall_time": 1461795049.212815, "content_type": "audio/wav"}]
\ No newline at end of file diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/individualAudio_index_0_tag_au1_2Faudio_2F0_run_run1.wav b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/individualAudio_index_0_tag_au1_2Faudio_2F0_run_run1.wav Binary files differnew file mode 100644 index 0000000000..f1d24adc0c --- /dev/null +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/individualAudio_index_0_tag_au1_2Faudio_2F0_run_run1.wav diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/individualAudio_index_0_tag_au2_2Faudio_2F0_run_run2.wav b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/individualAudio_index_0_tag_au2_2Faudio_2F0_run_run2.wav Binary files differnew file mode 100644 index 0000000000..006c84338f --- /dev/null +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/individualAudio_index_0_tag_au2_2Faudio_2F0_run_run2.wav diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/runs.json b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/runs.json new file mode 100644 index 0000000000..811a873684 --- /dev/null +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/data/runs.json @@ -0,0 +1,10 @@ +{ + "run1": + { + "audio": ["au1/audio/0"] + }, + "run2": + { + "audio": ["au2/audio/0"] + } +} diff --git a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/index.html b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/index.html index e6c92b095e..f0a79b573c 100644 --- a/tensorflow/tensorboard/components/tf_audio_dashboard/demo/index.html +++ b/tensorflow/tensorboard/components/tf_audio_dashboard/demo/index.html @@ -16,28 +16,30 @@ See the License for the specific language governing permissions and limitations under the License. --> -<html> - <head> - <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script> - <link rel="stylesheet" type="text/css" href="../../../lib/css/global.css"> - <link rel="import" href="../tf-audio-dashboard.html"> - <title>Audio Dashboard Demo</title> - <style> - #container{ - width: 1000px; - height: 800px; - border: 2px solid grey; - } - html,body { - height: 100%; - } - </style> - </head> - <body> +<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script> +<link rel="import" href="../../iron-demo-helpers/demo-snippet.html"> +<link rel="import" href="../tf-audio-dashboard.html"> + <link rel="import" href="../../paper-styles/typography.html"> + +<title>Audio Dashboard Demo</title> +<style> + #container { + height: 300px; + width: 100%; + } + + html, body { + margin: 0; + padding: 0; + font-family: "RobotoDraft","Roboto",sans-serif; + } + +</style> +<demo-snippet> + <template> <dom-module id="audio-dash-demo"> <template> - <tf-audio-dashboard id="demo" backend="[[backend]]"> - </tf-audio-dashboard> + <tf-audio-dashboard id="demo" backend="[[backend]]"></tf-audio-dashboard> </template> <script> Polymer({ @@ -46,8 +48,7 @@ limitations under the License. backend: { type: Object, value: function() { - var path = "/demo/data"; - var router = new TF.Backend.router(path, true); + var router = new TF.Backend.router("data", true); return new TF.Backend.Backend(router); }, }, @@ -55,8 +56,6 @@ limitations under the License. }); </script> </dom-module> - <div id="container"> - <audio-dash-demo></audio-dash-demo> - </div> - </body> -</html> + <audio-dash-demo id="container"></audio-dash-demo> + </template> +</demo-snippet> |