> On Oct. 3, 2016, 7:41 p.m., Di Li wrote: > > contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java, > > line 86 > > <https://reviews.apache.org/r/52430/diff/2/?file=1518869#file1518869line86> > > > > what's the point of passing the fileName only for the backend to add it > > to the header ? Can UI handle naming the file ? > > > > HTTP URL is to identify a resource ({queryId}), HTTP request types are > > for basic action type ( read - GET, create - PUT, update - POST, and delete > > - DELETE). predicates are for detailing an action when the basic HTTP > > request types aren't enough. > > > > so I am not clear on passing the file name here, as it's not really a > > resource (since that's identified by the queryId), and it's just so that > > web browser can name the file, right ? so I wonder if UI can do it without > > overheading it to the server backend.
Hi Di, yes its a valuable suggestion, I have updated the patch by removing the fileName from query param and handling it in the UI > On Oct. 3, 2016, 7:41 p.m., Di Li wrote: > > contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java, > > line 87 > > <https://reviews.apache.org/r/52430/diff/2/?file=1518869#file1518869line87> > > > > You may want to consider using operation=name format so that you don't > > need to add more query params each time you need to support a new > > operation. Think about download=true vs op=download, where op can be later > > extended to new operations, but download=true is set in stone and you will > > have no othe options but to introduce more URL query parameters for new > > operations. Thank you for the suggestion, I have updated accordingly. - Anita ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52430/#review151220 ----------------------------------------------------------- On Oct. 3, 2016, 11:25 p.m., Anita Jebaraj wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52430/ > ----------------------------------------------------------- > > (Updated Oct. 3, 2016, 11:25 p.m.) > > > Review request for Ambari, Alexandr Antonenko and Di Li. > > > Bugs: AMBARI-18496 > https://issues.apache.org/jira/browse/AMBARI-18496 > > > Repository: ambari > > > Description > ------- > > An option to download the saved query can be included. > > > Diffs > ----- > > > contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java > ccc4512 > > contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/queries.js > cbf6b42 > > contrib/views/hive-next/src/main/resources/ui/hive-web/app/initializers/i18n.js > f7f7706 > > contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/savedQueries/SavedQueryService.java > 9ea19c6 > > contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/queries.js > cbf6b42 > contrib/views/hive/src/main/resources/ui/hive-web/app/initializers/i18n.js > f7f7706 > > contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/savedQueries/SavedQueryServiceTest.java > d55858f > > Diff: https://reviews.apache.org/r/52430/diff/ > > > Testing > ------- > > Ran mvn test > > Added 1 new test case > > > File Attachments > ---------------- > > screenshot2.jpg > > https://reviews.apache.org/media/uploaded/files/2016/09/30/26f21b91-2637-4127-9ff2-ee6c0d3ddcfd__screenshot2.jpg > screenshot1.jpg > > https://reviews.apache.org/media/uploaded/files/2016/09/30/b494489d-90f6-42f1-847e-ac19ffcb817a__screenshot1.jpg > > > Thanks, > > Anita Jebaraj > >
