提交 cd2162b3 编写于 作者: N Nikhil Thorat 提交者: TensorFlower Gardener

Add a private bit to the upload to graph observatory script and the dataset JSON format.

If a dataset is private, it will only show up if it is requested via URL, otherwise it will
not appear in the dropdown.
Change: 127090337
上级 6e276036
......@@ -110,6 +110,12 @@
"name": "AlexNet",
"path": "alexnet.pbtxt"
},
{
"id": "alexprivate",
"name": "AlexNet Private",
"path": "alexnet.pbtxt",
"private": true
},
{
"name": "TestError404",
"path": "nofile"
......
......@@ -123,6 +123,8 @@ Polymer({
}
d3.json(DEMO_DATASETS, function (error, datasets) {
let publicDatasets = [];
if (error) {
console.log('Error loading demo datasets:');
console.log(error);
......@@ -135,6 +137,8 @@ Polymer({
_.each(datasets, function(dataset, index) {
if (queryParams['graphid'] && dataset.id == queryParams['graphid']) {
selectedDataset = index;
} else if (dataset['private']) {
return;
}
dataset.path = this._normalizePath(dataset.path);
......@@ -143,8 +147,9 @@ Polymer({
metadata.path = this._normalizePath(metadata.path);
}, this);
}
publicDatasets.push(dataset);
}, this);
this.set('datasets', datasets);
this.set('datasets', publicDatasets);
if (selectedDataset != 0) {
this.set('selectedDataset', selectedDataset);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册