X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;h=15ee6f1c2fba59ee5fe9a91236b791a9c7f077af;hb=a52c3773de8611def256d97dd699ba09d390b8fd;hp=bcb8192750aaeb8394bc6d89b4ac5988231e13f2;hpb=d9bbe0a36624c6fe558c05307964be1b3ed4e3b1;p=unfold.git
diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js
index bcb81927..15ee6f1c 100644
--- a/plugins/querytable/static/js/querytable.js
+++ b/plugins/querytable/static/js/querytable.js
@@ -7,12 +7,12 @@
(function($){
var debug=false;
- debug=true
+// debug=true
var QueryTable = Plugin.extend({
- init: function(options, element)
- {
+ init: function(options, element) {
+ this.classname="querytable";
this._super(options, element);
/* Member variables */
@@ -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]]);