Permalink
Browse files

check if var is in the response

  • Loading branch information...
1 parent 975bc7f commit 6e0873f686bd5a581064ccd0801d036d18559ea7 jeremi joslin committed Apr 30, 2010
Showing with 12 additions and 8 deletions.
  1. +3 −2 gadget-code-coverage-test-success.xml
  2. +3 −2 gadget-code-overview.xml
  3. +3 −2 gadget-comments-duplications.xml
  4. +3 −2 gadget-rules.xml
@@ -24,7 +24,8 @@
title="Sonar - Code coverage and Test success"
directory_title="Sonar - Code coverage and Test success"
title_url="http://www.exoplatform.com"
- description="Sonar gadget.">
+ description="Sonar gadget."
+ author_email="jeremi23@gmail.com">
<Require feature="dynamic-height" />
<Require feature="setprefs"/>
@@ -54,7 +55,7 @@
var metric = resource.msr[i];
$("#m_" + metric.key).text(metric.frmt_val);
$("#l_" + metric.key).attr("href", sonar_url + "drilldown/measures/" + resource.id + "?metric=" + metric.key);
- if (metric["var"] != 0) {
+ if (metric["var"]) {
$("#t_" + metric.key).attr("src", sonar_url + "images/tendency/" + metric["var"] + "-black-small.png");
$("#t_" + metric.key).show();
} else {
View
@@ -24,7 +24,8 @@
title="Sonar - Code overview"
directory_title="Sonar - Code overview"
title_url="http://www.exoplatform.com"
- description="Sonar gadget.">
+ description="Sonar gadget."
+ author_email="jeremi23@gmail.com">
<Require feature="dynamic-height" />
<Require feature="setprefs"/>
@@ -51,7 +52,7 @@
var metric = resource.msr[i];
$("#m_" + metric.key).text(metric.frmt_val);
$("#l_" + metric.key).attr("href", sonar_url + "drilldown/measures/" + resource.id + "?metric=" + metric.key);
- if (metric["var"] != 0) {
+ if (metric["var"]) {
$("#t_" + metric.key).attr("src", sonar_url + "images/tendency/" + metric["var"] + "-black-small.png");
$("#t_" + metric.key).show();
} else {
@@ -24,7 +24,8 @@
title="Sonar - Comments and Duplication"
directory_title="Sonar - Comments and Duplication"
title_url="http://www.exoplatform.com"
- description="Sonar gadget.">
+ description="Sonar gadget."
+ author_email="jeremi23@gmail.com">
<Require feature="dynamic-height" />
<Require feature="setprefs"/>
@@ -54,7 +55,7 @@
metric = resource.msr[i];
$("#m_" + metric.key).text(metric.frmt_val);
$("#l_" + metric.key).attr("href", sonar_url + "drilldown/measures/" + resource.id + "?metric=" + metric.key);
- if (metric["var"] != 0) {
+ if (metric["var"]) {
$("#t_" + metric.key).attr("src", sonar_url + "images/tendency/" + metric["var"] + "-black-small.png");
$("#t_" + metric.key).show();
} else {
View
@@ -24,7 +24,8 @@
title="Sonar - Rules compliance"
directory_title="Sonar - Rules compliance"
title_url="http://www.exoplatform.com"
- description="Sonar gadget.">
+ description="Sonar gadget."
+ author_email="jeremi23@gmail.com">
<Require feature="dynamic-height" />
<Require feature="setprefs"/>
@@ -69,7 +70,7 @@
var metric = resource.msr[i];
$("#m_" + metric.key).text(metric.frmt_val);
$("#l_" + metric.key).attr("href", sonar_url + "drilldown/measures/" + resource.id + "?metric=" + metric.key);
- if (metric["var"] != 0) {
+ if (metric["var"]) {
$("#t_" + metric.key).attr("src", sonar_url + "images/tendency/" + metric["var"] + "-black-small.png");
$("#t_" + metric.key).show();
} else {

0 comments on commit 6e0873f

Please sign in to comment.