Browse Source

Feature chart added link to update mview

Lacey Sanderson 10 years ago
parent
commit
b950759387

+ 1 - 1
tripal_feature/includes/tripal_feature.admin.inc

@@ -115,7 +115,7 @@ function tripal_feature_admin_feature_view() {
     'summary' => $chart,
     'types' => $type_names,
     'organisms' => $organism_names,
-    'mviewUrl' => url('admin/tripal/schema/mviews/action/update/' . $mview->mview_id),
+    'mviewUrl' => url('admin/tripal/schema/mviews/update/' . $mview->mview_id),
     'mviewUable' => $mview->name,
     'mviewLastUpdate' => format_date($mview->last_update),
   ))), 'setting');

+ 13 - 3
tripal_feature/theme/js/tripalFeature.adminChart.js

@@ -144,14 +144,24 @@ Drupal.behaviors.tripalFeature_adminSummaryChart = {
       // Add a small blurb mentioning this is from an mview and you should update ;).
       var blurb = svg.append('g')
           .classed('figure-legend', true)
+          .attr("transform", function(d, i) { return "translate(" + (width - 18) + "," + (height + 50) + ")"; });
+
+      blurb.append("svg:a")
+        .attr("xlink:href", Drupal.settings.tripalFeature.admin.mviewUrl)
         .append('text')
-          .attr('x', width - 18)
-          .attr('y', height + 70)
           .attr('font-style','italic')
           .style("fill", '#7F7F7F')
           .style("font-size","10px")
           .style("text-anchor", "end")
-          .text('Updated on ' + Drupal.settings.tripalFeature.admin.mviewLastUpdate);
+          .text("Update Materialized View");
+      blurb.append('text')
+        .attr('x', 0)
+        .attr('y', 20)
+        .attr('font-style','italic')
+        .style("fill", '#7F7F7F')
+        .style("font-size","10px")
+        .style("text-anchor", "end")
+        .text('Updated on ' + Drupal.settings.tripalFeature.admin.mviewLastUpdate);
 
       function wrap(text, width) {
         text.each(function() {