Skip to content

Commit

Permalink
Merge branch 'hotfix/UI/galaxy-importer-get-post' into 'bug/ja/select…
Browse files Browse the repository at this point in the history
…-all-after-large-file-filter'


HOTFIX: galaxy importer tool change get to post

See merge request !851
  • Loading branch information
tom114 committed Oct 26, 2016
2 parents 7d5daa4 + 1e64b83 commit 97a4884
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
Expand Down Expand Up @@ -345,8 +346,9 @@ public void uploadSequenceFiles(@PathVariable Long sampleId,
*
* @return {@link List}
*/
@RequestMapping("/samples/idList")
public List<Map<String, String>> getSampleListByIdList(@RequestParam(value = "sampleIds[]") List<Long> sampleIds, @RequestParam Long projectId) {
@RequestMapping(value ="/samples/idList", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> getSampleListByIdList(@RequestParam(value = "sampleIds[]") List<Long> sampleIds, @RequestParam Long projectId) {
List<Sample> list = (List<Sample>) sampleService.readMultiple(sampleIds);
List<Map<String, String>> result = new ArrayList<>();
for (Sample sample : list) {
Expand All @@ -360,7 +362,7 @@ public List<Map<String, String>> getSampleListByIdList(@RequestParam(value = "sa
));
}

return result;
return ImmutableMap.of("samples", result);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/resources/js/modules/cart/irida.cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@
// Need to get an actual list of samples from the server from their ids.
var promises = [];
Object.keys(ids).map(function(id) {
promises.push($http.get(PAGE.urls.samples.idList + "?" + $.param({sampleIds: ids[id], projectId: id}))
promises.push($http.post(PAGE.urls.samples.idList, {sampleIds: ids[id], projectId: id})
.then(function(result) {
result.data.mapList.forEach(function(sample) {
result.data.samples.forEach(function(sample) {
addSampleFile(sample.label, sample.href);
});
}));
Expand Down

0 comments on commit 97a4884

Please sign in to comment.