aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorboard/components/tf-dashboard-common/tf-url-generator.html
diff options
context:
space:
mode:
authorGravatar Manjunath Kudlur <keveman@gmail.com>2015-11-06 16:27:58 -0800
committerGravatar Manjunath Kudlur <keveman@gmail.com>2015-11-06 16:27:58 -0800
commitf41959ccb2d9d4c722fe8fc3351401d53bcf4900 (patch)
treeef0ca22cb2a5ac4bdec9d080d8e0788a53ed496d /tensorflow/tensorboard/components/tf-dashboard-common/tf-url-generator.html
TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation using data flow graphs. Base CL: 107276108
Diffstat (limited to 'tensorflow/tensorboard/components/tf-dashboard-common/tf-url-generator.html')
-rw-r--r--tensorflow/tensorboard/components/tf-dashboard-common/tf-url-generator.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/tensorflow/tensorboard/components/tf-dashboard-common/tf-url-generator.html b/tensorflow/tensorboard/components/tf-dashboard-common/tf-url-generator.html
new file mode 100644
index 0000000000..803998daeb
--- /dev/null
+++ b/tensorflow/tensorboard/components/tf-dashboard-common/tf-url-generator.html
@@ -0,0 +1,50 @@
+<link rel="import" href="../../bower_components/polymer/polymer.html">
+
+<!-- tf-url-generator is a plumbing component that provides two upward bindable properties:
+ outRunsUrl and outValuesUrlGenerator. These may be used by the rest of the application to communicate
+ with the backend, and by overriding the TF.Urls code that backs it, can be modified to load data from
+ a demo data source instead.
+ -->
+<dom-module id="tf-url-generator">
+ <script src="urlGenerator.js"></script>
+ <script>
+ var polymerObject = {
+ is: "tf-url-generator",
+ properties: {
+ outRunsUrl: {
+ type: String,
+ value: function() {
+ return TF.Urls.runsUrl();
+ },
+ readOnly: true,
+ notify: true,
+ },
+ },
+ };
+ TF.Urls.routes.forEach(function(route) {
+ /* for each route (other than runs, handled seperately):
+ * out`RouteName`: {
+ * type: Function,
+ * readOnly: true,
+ * notify: true,
+ * value: function() {
+ * return TF.Urls.`routeName`Url;
+ * }
+ */
+ if (route === "runs") {
+ return;
+ }
+ var urlName = route + "Url";
+ var propertyName = Polymer.CaseMap.dashToCamelCase("out-" + urlName + "Generator");
+ polymerObject.properties[propertyName] = {
+ type: Function,
+ value: function() {
+ return TF.Urls[urlName];
+ },
+ notify: true,
+ readOnly: true,
+ }
+ });
+ Polymer(polymerObject);
+ </script>
+</dom-module>