X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;fp=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;h=15ee6f1c2fba59ee5fe9a91236b791a9c7f077af;hb=a52c3773de8611def256d97dd699ba09d390b8fd;hp=19ecd6cc404c3a1775a49ca9b012f347bbf9197c;hpb=02c9260f3ec7e6b11f9b7330418f757075d2ed1f;p=myslice.git
diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js
index 19ecd6cc..15ee6f1c 100644
--- a/plugins/querytable/static/js/querytable.js
+++ b/plugins/querytable/static/js/querytable.js
@@ -207,8 +207,20 @@
else
line.push(record['hostname']);
- } else if (colnames[j] == 'hrn' && typeof(record) != 'undefined') {
- line.push(' '+record['hrn']);
+ } else if (colnames[j] == this.init_key && typeof(record) != 'undefined') {
+ obj = this.object
+ o = obj.split(':');
+ if(o.length>1){
+ obj = o[1];
+ }else{
+ obj = o[0];
+ }
+ /* XXX TODO: Remove this and have something consistant */
+ if(obj=='resource'){
+ line.push(' '+record[this.init_key]);
+ }else{
+ line.push(' '+record[this.init_key]);
+ }
} else {
if (record[colnames[j]])
line.push(record[colnames[j]]);