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
This commit is contained in:
parent
6e27603622
commit
cd2162b3ea
tensorflow/tensorboard/components/tf-graph/demo
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user