aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorboard/components/tf-dashboard-common/urlGenerator.ts
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/urlGenerator.ts
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/urlGenerator.ts')
-rw-r--r--tensorflow/tensorboard/components/tf-dashboard-common/urlGenerator.ts33
1 files changed, 33 insertions, 0 deletions
diff --git a/tensorflow/tensorboard/components/tf-dashboard-common/urlGenerator.ts b/tensorflow/tensorboard/components/tf-dashboard-common/urlGenerator.ts
new file mode 100644
index 0000000000..c7bbcbf434
--- /dev/null
+++ b/tensorflow/tensorboard/components/tf-dashboard-common/urlGenerator.ts
@@ -0,0 +1,33 @@
+/// <reference path="../../typings/tsd.d.ts" />
+/// <reference path="../../bower_components/plottable/plottable.d.ts" />
+
+module TF {
+ export module Urls {
+
+ export var routes = ["runs", "scalars", "histograms",
+ "compressedHistograms", "images",
+ "individualImage", "graph"];
+
+ function router(route: string): ((tag: string, run: string) => string) {
+ return function(tag: string, run: string): string {
+ return "/" + route + "?tag=" + encodeURIComponent(tag)
+ + "&run=" + encodeURIComponent(run);
+ };
+ }
+
+ export function runsUrl() {
+ return "/runs";
+ }
+ export var scalarsUrl = router("scalars");
+ export var histogramsUrl = router("histograms");
+ export var compressedHistogramsUrl = router("compressedHistograms");
+ export var imagesUrl = router("images");
+ export function individualImageUrl(query: string) {
+ return "/individualImage?" + query;
+ }
+ export function graphUrl(run: string) {
+ return "/graph?run=" + encodeURIComponent(run);
+ }
+
+ }
+}