Skip to content

Commit

Permalink
Cernbox prod 8.2.2 expose xrootd path in ui (#113)
Browse files Browse the repository at this point in the history
* Expose the XROOTD path in the UI

* Fix mistake
  • Loading branch information
labkode authored Apr 10, 2017
1 parent 6817754 commit ca43451
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
7 changes: 5 additions & 2 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@
size: parseInt($el.attr('data-size'), 10),
etag: $el.attr('data-etag'),
permissions: parseInt($el.attr('data-permissions'), 10),
eospath: $el.attr('data-eospath')
eospath: $el.attr('data-eospath'),
eosmgmurl: $el.attr('data-eosmgmurl')
};
var icon = $el.attr('data-icon');
if (icon) {
Expand Down Expand Up @@ -925,6 +926,7 @@
path = fileData.path,
dataIcon = null,
eospath = fileData.eospath,
eosmgmurl = fileData.eosmgmurl,
linkUrl;
options = options || {};

Expand All @@ -951,7 +953,8 @@
"data-mtime": mtime,
"data-etag": fileData.etag,
"data-permissions": fileData.permissions || this.getDirectoryPermissions(),
"data-eospath": eospath
"data-eospath": eospath,
"data-eosmgmurl":eosmgmurl
});

if (dataIcon) {
Expand Down
1 change: 1 addition & 0 deletions apps/files/lib/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public static function formatFileInfo(FileInfo $i) {
}

$entry['eospath'] = $i['eospath'];
$entry['eosmgmurl'] = $i['eosmgmurl'];

return $entry;
}
Expand Down
7 changes: 5 additions & 2 deletions core/js/ShareDialogEospath.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
}

var TEMPLATE =
'<p><b>EOS Path</b>:</p><textarea onclick="this.focus();this.select()">{{eospathText}}</textarea>';
'<p><b>EOS Path</b>:</p><textarea onclick="this.focus();this.select()">{{eospathText}}</textarea>' +
'<p><b>XROOTD Path</b>:</p><textarea onclick="this.focus();this.select()">{{xrootdpathText}}</textarea>';

var ShareDialogEospath = OC.Backbone.View.extend({
/** @type {string} **/
Expand Down Expand Up @@ -48,6 +49,7 @@
}

var eospathT = this.model.get('eospath');
var xrootdPath = this.model.get('eosmgmurl') + ":/" + this.model.get('eospath');

if(typeof eospathT == 'undefined')
{
Expand All @@ -68,7 +70,8 @@
var reshareTemplate = this.template();

this.$el.html(reshareTemplate({
eospathText: eospathT
eospathText: eospathT,
xrootdpathText: xrootdPath
}));

//this.$el.find('textarea').select();
Expand Down
1 change: 1 addition & 0 deletions lib/private/files/objectstore/eosparser.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static function parseFileInfoMonitorMode($line_to_parse) {
$data["eosuid"] = $info["uid"];
$data["eosmode"] = $info["mode"];
$data["eostype"] = isset($info["container"]) ? 'folder' : 'file';
$data["eosmgmurl"] = EosUtil::getEosMgmUrl();
/*
if(isset($info['xattrn']) && isset($info['xattrv']) && $info['xattrn'] === 'user.acl'){
$data["eosacl"] = $info['xattrv'];
Expand Down

0 comments on commit ca43451

Please sign in to comment.