Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "build: refactor ng_polymer_lib to be reused." #3664

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 32 additions & 23 deletions tensorboard/components/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ load("//tensorboard/defs:vulcanize.bzl", "tensorboard_html_binary")
licenses(["notice"]) # Apache 2.0

tf_web_library(
name = "polymer_lib",
srcs = [
"polymer_lib.html",
],
name = "tensorboard",
srcs = ["tensorboard.html"],
path = "/",
deps = [
":analytics",
Expand All @@ -19,27 +17,9 @@ tf_web_library(
],
)

# This Polymer only binary without entry point.
tensorboard_html_binary(
name = "polymer_lib_binary",
compile = True,
input_path = "/polymer_lib.html",
output_path = "/polymer_lib_binary.html",
deps = [":polymer_lib"],
)

tf_web_library(
name = "tensorboard",
srcs = ["tensorboard.html"],
path = "/",
deps = [
":polymer_lib_binary",
],
)

tensorboard_html_binary(
name = "index",
compile = False,
compile = True,
input_path = "/tensorboard.html",
js_path = "/index.js",
output_path = "/index.html",
Expand Down Expand Up @@ -69,3 +49,32 @@ tf_web_library(
],
path = "/",
)

tf_web_library(
name = "ng_polymer_lib",
srcs = [
"ng_polymer_lib.html",
],
path = "/",
deps = [
":analytics",
":security",
"//tensorboard/components/tf_backend",
"//tensorboard/components/tf_imports:polymer",
"//tensorboard/components/tf_storage",
"//tensorboard/components/tf_tensorboard",
"//tensorboard/components/tf_tensorboard:default_plugins",
"//tensorboard/components/tf_tensorboard:registry",
],
)

# This Polymer only binary (as opposed to ng_index) allows ng_index to be built without
# JSCompiler step. In other words, Angular-only changes can be built faster
# incrementally.
tensorboard_html_binary(
name = "ng_polymer_lib_binary",
compile = False,
input_path = "/ng_polymer_lib.html",
output_path = "/ng_polymer_lib_binary.html",
deps = [":ng_polymer_lib"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
limitations under the License.
-->
<!-- Configures polymer and requires to be loaded at the top. -->
<!-- TODO(stephanwlee): Hparams (vaadin-grid) cannot support strictTemplatePolciy. Figure out
how to enable it back. -->
<!-- <link rel="import" href="security.html" /> -->
<link rel="import" href="security.html" />

<link rel="import" href="analytics.html" />
<link rel="import" href="tf-imports/polymer.html" />
<link rel="import" href="tf-tensorboard/registry.html" />
<link rel="import" href="tf-tensorboard/style.html" />
<link rel="import" href="tf-backend/tf-backend.html" />
<link rel="import" href="tf-storage/tf-storage.html" />
<link rel="import" href="tf-tensorboard/default-plugins.html" />
<link rel="import" href="tf-tensorboard/tf-tensorboard.html" />
11 changes: 10 additions & 1 deletion tensorboard/components/tensorboard.uninlined.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@
<link rel="shortcut icon" href="%TENSORBOARD_FAVICON_URI%" />
<link rel="apple-touch-icon" href="%TENSORBOARD_FAVICON_URI%" />

<link rel="import" href="polymer_lib_binary.html" />
<!-- Configures polymer and requires to be loaded at the top. -->
<!-- TODO(stephanwlee): Hparams (vaadin-grid) cannot support strictTemplatePolciy. Figure out
how to enable it back. -->
<!-- <link rel="import" href="security.html" /> -->

<link rel="import" href="analytics.html" />
<link rel="import" href="tf-imports/polymer.html" />
<link rel="import" href="tf-tensorboard/style.html" />
<link rel="import" href="tf-tensorboard/default-plugins.html" />
<link rel="import" href="tf-tensorboard/tf-tensorboard.html" />
<body>
<tf-tensorboard use-hash brand="TensorBoard"></tf-tensorboard>
</body>
Expand Down
2 changes: 1 addition & 1 deletion tensorboard/webapp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ tf_web_library(
path = "/",
deps = [
":tb_webapp",
"//tensorboard/components:polymer_lib_binary",
"//tensorboard/components:ng_polymer_lib_binary",
"//tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/source_code/monaco:requirejs",
],
)
Expand Down
2 changes: 1 addition & 1 deletion tensorboard/webapp/index.uninlined.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="shortcut icon" href="%TENSORBOARD_FAVICON_URI%" />
<link rel="apple-touch-icon" href="%TENSORBOARD_FAVICON_URI%" />

<link rel="import" href="polymer_lib_binary.html" />
<link rel="import" href="ng_polymer_lib_binary.html" />
<link rel="stylesheet" href="styles.css" />

<body>
Expand Down