uuid; $results = Array(); $async = 1; /* XXX required field in options : query_uuid */ $query = Plugins::get_query_by_uuid($this->params['query_uuid']); $is_unique = Plugins::get_key_filter($query); $method_keys = Plugins::get_default_fields($query->method, $is_unique); //$method_keys = Plugins::query_get_default_keys($options['query_uuid']); //$fields = Plugins::query_get_fields($options['query_uuid']); //$all_headers = $_SESSION['metadata']['nodes']['columns']; //$fields = $all_headers; $fields = Plugins::metadata_get_fields($query->method); /* * @author: lbaron * date: 2012-05-29 * debug columns QueryEditor to DataTables * */ // Problem: field names are differents between // $_SESSION['metadata']['nodes']['columns'] // JSON values //$fields[]="arch"; // architecture in Session metadata //$fields[]="astype"; // as_type in Session metadata $fields['platform'] = Array('column' => 'platform'); $fields['platform_longname'] = Array('column' => 'platform_longname'); //---------------------------------- $out = Array(); $out[] = "
$f | "; } /* We put defaults fields (should be keys) at the beginning, and don't repeat them afterwards */ foreach ($fields as $key=>$f) { if((array_search($f['column'], $method_keys)) === false) $out[] = "".$f['column']." | "; } if (array_key_exists('checkboxes', $this->params) && ($this->params['checkboxes'])) { $out[] = "+/- | "; } $out[] = "
---|---|---|
"; $out[] = Plugins::render_element($query, $r[$f], $f); // XXX was query->method $out[] = " | "; } if (array_key_exists('checkboxes', $this->params) && ($this->params['checkboxes'])) { $out[] = "[X] | "; } $out[] = "