Fixed PNG serving issue and added new external link icon
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/APIServlet.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/APIServlet.java
index b1f5cd3..72d742d 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/APIServlet.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/APIServlet.java
@@ -131,13 +131,16 @@
         }
 
         // Special handler for font files and .png resources
-        if (resourcePath.endsWith(".png")) {
+        if (resourcePath.endsWith(".png")) { 
+            
             BufferedImage img = ImageIO.read(is);
             OutputStream outputStream = response.getOutputStream();
-            ImageIO.write(img, "png", outputStream);
-            outputStream.close();
+            String formatName = "png";            
             response.setContentType("image/png");
+            ImageIO.write(img, formatName, outputStream);
+            outputStream.close();
             return;
+
         }
         
         response.setCharacterEncoding("utf-8");
diff --git a/asterix-app/src/main/resources/webui/querytemplate.html b/asterix-app/src/main/resources/webui/querytemplate.html
index e122e0e..2abc24b 100644
--- a/asterix-app/src/main/resources/webui/querytemplate.html
+++ b/asterix-app/src/main/resources/webui/querytemplate.html
@@ -6,9 +6,6 @@
 <link href='http://fonts.googleapis.com/css?family=Bitter|PT+Sans+Caption|Open+Sans' rel='stylesheet' type='text/css'>
 <script src="/webui/static/js/jquery.min.js"></script>
 
-<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
-<link href="//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.css" rel="stylesheet">
-
 <link href="/webui/static/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
 <link href="/webui/static/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" />
 
@@ -125,9 +122,12 @@
         
         <div class="nav-collapse collapse">
           <ul class="nav">
-            <li><a href="http://code.google.com/p/asterixdb/" target="_blank">Open source<i class="icon-external-link"></i></a></li>
-            <li><a href="http://code.google.com/p/asterixdb/issues/list" target="_blank">File issues<i class="icon-external-link"></i></a></li>
-            <li><a href="https://groups.google.com/forum/?fromgroups#!forum/asterixdb-users" target="_blank">Contact<i class="icon-external-link"></i></a></li>
+            <li><a href="http://code.google.com/p/asterixdb/" target="_blank">
+                    Open source<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li>
+            <li><a href="http://code.google.com/p/asterixdb/issues/list" target="_blank">
+                    File issues<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li>
+            <li><a href="https://groups.google.com/forum/?fromgroups#!forum/asterixdb-users" target="_blank">
+                    Contact<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li>
           </ul>
         </div><!--/.nav-collapse -->
       </div>
diff --git a/asterix-app/src/main/resources/webui/static/css/style.css b/asterix-app/src/main/resources/webui/static/css/style.css
index 6bfd18f..df12b4d 100644
--- a/asterix-app/src/main/resources/webui/static/css/style.css
+++ b/asterix-app/src/main/resources/webui/static/css/style.css
@@ -157,8 +157,9 @@
     color: #17265a;
 }*/
 
-i {
+.extarget {
     margin-left: 4px;
+    padding-bottom: 2px;
 }
 
 .btn-custom-darken.active {
diff --git a/asterix-app/src/main/resources/webui/static/img/targetlink.png b/asterix-app/src/main/resources/webui/static/img/targetlink.png
new file mode 100644
index 0000000..68ceb60
--- /dev/null
+++ b/asterix-app/src/main/resources/webui/static/img/targetlink.png
Binary files differ