Forráskód Böngészése

add analysis name in instance table, need a better description for analysis in Create nextY

Yichao Shen 5 éve
szülő
commit
7f0c85159e

+ 7 - 0
tripal_jbrowse_mgmt/includes/tripal_jbrowse_mgmt.api.inc

@@ -54,6 +54,7 @@ function tripal_jbrowse_mgmt_save_settings($settings) {
 function tripal_jbrowse_mgmt_get_instances($conditions = NULL) {
   static $users = [];
   static $organisms = [];
+  static $analysis = [];
 
   $instances = db_select('tripal_jbrowse_mgmt_instances', 'H')->fields('H');
 
@@ -76,6 +77,12 @@ function tripal_jbrowse_mgmt_get_instances($conditions = NULL) {
         [':id' => $instance->organism_id])->fetchObject();
     }
     $instance->organism = $organisms[$instance->organism_id];
+
+    if (!isset($analysis[$instance->analysis_id])){
+      $instance[$instance->analysis_id] = chado_query('SELECT * FROM {analysis} WHERE analysis_id=:id'
+        [':id' => $instance->analysis_id])->fetchObject();
+    }
+    $instance->analysis = $analysis[$instance->analysis_id];
   }
 
   return $instances;

+ 1 - 0
tripal_jbrowse_mgmt/includes/tripal_jbrowse_mgmt_instance.page.inc

@@ -36,6 +36,7 @@ function tripal_jbrowse_mgmt_instance_page($instance_id) {
         'header' => ['Key', 'Value'],
         'rows' => [
           ['Instance Name', $instance->title],
+          ['Analysis Name', $instance->analysis->name],
           ['Created At', date('m/d/Y', $instance->created_at)],
           [
             'Organism',