Jelajahi Sumber

HUE-1921 [core] Fix IE9 glitches

Removed download graph button
Fixed Spark app
Enrico Berti 11 tahun lalu
induk
melakukan
5f1233a422

+ 1 - 8
apps/beeswax/src/beeswax/templates/execute.mako

@@ -367,8 +367,7 @@ ${layout.menubar(section='query')}
               </label>&nbsp;&nbsp;
               <label>${_('Y-Axis')}
               <select id="blueprintY" class="blueprintSelect"></select>
-              </label>&nbsp;&nbsp;
-              <a rel="tooltip" data-placement="top" title="${_('Download image')}" id="blueprintDownload" href="javascript:void(0)" class="btn hide"><i class="fa fa-download"></i></a>
+              </label>
             </span>
             <span id="blueprintLatLng" class="hide">
               <label>${_('Latitude')}
@@ -1243,7 +1242,6 @@ $(document).ready(function () {
         catch (err) { // do nothing
         }
       }
-      $("#blueprintDownload").addClass("hide");
       $("#blueprint").attr("class", "").attr("style", "").empty();
       $("#blueprint").data("plugin_jHueBlueprint", null);
       if (graphType == $.jHueBlueprint.TYPES.MAP) {
@@ -1312,7 +1310,6 @@ $(document).ready(function () {
           if (_data.length > 30){
             $(".flot-x-axis .flot-tick-label").hide();
           }
-          $("#blueprintDownload").removeClass("hide");
         }
         else {
           $("#blueprint").addClass("empty").text("${_("Please select the columns you would like to see in this chart.")}");
@@ -1321,10 +1318,6 @@ $(document).ready(function () {
     }
   }
 
-  $("#blueprintDownload").on("click", function(){
-    window.open($(".flot-base")[0].toDataURL());
-  });
-
   function getGraphType() {
     var _type = "";
     if ($("#blueprintBars").hasClass("active")) {

+ 1 - 8
apps/beeswax/src/beeswax/templates/watch_results.mako

@@ -250,8 +250,7 @@ ${layout.menubar(section='query')}
                     <option value="${loop.index+2}">${ col.name }</option>
                   % endfor
                 </select>
-              </label>&nbsp;&nbsp;
-              <a rel="tooltip" data-placement="top" title="${_('Download image')}" id="blueprintDownload" href="javascript:void(0)" class="btn hide"><i class="fa fa-download"></i></a>
+              </label>
             </span>
             <span id="blueprintLatLng" class="hide">
               <label>${_('Latitude')}
@@ -549,7 +548,6 @@ $(document).ready(function () {
         catch (err) { // do nothing
         }
       }
-      $("#blueprintDownload").addClass("hide");
       $("#blueprint").attr("class", "").attr("style", "").empty();
       $("#blueprint").data("plugin_jHueBlueprint", null);
       if (graphType == $.jHueBlueprint.TYPES.MAP) {
@@ -608,7 +606,6 @@ $(document).ready(function () {
           if (_data.length > 30){
             $(".flot-x-axis .flot-tick-label").hide();
           }
-          $("#blueprintDownload").removeClass("hide");
         }
         else {
           $("#blueprint").addClass("empty").text("${_("Please select the columns you would like to see in this chart.")}");
@@ -617,10 +614,6 @@ $(document).ready(function () {
     }
   }
 
-  $("#blueprintDownload").on("click", function(){
-    window.open($(".flot-base")[0].toDataURL());
-  });
-
   function getGraphType() {
     var _type = "";
     if ($("#blueprintBars").hasClass("active")) {

+ 1 - 0
apps/spark/src/spark/templates/editor.mako

@@ -58,6 +58,7 @@ ${ common.navbar('editor') }
             <button type="button" class="btn btn-primary uploadAppModalBtn">${ _('Upload app') }</button>
             <button type="button" class="btn btn-primary createContextModalBtn">${ _('Create context') }</button>
           </span>
+          <div></div><!-- this is to fix IE's quirkiness /-->
           <form class="form-inline">
             <span class="dropdown">
               ${_('App name')}&nbsp;

+ 3 - 3
apps/spark/static/js/spark.vm.js

@@ -271,7 +271,7 @@ function sparkViewModel() {
   var timerId = 0;
 
     var request = {
-      url: '/spark/api/job/' + self.query.jobId(),
+      url: '/spark/api/job/' + self.query.jobId() + '?' + Math.random(),
       dataType: 'json',
       type: 'GET',
       success: function(data) {
@@ -299,7 +299,7 @@ function sparkViewModel() {
 
   self.fetchAppNames = function() {
     var request = {
-      url: '/spark/api/jars',
+      url: '/spark/api/jars?' + Math.random(),
       dataType: 'json',
       type: 'GET',
       success: function(data) {
@@ -317,7 +317,7 @@ function sparkViewModel() {
 
   self.fetchContexts = function() {
     var request = {
-      url: '/spark/api/contexts',
+      url: '/spark/api/contexts?' + Math.random(),
       dataType: 'json',
       type: 'GET',
       success: function(data) {