-
Notifications
You must be signed in to change notification settings - Fork 48
Adds REST API allow clearing of all or some cached dashboards #265
Conversation
Also adds missing delete test cases using auth token. Fixes jupyter#208 (c) Copyright IBM Corp. 2016
Ref jupyter#208 (c) Copyright IBM Corp. 2016
Does it make sense to rename the clear cache script to jupyter-dashboards-admin and support other ops like deletion, no just cache clearing? Does the script get bundled into the npm package? There's a make target for building a release without sending it to npm I think. The API wiki page should get updated. |
As in deletion of a notebook/dashboard? Sure, we can add that. Could add upload as well. We did remember the API wiki page, just haven't done that yet. And we'll take a look at npm package and naming. |
There's just the |
Renames script to jupyter-dashboard-admin Ref jupyter#208 (c) Copyright IBM Corp. 2016
|
||
// command to clear the dashboard server cache | ||
var clear_cache_command = { | ||
command: 'clear-cache [options]', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The common options don't appear when passing --help
for me so it's not clear how to pass the host or token without cracking the source. Can we fix this?
EDIT: ... without cracking the source or trying one of the commands without help first.
Few problems using the CLI for uploads:
|
This is the standard behavior of the REST API for |
Yes. Understood. I was poorly explaining that the behavior is correct for the bundler type action where a user just clicks "Deploy to dashboard server" and the right thing happens. But from a CLI, where a human has to type a file name, we might want the CLI to at least give a warning if something with that name already exists because the human made a typo or some such. |
Without changing the current REST API, we could warn the user that a dashboard by that name already exists (whether an individual file or bundled) and ask if user wants to continue. Does that seem fine to you? Or did you have something else in mind? |
Yea. That's what I was thinking. Something simple in the CLI by doing a GET first to check existence. I definitely don't want to change the API. |
This is because the destination name is listed with the |
Asks before overwriting existing files/dirs Better help text. (c) Copyright IBM Corp. 2016
OK, I think I took care of all of the issues found by Pete. @parente and @jameslmartin, please take a look at latest changes. Also, I updated the wiki. |
Checks should pass once PR #275 is merged. |
I'll give this a shot tomorrow. |
Tested locally. Everything looks good now. @jhpedemonte You do the merge since you're also working on #275. I don't know if you want to fix that first or get this in or ... |
Reran Travis tests since PR #278 went in. Now green so merging. |
Also adds missing delete test cases using auth token.
Fixes #208