Skip to content
Snippets Groups Projects
Commit 535976e5 authored by juanf's avatar juanf
Browse files

SSDM-3449 : Direct link to host

SVN: 36076
parent 05e7467a
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,12 @@ function DataSetViewerModel(containerId, profile, sample, serverFacade, datastor
return false;
}
this.getDirectDirectoryLink = function(datasetCode, datasetFile) {
var directLinkURL = profile.directLinkURL + this.sample.experimentIdentifierOrNull.substring(1) + "/" + datasetCode + "/" + datasetFile.pathInDataSet + "/";
var directLink = "<span onclick=\"" + "window.open('" + directLinkURL + "')" + "\" class='glyphicon glyphicon-hdd'></span>";
return directLink;
}
this.getPreviewLink = function(datasetCode, datasetFile) {
var previewLink = null;
if(this._isPreviewableImage(datasetFile.pathInDataSet)) {
......
......@@ -109,6 +109,10 @@ function DataSetViewerView(dataSetViewerController, dataSetViewerModel) {
var titleValue = null;
if(file.isDirectory) {
titleValue = file.pathInListing;
var directLink = _this._dataSetViewerModel.getDirectDirectoryLink(code, file);
if(directLink) {
titleValue = directLink + " " + titleValue;
}
} else {
var $fileLink = _this._dataSetViewerModel.getDownloadLink(code, file, true);
titleValue = $fileLink[0].outerHTML;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment