Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_51669992
tensorflow
提交
a3e1558f
T
tensorflow
项目概览
weixin_51669992
/
tensorflow
与 Fork 源项目一致
从无法访问的项目Fork
通知
16
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tensorflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a3e1558f
编写于
7月 08, 2016
作者:
R
Renato Utsch
提交者:
TensorFlower Gardener
7月 08, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for booleans on TF.URIStorage. Also add "Show download links" to URIStorage.
Change: 126930259
上级
cf7f7de7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
53 addition
and
7 deletion
+53
-7
tensorflow/tensorboard/components/tf-event-dashboard/tf-event-dashboard.html
...ard/components/tf-event-dashboard/tf-event-dashboard.html
+14
-6
tensorflow/tensorboard/components/tf-storage/storage.ts
tensorflow/tensorboard/components/tf-storage/storage.ts
+39
-1
未找到文件。
tensorflow/tensorboard/components/tf-event-dashboard/tf-event-dashboard.html
浏览文件 @
a3e1558f
...
...
@@ -46,7 +46,7 @@ The #center div contains tf-charts embedded inside tf-collapsable-panes.
></tf-categorizer>
<paper-checkbox
id=
"download-option"
checked=
"{{_show
_download_l
inks}}"
checked=
"{{_show
DownloadL
inks}}"
>
Data download links
</paper-checkbox>
</div>
<div
class=
"sidebar-section"
>
...
...
@@ -89,12 +89,12 @@ The #center div contains tf-charts embedded inside tf-collapsable-panes.
></tf-chart>
<paper-icon-button
class=
"expand-button"
shift
$="[[
_show
_download_l
inks
]]"
shift
$="[[
_show
DownloadL
inks
]]"
icon=
"fullscreen"
on-tap=
"toggleSelected"
></paper-icon-button>
</div>
<template
is=
"dom-if"
if=
"[[_show
_download_l
inks]]"
>
<template
is=
"dom-if"
if=
"[[_show
DownloadL
inks]]"
>
<div
class=
"card-bottom-row"
>
<tf-downloader
selected-runs=
"[[selectedRuns]]"
...
...
@@ -135,7 +135,13 @@ The #center div contains tf-charts embedded inside tf-collapsable-panes.
type
:
Array
,
computed
:
"
_getVisibleTags(selectedRuns.*, run2tag.*)
"
},
_show_download_links
:
Boolean
,
_showDownloadLinks
:
{
type
:
Boolean
,
notify
:
true
,
value
:
TF
.
URIStorage
.
getBooleanInitializer
(
'
_showDownloadLinks
'
,
false
),
observer
:
'
_showDownloadLinksObserver
'
},
colorScale
:
{
type
:
Object
,
notify
:
true
,
...
...
@@ -146,8 +152,8 @@ The #center div contains tf-charts embedded inside tf-collapsable-panes.
this
.
fire
(
"
rendered
"
);
});
},
observers
:
[
'
redraw(_show
_download_l
inks)
'
],
redraw
:
function
(
_show
_download_l
inks
)
{
observers
:
[
'
redraw(_show
DownloadL
inks)
'
],
redraw
:
function
(
_show
DownloadL
inks
)
{
var
els
=
this
.
getElementsByTagName
(
"
tf-chart
"
);
for
(
var
i
=
0
;
i
<
els
.
length
;
i
++
)
{
els
[
i
].
redraw
();
...
...
@@ -161,6 +167,8 @@ The #center div contains tf-charts embedded inside tf-collapsable-panes.
_getScalarUrl
:
function
()
{
return
this
.
router
.
scalars
;
},
_showDownloadLinksObserver
:
TF
.
URIStorage
.
getBooleanObserver
(
'
_showDownloadLinks
'
,
false
),
toggleSelected
:
function
(
e
)
{
var
currentTarget
=
Polymer
.
dom
(
e
.
currentTarget
);
var
parentDiv
=
currentTarget
.
parentNode
.
parentNode
;
...
...
tensorflow/tensorboard/components/tf-storage/storage.ts
浏览文件 @
a3e1558f
...
...
@@ -50,7 +50,26 @@ module TF.URIStorage {
export
let
DISAMBIGUATOR
=
'
disambiguator
'
;
/**
* Return a string stored in the URI, given a corresonding key.
* Return a boolean stored in the URI, given a corresponding key.
* Undefined if not found.
*/
export
function
getBoolean
(
key
:
string
):
boolean
{
let
items
=
_componentToDict
(
_readComponent
());
let
item
=
items
[
key
];
return
item
===
'
true
'
?
true
:
item
===
'
false
'
?
false
:
undefined
;
}
/**
* Store a boolean in the URI, with a corresponding key.
*/
export
function
setBoolean
(
key
:
string
,
value
:
boolean
)
{
let
items
=
_componentToDict
(
_readComponent
());
items
[
key
]
=
value
.
toString
();
_writeComponent
(
_dictToComponent
(
items
));
}
/**
* Return a string stored in the URI, given a corresponding key.
* Undefined if not found.
*/
export
function
getString
(
key
:
string
):
string
{
...
...
@@ -116,6 +135,17 @@ module TF.URIStorage {
return
components
.
join
(
'
.
'
);
}
/**
* Return a function that:
* (1) Initializes a Polymer boolean property with a default value, if its
* value is not already set
* (2) Sets up listener that updates Polymer property on hash change.
*/
export
function
getBooleanInitializer
(
propertyName
:
string
,
defaultVal
:
boolean
):
Function
{
return
_getInitializer
(
getBoolean
,
propertyName
,
defaultVal
);
}
/**
* Return a function that:
* (1) Initializes a Polymer string property with a default value, if its
...
...
@@ -152,6 +182,14 @@ module TF.URIStorage {
return
_getInitializer
(
getObject
,
propertyName
,
clone
);
}
/**
* Return a function that updates URIStorage when a string property changes.
*/
export
function
getBooleanObserver
(
propertyName
:
string
,
defaultVal
:
boolean
):
Function
{
return
_getObserver
(
getBoolean
,
setBoolean
,
propertyName
,
defaultVal
);
}
/**
* Return a function that updates URIStorage when a string property changes.
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录