You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chukwa.apache.org by ey...@apache.org on 2015/09/13 22:27:54 UTC

[1/9] chukwa git commit: CHUKWA-776. Added Docker support. (Eric Yang)

Repository: chukwa
Updated Branches:
  refs/heads/master a31164908 -> 6e9e7899d


CHUKWA-776. Added Docker support.  (Eric Yang)


Project: http://git-wip-us.apache.org/repos/asf/chukwa/repo
Commit: http://git-wip-us.apache.org/repos/asf/chukwa/commit/112d3bbd
Tree: http://git-wip-us.apache.org/repos/asf/chukwa/tree/112d3bbd
Diff: http://git-wip-us.apache.org/repos/asf/chukwa/diff/112d3bbd

Branch: refs/heads/master
Commit: 112d3bbd652dcdb15b40bdcdc9b01398019e6eff
Parents: a311649
Author: Eric Yang <ey...@apache.org>
Authored: Sun Aug 23 20:16:20 2015 -0700
Committer: Eric Yang <ey...@apache.org>
Committed: Sun Aug 23 20:19:07 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                           |   2 +
 contrib/docker/Dockerfile             |  45 +++++++++
 contrib/docker/README                 |  14 +++
 contrib/docker/hadoop/core-site.xml   |  28 ++++++
 contrib/docker/hadoop/hadoop-env.sh   | 101 ++++++++++++++++++++
 contrib/docker/hadoop/mapred-site.xml |  28 ++++++
 contrib/docker/hadoop/yarn-env.sh     | 124 ++++++++++++++++++++++++
 contrib/docker/hadoop/yarn-site.xml   |  22 +++++
 contrib/docker/hbase/hbase-env.sh     | 146 +++++++++++++++++++++++++++++
 contrib/docker/hbase/hbase-site.xml   |  47 ++++++++++
 contrib/docker/setup-image.sh         | 120 ++++++++++++++++++++++++
 contrib/docker/start-all.sh           |  40 ++++++++
 12 files changed, 717 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 32f42af..ca9eefa 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
   NEW FEATURES
 
+    CHUKWA-776. Added Docker support.  (Eric Yang)
+
     CHUKWA-772. Added ChukwaParquetWriter.  (Eric Yang)
 
     CHUKWA-756. Added ajax-solr UI for log search.  (Eric Yang)

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile
new file mode 100644
index 0000000..371d39e
--- /dev/null
+++ b/contrib/docker/Dockerfile
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+FROM centos:6
+MAINTAINER Apache
+RUN yum install -y tar wget bind-utils ntpd java-1.7.0-openjdk which openssh-server openssh-clients
+RUN mkdir -p /opt/apache
+RUN wget https://www.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
+RUN wget https://www.apache.org/dist/hadoop/common/hadoop-2.7.1/hadoop-2.7.1.tar.gz 
+RUN wget https://www.apache.org/dist/hbase/1.1.1/hbase-1.1.1-bin.tar.gz
+RUN wget https://www.apache.org/dist/lucene/solr/4.10.4/solr-4.10.4.tgz
+ADD chukwa-0.7.0.tar.gz /opt/apache/
+RUN tar xf zookeeper-3.4.6.tar.gz -C /opt/apache
+RUN tar xf hadoop-2.7.1.tar.gz -C /opt/apache
+RUN tar xf hbase-1.1.1-bin.tar.gz -C /opt/apache
+RUN tar xf solr-4.10.4.tgz -C /opt/apache
+RUN rm -f zookeeper-*.tar.gz hadoop-*.tar.gz hbase-*.tar.gz solr-*.tgz
+RUN ln -s /opt/apache/zookeeper-* /opt/apache/zookeeper
+RUN ln -s /opt/apache/hadoop-* /opt/apache/hadoop
+RUN ln -s /opt/apache/hbase-* /opt/apache/hbase
+RUN ln -s /opt/apache/solr-* /opt/apache/solr
+RUN ln -s /opt/apache/chukwa-* /opt/apache/chukwa
+RUN cp -f /opt/apache/chukwa/etc/chukwa/hadoop-log4j.properties /opt/apache/hadoop/etc/hadoop/log4j.properties
+RUN cp -f /opt/apache/chukwa/etc/chukwa/hadoop-metrics2.properties /opt/apache/hadoop/etc/hadoop/hadoop-metrics2.properties
+RUN cp -f /opt/apache/chukwa/etc/chukwa/hadoop-metrics2-hbase.properties /opt/apache/hbase/conf/hadoop-metrics2-hbase.properties
+RUN cp -f /opt/apache/chukwa/etc/chukwa/hbase-log4j.properties /opt/apache/hbase/conf/log4j.properties
+ADD hadoop/* /opt/apache/hadoop/etc/hadoop/
+ADD hbase/* /opt/apache/hbase/conf/
+ADD start-all.sh /etc/start-all.sh
+ADD setup-image.sh /
+RUN bash setup-image.sh
+RUN rm -f /setup-image.sh
+EXPOSE 4080 50070 8088 16010 7574
+CMD ["/etc/start-all.sh"]

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/README
----------------------------------------------------------------------
diff --git a/contrib/docker/README b/contrib/docker/README
new file mode 100644
index 0000000..e090edf
--- /dev/null
+++ b/contrib/docker/README
@@ -0,0 +1,14 @@
+This file contains instruction on how to build docker image for Chukwa
+
+- Copy chukwa binary tarball to the same directory as this README file.
+- Run docker build procedure:
+
+  docker build -t chukwa .
+
+- Trim down the size of docker image using docker-squash
+
+  docker save [id] | sudo /usr/local/bin/docker-squash -t chukwa/chukwa | docker load
+
+- Chukwa image can be launched using:
+
+  docker run -itP -p 4080:4080 -p 50070:50070 -p 8088:8088 -p 60010:60010 chukwa/chukwa

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/hadoop/core-site.xml
----------------------------------------------------------------------
diff --git a/contrib/docker/hadoop/core-site.xml b/contrib/docker/hadoop/core-site.xml
new file mode 100644
index 0000000..c278dfd
--- /dev/null
+++ b/contrib/docker/hadoop/core-site.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<!-- Put site-specific property overrides in this file. -->
+
+<configuration>
+    <property>
+        <name>fs.defaultFS</name>
+        <value>hdfs://localhost:9000</value>
+    </property>
+    <property>
+        <name>dfs.replication</name>
+        <value>1</value>
+    </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/hadoop/hadoop-env.sh
----------------------------------------------------------------------
diff --git a/contrib/docker/hadoop/hadoop-env.sh b/contrib/docker/hadoop/hadoop-env.sh
new file mode 100644
index 0000000..593a5f7
--- /dev/null
+++ b/contrib/docker/hadoop/hadoop-env.sh
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Set Hadoop-specific environment variables here.
+
+# The only required environment variable is JAVA_HOME.  All others are
+# optional.  When running a distributed configuration it is best to
+# set JAVA_HOME in this file, so that it is correctly defined on
+# remote nodes.
+
+# The java implementation to use.
+export JAVA_HOME=/usr/lib/jvm/jre
+
+export HADOOP_LOG_DIR=/var/log/hadoop
+export HADOOP_PID_DIR=/var/run/hadoop
+
+# The jsvc implementation to use. Jsvc is required to run secure datanodes
+# that bind to privileged ports to provide authentication of data transfer
+# protocol.  Jsvc is not required if SASL is configured for authentication of
+# data transfer protocol using non-privileged ports.
+#export JSVC_HOME=${JSVC_HOME}
+
+export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/etc/hadoop"}
+
+# Extra Java CLASSPATH elements.  Automatically insert capacity-scheduler.
+for f in $HADOOP_HOME/contrib/capacity-scheduler/*.jar; do
+  if [ "$HADOOP_CLASSPATH" ]; then
+    export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$f
+  else
+    export HADOOP_CLASSPATH=$f
+  fi
+done
+
+# The maximum amount of heap to use, in MB. Default is 1000.
+#export HADOOP_HEAPSIZE=
+#export HADOOP_NAMENODE_INIT_HEAPSIZE=""
+
+# Extra Java runtime options.  Empty by default.
+export HADOOP_OPTS="$HADOOP_OPTS -Djava.security.krb5.realm= -Djava.security.krb5.kdc= -Djava.net.preferIPv4Stack=true"
+
+# Command specific options appended to HADOOP_OPTS when specified
+export HADOOP_NAMENODE_OPTS="-Xmx256m -Dhadoop.log.port=9096 -Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,RFAS} -Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-INFO,NullAppender} $HADOOP_NAMENODE_OPTS"
+export HADOOP_DATANODE_OPTS="-Dhadoop.log.port=9098 -Dhadoop.security.logger=ERROR,RFAS $HADOOP_DATANODE_OPTS"
+
+export HADOOP_SECONDARYNAMENODE_OPTS="-Xmx256m -Dhadoop.log.port=9097 -Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,RFAS} -Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-INFO,NullAppender} $HADOOP_SECONDARYNAMENODE_OPTS"
+
+export HADOOP_NFS3_OPTS="$HADOOP_NFS3_OPTS"
+export HADOOP_PORTMAP_OPTS="-Xmx512m $HADOOP_PORTMAP_OPTS"
+
+# The following applies to multiple commands (fs, dfs, fsck, distcp etc)
+export HADOOP_CLIENT_OPTS="-Xmx512m $HADOOP_CLIENT_OPTS"
+#HADOOP_JAVA_PLATFORM_OPTS="-XX:-UsePerfData $HADOOP_JAVA_PLATFORM_OPTS"
+
+# On secure datanodes, user to run the datanode as after dropping privileges.
+# This **MUST** be uncommented to enable secure HDFS if using privileged ports
+# to provide authentication of data transfer protocol.  This **MUST NOT** be
+# defined if SASL is configured for authentication of data transfer protocol
+# using non-privileged ports.
+export HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER}
+
+# Where log files are stored.  $HADOOP_HOME/logs by default.
+#export HADOOP_LOG_DIR=${HADOOP_LOG_DIR}/$USER
+
+# Where log files are stored in the secure data environment.
+export HADOOP_SECURE_DN_LOG_DIR=${HADOOP_LOG_DIR}/${HADOOP_HDFS_USER}
+
+###
+# HDFS Mover specific parameters
+###
+# Specify the JVM options to be used when starting the HDFS Mover.
+# These options will be appended to the options specified as HADOOP_OPTS
+# and therefore may override any similar flags set in HADOOP_OPTS
+#
+# export HADOOP_MOVER_OPTS=""
+
+###
+# Advanced Users Only!
+###
+
+# The directory where pid files are stored. /tmp by default.
+# NOTE: this should be set to a directory that can only be written to by 
+#       the user that will run the hadoop daemons.  Otherwise there is the
+#       potential for a symlink attack.
+export HADOOP_PID_DIR=${HADOOP_PID_DIR}
+export HADOOP_SECURE_DN_PID_DIR=${HADOOP_PID_DIR}
+
+# A string representing this instance of hadoop. $USER by default.
+export HADOOP_IDENT_STRING=$USER

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/hadoop/mapred-site.xml
----------------------------------------------------------------------
diff --git a/contrib/docker/hadoop/mapred-site.xml b/contrib/docker/hadoop/mapred-site.xml
new file mode 100644
index 0000000..007a9ec
--- /dev/null
+++ b/contrib/docker/hadoop/mapred-site.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<!-- Put site-specific property overrides in this file. -->
+
+<configuration>
+    <property>
+        <name>mapreduce.framework.name</name>
+        <value>yarn</value>
+    </property>
+    <property>
+        <name>yarn.nodemanager.aux-services</name>
+        <value>mapreduce_shuffle</value>
+    </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/hadoop/yarn-env.sh
----------------------------------------------------------------------
diff --git a/contrib/docker/hadoop/yarn-env.sh b/contrib/docker/hadoop/yarn-env.sh
new file mode 100644
index 0000000..d4da29a
--- /dev/null
+++ b/contrib/docker/hadoop/yarn-env.sh
@@ -0,0 +1,124 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# User for YARN daemons
+export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn}
+
+# resolve links - $0 may be a softlink
+export YARN_CONF_DIR="${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}"
+
+export YARN_LOG_DIR=/var/log/hadoop
+
+# some Java parameters
+export JAVA_HOME=/usr/lib/jvm/jre
+
+if [ "$JAVA_HOME" != "" ]; then
+  #echo "run java in $JAVA_HOME"
+  JAVA_HOME=$JAVA_HOME
+fi
+  
+if [ "$JAVA_HOME" = "" ]; then
+  echo "Error: JAVA_HOME is not set."
+  exit 1
+fi
+
+JAVA=$JAVA_HOME/bin/java
+JAVA_HEAP_MAX=-Xmx1000m 
+
+# For setting YARN specific HEAP sizes please use this
+# Parameter and set appropriately
+YARN_HEAPSIZE=256
+
+# check envvars which might override default args
+if [ "$YARN_HEAPSIZE" != "" ]; then
+  JAVA_HEAP_MAX="-Xmx""$YARN_HEAPSIZE""m"
+fi
+
+# Resource Manager specific parameters
+
+# Specify the max Heapsize for the ResourceManager using a numerical value
+# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
+# the value to 1000.
+# This value will be overridden by an Xmx setting specified in either YARN_OPTS
+# and/or YARN_RESOURCEMANAGER_OPTS.
+# If not specified, the default value will be picked from either YARN_HEAPMAX
+# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+#export YARN_RESOURCEMANAGER_HEAPSIZE=1000
+
+# Specify the max Heapsize for the timeline server using a numerical value
+# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
+# the value to 1000.
+# This value will be overridden by an Xmx setting specified in either YARN_OPTS
+# and/or YARN_TIMELINESERVER_OPTS.
+# If not specified, the default value will be picked from either YARN_HEAPMAX
+# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+#export YARN_TIMELINESERVER_HEAPSIZE=1000
+
+# Specify the JVM options to be used when starting the ResourceManager.
+# These options will be appended to the options specified as YARN_OPTS
+# and therefore may override any similar flags set in YARN_OPTS
+export YARN_RESOURCEMANAGER_OPTS="-Dhadoop.log.port=9099"
+
+# Node Manager specific parameters
+
+# Specify the max Heapsize for the NodeManager using a numerical value
+# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
+# the value to 1000.
+# This value will be overridden by an Xmx setting specified in either YARN_OPTS
+# and/or YARN_NODEMANAGER_OPTS.
+# If not specified, the default value will be picked from either YARN_HEAPMAX
+# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+#export YARN_NODEMANAGER_HEAPSIZE=1000
+
+# Specify the JVM options to be used when starting the NodeManager.
+# These options will be appended to the options specified as YARN_OPTS
+# and therefore may override any similar flags set in YARN_OPTS
+export YARN_NODEMANAGER_OPTS="-Dhadoop.log.port=9100"
+
+# so that filenames w/ spaces are handled correctly in loops below
+IFS=
+
+
+# default log directory & file
+if [ "$YARN_LOG_DIR" = "" ]; then
+  YARN_LOG_DIR="$HADOOP_YARN_HOME/logs"
+fi
+if [ "$YARN_LOGFILE" = "" ]; then
+  YARN_LOGFILE='yarn.log'
+fi
+
+# default policy file for service-level authorization
+if [ "$YARN_POLICYFILE" = "" ]; then
+  YARN_POLICYFILE="hadoop-policy.xml"
+fi
+
+# restore ordinary behaviour
+unset IFS
+
+
+YARN_OPTS="$YARN_OPTS -Dhadoop.log.dir=$YARN_LOG_DIR"
+YARN_OPTS="$YARN_OPTS -Dyarn.log.dir=$YARN_LOG_DIR"
+YARN_OPTS="$YARN_OPTS -Dhadoop.log.file=$YARN_LOGFILE"
+YARN_OPTS="$YARN_OPTS -Dyarn.log.file=$YARN_LOGFILE"
+YARN_OPTS="$YARN_OPTS -Dyarn.home.dir=$YARN_COMMON_HOME"
+YARN_OPTS="$YARN_OPTS -Dyarn.id.str=$YARN_IDENT_STRING"
+YARN_OPTS="$YARN_OPTS -Dhadoop.root.logger=${YARN_ROOT_LOGGER:-INFO,console}"
+YARN_OPTS="$YARN_OPTS -Dyarn.root.logger=${YARN_ROOT_LOGGER:-INFO,console}"
+if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
+  YARN_OPTS="$YARN_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH"
+fi  
+YARN_OPTS="$YARN_OPTS -Dyarn.policy.file=$YARN_POLICYFILE"
+
+

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/hadoop/yarn-site.xml
----------------------------------------------------------------------
diff --git a/contrib/docker/hadoop/yarn-site.xml b/contrib/docker/hadoop/yarn-site.xml
new file mode 100644
index 0000000..b61d427
--- /dev/null
+++ b/contrib/docker/hadoop/yarn-site.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+<configuration>
+
+<!-- Site specific YARN configuration properties -->
+  <property>
+    <name>yarn.log-aggregation-enable</name>
+    <value>true</value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/hbase/hbase-env.sh
----------------------------------------------------------------------
diff --git a/contrib/docker/hbase/hbase-env.sh b/contrib/docker/hbase/hbase-env.sh
new file mode 100644
index 0000000..47a77de
--- /dev/null
+++ b/contrib/docker/hbase/hbase-env.sh
@@ -0,0 +1,146 @@
+#
+#/**
+# * Copyright 2007 The Apache Software Foundation
+# *
+# * Licensed to the Apache Software Foundation (ASF) under one
+# * or more contributor license agreements.  See the NOTICE file
+# * distributed with this work for additional information
+# * regarding copyright ownership.  The ASF licenses this file
+# * to you under the Apache License, Version 2.0 (the
+# * "License"); you may not use this file except in compliance
+# * with the License.  You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# */
+
+# Set environment variables here.
+
+# This script sets variables multiple times over the course of starting an hbase process,
+# so try to keep things idempotent unless you want to take an even deeper look
+# into the startup scripts (bin/hbase, etc.)
+
+# The java implementation to use.  Java 1.7+ required.
+export JAVA_HOME=/usr/lib/jvm/jre
+
+export HADOOP_CONF_DIR=/opt/apache/hadoop/etc/hadoop
+
+# Extra Java CLASSPATH elements.  Optional.
+# export HBASE_CLASSPATH=
+
+# The maximum amount of heap to use, in MB. Default is 1000.
+export HBASE_HEAPSIZE=256
+
+# Uncomment below if you intend to use off heap cache.
+# export HBASE_OFFHEAPSIZE=1000
+
+# For example, to allocate 8G of offheap, to 8G:
+# export HBASE_OFFHEAPSIZE=8G
+
+# Extra Java runtime options.
+# Below are what we set by default.  May only work with SUN JVM.
+# For more on why as well as other possible settings,
+# see http://wiki.apache.org/hadoop/PerformanceTuning
+export HBASE_OPTS="-XX:+UseConcMarkSweepGC -Dhbase.security.log.port=9105"
+
+# Uncomment one of the below three options to enable java garbage collection logging for the server-side processes.
+
+# This enables basic gc logging to the .out file.
+# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
+
+# This enables basic gc logging to its own file.
+# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
+# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"
+
+# This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+.
+# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
+# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"
+
+# Uncomment one of the below three options to enable java garbage collection logging for the client processes.
+
+# This enables basic gc logging to the .out file.
+# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
+
+# This enables basic gc logging to its own file.
+# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
+# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"
+
+# This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+.
+# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
+# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"
+
+# See the package documentation for org.apache.hadoop.hbase.io.hfile for other configurations
+# needed setting up off-heap block caching. 
+
+# Uncomment and adjust to enable JMX exporting
+# See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access.
+# More details at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html
+# NOTE: HBase provides an alternative JMX implementation to fix the random ports issue, please see JMX
+# section in HBase Reference Guide for instructions.
+
+# export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
+#export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101"
+#export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10102"
+#export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103"
+#export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104"
+#export HBASE_REST_OPTS="$HBASE_REST_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10105"
+
+# File naming hosts on which HRegionServers will run.  $HBASE_HOME/conf/regionservers by default.
+# export HBASE_REGIONSERVERS=${HBASE_HOME}/conf/regionservers
+
+# Uncomment and adjust to keep all the Region Server pages mapped to be memory resident
+#HBASE_REGIONSERVER_MLOCK=true
+#HBASE_REGIONSERVER_UID="hbase"
+
+# File naming hosts on which backup HMaster will run.  $HBASE_HOME/conf/backup-masters by default.
+# export HBASE_BACKUP_MASTERS=${HBASE_HOME}/conf/backup-masters
+
+# Extra ssh options.  Empty by default.
+# export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR"
+
+# Where log files are stored.  $HBASE_HOME/logs by default.
+export HBASE_LOG_DIR=/var/log/hbase
+
+# Enable remote JDWP debugging of major HBase processes. Meant for Core Developers 
+# export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8070"
+# export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8071"
+# export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8072"
+# export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8073"
+
+# A string representing this instance of hbase. $USER by default.
+# export HBASE_IDENT_STRING=$USER
+
+# The scheduling priority for daemon processes.  See 'man nice'.
+# export HBASE_NICENESS=10
+
+# The directory where pid files are stored. /tmp by default.
+# export HBASE_PID_DIR=/var/hadoop/pids
+
+# Seconds to sleep between slave commands.  Unset by default.  This
+# can be useful in large clusters, where, e.g., slave rsyncs can
+# otherwise arrive faster than the master can service them.
+# export HBASE_SLAVE_SLEEP=0.1
+
+# Tell HBase whether it should manage it's own instance of Zookeeper or not.
+export HBASE_MANAGES_ZK=false
+
+# The default log rolling policy is RFA, where the log file is rolled as per the size defined for the 
+# RFA appender. Please refer to the log4j.properties file to see more details on this appender.
+# In case one needs to do log rolling on a date change, one should set the environment property
+# HBASE_ROOT_LOGGER to "<DESIRED_LOG LEVEL>,DRFA".
+# For example:
+# HBASE_ROOT_LOGGER=INFO,DRFA
+# The reason for changing default to RFA is to avoid the boundary case of filling out disk space as 
+# DRFA doesn't put any cap on the log size. Please refer to HBase-5655 for more context.
+
+# Port number to stream hbase log to Chukwa
+export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Dhbase.log.port=9106"
+export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Dhbase.log.port=9107"
+export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS -Dhbase.log.port=9108"
+export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Dhbase.log.port=9109"
+export HBASE_REST_OPTS="$HBASE_REST_OPTS -Dhbase.log.port=9110"

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/hbase/hbase-site.xml
----------------------------------------------------------------------
diff --git a/contrib/docker/hbase/hbase-site.xml b/contrib/docker/hbase/hbase-site.xml
new file mode 100644
index 0000000..1287e44
--- /dev/null
+++ b/contrib/docker/hbase/hbase-site.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<configuration>
+  <property>
+    <name>hbase.rootdir</name>
+    <value>hdfs://localhost:9000/hbase</value>
+  </property>
+  <property>
+    <name>hbase.zookeeper.property.clientPort</name>
+    <value>2181</value>
+    <description>Property from ZooKeeper's config zoo.cfg.
+      The port at which the clients will connect.
+    </description>
+  </property>
+  <property>
+    <name>hbase.zookeeper.quorum</name>
+    <value>localhost</value>
+  </property>
+  <property >
+    <name>hbase.cluster.distributed</name>
+    <value>true</value>
+  </property>
+  <property>
+    <name>hbase.zookeeper.property.dataDir</name>
+    <value>/var/lib/zoo</value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/setup-image.sh
----------------------------------------------------------------------
diff --git a/contrib/docker/setup-image.sh b/contrib/docker/setup-image.sh
new file mode 100755
index 0000000..b2b23f5
--- /dev/null
+++ b/contrib/docker/setup-image.sh
@@ -0,0 +1,120 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Initialize Users
+groupadd -g 123 hadoop
+groupadd -g 201 hdfs
+useradd -u 200 -g 123 zookeeper
+useradd -u 201 -g 201 -G 123 hdfs
+useradd -u 202 -g 123 yarn
+useradd -u 203 -g 123 hbase
+useradd -u 204 -g 123 solr
+useradd -u 205 -g 123 chukwa
+
+# Global SSH configuration
+echo StrictHostKeyChecking no >> /etc/ssh/ssh_config
+
+# Setup SSH configuration for service accounts
+su - hdfs -c 'cat /dev/zero | ssh-keygen -t dsa -N ""'
+su - yarn -c 'cat /dev/zero | ssh-keygen -t dsa -N ""'
+su - hbase -c 'cat /dev/zero | ssh-keygen -t dsa -N ""'
+su - chukwa -c 'cat /dev/zero | ssh-keygen -t dsa -N ""'
+cp /home/hdfs/.ssh/id_dsa.pub /home/hdfs/.ssh/authorized_keys
+cp /home/yarn/.ssh/id_dsa.pub /home/yarn/.ssh/authorized_keys
+cp /home/hbase/.ssh/id_dsa.pub /home/hbase/.ssh/authorized_keys
+cp /home/chukwa/.ssh/id_dsa.pub /home/chukwa/.ssh/authorized_keys
+chown hdfs:hdfs /home/hdfs/.ssh/authorized_keys
+chown yarn:hadoop /home/yarn/.ssh/authorized_keys
+chown hbase:hadoop /home/hbase/.ssh/authorized_keys
+chown chukwa:hadoop /home/chukwa/.ssh/authorized_keys
+
+# Create symlinks for current version
+ln -s /opt/apache/zookeeper-* /opt/apache/zookeeper
+ln -s /opt/apache/hadoop-* /opt/apache/hadoop
+ln -s /opt/apache/hbase-* /opt/apache/hbase
+ln -s /opt/apache/solr-* /opt/apache/solr
+ln -s /opt/apache/chukwa-* /opt/apache/chukwa
+ln -s /opt/apache/chukwa/share/chukwa/lib/json-simple-*.jar /opt/apache/hadoop/share/hadoop/common/lib/json-simple.jar
+ln -s /opt/apache/chukwa/share/chukwa/chukwa-*-client.jar /opt/apache/hadoop/share/hadoop/common/lib/chukwa-client.jar
+ln -s /opt/apache/chukwa/share/chukwa/lib/json-simple-*.jar /opt/apache/hbase/lib/json-simple.jar
+ln -s /opt/apache/chukwa/share/chukwa/chukwa-*-client.jar /opt/apache/hbase/lib/chukwa-client.jar
+ln -s /opt/apache/zookeeper/conf /etc/zookeeper
+ln -s /opt/apache/hadoop/etc/hadoop /etc/hadoop
+ln -s /opt/apache/hbase/conf /etc/hbase
+ln -s /opt/apache/chukwa/etc/chukwa /etc/chukwa
+
+# ZooKeeper configuration
+cat /opt/apache/zookeeper/conf/zoo_sample.cfg | \
+sed -e 's:/tmp/zoo:/var/lib/zoo:' > /opt/apache/zookeeper/conf/zoo.cfg
+
+# Configure Solr with Chukwa configuraiton
+mv -f /opt/apache/chukwa/etc/solr/logs /opt/apache/solr/example/solr/logs
+
+# Configure Chukwa configuration
+cat /opt/apache/chukwa/etc/chukwa/chukwa-env.sh | \
+sed -e 's:\${JAVA_HOME}:/usr/lib/jvm/jre:' | \
+sed -e 's:\${HBASE_CONF_DIR}:/opt/apache/hbase/conf:' | \
+sed -e 's:\${HADOOP_CONF_DIR}:/opt/apache/hadoop/etc/hadoop:' | \
+sed -e 's:/tmp/chukwa/pidDir:/var/run/chukwa:' | \
+sed -e 's:/tmp/chukwa/log:/var/log/chukwa:' > /tmp/chukwa-env.sh
+cp -f /tmp/chukwa-env.sh /opt/apache/chukwa/etc/chukwa/chukwa-env.sh
+rm -f /tmp/chukwa-env.sh
+cp -f /opt/apache/chukwa/etc/chukwa/hadoop-log4j.properties /opt/apache/hadoop/etc/hadoop/log4j.properties
+cp -f /opt/apache/chukwa/etc/chukwa/hadoop-metrics2.properties /opt/apache/hadoop/etc/hadoop/hadoop-metrics2.properties
+cp -f /opt/apache/chukwa/etc/chukwa/hadoop-metrics2-hbase.properties /opt/apache/hbase/conf/hadoop-metrics2-hbase.properties
+cp -f /opt/apache/chukwa/etc/chukwa/hbase-log4j.properties /opt/apache/hbase/conf/log4j.properties
+
+# Initialize Service file permissions
+mkdir -p /var/lib/zookeeper
+mkdir -p /var/lib/hdfs
+mkdir -p /var/lib/yarn
+mkdir -p /var/lib/chukwa
+mkdir -p /var/lib/solr
+mkdir -p /var/run/hadoop
+mkdir -p /var/run/hbase
+mkdir -p /var/run/chukwa
+mkdir -p /var/run/solr
+mkdir -p /var/log/hadoop
+mkdir -p /var/log/hbase
+mkdir -p /var/log/chukwa
+
+chown -R zookeeper:hadoop /opt/apache/zookeeper* /var/lib/zookeeper
+chmod 775 /var/run/hadoop
+chmod 775 /var/log/hadoop
+chown -R hdfs:hadoop /opt/apache/hadoop* /var/lib/hdfs /var/run/hadoop /var/log/hadoop
+chown -R hbase:hadoop /opt/apache/hbase* /var/run/hbase /var/log/hbase
+chown -R solr:hadoop /opt/apache/solr* /var/run/solr
+chown -R chukwa:hadoop /opt/apache/chukwa* /var/lib/chukwa /var/run/chukwa /var/log/chukwa
+
+# format HDFS
+export JAVA_HOME=/usr/lib/jvm/jre
+export HADOOP_CONF_DIR=/opt/apache/hadoop/etc/hadoop
+export HBASE_CONF_DIR=/opt/apache/hbase/conf
+export CHUKWA_CONF_DIR=/opt/apache/chukwa/etc/chukwa
+service sshd start
+su - hdfs -c '/opt/apache/hadoop/bin/hadoop namenode -format'
+su - hdfs -c '/opt/apache/hadoop/sbin/start-all.sh'
+su - zookeeper -c '/opt/apache/zookeeper/bin/zkServer.sh start'
+SAFE_MODE=`su - hdfs -c '/opt/apache/hadoop/bin/hadoop dfsadmin -safemode get 2>/dev/null'`
+while [ "$SAFE_MODE" == "Safe mode is ON" ]; do
+  SAFE_MODE=`su - hdfs -c '/opt/apache/hadoop/bin/hadoop dfsadmin -safemode get 2>/dev/null'`
+  sleep 3
+done
+su - hdfs -c '/opt/apache/hadoop/bin/hadoop fs -mkdir /hbase >/dev/null 2>&1'
+su - hdfs -c '/opt/apache/hadoop/bin/hadoop fs -chown hbase:hadoop /hbase >/dev/null 2>&1'
+su - hbase -c '/opt/apache/hbase/bin/start-hbase.sh'
+sleep 5
+su - hbase -c '/opt/apache/hbase/bin/hbase shell < /opt/apache/chukwa/etc/chukwa/hbase.schema'

http://git-wip-us.apache.org/repos/asf/chukwa/blob/112d3bbd/contrib/docker/start-all.sh
----------------------------------------------------------------------
diff --git a/contrib/docker/start-all.sh b/contrib/docker/start-all.sh
new file mode 100755
index 0000000..4cfe827
--- /dev/null
+++ b/contrib/docker/start-all.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+export PATH=${PATH}:/opt/apache/hadoop/bin:/opt/apache/hbase/bin
+export JAVA_HOME=/usr/lib/jvm/jre
+export HADOOP_CONF_DIR=/opt/apache/hadoop/etc/hadoop
+export HBASE_CONF_DIR=/opt/apache/hbase/conf
+export CHUKWA_CONF_DIR=/opt/apache/chukwa/etc/chukwa
+service sshd start
+su - zookeeper -c '/opt/apache/zookeeper/bin/zkServer.sh start'
+su - solr -c 'cd /opt/apache/solr/example; /usr/lib/jvm/jre/bin/java -Dbootstrap_confdir=/opt/apache/solr/example/solr/logs/conf -Dcollection.configName=myconf -Djetty.port=7574 -DzkHost=localhost:2181 -jar /opt/apache/solr/example/start.jar >/dev/null 2>&1 &'
+su - hdfs -c '/opt/apache/hadoop/sbin/start-dfs.sh >/dev/null 2>&1'
+su - yarn -c '/opt/apache/hadoop/sbin/start-yarn.sh >/dev/null 2>&1'
+SAFE_MODE=`su - hdfs -c '/opt/apache/hadoop/bin/hadoop dfsadmin -safemode get 2>/dev/null'`
+while [ "$SAFE_MODE" == "Safe mode is ON" ]; do
+  SAFE_MODE=`su - hdfs -c '/opt/apache/hadoop/bin/hadoop dfsadmin -safemode get 2>/dev/null'`
+  sleep 3
+done
+su - hbase -c '/opt/apache/hbase/bin/start-hbase.sh >/dev/null 2>&1'
+su - chukwa -c '/opt/apache/chukwa/sbin/start-chukwa.sh'
+echo
+echo "Chukwa Docker container is ready."
+echo "Use web browser to visit http://`hostname -f`:4080/ for demo."
+echo "Username: admin, password: admin"
+echo
+echo "Enjoy!"
+bash


[9/9] chukwa git commit: CHUKWA-779. Remove support for JSP pages. (Eric Yang)

Posted by ey...@apache.org.
CHUKWA-779.  Remove support for JSP pages.  (Eric Yang)


Project: http://git-wip-us.apache.org/repos/asf/chukwa/repo
Commit: http://git-wip-us.apache.org/repos/asf/chukwa/commit/6e9e7899
Tree: http://git-wip-us.apache.org/repos/asf/chukwa/tree/6e9e7899
Diff: http://git-wip-us.apache.org/repos/asf/chukwa/diff/6e9e7899

Branch: refs/heads/master
Commit: 6e9e7899daa1e1621e754875260357a6c398859e
Parents: 666dbb9
Author: Eric Yang <ey...@apache.org>
Authored: Sat Sep 5 19:46:50 2015 -0700
Committer: Eric Yang <ey...@apache.org>
Committed: Sun Sep 13 13:27:30 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     |   2 +
 conf/chukwa-agent-conf.xml                      |   4 +-
 conf/shiro.ini                                  |   4 +-
 contrib/docker/setup-image.sh                   |   4 +
 pom.xml                                         |  59 +---
 .../chukwa/datastore/ChukwaHBaseStore.java      | 298 ++++++++++++++--
 .../chukwa/hicc/rest/HeatmapController.java     |  36 ++
 .../chukwa/hicc/rest/LoginController.java       |  81 +++++
 src/main/web/hicc/WEB-INF/jsp2/taglib.tld       |  39 ---
 src/main/web/hicc/WEB-INF/vm/heatmap.vm         | 141 ++++++++
 src/main/web/hicc/WEB-INF/vm/login.vm           |  58 +++
 src/main/web/hicc/alerts/index.html             |  76 ++++
 src/main/web/hicc/apps/pie.js                   |   2 +-
 src/main/web/hicc/home/index.html               |   2 +
 src/main/web/hicc/jsp/chart.jsp                 | 166 ---------
 src/main/web/hicc/jsp/cluster_selector.jsp      |  51 ---
 src/main/web/hicc/jsp/debug.jsp                 |  31 --
 src/main/web/hicc/jsp/event.jsp                 | 102 ------
 src/main/web/hicc/jsp/event2_viewer.jsp         |  75 ----
 src/main/web/hicc/jsp/event_viewer.jsp          |  29 --
 src/main/web/hicc/jsp/event_viewer_data.jsp     |  74 ----
 src/main/web/hicc/jsp/event_viewer_helper.jsp   |  72 ----
 src/main/web/hicc/jsp/event_wrapper.jsp         |  26 --
 src/main/web/hicc/jsp/events-xml.jsp            |  93 -----
 src/main/web/hicc/jsp/get_data_source.jsp       |  36 --
 src/main/web/hicc/jsp/get_db_data.jsp           | 108 ------
 src/main/web/hicc/jsp/get_timezone_list.jsp     |  31 --
 src/main/web/hicc/jsp/hadoop_activity.jsp       |  71 ----
 .../web/hicc/jsp/heatmap-datanode-data-js.jsp   | 255 --------------
 src/main/web/hicc/jsp/heatmap-static.jsp        |  71 ----
 src/main/web/hicc/jsp/heatmap.jsp               | 136 --------
 src/main/web/hicc/jsp/heatmap_datanode.jsp      | 349 -------------------
 src/main/web/hicc/jsp/help.jsp                  |  48 ---
 src/main/web/hicc/jsp/host_selector.jsp         |  47 ---
 .../web/hicc/jsp/host_selector_dropdown.jsp     |  92 -----
 src/main/web/hicc/jsp/host_selector_role.jsp    |  90 -----
 src/main/web/hicc/jsp/host_selector_user.jsp    |  35 --
 src/main/web/hicc/jsp/image-viewer.jsp          | 195 -----------
 src/main/web/hicc/jsp/job_viewer.jsp            | 133 -------
 src/main/web/hicc/jsp/jobs_viewer.jsp           | 130 -------
 src/main/web/hicc/jsp/permlink.jsp              |  46 ---
 src/main/web/hicc/jsp/query.jsp                 | 113 ------
 src/main/web/hicc/jsp/session.jsp               |  31 --
 src/main/web/hicc/jsp/sql_client.jsp            |  69 ----
 .../web/hicc/jsp/swimlanes-event-data-js.jsp    | 302 ----------------
 src/main/web/hicc/jsp/swimlanes-static.jsp      |  70 ----
 src/main/web/hicc/jsp/swimlanes.jsp             |  72 ----
 src/main/web/hicc/jsp/swimlanes_viewer.jsp      |  25 --
 src/main/web/hicc/jsp/table.jsp                 |  71 ----
 src/main/web/hicc/jsp/table_viewer.jsp          |  85 -----
 src/main/web/hicc/jsp/time.jsp                  |  50 ---
 src/main/web/hicc/jsp/time_frame.jsp            |  61 ----
 src/main/web/hicc/jsp/time_range.jsp            | 142 --------
 src/main/web/hicc/jsp/time_slider.jsp           | 155 --------
 src/main/web/hicc/jsp/time_slider_wrapper.jsp   |  27 --
 src/main/web/hicc/jsp/util.jsp                  | 187 ----------
 src/main/web/hicc/jsp/workspace/manage_view.jsp | 132 -------
 src/main/web/hicc/jsp/workspace/time_iphone.jsp | 113 ------
 src/main/web/hicc/login.jsp                     |  56 ---
 src/main/web/hicc/logs/index.html               |  76 ++++
 60 files changed, 763 insertions(+), 4472 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index bb0f3f1..ca6b303 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -60,6 +60,8 @@ Trunk (unreleased changes)
 
   BUGS
 
+    CHUKWA-779.  Remove support for JSP pages.  (Eric Yang)
+
     CHUKWA-775. Updated Jersey version.  (Eric Yang)
 
     CHUKWA-774. Fixed resolution of symlinked prefix directory.  (Eric Yang)

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/conf/chukwa-agent-conf.xml
----------------------------------------------------------------------
diff --git a/conf/chukwa-agent-conf.xml b/conf/chukwa-agent-conf.xml
index 72a0bd3..7572d2a 100644
--- a/conf/chukwa-agent-conf.xml
+++ b/conf/chukwa-agent-conf.xml
@@ -78,8 +78,8 @@
 
   <property>
     <name>chukwa.pipeline</name>
-    <!--<value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter,org.apache.hadoop.chukwa.datacollection.writer.solr.SolrWriter</value>-->
-    <value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter</value>
+    <value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter,org.apache.hadoop.chukwa.datacollection.writer.solr.SolrWriter</value>
+    <!--<value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter</value>-->
   </property>
 
   <property>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/conf/shiro.ini
----------------------------------------------------------------------
diff --git a/conf/shiro.ini b/conf/shiro.ini
index a584f7e..e9b6f2d 100644
--- a/conf/shiro.ini
+++ b/conf/shiro.ini
@@ -21,7 +21,7 @@
 # http://shiro.apache.org/web.html for more.
 
 [main]
-shiro.loginUrl = /login.jsp
+shiro.loginUrl = /v1/login/check
 
 [users]
 # format: username = password, role1, role2, ..., roleN
@@ -37,7 +37,7 @@ admin = *
 # the 'authc' filter must still be specified for it so it can process that url's
 # login submissions. It is 'smart' enough to allow those requests through as specified by the
 # shiro.loginUrl above.
-/login.jsp = authc
+/v1/login/check = authc
 /logout = logout
 /index.html = authc
 /home/css/** = anon

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/contrib/docker/setup-image.sh
----------------------------------------------------------------------
diff --git a/contrib/docker/setup-image.sh b/contrib/docker/setup-image.sh
index b2b23f5..021468d 100755
--- a/contrib/docker/setup-image.sh
+++ b/contrib/docker/setup-image.sh
@@ -118,3 +118,7 @@ su - hdfs -c '/opt/apache/hadoop/bin/hadoop fs -chown hbase:hadoop /hbase >/dev/
 su - hbase -c '/opt/apache/hbase/bin/start-hbase.sh'
 sleep 5
 su - hbase -c '/opt/apache/hbase/bin/hbase shell < /opt/apache/chukwa/etc/chukwa/hbase.schema'
+sleep 5
+su - hbase -c '/opt/apache/hbase/bin/stop-hbase.sh'
+su - hdfs -c '/opt/apache/hadoop/sbin/stop-dfs.sh'
+su - zookeeper -c '/opt/apache/zookeeper/bin/zkServer.sh stop'

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5bc3556..3dc2728 100644
--- a/pom.xml
+++ b/pom.xml
@@ -308,16 +308,6 @@
             </exclusions>
           </dependency>
           <dependency>
-            <groupId>org.mortbay.jetty</groupId>
-            <artifactId>jsp-2.1</artifactId>
-            <version>6.1.14</version>
-          </dependency>
-          <dependency>
-            <groupId>org.mortbay.jetty</groupId>
-            <artifactId>jsp-api-2.1</artifactId>
-            <version>6.1.14</version>
-          </dependency>
-          <dependency>
             <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-core</artifactId>
             <version>1.2.3</version>
@@ -1005,6 +995,14 @@
                     <version>${hbase.version}</version>
                     <exclusions>
                         <exclusion>
+                            <groupId>org.mortbay.jetty</groupId>
+                            <artifactId>jsp-2.1</artifactId>
+                        </exclusion>
+                        <exclusion>
+                            <groupId>org.mortbay.jetty</groupId>
+                            <artifactId>jsp-api-2.1</artifactId>
+                        </exclusion>
+                        <exclusion>
                             <groupId>com.sun.jersey</groupId>
                             <artifactId>jersey-server</artifactId>
                         </exclusion>
@@ -1086,6 +1084,10 @@
                     <version>${hadoop.version}</version>
                     <exclusions>
                         <exclusion>
+                            <groupId>javax.servlet.jsp</groupId>
+                            <artifactId>jsp-api</artifactId>
+                        </exclusion>
+                        <exclusion>
                             <groupId>tomcat</groupId>
                             <artifactId>jasper-compiler</artifactId>
                         </exclusion>
@@ -1138,43 +1140,6 @@
             </dependencies>
         </profile>
         <profile>
-            <id>jspc</id>
-            <activation>
-                <property>
-                    <name>jspc</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                      <groupId>org.mortbay.jetty</groupId>
-                      <artifactId>maven-jetty-jspc-plugin</artifactId>
-                      <version>6.1.26</version>
-                      <executions>
-                        <execution>
-                          <id>jspc</id>
-                          <goals>
-                             <goal>jspc</goal>
-                          </goals>
-                          <configuration>
-                             <webAppSourceDirectory>
-                             src/main/web/hicc
-                             </webAppSourceDirectory>
-                             <generatedClasses>
-                             ${basedir}/target/web
-                             </generatedClasses>
-                             <verbose>true</verbose>
-                             <keepSources>false</keepSources>
-                             <packageRoot>org.apache.jsp</packageRoot>
-                             <ignoreJspFragmentErrors>true</ignoreJspFragmentErrors>
-                          </configuration>
-                        </execution>
-                      </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile> 
-        <profile>
           <id>docs</id>
           <activation>
             <file>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java b/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
index 721f290..4c6ccdb 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
@@ -827,6 +827,26 @@ public class ChukwaHBaseStore {
       namenode.append(":NameNode");
       String[] namenodeHeap = { "HadoopMetrics.jvm.JvmMetrics.MemHeapUsedM", "HadoopMetrics.jvm.JvmMetrics.MemHeapMaxM" };
       createChart("7", "percent", "Namenode Memory", namenodeHeap, namenode.toString());
+      String[] hdfsUsage = { "HadoopMetrics.dfs.FSNamesystem.CapacityUsed", "HadoopMetrics.dfs.FSNamesystem.CapacityTotal" };
+      createChart("8", "percent", "HDFS Usage", hdfsUsage, hostname);
+
+      StringBuilder rmnode = new StringBuilder();
+      rmnode.append(hostname);
+      rmnode.append(":ResourceManager");
+      String[] rmHeap = { "HadoopMetrics.jvm.JvmMetrics.MemHeapUsedM", "HadoopMetrics.jvm.JvmMetrics.MemHeapMaxM" };
+      createChart("9", "percent", "Resource Manager Memory", rmHeap, rmnode.toString());
+
+      StringBuilder hbaseMaster = new StringBuilder();
+      hbaseMaster.append(hostname);
+      hbaseMaster.append(":Master");
+      String[] hbm = { "HBaseMetrics.jvm.JvmMetrics.MemHeapUsedM", "HBaseMetrics.jvm.JvmMetrics.MemHeapMaxM" };
+      createChart("10", "percent", "HBase Master Memory", hbm, hbaseMaster.toString());
+
+      // Demo metrics
+      String[] trialAbandonRate = { "HadoopMetrics.jvm.JvmMetrics.MemHeapUsedM", "HadoopMetrics.jvm.JvmMetrics.MemHeapMaxM" };
+      createChart("11", "percent", "Trial Abandon Rate", trialAbandonRate, namenode.toString());
+      createChart("12", "percent", "Unhealthy Clusters", hdfsUsage, hostname);
+      
       // Populate default widgets
       Widget widget = new Widget();
       widget.setTitle("System Load Average");
@@ -837,46 +857,200 @@ public class ChukwaHBaseStore {
       widget.setSize_y(1);
       createWidget(widget);
 
-      // CPU heatmap
+      // Populate default dashboard
+      Dashboard dashboard = new Dashboard();
+
       widget = new Widget();
-      widget.setTitle("CPU Heatmap");
-      widget.setSrc(new URI("/hicc/jsp/heatmap.jsp"));
+      widget.setTitle("Trial Downloading");
+      widget.setSrc(new URI("/hicc/home/downloads.html"));
       widget.setCol(1);
       widget.setRow(1);
-      widget.setSize_x(5);
+      widget.setSize_x(2);
       widget.setSize_y(1);
       createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Cluster Running");
+      widget.setSrc(new URI("/hicc/home/clusters.html"));
+      widget.setCol(3);
+      widget.setRow(1);
+      widget.setSize_x(2);
+      widget.setSize_y(1);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Users Working");
+      widget.setSrc(new URI("/hicc/home/users.html"));
+      widget.setCol(5);
+      widget.setRow(1);
+      widget.setSize_x(2);
+      widget.setSize_y(1);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Applications Running");
+      widget.setSrc(new URI("/hicc/home/apps.html"));
+      widget.setCol(7);
+      widget.setRow(1);
+      widget.setSize_x(2);
+      widget.setSize_y(1);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Trial Abandon Rate");
+      widget.setSrc(new URI("/hicc/v1/circles/draw/11"));
+      widget.setCol(1);
+      widget.setRow(2);
+      widget.setSize_x(2);
+      widget.setSize_y(2);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Clusters Health");
+      widget.setSrc(new URI("/hicc/v1/circles/draw/12"));
+      widget.setCol(3);
+      widget.setRow(2);
+      widget.setSize_x(2);
+      widget.setSize_y(2);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Top Active Clusters");
+      widget.setSrc(new URI("/hicc/clusters/"));
+      widget.setCol(5);
+      widget.setRow(2);
+      widget.setSize_x(2);
+      widget.setSize_y(2);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Top Applications");
+      widget.setSrc(new URI("/hicc/apps/"));
+      widget.setCol(7);
+      widget.setRow(2);
+      widget.setSize_x(2);
+      widget.setSize_y(2);
+      createWidget(widget);
+//      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Applications Usage");
+      widget.setSrc(new URI("/hicc/apps/apps-usage.html"));
+      widget.setCol(7);
+      widget.setRow(2);
+      widget.setSize_x(2);
+      widget.setSize_y(2);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      updateDashboard("default", "", dashboard);
+
+      // Populate user dashboards
+      dashboard = new Dashboard();
+      widget = new Widget();
+      widget.setTitle("Top Applications");
+      widget.setSrc(new URI("/hicc/apps/"));
+      widget.setCol(1);
+      widget.setRow(1);
+      widget.setSize_x(2);
+      widget.setSize_y(2);
+      dashboard.add(widget);
 
-      Dashboard dashboard = new Dashboard();
       // Log Search widget
       widget = new Widget();
       widget.setTitle("Log Search");
       widget.setSrc(new URI("/hicc/ajax-solr/chukwa"));
-      widget.setCol(1);
+      widget.setCol(3);
       widget.setRow(1);
-      widget.setSize_x(7);
-      widget.setSize_y(4);
+      widget.setSize_x(6);
+      widget.setSize_y(6);
       createWidget(widget);
       dashboard.add(widget);
-      updateDashboard("default", "", dashboard);
+
+      widget = new Widget();
+      widget.setTitle("Top Users");
+      widget.setSrc(new URI("/hicc/users/"));
+      widget.setCol(1);
+      widget.setRow(3);
+      widget.setSize_x(2);
+      widget.setSize_y(2);
+      createWidget(widget);
+      dashboard.add(widget);
+      updateDashboard("user", "", dashboard);
 
       // Populate system dashboards
       dashboard = new Dashboard();
       widget = new Widget();
-      widget.setTitle("CPU Utilization");
-      widget.setSrc(new URI("/hicc/v1/chart/draw/2"));
+      widget.setTitle("Services Running");
+      widget.setSrc(new URI("/hicc/services/services.html"));
       widget.setCol(1);
       widget.setRow(1);
-      widget.setSize_x(3);
+      widget.setSize_x(2);
       widget.setSize_y(1);
       createWidget(widget);
       dashboard.add(widget);
+      
+      widget = new Widget();
+      widget.setTitle("Applications Running");
+      widget.setSrc(new URI("/hicc/home/apps.html"));
+      widget.setCol(3);
+      widget.setRow(1);
+      widget.setSize_x(2);
+      widget.setSize_y(1);
+      dashboard.add(widget);
 
       widget = new Widget();
-      widget.setTitle("Memory Utilization");
-      widget.setSrc(new URI("/hicc/v1/chart/draw/3"));
-      widget.setCol(4);
+      widget.setTitle("HDFS Usage");
+      widget.setSrc(new URI("/hicc/v1/circles/draw/8"));
+      widget.setCol(5);
+      widget.setRow(1);
+      widget.setSize_x(1);
+      widget.setSize_y(1);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Namenode Memory");
+      widget.setSrc(new URI("/hicc/v1/circles/draw/7"));
+      widget.setCol(6);
+      widget.setRow(1);
+      widget.setSize_x(1);
+      widget.setSize_y(1);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Resource Manager Memory");
+      widget.setSrc(new URI("/hicc/v1/circles/draw/9"));
+      widget.setCol(7);
       widget.setRow(1);
+      widget.setSize_x(1);
+      widget.setSize_y(1);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("HBase Master Memory");
+      widget.setSrc(new URI("/hicc/v1/circles/draw/10"));
+      widget.setCol(8);
+      widget.setRow(1);
+      widget.setSize_x(1);
+      widget.setSize_y(1);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("System Load Average");
+      widget.setSrc(new URI("/hicc/v1/chart/draw/1"));
+      widget.setCol(1);
+      widget.setRow(2);
       widget.setSize_x(3);
       widget.setSize_y(1);
       createWidget(widget);
@@ -885,7 +1059,7 @@ public class ChukwaHBaseStore {
       widget = new Widget();
       widget.setTitle("Disk Utilization");
       widget.setSrc(new URI("/hicc/v1/chart/draw/4"));
-      widget.setCol(1);
+      widget.setCol(4);
       widget.setRow(2);
       widget.setSize_x(3);
       widget.setSize_y(1);
@@ -893,43 +1067,111 @@ public class ChukwaHBaseStore {
       dashboard.add(widget);
 
       widget = new Widget();
+      widget.setTitle("Timeline");
+      widget.setSrc(new URI("/hicc/timeline/"));
+      widget.setCol(7);
+      widget.setRow(2);
+      widget.setSize_x(4);
+      widget.setSize_y(6);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("CPU Utilization");
+      widget.setSrc(new URI("/hicc/v1/chart/draw/2"));
+      widget.setCol(1);
+      widget.setRow(3);
+      widget.setSize_x(3);
+      widget.setSize_y(1);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
       widget.setTitle("Network Utilization");
       widget.setSrc(new URI("/hicc/v1/chart/draw/5"));
       widget.setCol(4);
-      widget.setRow(2);
+      widget.setRow(3);
       widget.setSize_x(3);
       widget.setSize_y(1);
       createWidget(widget);
       dashboard.add(widget);
 
       widget = new Widget();
-      widget.setTitle("Swap Utilization");
-      widget.setSrc(new URI("/hicc/v1/chart/draw/6"));
+      widget.setTitle("Memory Utilization");
+      widget.setSrc(new URI("/hicc/v1/chart/draw/3"));
       widget.setCol(1);
-      widget.setRow(3);
+      widget.setRow(4);
       widget.setSize_x(3);
       widget.setSize_y(1);
       createWidget(widget);
       dashboard.add(widget);
 
       widget = new Widget();
-      widget.setTitle("System Load Average");
-      widget.setSrc(new URI("/hicc/v1/chart/draw/1"));
+      widget.setTitle("Swap Utilization");
+      widget.setSrc(new URI("/hicc/v1/chart/draw/6"));
       widget.setCol(4);
-      widget.setRow(3);
+      widget.setRow(4);
       widget.setSize_x(3);
       widget.setSize_y(1);
       createWidget(widget);
       dashboard.add(widget);
 
+      // CPU heatmap
       widget = new Widget();
-      widget.setTitle("Namenode Memory");
-      widget.setSrc(new URI("/hicc/v1/circles/draw/7"));
+      widget.setTitle("CPU Heatmap");
+      widget.setSrc(new URI("/hicc/v1/heatmap/render/SystemMetrics/cpu.combined."));
       widget.setCol(1);
-      widget.setRow(1);
-      widget.setSize_x(2);
-      widget.setSize_y(2);
+      widget.setRow(5);
+      widget.setSize_x(6);
+      widget.setSize_y(5);
+      createWidget(widget);
+      dashboard.add(widget);
+
+      widget = new Widget();
+      widget.setTitle("Alerts");
+      widget.setSrc(new URI("/hicc/alerts/"));
+      widget.setCol(1);
+      widget.setRow(5);
+      widget.setSize_x(6);
+      widget.setSize_y(5);
       createWidget(widget);
+
+      widget = new Widget();
+      widget.setTitle("Log Errors");
+      widget.setSrc(new URI("/hicc/logs/"));
+      widget.setCol(1);
+      widget.setRow(5);
+      widget.setSize_x(6);
+      widget.setSize_y(5);
+      createWidget(widget);
+
+      widget = new Widget();
+      widget.setTitle("Web Stats");
+      widget.setSrc(new URI("https://birepo-internal.svl.ibm.com/awstats/awstats.pl?config=ibm-open-platform&framename=mainright&month=08&year=2015#month"));
+      widget.setCol(1);
+      widget.setRow(5);
+      widget.setSize_x(6);
+      widget.setSize_y(5);
+      createWidget(widget);
+
+      widget = new Widget();
+      widget.setTitle("Sessions");
+      widget.setSrc(new URI("https://birepo-internal.svl.ibm.com/awstats/awstats.pl?config=ibm-open-platform&framename=mainright&month=08&year=2015#sessions"));
+      widget.setCol(1);
+      widget.setRow(5);
+      widget.setSize_x(6);
+      widget.setSize_y(5);
+      createWidget(widget);
+
+      widget = new Widget();
+      widget.setTitle("Domains");
+      widget.setSrc(new URI("https://birepo-internal.svl.ibm.com/awstats/awstats.pl?config=ibm-open-platform&framename=mainright&month=08&year=2015#domains"));
+      widget.setCol(1);
+      widget.setRow(5);
+      widget.setSize_x(6);
+      widget.setSize_y(5);
+      createWidget(widget);
+
       updateDashboard("system", "", dashboard);
       
     } catch (Throwable ex) {

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/java/org/apache/hadoop/chukwa/hicc/rest/HeatmapController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/HeatmapController.java b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/HeatmapController.java
index 621f318..80f7457 100644
--- a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/HeatmapController.java
+++ b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/HeatmapController.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.chukwa.hicc.rest;
 
+import java.io.StringWriter;
 import java.text.SimpleDateFormat;
 
 import javax.servlet.http.HttpServletRequest;
@@ -34,10 +35,16 @@ import org.apache.hadoop.chukwa.hicc.TimeHandler;
 import org.apache.hadoop.chukwa.hicc.bean.Heatmap;
 import org.apache.hadoop.chukwa.util.ExceptionUtil;
 import org.apache.log4j.Logger;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
 
 @Path("/heatmap")
 public class HeatmapController {
   static Logger log = Logger.getLogger(HeatmapController.class);
+  
+  @Context
+  VelocityEngine velocity;
 
   @GET
   @Path("{metricGroup}/{metric}")
@@ -73,4 +80,33 @@ public class HeatmapController {
     }
     return heatmap;
   }
+  
+  @GET
+  @Path("render/{metricGroup}/{metric}")
+  @Produces(MediaType.TEXT_HTML)
+  public String heatmapTemplate(@PathParam("metricGroup") @DefaultValue("SystemMetrics") String metricGroup,
+      @PathParam("metric") @DefaultValue("cpu.combined.") String metric,
+      @QueryParam("width") @DefaultValue("700px") String width,
+      @QueryParam("height") @DefaultValue("400px") String height,
+      @QueryParam("title") @DefaultValue("CPU") String title,
+      @QueryParam("yLabel") @DefaultValue("device") String yLabel) {
+    StringBuilder url = new StringBuilder();
+    url.append("/hicc/v1/heatmap/").append(metricGroup).append("/").append(metric);
+    VelocityContext context = new VelocityContext();
+    StringWriter sw = null;
+    try {
+      context.put("url", url.toString());
+      context.put("width", width);
+      context.put("height", height);
+      context.put("title", title);
+      context.put("yLabel", yLabel);
+      Template template = velocity.getTemplate("heatmap.vm");
+      sw = new StringWriter();
+      template.merge(context, sw);
+    } catch (Exception e) {
+      e.printStackTrace();
+      return e.getMessage();
+    }
+    return sw.toString();
+  }
 }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/java/org/apache/hadoop/chukwa/hicc/rest/LoginController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/LoginController.java b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/LoginController.java
new file mode 100644
index 0000000..d3413a4
--- /dev/null
+++ b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/LoginController.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.chukwa.hicc.rest;
+
+import java.io.StringWriter;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+
+import org.apache.hadoop.chukwa.datastore.ChukwaHBaseStore;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+
+import com.sun.jersey.api.client.ClientResponse.Status;
+
+@Path("/login")
+public class LoginController {
+  @Context
+  VelocityEngine velocity;
+  
+  static {
+    ChukwaHBaseStore.populateDefaults();
+  }
+
+  @GET
+  @Path("check")
+  public String login(String buffer) {
+    VelocityContext context = new VelocityContext();
+    StringWriter sw = null;
+    try {
+      Template template = velocity.getTemplate("login.vm");
+      sw = new StringWriter();
+      template.merge(context, sw);
+    } catch (Exception e) {
+      e.printStackTrace();
+      return e.getMessage();
+    }
+    return sw.toString();
+  }
+
+  @POST
+  @Path("check")
+  public Response check(@Context HttpServletRequest request) {
+    VelocityContext context = new VelocityContext();
+    if(request.getRemoteUser()!=null) {
+      URI location;
+      try {
+        location = new URI("/hicc/");
+        return Response.temporaryRedirect(location).build();
+      } catch (URISyntaxException e) {
+      }
+    }
+    context.put("invalid", true);
+    Template template = velocity.getTemplate("login.vm");
+    StringWriter sw = new StringWriter();
+    template.merge(context, sw);
+    return Response.status(Status.FORBIDDEN).entity(sw.toString()).build();
+  }
+}

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/WEB-INF/jsp2/taglib.tld
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/WEB-INF/jsp2/taglib.tld b/src/main/web/hicc/WEB-INF/jsp2/taglib.tld
deleted file mode 100644
index 71f2d42..0000000
--- a/src/main/web/hicc/WEB-INF/jsp2/taglib.tld
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
-    version="2.0">
-    <description>A tag library exercising SimpleTag handlers.</description>
-    <tlib-version>1.0</tlib-version>
-    <short-name>SimpleTagLibrary</short-name>
-    <uri>/SimpleTagLibrary</uri>
-    <tag>
-	<description>Workspace views JSON Coverter</description>
-        <name>findViews</name>
-	<tag-class>org.apache.hadoop.chukwa.hicc.ViewsTag</tag-class>
-	<body-content>scriptless</body-content>
-        <attribute>
-            <name>key</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-        </attribute>
-    </tag>
-</taglib>
-

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/WEB-INF/vm/heatmap.vm
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/WEB-INF/vm/heatmap.vm b/src/main/web/hicc/WEB-INF/vm/heatmap.vm
new file mode 100644
index 0000000..74f9d29
--- /dev/null
+++ b/src/main/web/hicc/WEB-INF/vm/heatmap.vm
@@ -0,0 +1,141 @@
+#*
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*#
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <style>
+
+      .outer {
+        display: table;
+        position: absolute;
+        height: 100%;
+        width: 100%;
+      }
+
+      .middle {
+        display: table-cell;
+        vertical-align: middle;
+      }
+
+      .inner {
+        margin-left: auto;
+        margin-right: auto; 
+      }
+
+      #heatmapArea {
+        display: block;
+        position:absolute;
+        float:left;
+        top:0;
+        left: 50px;
+      }
+
+      #yaxis {
+        text-align: center;
+        width: 50px;
+        height: $height;
+        line-height: 400px;
+      }
+
+      p {
+        border:0px solid red;
+        writing-mode:lr-tb;
+        -webkit-transform:rotate(270deg);
+        -moz-transform:rotate(270deg);
+        -o-transform: rotate(270deg);
+        white-space:nowrap;
+        bottom:0;
+      }
+
+      #xaxis {
+        width: $width px;
+        position: relative;
+        left: 0px;
+        height: 20px;
+        text-align: center;
+        display: block;
+      }
+
+      body {
+        color:#333;
+        font-family: Oswald, Helvetica, Arial;
+        font-weight:normal;
+      }
+
+    </style>
+    <link href="/hicc/css/default.css" rel="stylesheet" type="text/css">
+  </head>
+  <body onresize="resize()">
+    <div class="outer">
+      <div class="middle">
+        <div class="inner">
+          <div id="yaxis">
+            <p id="yLabel"></p>
+          </div>
+          <div id="heatmapArea"></div>
+          <div id="xaxis">Time</div>
+        </div>
+      </div>
+    </div>
+    <script src="/hicc/js/jquery.js" type="text/javascript" charset="utf-8"></script>
+    <script type="text/javascript" src="/hicc/js/heatmap.js"></script>
+    <script type="text/javascript">
+      function load() {
+        var x = window.innerWidth - 80;
+        var y = window.innerHeight - 60;
+        $.ajax({ 
+          url: "$url", 
+          dataType: "json", 
+          success: function(data) {
+            $('#yLabel').html(data.series + " $yLabel (s)");
+            var config = {
+              width: x,
+              height: y,
+              element: document.getElementById("heatmapArea"),
+              radius: y / data.radius * 4/3,
+              opacity: 50,
+              legend: {
+                position: 'br',
+                title: '$title Distribution'
+              }
+            };
+            $("#heatmapArea").empty();
+            var heatmap = h337.create(config);
+            heatmap.store.setDataSet(data);
+            setTimeout(load, 5000);
+          }
+        });
+      }
+      
+      function resize() {
+        var x = window.innerWidth - 80;
+        var y = window.innerHeight - 60;
+        $("#heatmapArea").width(x + 'px');
+        $("#heatmapArea").height(y + 'px');
+      }
+
+      window.onload = function() {
+        document.body.style.overflow = 'hidden';
+        window.addEventListener("resize", resize, false);
+        setTimeout(load, 5000);
+      };
+    </script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/WEB-INF/vm/login.vm
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/WEB-INF/vm/login.vm b/src/main/web/hicc/WEB-INF/vm/login.vm
new file mode 100644
index 0000000..aeb9f08
--- /dev/null
+++ b/src/main/web/hicc/WEB-INF/vm/login.vm
@@ -0,0 +1,58 @@
+#*
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  *#
+<html>
+<head>
+    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+    <meta http-equiv="Pragma" content="no-cache" />
+    <meta http-equiv="Expires" content="0" />
+    <link type="text/css" rel="stylesheet" href="/hicc/css/login.css"/>
+    <link href="/hicc/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <link href="/hicc/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <script src="/hicc/js/jquery.js" type="text/javascript"></script>
+    <script src="/hicc/js/bootstrap.min.js" type="text/javascript"></script>
+</head>
+<body>
+
+<div class="container">
+    <form class="form-signin" name="loginform" action="" method="post">
+      <h2 class="form-signin-heading">Sign in to Chukwa</h2>
+      <label for="inputEmail" class="sr-only">Username</label>
+      <input type="text" class="form-control" name="username" placeholder="Username" required autofocus>
+      <label for="inputPassword" class="sr-only">Password:</label>
+      <input type="password" class="form-control" name="password" placeholder="Password" required>
+      <div class="checkbox">
+        <label> 
+          <input type="checkbox" name="rememberMe"> Keep me signed in
+        </label>
+      </div>
+      <input type="submit" class="btn btn-lg btn-primary btn-block" name="submit" value="Login">
+      #if ($invalid)
+        <br>
+        <div class="alert alert-danger alert-dismissible" role="alert">
+          Invalid username or password
+        </div>
+      #end
+      <span class="form-signin-footer">
+        Copyright (c) 2008-2015 Apache Software Foundation
+      </span>
+    </form>
+</div>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/alerts/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/alerts/index.html b/src/main/web/hicc/alerts/index.html
new file mode 100644
index 0000000..ce653ec
--- /dev/null
+++ b/src/main/web/hicc/alerts/index.html
@@ -0,0 +1,76 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--> 
+<!DOCTYPE html>
+<html lang="en" class="no-js">
+  <head>
+    <title>Tile</title>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js" type="text/javascript"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <style>
+      .tile {
+        color: #ffffff;
+        background-color: #5bc0de;
+      }
+      .row {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display:         flex;
+      }
+      .banner {
+        background-color: #ffffff;
+      }
+    </style>
+  </head>
+  <body onResize="resize()">
+    <div class="jumbotron">
+    <div class="container">
+      <div class="row">
+        <div class="col-xs-5 col-md-5 text-center tile">
+            <h2><span class="glyphicon glyphicon-alert" aria-hidden="true"></span></h2>
+            Alerts
+        </div>
+        <div class="col-xs-7 col-md-7 text-center banner">
+          <p><h1>7</h1> Notifications</p>
+        </div>
+      </div>
+    </div>
+    </div>
+
+    <script src="js/jquery.js"></script>
+    <script>
+      var tracker;
+
+      function resize() {
+        clearTimeout(tracker);
+        tracker = setTimeout(render, 50);
+      }
+
+      function render() {
+        document.body.style.overflow = 'hidden';
+        tracker = setTimeout(render, 3000);
+      }
+
+      $( document ).ready(function() {
+        render();
+      });
+    </script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/apps/pie.js
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/apps/pie.js b/src/main/web/hicc/apps/pie.js
index 9f4d72c..dc575f6 100644
--- a/src/main/web/hicc/apps/pie.js
+++ b/src/main/web/hicc/apps/pie.js
@@ -1,6 +1,6 @@
 var data = {
   labels: ['Mapreduce', 'HBase', 'Hive', 'Spark', 'BigSQL', 'R'],
-  series: [45, 29, 21,3, 2, 1]
+  series: [25, 19, 21,13, 12, 11]
 };
 
 var options = {

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/home/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/index.html b/src/main/web/hicc/home/index.html
index 37656cc..112c2a1 100755
--- a/src/main/web/hicc/home/index.html
+++ b/src/main/web/hicc/home/index.html
@@ -269,6 +269,8 @@ $(function(){ //DOM Ready
     cache: false
   }).done(function( html ) {
     $('#username').append(html);
+  }).fail(function() {
+    window.location = "/hicc/";
   });
 
   $.getJSON('/hicc/v1/session/key/dashboard',

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/chart.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/chart.jsp b/src/main/web/hicc/jsp/chart.jsp
deleted file mode 100644
index 84f39a3..0000000
--- a/src/main/web/hicc/jsp/chart.jsp
+++ /dev/null
@@ -1,166 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.sql.*" %>
-<%@ page import = "java.io.*" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.util.*" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.ClusterConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.Chart" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.DatasetMapper" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.DatabaseConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.Macro" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-    XssFilter xf = new XssFilter(request);
-    //String boxId=xf.getParameter("boxId");
-    //response.setHeader("boxId", xf.getParameter("boxId"));
-    response.setContentType("text/html; chartset=UTF-8//IGNORE");
-
-    /*
-     * Set chart title, and output type.
-     */
-    String title = xf.getParameter("title");
-    String graphType = xf.getParameter("graph_type");
-
-    /*
-     * Set chart width.
-     */
-    int width=300;
-    if(request.getParameter("width")!=null) {
-      width=Integer.parseInt(request.getParameter("width"));
-    }
-
-    /*
-     * Set chart height.
-     */
-    int height=200;
-    if(request.getParameter("height")!=null) {
-      height=Integer.parseInt(request.getParameter("height"));
-    }
-
-    /*
-     * Set series data source.
-     */
-    String[] seriesName = xf.getParameterValues("series_name");
-    String[] data = xf.getParameterValues("data");
-    if(xf.getParameterValues("data").length==1 && xf.getParameterValues("data")[0].indexOf(",")!=-1) {
-      data = xf.getParameterValues("data")[0].split(",");
-    }
-    
-    /*
-     * Set series render format.
-     */
-    String[] render = null;
-    if(request.getParameter("render")!=null) {
-      render=xf.getParameterValues("render");
-    } 
-    if(render==null || render.length!=data.length) { 
-      render = new String[data.length];
-      for(int i=0;i<data.length;i++) {
-        render[i] = "line";
-      }
-    }
-
-    Chart c = new Chart(request);
-
-    /*
-     * Setup x axis display.
-     */
-    if(request.getParameter("x_label")!=null && xf.getParameter("x_label").equals("on")) {
-      c.setXAxisLabels(true);
-    } else {
-      c.setXAxisLabels(false);
-    }
-    if(request.getParameter("x_axis_label")!=null) {
-      c.setXAxisLabel(xf.getParameter("x_axis_label"));
-    } else {
-      c.setXAxisLabel("Time");
-    }
-
-    // set ymin and ymax
-    // TODO: check that these are numbers
-    if (request.getParameter("ymin") != null && 
-        request.getParameter("ymin").length() != 0) {
-      c.setYMin(new Double(xf.getParameter("ymin")));
-    }
-    if (request.getParameter("ymax") != null &&
-        request.getParameter("ymax").length() != 0) {
-      c.setYMax(new Double(xf.getParameter("ymax")));
-    }
-
-    /*
-     * Setup y axis display.
-     */
-    if(request.getParameter("y_label")!=null && xf.getParameter("y_label").equals("on")) {
-      c.setYAxisLabels(true);
-      c.setYAxisLabel(xf.getParameter("y_axis_label"));
-    } else {
-      c.setYAxisLabels(false);
-      c.setYAxisLabel("");
-    }
-    if(request.getParameter("y_axis_max")!=null) {
-      double max = Double.parseDouble(xf.getParameter("y_axis_max"));
-      c.setYMax(max);
-    }
-    if(request.getParameter("display_percentage")!=null) {
-      c.setDisplayPercentage(true);
-    }
-
-    /*
-     * Setup title.
-     */
-    if(title!=null) {
-      c.setTitle(title);
-    }
-
-    /*
-     * Setup legend display.
-     */
-    if(request.getParameter("legend")!=null && xf.getParameter("legend").equals("off")) {
-      c.setLegend(false);
-    }
-
-    /*
-     * Setup series display.
-     */
-    c.setGraphType(graphType);
-    c.setSize(width,height);
-
-    /*
-     * Setup data structure.
-     */
-    if(seriesName!=null && data.length==seriesName.length) {
-      for(int i=0;i<data.length;i++) {
-        c.setDataSet(render[i],seriesName[i],data[i]);
-      }
-    } else {
-      for(int i=0;i<data.length;i++) {
-        c.setDataSet(render[i],"",data[i]);
-      }
-    }
-
-    /*
-     * Render graph
-     */
-    out.println(c.plot());
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/cluster_selector.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/cluster_selector.jsp b/src/main/web/hicc/jsp/cluster_selector.jsp
deleted file mode 100644
index 5d28768..0000000
--- a/src/main/web/hicc/jsp/cluster_selector.jsp
+++ /dev/null
@@ -1,51 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "javax.servlet.http.*, java.io.*, java.util.*, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.util.XssFilter"  %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setContentType("text/html; chartset=UTF-8//IGNORE");
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<% String boxId = xf.getParameter("boxId"); %>
-Cluster
-<select id="<%= boxId %>cluster" name="<%= boxId %>cluster" class="formSelect">
-<%
-       String cluster=xf.getParameter("cluster");
-       if(cluster!=null && !cluster.equals("null")) {
-           session.setAttribute("cluster",cluster);
-       } else {
-           cluster = (String) session.getAttribute("cluster");
-           if(cluster==null || cluster.equals("null")) {
-               cluster="demo";
-               session.setAttribute("cluster",cluster);
-           }
-       }
-       ClusterConfig cc = new ClusterConfig();
-       Iterator i = cc.getClusters();
-       while(i.hasNext()) { 
-           String label = i.next().toString();
-           if(label.equals(cluster)) {
-               out.println("<option selected>"+label+"</option>");
-           } else {
-               out.println("<option>"+label+"</option>");
-           }
-       } %>
-</select>
-<input type="button" onClick="save_cluster('<%= boxId %>');" name="Apply" value="Apply">

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/debug.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/debug.jsp b/src/main/web/hicc/jsp/debug.jsp
deleted file mode 100644
index 9cd8f1d..0000000
--- a/src/main/web/hicc/jsp/debug.jsp
+++ /dev/null
@@ -1,31 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "javax.servlet.http.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-       XssFilter xf = new XssFilter(request);
-       response.setContentType("text/html; chartset=UTF-8//IGNORE");
-       response.setHeader("boxId", xf.getParameter("boxId"));
-
-       for (Enumeration e = session.getAttributeNames() ; e.hasMoreElements() ;) {
-           String name = (String) e.nextElement();
-           out.println(name+":"+session.getAttribute(name).toString());
-           out.println("<br>");
-       }
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/event.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/event.jsp b/src/main/web/hicc/jsp/event.jsp
deleted file mode 100644
index b186f1f..0000000
--- a/src/main/web/hicc/jsp/event.jsp
+++ /dev/null
@@ -1,102 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<% TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-   long start = time.getStartTime();
-   long end = time.getEndTime();
-   long midpoint = (end+start)/2;
-   SimpleDateFormat formatter = new SimpleDateFormat("MMM dd yyyy HH:mm:ss");
-   String startDate = formatter.format(midpoint);
-   String endDate = formatter.format(end);
-   String intervalUnit1="MINUTE";
-   String intervalUnit2="HOUR";
-   int intervalPixels = 10;
-   if(((end-start)/1000)>=(60*60*24*3)) {
-       intervalUnit1 = "DAY";
-       intervalUnit2 = "WEEK";
-       intervalPixels = 600;
-       if(((end-start)/1000)>(60*60*24*15)) {
-         intervalPixels = 300;
-       }
-   } else if(((end-start)/1000)>(60*60*6)) {
-       intervalUnit1 = "HOUR";
-       intervalUnit2 = "DAY";
-       intervalPixels = 600;
-   } else {
-       intervalUnit1 = "MINUTE";
-       intervalUnit2 = "HOUR";
-       intervalPixels = 600;
-       if(((end-start)/1000)>(60*60*3)) {
-         intervalPixels = 250;
-       }
-   }
-%>
-<html>
-  <head>
-    <link rel='stylesheet' href='/hicc/lib/timeline/bundle.css' type='text/css' />
-    <link href="/hicc/css/default.css" rel="stylesheet" type="text/css">
-    <link href="/hicc/css/formalize.css" rel="stylesheet" type="text/css" />
-    <script src="/hicc/js/jquery.formalize.js"></script>
-    <script src="/hicc/lib/timeline/timeline-api.js?bundle=true" type="text/javascript"></script>
-    <script src="/hicc/lib/timeline/search.js" type="text/javascript"></script>
-    <script type="text/javascript">
-        var theme = Timeline.ClassicTheme.create();
-        theme.event.label.width = 220; // px
-        theme.event.bubble.width = 400;
-        theme.event.bubble.height = 80;
-        function onLoad() {
-          var eventSource = new Timeline.DefaultEventSource();
-          var bandInfos = [
-            Timeline.createBandInfo({
-                eventSource:    eventSource,
-                showEventText:  false,
-                trackHeight:    0.5,
-                trackGap:       0.2,
-                date:           "<%= startDate %>  GMT",
-                width:          "100%", 
-                intervalUnit:   Timeline.DateTime.<%= intervalUnit2 %>, 
-                intervalPixels: <%= intervalPixels %>,
-                theme: theme,
-            })
-          ];
-          bandInfos[0].highlight = true;
-  
-          tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);
-          Timeline.loadXML("events-xml.jsp", function(xml, url) { eventSource.loadXML(xml, url); });
-          setupFilterHighlightControls(document.getElementById("controls"), tl, [0], theme);
-
-        }
-        var resizeTimerID = null;
-        function onResize() {
-            if (resizeTimerID == null) {
-                resizeTimerID = window.setTimeout(function() {
-                    resizeTimerID = null;
-                    tl.layout();
-                }, 500);
-            }
-        }
-    </script>
-  </head>
-  <body onload="onLoad();" onresize="onResize();">
-    <div id="my-timeline" style="height: 500px; border: 1px solid #aaa"></div>
-    <div class="controls" id="controls">
-    </div>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/event2_viewer.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/event2_viewer.jsp b/src/main/web/hicc/jsp/event2_viewer.jsp
deleted file mode 100644
index 109dd11..0000000
--- a/src/main/web/hicc/jsp/event2_viewer.jsp
+++ /dev/null
@@ -1,75 +0,0 @@
-<%/*
-       * Licensed to the Apache Software Foundation (ASF) under one
-       * or more contributor license agreements.  See the NOTICE file 
-       * distributed with this work for additional information
-       * regarding copyright ownership.  The ASF licenses this file
-       * to you under the Apache License, Version 2.0 (the
-       * "License"); you may not use this file except in compliance
-       * with the License.  You may obtain a copy of the License at
-       *
-       *     http://www.apache.org/licenses/LICENSE-2.0
-       *
-       * Unless required by applicable law or agreed to in writing, software
-       * distributed under the License is distributed on an "AS IS" BASIS,
-       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-       * See the License for the specific language governing permissions and
-       * limitations under the License.
-       */%>
-<%@ page import = "java.util.Calendar,java.util.Date,java.text.SimpleDateFormat,java.util.*,java.sql.*,java.io.*,java.util.Calendar, java.util.Date,org.apache.hadoop.chukwa.hicc.ClusterConfig,org.apache.hadoop.chukwa.dao.*,org.apache.hadoop.chukwa.dao.database.*,org.apache.hadoop.chukwa.dao.hdfs.*,org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.*,org.apache.hadoop.chukwa.extraction.engine.*" %>
-<%
-  XssFilter xf = new XssFilter(request);
-  response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<%
-  String filter = (String) session.getAttribute("filter");
-  if (filter == null) {
-    filter = "";
-  }
-%>
-<div style="height:300px;overflow:auto;">
-Filter: <input type="text" id="<%=XssFilter.filter(request.getParameter("boxId"))%>filter" name="<%=XssFilter.filter(request.getParameter("boxId"))%>filter" value="<%=filter%>">
-<input type="button" name="apply_filter" value="Filter" onClick="filter_event_viewer('<%=XssFilter.filter(request.getParameter("boxId"))%>');">
-<table class="simple" width="100%">
-<tr>
-<th>Time</th>
-<th>Event</th>
-</tr>
-<%
-  String cluster = (String) session.getAttribute("cluster");
-  ClusterConfig cc = new ClusterConfig();
-  String boxId = XssFilter.filter(request.getParameter("boxId"));
-  TimeHandler time = new TimeHandler(request);
-  String startdate = time.getStartTimeText();
-  String enddate = time.getEndTimeText();
-  String[] timefield = new String[3];
-  String[] database = new String[3];
-  database[0] = "MRJob";
-  database[1] = "HodJob";
-  database[2] = "QueueInfo";
-  timefield[0] = "LAUNCH_TIME";
-  timefield[1] = "StartTime";
-  timefield[2] = "timestamp";
-  long startDate = time.getStartTime();
-  long endDate = time.getEndTime();
-
-  ChukwaSearchService se = new ChukwaSearchService();
-  SearchResult result = se.search(cluster, database, startDate, endDate,
-      filter, (Token) null);
-  TreeMap events = result.getRecords();
-
-  Iterator ei = ( events.keySet() ).iterator();
-  while (ei.hasNext()) {
-    long timestamp = (Long) ei.next();
-    List<Record> tEvents = (List) events.get(timestamp);
-    SimpleDateFormat sdf = new java.text.SimpleDateFormat(
-        "yyyy-MM-dd HH:mm:ss");
-    for (Record event : tEvents) {
-      String cell = event.toString();
-      out.println("<tr><td>" + sdf.format(event.getTime()) + "</td><td>"
-          + cell + "</td></tr>");
-    }
-  }
-%>
-</table>
-</div>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/event_viewer.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/event_viewer.jsp b/src/main/web/hicc/jsp/event_viewer.jsp
deleted file mode 100644
index a6144d7..0000000
--- a/src/main/web/hicc/jsp/event_viewer.jsp
+++ /dev/null
@@ -1,29 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = " org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
-   if(xf.getParameter("type").equals("list")) {
-%>
-<IFRAME id="<%= xf.getParameter("boxId") %>iframe" src="/hicc/jsp/job_viewer.jsp?<%= xf.filter(request.getQueryString()) %>" width="100%" frameborder="0" height="400" scrolling="no"></IFRAME>
-<% } else { %>
-<IFRAME id="<%= xf.getParameter("boxId") %>iframe" src="/hicc/jsp/event.jsp" width="100%" frameborder="0" height="600"></IFRAME>
-<% } %>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/event_viewer_data.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/event_viewer_data.jsp b/src/main/web/hicc/jsp/event_viewer_data.jsp
deleted file mode 100644
index 923d720..0000000
--- a/src/main/web/hicc/jsp/event_viewer_data.jsp
+++ /dev/null
@@ -1,74 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.extraction.engine.*, org.apache.hadoop.chukwa.hicc.TimeHandler, org.json.*, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<% String filter=xf.getParameter("query");
-   if(filter==null) {
-       filter="";
-   }
-    TimeHandler th = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-    long startDate = th.getStartTime();
-    long endDate = th.getEndTime();
-
-        Calendar now = Calendar.getInstance();
-        long start = 0;
-        long end = now.getTimeInMillis();
-        String[] database = xf.getParameterValues("database");
-        String[] timefield = new String[3];
-        timefield[0]="LAUNCH_TIME";
-        timefield[1]="StartTime";
-        timefield[2]="timestamp";
-        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss");
-
-        ChukwaSearchService se = new ChukwaSearchService();
-        String cluster = (String) session.getAttribute("cluster");
-        if (cluster == null)
-            { cluster = "unknown"; }
-        Token token = (Token) session.getAttribute(database+"_token");
-        SearchResult result = se.search(cluster,database,startDate,endDate,filter,token);
-        TreeMap events = result.getRecords();
-        session.setAttribute(database+"_token",result.getToken());
-
-        SimpleDateFormat sdf=  new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        JSONArray array = new JSONArray();
-        Iterator ei = (events.keySet()).iterator();
-        while(ei.hasNext()) {
-            long time = (Long) ei.next();
-            List<Record> tEvents = (List) events.get(time);
-            for(Record event : tEvents) {
-                JSONObject eventRecord = new JSONObject();
-                eventRecord.put("id",event.getTime());
-                JSONArray cells = new JSONArray();
-//                cells.put(sdf.format(event.getTime()));
-                cells.put(event.toString());
-                eventRecord.put("cell",cells);
-                array.put(eventRecord);
-            }
-        }
-
-        JSONObject hash = new JSONObject();
-        hash.put("page","1");
-        hash.put("total","1");
-        hash.put("rows", array);
-        out.println(hash.toString());
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/event_viewer_helper.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/event_viewer_helper.jsp b/src/main/web/hicc/jsp/event_viewer_helper.jsp
deleted file mode 100644
index 2519cc0..0000000
--- a/src/main/web/hicc/jsp/event_viewer_helper.jsp
+++ /dev/null
@@ -1,72 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<%@ page import = "java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.extraction.engine.*, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.util.XssFilter" %>
-<% String filter=(String)session.getAttribute("filter");
-   if(filter==null) {
-       filter="";
-   } %>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-<link href="/hicc/css/flexigrid/flexigrid.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="/hicc/js/jquery-1.3.2.min.js"></script>
-<script type="text/javascript" src="/hicc/js/flexigrid.js"></script>
-</head>
-<body>
-<div class="flexigrid">
-<table class="flexme1">
-	<thead>
-    		<tr>
-            	<th width="100%">Event</th>
-            </tr>
-    </thead>
-<%
-        String[] database = xf.getParameterValues("database");
-%>
-    <tbody>
-    </tbody>
-</table>
-</div>
-<script type="text/javascript">
-$('.flexme1').flexigrid(
-			{
-                        url: '/hicc/jsp/event_viewer_data.jsp?<% for(int i=0;i<database.length;i++) { out.print("database="+xf.filter(database[i])+"&"); } %>',
-                        dataType: 'json',
-			searchitems : [
-				{display: 'Event', name : 'event', isdefault: true}
-				],
-			sortorder: "asc",
-			usepager: true,
-			useRp: true,
-			rp: 15,
-                        striped:false,
-			showTableToggleBtn: true,
-			width: 'auto',
-			height: 300
-			}
-);
-</script>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/event_wrapper.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/event_wrapper.jsp b/src/main/web/hicc/jsp/event_wrapper.jsp
deleted file mode 100644
index d091b45..0000000
--- a/src/main/web/hicc/jsp/event_wrapper.jsp
+++ /dev/null
@@ -1,26 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<IFRAME id="<%= xf.getParameter("boxId") %>iframe" src="/hicc/jsp/event.jsp" width="100%" frameborder="0" height="600"></IFRAME>
-

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/events-xml.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/events-xml.jsp b/src/main/web/hicc/jsp/events-xml.jsp
deleted file mode 100644
index 9afa5fc..0000000
--- a/src/main/web/hicc/jsp/events-xml.jsp
+++ /dev/null
@@ -1,93 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%><?xml version="1.0" encoding="UTF-8"?>
-<%@ page import = "java.util.Calendar, java.util.Date, java.sql.*, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.util.DatabaseWriter, org.apache.hadoop.chukwa.database.Macro, org.apache.hadoop.chukwa.database.DatabaseConfig, org.apache.hadoop.chukwa.util.XssFilter, org.apache.hadoop.hbase.HBaseConfiguration, org.apache.hadoop.hbase.client.HTableInterface, org.apache.hadoop.hbase.client.HTablePool, org.apache.hadoop.hbase.client.Result, org.apache.hadoop.hbase.client.ResultScanner, org.apache.hadoop.hbase.client.Scan, org.apache.hadoop.conf.Configuration" %>
-<%! final static private Configuration hconf = HBaseConfiguration.create(); %>
-<%! final static private HTablePool pool = new HTablePool(hconf, 60); %>
-<%
-    response.setContentType("text/xml");
-    XssFilter xf = new XssFilter(request);
-    TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-    long start = time.getStartTime();
-    long end = time.getEndTime();
-    String cluster = (String) session.getAttribute("cluster");
-
-    HTableInterface table = pool.getTable("Jobs");
-
-    String family = "summary";
-
-    Scan scan = new Scan();
-    scan.addColumn(family.getBytes(), "jobId".getBytes());
-    scan.addColumn(family.getBytes(), "user".getBytes());
-    scan.addColumn(family.getBytes(), "submitTime".getBytes());
-    scan.addColumn(family.getBytes(), "launchTime".getBytes());
-    scan.addColumn(family.getBytes(), "finishTime".getBytes());
-    scan.addColumn(family.getBytes(), "status".getBytes());
-    scan.setTimeRange(start, end);
-    scan.setMaxVersions();
-
-    ResultScanner results = table.getScanner(scan);
-    Iterator<Result> it = results.iterator();
-    ArrayList<HashMap<String, Object>> events = new ArrayList<HashMap<String, Object>>();
-
-    while(it.hasNext()) {
-      Result result = it.next();
-      HashMap<String, Object> event = new HashMap<String, Object>();
-      event.put("jobId", new String(result.getValue(family.getBytes(), "jobId".getBytes())));
-      event.put("user", new String(result.getValue(family.getBytes(), "user".getBytes())));
-      event.put("submitTime", Long.parseLong(new String(result.getValue(family.getBytes(), "submitTime".getBytes()))));
-      event.put("launchTime", Long.parseLong(new String(result.getValue(family.getBytes(), "launchTime".getBytes()))));
-      event.put("finishTime", Long.parseLong(new String(result.getValue(family.getBytes(), "finishTime".getBytes()))));
-      event.put("status", new String(result.getValue(family.getBytes(), "status".getBytes())));
-      events.add(event);
-    }
-    results.close();
-    table.close();
-
-%>
-<data>
-<%
-    SimpleDateFormat format = new SimpleDateFormat("MMM dd yyyy HH:mm:ss");
-    for(int i=0;i<events.size();i++) {
-      HashMap<String, Object> event = events.get(i);
-      start=(Long)event.get("submitTime");
-      end=(Long)event.get("finishTime");
-      String event_time = format.format(start);
-      String launch_time = format.format((Long)event.get("launchTime"));
-      String event_end_time = format.format(end);
-      String cell = (String) event.get("_event");
-      if(!event.get("status").toString().equals("SUCCEEDED")) {
-%>
-      <event start="<%= event_time %> GMT" latestStart="<%= launch_time %> GMT" end="<%= event_end_time %> GMT" title="Job ID: <%= event.get("jobId") %>" link="/hicc/jsp/job_viewer.jsp?job_id=<%= event.get("jobId") %>" isDuration="true" color="#f00">
-      Job ID: <%= event.get("jobId") %>
-      User: <%= event.get("user") %>
-      Status: <%= event.get("status") %>
-      </event>
-<%
-      } else {
-%>
-      <event start="<%= event_time %> GMT" latestStart="<%= launch_time %> GMT" end="<%= event_end_time %> GMT" title="Job ID: <%= event.get("jobId") %>" link="/hicc/jsp/job_viewer.jsp?job_id=<%= event.get("jobId") %>" isDuration="true">
-      Job ID: <%= event.get("jobId") %>
-      User: <%= event.get("user") %>
-      Status: <%= event.get("status") %>
-      </event>
-<%
-      }
-    } %>
-</data>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/get_data_source.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/get_data_source.jsp b/src/main/web/hicc/jsp/get_data_source.jsp
deleted file mode 100644
index e069f26..0000000
--- a/src/main/web/hicc/jsp/get_data_source.jsp
+++ /dev/null
@@ -1,36 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "org.apache.hadoop.chukwa.extraction.engine.datasource.DsDirectory, org.json.*"  %>
-<%
-       String cluster = (String) session.getAttribute("cluster");
-       if(cluster==null) {
-           cluster="unknown";
-       }
-       JSONArray array = new JSONArray();
-       DsDirectory ds = DsDirectory.getInstance();
-       String[] list = ds.list(cluster);
-       for(String dataSource : list) {
-           JSONObject hash = new JSONObject();
-           hash.put("label", dataSource);
-           hash.put("value", dataSource);
-           array.put(hash);
-       }
-       out.println(array.toString());
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/get_db_data.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/get_db_data.jsp b/src/main/web/hicc/jsp/get_db_data.jsp
deleted file mode 100644
index fdf6c36..0000000
--- a/src/main/web/hicc/jsp/get_db_data.jsp
+++ /dev/null
@@ -1,108 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.text.DecimalFormat" %>
-<%@ page import = "java.text.NumberFormat" %>
-<%@ page import = "java.sql.*" %>
-<%@ page import = "java.io.*" %>
-<%@ page import = "org.json.*" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.util.*" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.ClusterConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.DatabaseWriter" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.Macro" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.DatabaseConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.DatasetMapper"  %> 
-<%
-    /* get the passed in parameters */
-    String table=request.getParameter("table");
-    String startDate=request.getParameter("start"); 	// in long format
-    String endDate=request.getParameter("end");		// in long format
-
-
-    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-    Date startDateObj=new Date(Long.parseLong(startDate));
-    String startDateString = sdf.format(startDateObj);
-
-    Date endDateObj=new Date(Long.parseLong(endDate));
-    String endDateString = sdf.format(endDateObj);
-
-    /* get the query result */
-
-    /* handle special case for other tables: mr_job, mr_task */
-    String timeField="timestamp";
-    if (table.compareToIgnoreCase("mr_job")==0) {
-	timeField="finish_time";
-    } else if (table.compareToIgnoreCase("mr_task")==0) {
-	timeField="finish_time";
-    } 
-    String query="select * from ["+table+"] where "+timeField+" between '"
-	+startDateString+"' and '"+endDateString+"'";
-	
-    Macro m=new Macro(Long.parseLong(startDate),Long.parseLong(endDate),query);
-
-    String cluster="demo";
-    DatabaseWriter db = new DatabaseWriter(cluster);
-
-    String jsonString="[]";
-
-    try {
-	// first get the table
-	DatabaseMetaData meta = db.getConnection().getMetaData();
-	String tableName = m.computeMacro(table);
-
-	ResultSet rsColumns = meta.getColumns(null, null, tableName, null);
-    	ResultSet rs = db.query(m.toString());
-
-	JSONArray ja = new JSONArray();
-
-	while (rs.next()) {
-	    rsColumns.beforeFirst();
-	    JSONObject jo = new JSONObject();
-	    while (rsColumns.next()) {
-		String columnName=rsColumns.getString("COLUMN_NAME");
-		String data_type=rsColumns.getString("TYPE_NAME");
-	        String value="";
-		if (data_type.compareToIgnoreCase("timestamp")==0) {
-		    java.sql.Timestamp ts=rs.getTimestamp(columnName);
-		    value=Long.toString(ts.getTime());
-		} else {	
-		    value=rs.getString(columnName);
-		}
-	 	//out.println(columnName+":"+value+"<br/>");
-		jo.put(columnName, value);
-	    }
-	    ja.put(jo);
-	}
-	db.close();
-
-	/* convert the result set to JSON */
-	jsonString=ja.toString();
-
-    } catch (Exception e) {
-	// cannot execute the query
-    }
-
-    out.println(jsonString);
-
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/get_timezone_list.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/get_timezone_list.jsp b/src/main/web/hicc/jsp/get_timezone_list.jsp
deleted file mode 100644
index a0ee034..0000000
--- a/src/main/web/hicc/jsp/get_timezone_list.jsp
+++ /dev/null
@@ -1,31 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.TimeZone, org.json.*"  %>
-<%  
-String[] tzs = TimeZone.getAvailableIDs();
-JSONArray array = new JSONArray();
-for(String tz : tzs) {
-  JSONObject hash = new JSONObject();
-  hash.put("label", tz);
-  hash.put("value", tz);
-  array.put(hash);
-}
-out.println(array.toString());
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/hadoop_activity.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/hadoop_activity.jsp b/src/main/web/hicc/jsp/hadoop_activity.jsp
deleted file mode 100644
index 15c0d9b..0000000
--- a/src/main/web/hicc/jsp/hadoop_activity.jsp
+++ /dev/null
@@ -1,71 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-  <title>Activity</title>
-  <script src="/hicc/js/processing.js" type="text/javascript" charset="utf-8"></script>
-  <script src="/hicc/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
-  <script src="/hicc/js/activity.js" type="text/javascript" charset="utf-8"></script>
-
-  <style type="text/css" media="screen">
-    body {
-        background: #000;
-        color: #aaa;
-        font-family: Helvetica, sans-serif;
-    }
-    h1 {
-        font-size: 2.5em;
-        margin: 0;
-        margin-top: .5em;
-        text-align: center;
-        color: #eee;
-        font-weight: bold;
-    }
-    #glow {
-      margin: 1em auto;
-      width: 1000px;
-      display: block;
-    }
-    #date {
-      text-align: center;
-      font-size: 1.5em;
-    }
-    #footer {
-        position: absolute;
-        bottom: 1em;
-        right: 1em;
-        font-size: 12px;
-    }
-    #footer a {
-        color: #eee;
-    }
-  </style>
-</head>
-<body>
-<h1>Hadoop activity</h1>
-<canvas id="glow" width="1000" height="500"></canvas>
-<p id="date"></p>
-</body>
-</html>
-


[3/9] chukwa git commit: CHUKWA-777. Added Home page and some widgets for the demo purpose. (Eric Yang)

Posted by ey...@apache.org.
CHUKWA-777. Added Home page and some widgets for the demo purpose. (Eric Yang)


Project: http://git-wip-us.apache.org/repos/asf/chukwa/repo
Commit: http://git-wip-us.apache.org/repos/asf/chukwa/commit/602b55f9
Tree: http://git-wip-us.apache.org/repos/asf/chukwa/tree/602b55f9
Diff: http://git-wip-us.apache.org/repos/asf/chukwa/diff/602b55f9

Branch: refs/heads/master
Commit: 602b55f962657f35baab7a0c2f42de8947f6fb4b
Parents: 253797e
Author: Eric Yang <ey...@apache.org>
Authored: Sat Sep 5 14:14:27 2015 -0700
Committer: Eric Yang <ey...@apache.org>
Committed: Sat Sep 5 20:57:16 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                    |  2 +
 src/main/web/hicc/apps/apps-usage.html         | 56 +++++++++++++++
 src/main/web/hicc/apps/index.html              | 38 +++++++++++
 src/main/web/hicc/apps/pie.js                  | 27 ++++++++
 src/main/web/hicc/clusters/index.html          | 38 +++++++++++
 src/main/web/hicc/home/apps.html               | 76 +++++++++++++++++++++
 src/main/web/hicc/home/clusters.html           | 76 +++++++++++++++++++++
 src/main/web/hicc/home/css/component.css       |  6 ++
 src/main/web/hicc/home/css/jquery.gridster.css |  1 +
 src/main/web/hicc/home/downloads.html          | 76 +++++++++++++++++++++
 src/main/web/hicc/home/index.html              | 29 ++++++--
 src/main/web/hicc/home/js/jquery.gridster.js   |  2 +-
 src/main/web/hicc/home/tile.html               | 34 +++++++--
 src/main/web/hicc/home/users.html              | 76 +++++++++++++++++++++
 src/main/web/hicc/services/services.html       | 76 +++++++++++++++++++++
 src/main/web/hicc/users/index.html             | 38 +++++++++++
 16 files changed, 637 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ca9eefa..d70aa71 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
   NEW FEATURES
 
+    CHUKWA-777. Added Home page and some widgets for the demo purpose. (Eric Yang)
+
     CHUKWA-776. Added Docker support.  (Eric Yang)
 
     CHUKWA-772. Added ChukwaParquetWriter.  (Eric Yang)

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/apps/apps-usage.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/apps/apps-usage.html b/src/main/web/hicc/apps/apps-usage.html
new file mode 100644
index 0000000..4e25506
--- /dev/null
+++ b/src/main/web/hicc/apps/apps-usage.html
@@ -0,0 +1,56 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ -->
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title>Applications Usage</title>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/chartist.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <script src="../js/chartist.min.js" type="text/javascript"></script>
+<style>
+.outer {
+    display: table;
+    position: absolute;
+    height: 100%;
+    width: 100%;
+}
+
+.middle {
+    display: table-cell;
+    vertical-align: middle;
+}
+
+.inner {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+</style>
+  </head>
+  <body>
+    <div class="outer">
+      <div class="middle">
+        <div class="ct-chart ct-perfect-fourth inner"></div>
+      </div>
+    </div>
+    <script src="pie.js"></script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/apps/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/apps/index.html b/src/main/web/hicc/apps/index.html
new file mode 100644
index 0000000..61467ba
--- /dev/null
+++ b/src/main/web/hicc/apps/index.html
@@ -0,0 +1,38 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ -->
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title>Top Applications</title>
+    <link href="/hicc/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="/hicc/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="/hicc/js/jquery.js"></script>
+    <script src="/hicc/js/bootstrap.min.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <table class="table">
+      <tr><th>Top Applications</th><th>Resource Usage</th></tr>
+      <tr><td>Mapreduce</td><td>45%</td></tr>
+      <tr><td>HBase</td><td>29%</td></tr>
+      <tr><td>Hive</td><td>21%</td></tr>
+      <tr><td>Spark</td><td>3%</td></tr>
+      <tr><td>BigSQL</td><td>2%</td></tr>
+      <tr><td>R</td><td>1%</td></tr>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/apps/pie.js
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/apps/pie.js b/src/main/web/hicc/apps/pie.js
new file mode 100644
index 0000000..9f4d72c
--- /dev/null
+++ b/src/main/web/hicc/apps/pie.js
@@ -0,0 +1,27 @@
+var data = {
+  labels: ['Mapreduce', 'HBase', 'Hive', 'Spark', 'BigSQL', 'R'],
+  series: [45, 29, 21,3, 2, 1]
+};
+
+var options = {
+  labelInterpolationFnc: function(value) {
+    return value[0]
+  }
+};
+
+var responsiveOptions = [
+  ['screen and (min-width: 200px)', {
+    chartPadding: 20,
+    labelOffset: 20,
+    labelDirection: 'explode',
+    labelInterpolationFnc: function(value) {
+      return value;
+    }
+  }],
+  ['screen and (min-width: 400px)', {
+    labelOffset: 80,
+    chartPadding: 20
+  }]
+];
+
+new Chartist.Pie('.ct-chart', data, options, responsiveOptions);

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/clusters/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/clusters/index.html b/src/main/web/hicc/clusters/index.html
new file mode 100644
index 0000000..44ce78b
--- /dev/null
+++ b/src/main/web/hicc/clusters/index.html
@@ -0,0 +1,38 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ -->
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title>Top Users</title>
+    <link href="/hicc/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="/hicc/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="/hicc/js/jquery.js"></script>
+    <script src="/hicc/js/bootstrap.min.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <table class="table">
+      <tr><th>Top Active Clusters</th><th>System Load</th></tr>
+      <tr><td>af:00:f3:1a:09:ab</td><td>10.1</td></tr>
+      <tr><td>ef:20:63:1c:05:01</td><td>5.2</td></tr>
+      <tr><td>ef:20:63:1c:05:07</td><td>3.9</td></tr>
+      <tr><td>cd:21:62:b1:45:5a</td><td>2.1</td></tr>
+      <tr><td>4d:11:72:31:14:44</td><td>1.4</td></tr>
+      <tr><td>11:11:99:31:91:94</td><td>0.6</td></tr>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/apps.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/apps.html b/src/main/web/hicc/home/apps.html
new file mode 100644
index 0000000..a281b68
--- /dev/null
+++ b/src/main/web/hicc/home/apps.html
@@ -0,0 +1,76 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--> 
+<!DOCTYPE html>
+<html lang="en" class="no-js">
+  <head>
+    <title>Tile</title>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js" type="text/javascript"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <style>
+      .tile {
+        color: #ffffff;
+        background-color: #5bc0de;
+      }
+      .row {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display:         flex;
+      }
+      .banner {
+        background-color: #ffffff;
+      }
+    </style>
+  </head>
+  <body onResize="resize()">
+    <div class="jumbotron">
+    <div class="container">
+      <div class="row">
+        <div class="col-xs-5 col-md-5 text-center tile">
+            <h2><span class="glyphicon glyphicon-picture" aria-hidden="true"></span></h2>
+            Applications
+        </div>
+        <div class="col-xs-7 col-md-7 text-center banner">
+          <p><h1>409</h1> Running</p>
+        </div>
+      </div>
+    </div>
+    </div>
+
+    <script src="js/jquery.js"></script>
+    <script>
+      var tracker;
+
+      function resize() {
+        clearTimeout(tracker);
+        tracker = setTimeout(render, 50);
+      }
+
+      function render() {
+        document.body.style.overflow = 'hidden';
+        tracker = setTimeout(render, 3000);
+      }
+
+      $( document ).ready(function() {
+        render();
+      });
+    </script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/clusters.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/clusters.html b/src/main/web/hicc/home/clusters.html
new file mode 100644
index 0000000..a7fa49b
--- /dev/null
+++ b/src/main/web/hicc/home/clusters.html
@@ -0,0 +1,76 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--> 
+<!DOCTYPE html>
+<html lang="en" class="no-js">
+  <head>
+    <title>Tile</title>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js" type="text/javascript"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <style>
+      .tile {
+        color: #ffffff;
+        background-color: #5bc0de;
+      }
+      .row {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display:         flex;
+      }
+      .banner {
+        background-color: #ffffff;
+      }
+    </style>
+  </head>
+  <body onResize="resize()">
+    <div class="jumbotron">
+    <div class="container">
+      <div class="row">
+        <div class="col-xs-5 col-md-5 text-center tile">
+            <h2><span class="glyphicon glyphicon-cloud" aria-hidden="true"></span></h2>
+            Clusters
+        </div>
+        <div class="col-xs-7 col-md-7 text-center banner">
+          <p><h1>98</h1> Running</p>
+        </div>
+      </div>
+    </div>
+    </div>
+
+    <script src="js/jquery.js"></script>
+    <script>
+      var tracker;
+
+      function resize() {
+        clearTimeout(tracker);
+        tracker = setTimeout(render, 50);
+      }
+
+      function render() {
+        document.body.style.overflow = 'hidden';
+        tracker = setTimeout(render, 3000);
+      }
+
+      $( document ).ready(function() {
+        render();
+      });
+    </script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/css/component.css
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/css/component.css b/src/main/web/hicc/home/css/component.css
index 9828873..9b4bcec 100755
--- a/src/main/web/hicc/home/css/component.css
+++ b/src/main/web/hicc/home/css/component.css
@@ -457,6 +457,12 @@ input.gn-search:focus {
 		content: "\e017";
 }
 
+.gn-icon-home::before {
+		font-family: 'Glyphicons Halflings';
+		font-size: 18px;
+		content: "\e021";
+}
+
 .gn-username {
 		font-family: 'Helvetica Neue', Arial, sans-serif;
 }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/css/jquery.gridster.css
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/css/jquery.gridster.css b/src/main/web/hicc/home/css/jquery.gridster.css
index a0f3acf..ee40430 100755
--- a/src/main/web/hicc/home/css/jquery.gridster.css
+++ b/src/main/web/hicc/home/css/jquery.gridster.css
@@ -257,6 +257,7 @@ li iframe {
   width: 100%;
   height: 100%;
   border: 0px;
+  overflow: hidden;
 }
 
 .tt-dropdown-menu {

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/downloads.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/downloads.html b/src/main/web/hicc/home/downloads.html
new file mode 100644
index 0000000..f8d4353
--- /dev/null
+++ b/src/main/web/hicc/home/downloads.html
@@ -0,0 +1,76 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--> 
+<!DOCTYPE html>
+<html lang="en" class="no-js">
+  <head>
+    <title>Tile</title>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js" type="text/javascript"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <style>
+      .tile {
+        color: #ffffff;
+        background-color: #5bc0de;
+      }
+      .row {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display:         flex;
+      }
+      .banner {
+        background-color: #ffffff;
+      }
+    </style>
+  </head>
+  <body onResize="resize()">
+    <div class="jumbotron">
+    <div class="container">
+      <div class="row">
+        <div class="col-xs-5 col-md-5 text-center tile">
+            <h2><span class="glyphicon glyphicon-download" aria-hidden="true"></span></h2>
+            Trial
+        </div>
+        <div class="col-xs-7 col-md-7 text-center banner">
+          <p><h1>208</h1> Downloads</p>
+        </div>
+      </div>
+    </div>
+    </div>
+
+    <script src="js/jquery.js"></script>
+    <script>
+      var tracker;
+
+      function resize() {
+        clearTimeout(tracker);
+        tracker = setTimeout(render, 50);
+      }
+
+      function render() {
+        document.body.style.overflow = 'hidden';
+        tracker = setTimeout(render, 3000);
+      }
+
+      $( document ).ready(function() {
+        render();
+      });
+    </script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/index.html b/src/main/web/hicc/home/index.html
index 38578bd..37656cc 100755
--- a/src/main/web/hicc/home/index.html
+++ b/src/main/web/hicc/home/index.html
@@ -34,7 +34,7 @@
     <script src="js/jquery.gridster.js" type="text/javascript" charset="utf-8"></script>
     <script src="js/typeahead.bundle.js" type="text/javascript"></script>
   </head>
-  <body onunload="">
+  <body>
     <div id="glass" class="glass" onclick="toggleGlass()"></div>
     <div class="frame">
       <ul><li><iframe id="frame"></iframe></li></ul>
@@ -51,7 +51,8 @@
                   <input placeholder="Search" id="url" type="search" class="gn-search">
                   <a class="gn-icon gn-icon-search"><span>Search</span></a>
                 </li>
-                <li><a class="gn-icon gn-icon-illustrator" onclick="setDashboard('default')">User Activities</a></li>
+                <li><a class="gn-icon gn-icon-home" onclick="setDashboard('default')">Home</a></li>
+                <li><a class="gn-icon gn-icon-illustrator" onclick="setDashboard('user')">User Activities</a></li>
                 <li><a class="gn-icon gn-icon-article" onclick="setDashboard('system')">System Activities</a></li>
                 <li><a class="gn-icon gn-icon-pictures" onclick="showFrame('graph-explorer.html')">Graph Explorer</a></li>
                 <li><a class="gn-icon gn-icon-cog" onclick="showFrame('settings')">Settings</a></li>
@@ -80,7 +81,7 @@
     <script src="js/classie.js"></script>
     <script src="js/gnmenu.js"></script>
     <script>
-
+window.onunload = function(){};
 var dashboard = 'default';
 var widgets = [];
 var widgetsToUrl = {};
@@ -224,9 +225,25 @@ function showFrame(target) {
   gnMenu._closeMenu();
 }
 
+// Read a page's GET URL variables and return them as an associative array.
+function getUrlVars()
+{
+    var vars = [], hash;
+    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+    for(var i = 0; i < hashes.length; i++)
+    {
+        hash = hashes[i].split('=');
+        vars.push(hash[0]);
+        vars[hash[0]] = hash[1];
+    }
+    return vars;
+}
+
 var gnMenu = new gnMenu( document.getElementById( 'gn-menu' ) );
 $(function(){ //DOM Ready
-
+  if(getUrlVars()['view']!=null) {
+    dashboard = getUrlVars()['view'];
+  }
   $.getJSON('/hicc/v1/session/key/period',
     function(data) {
       var value = (data['period'] == null) ? "last1hr" : data['period'];
@@ -256,7 +273,7 @@ $(function(){ //DOM Ready
 
   $.getJSON('/hicc/v1/session/key/dashboard',
     function(data) {
-      var value = (data['dashboard'] == null) ? "default" : data['dashboard'];
+      var value = (data['dashboard'] != null) ? data['dashboard'] : "default";
       dashboard = value;
       load();
     }
@@ -281,7 +298,7 @@ function logout() {
     url: '/hicc/logout',
     success: function(data) {
       document.cookie = 'JSESSIONID=;path=/hicc;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
-      window.location.assign("/hicc/login.jsp");
+      window.location.assign("/hicc/v1/login/check");
     }
   });
 }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/js/jquery.gridster.js
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/js/jquery.gridster.js b/src/main/web/hicc/home/js/jquery.gridster.js
index 1276676..0f61c44 100755
--- a/src/main/web/hicc/home/js/jquery.gridster.js
+++ b/src/main/web/hicc/home/js/jquery.gridster.js
@@ -1198,7 +1198,7 @@
 
             this.empty_cells(col, row, size_x, size_y);
         }
-        var html = '<li><iframe src="'+url+'"/></li>';
+        var html = '<li><iframe src="'+url+'" seamless /></li>';
         var $w = $(html).attr({
                 'data-col': pos.col,
                 'data-row': pos.row,

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/tile.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/tile.html b/src/main/web/hicc/home/tile.html
index 1fc905e..cf1aa91 100644
--- a/src/main/web/hicc/home/tile.html
+++ b/src/main/web/hicc/home/tile.html
@@ -19,18 +19,38 @@
 <html lang="en" class="no-js">
   <head>
     <title>Tile</title>
-    <link href="../../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
-    <link href="../../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
-    <script src="../../js/jquery.js" type="text/javascript"></script>
-    <script src="../../js/bootstrap.min.js" type="text/javascript"></script>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js" type="text/javascript"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <style>
+      .tile {
+        color: #ffffff;
+        background-color: #5bc0de;
+      }
+      .row {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display:         flex;
+      }
+    </style>
   </head>
   <body onResize="resize()">
-    <div class="container-fluid">
+    <div class="jumbotron">
+    <div class="container">
       <div class="row">
-        <div class=".col-xs-1 .col-sm-1 .col-md-1 .col-lg-1 glyhicon-hdd"></div>
-        <div class=".col-xs-1 .col-sm-2 .col-md-2 .col-lg-2">1000</div>
+        <div class="col-xs-5 col-md-5 text-center tile">
+            <h2><span class="glyphicon glyphicon-picture" aria-hidden="true"></span></h2>
+            Applications
+        </div>
+        <div class="col-xs-7 col-md-7 text-center">
+          <p><h1>4</h1> Running</p>
+        </div>
       </div>
     </div>
+    </div>
+
     <script src="js/jquery.js"></script>
     <script>
       var tracker;

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/home/users.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/users.html b/src/main/web/hicc/home/users.html
new file mode 100644
index 0000000..0a62948
--- /dev/null
+++ b/src/main/web/hicc/home/users.html
@@ -0,0 +1,76 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--> 
+<!DOCTYPE html>
+<html lang="en" class="no-js">
+  <head>
+    <title>Tile</title>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js" type="text/javascript"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <style>
+      .tile {
+        color: #ffffff;
+        background-color: #5bc0de;
+      }
+      .row {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display:         flex;
+      }
+      .banner {
+        background-color: #ffffff;
+      }
+    </style>
+  </head>
+  <body onResize="resize()">
+    <div class="jumbotron">
+    <div class="container">
+      <div class="row">
+        <div class="col-xs-5 col-md-5 text-center tile">
+            <h2><span class="glyphicon glyphicon-user" aria-hidden="true"></span></h2>
+            Users
+        </div>
+        <div class="col-xs-7 col-md-7 text-center banner">
+          <p><h1>25</h1> Working</p>
+        </div>
+      </div>
+    </div>
+    </div>
+
+    <script src="js/jquery.js"></script>
+    <script>
+      var tracker;
+
+      function resize() {
+        clearTimeout(tracker);
+        tracker = setTimeout(render, 50);
+      }
+
+      function render() {
+        document.body.style.overflow = 'hidden';
+        tracker = setTimeout(render, 3000);
+      }
+
+      $( document ).ready(function() {
+        render();
+      });
+    </script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/services/services.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/services/services.html b/src/main/web/hicc/services/services.html
new file mode 100644
index 0000000..70ef63e
--- /dev/null
+++ b/src/main/web/hicc/services/services.html
@@ -0,0 +1,76 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--> 
+<!DOCTYPE html>
+<html lang="en" class="no-js">
+  <head>
+    <title>Tile</title>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js" type="text/javascript"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <style>
+      .tile {
+        color: #ffffff;
+        background-color: #5bc0de;
+      }
+      .row {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display:         flex;
+      }
+      .banner {
+        background-color: #ffffff;
+      }
+    </style>
+  </head>
+  <body onResize="resize()">
+    <div class="jumbotron">
+    <div class="container">
+      <div class="row">
+        <div class="col-xs-5 col-md-5 text-center tile">
+            <h2><span class="glyphicon glyphicon-credit-card" aria-hidden="true"></span></h2>
+            Services
+        </div>
+        <div class="col-xs-7 col-md-7 text-center banner">
+          <p><h1>9</h1> Running</p>
+        </div>
+      </div>
+    </div>
+    </div>
+
+    <script src="js/jquery.js"></script>
+    <script>
+      var tracker;
+
+      function resize() {
+        clearTimeout(tracker);
+        tracker = setTimeout(render, 50);
+      }
+
+      function render() {
+        document.body.style.overflow = 'hidden';
+        tracker = setTimeout(render, 3000);
+      }
+
+      $( document ).ready(function() {
+        render();
+      });
+    </script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/602b55f9/src/main/web/hicc/users/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/users/index.html b/src/main/web/hicc/users/index.html
new file mode 100644
index 0000000..a8585d4
--- /dev/null
+++ b/src/main/web/hicc/users/index.html
@@ -0,0 +1,38 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ -->
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title>Top Users</title>
+    <link href="/hicc/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="/hicc/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="/hicc/js/jquery.js"></script>
+    <script src="/hicc/js/bootstrap.min.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <table class="table">
+      <tr><th>Top Users</th><th>Bytes Processed</th></tr>
+      <tr><td>John</td><td>12 TB<td></tr>
+      <tr><td>Frank</td><td>3 TB</td></tr>
+      <tr><td>Kevin</td><td>900 GB</td></tr>
+      <tr><td>Phoebe</td><td>890 GB</td></tr>
+      <tr><td>Jim</td><td>500 GB</td></tr>
+      <tr><td>Standley</td><td>121 GB</td></tr>
+    </table>
+  </body>
+</html>


[7/9] chukwa git commit: CHUKWA-779. Remove support for JSP pages. (Eric Yang)

Posted by ey...@apache.org.
http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/swimlanes-event-data-js.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/swimlanes-event-data-js.jsp b/src/main/web/hicc/jsp/swimlanes-event-data-js.jsp
deleted file mode 100644
index 1fa956b..0000000
--- a/src/main/web/hicc/jsp/swimlanes-event-data-js.jsp
+++ /dev/null
@@ -1,302 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Calendar, java.util.Date, java.sql.*, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*,java.lang.Math, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.lang.StringBuilder, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.util.DatabaseWriter, org.apache.hadoop.chukwa.database.Macro, org.apache.hadoop.chukwa.database.DatabaseConfig, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page session="true" %> 
-<%
-HashMap<String, String> state_colours = new HashMap<String, String>();
-state_colours.put("map","#0000cc");
-state_colours.put("reduce","#00cc00");
-state_colours.put("reduce_reducer", "#ff0000");
-state_colours.put("reduce_shufflewait", "#330000");
-state_colours.put("reduce_sort", "#990000");
-String defaultcolour = new String("#333333");
-
-response.setContentType("text/javascript");
-
-XssFilter xf = new XssFilter(request);
-TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-long start = time.getStartTime();
-long end = time.getEndTime();
-String cluster = (String) session.getAttribute("cluster");
-String table = "mapreduce_fsm";
-
-if(xf.getParameter("event_type")!=null) {
-  table = xf.getParameter("event_type");
-}
-String query = "select job_id,friendly_id,start_time,finish_time,start_time_millis,finish_time_millis,status,state_name,hostname from ["+table+"] where finish_time between '[start]' and '[end]'";
-Macro mp = new Macro(start,end,query, request);
-query = mp.toString() + " order by start_time";
-
-out.print("/" + "/" + "swimlanes: " + mp.toString() + " cluster: " + cluster);
-
-ArrayList<HashMap<String, Object>> events = new ArrayList<HashMap<String, Object>>();
-
-Connection conn = null;
-Statement stmt = null;
-ResultSet rs = null;
-
-DatabaseWriter dbw = new DatabaseWriter(cluster);
-try {
-  rs = dbw.query(query);
-  ResultSetMetaData rmeta = rs.getMetaData();
-  int col = rmeta.getColumnCount();
-  while (rs.next()) {
-    HashMap<String, Object> event = new HashMap<String, Object>();
-    long event_time=0;
-    for(int i=1;i<=col;i++) {
-      if(rmeta.getColumnType(i)==java.sql.Types.TIMESTAMP) {
-        event.put(rmeta.getColumnName(i),rs.getTimestamp(i).getTime());
-      } else {
-        event.put(rmeta.getColumnName(i),rs.getString(i));
-      }
-    }
-    events.add(event);
-  }
-} catch (SQLException ex) {
-  // handle any errors
-  //out.println("SQLException: " + ex.getMessage());
-  //out.println("SQLState: " + ex.getSQLState());
-  //out.println("VendorError: " + ex.getErrorCode());
-} finally {
-  // it is a good idea to release
-  // resources in a finally{} block
-  // in reverse-order of their creation
-  // if they are no-longer needed
-  dbw.close();
-}
-%>
-$(function () {
-<%
-  SimpleDateFormat format = new SimpleDateFormat("MMM dd yyyy HH:mm:ss");
-  HashMap<String, Integer> reduce_ytick_ids = new HashMap<String, Integer>();
-
-  StringBuilder opts_colour_string, opts_series_string, opts_data_string;
-  opts_colour_string = new StringBuilder();
-  opts_series_string = new StringBuilder();
-  opts_data_string = new StringBuilder("[");
-
-  StringBuilder withstart_points_series_string = new StringBuilder();
-  StringBuilder nostart_points_series_string = new StringBuilder();
-  StringBuilder start_points_data_string = new StringBuilder();
-  StringBuilder start_points_colour_string = new StringBuilder();
-
-  StringBuilder lookupFunctionString = new StringBuilder();
-
-  out.println("/" + "/" + events.size() + " results returned.");
-  int unique_plot_yticks = 0;
-  int global_ycounter = 1;
-
-%> $("#resultcountholder").text("<%= events.size() %> states returned.");
-<%
-
-  int start_millis = 0, end_millis = 0;
-  for(int i=0;i<events.size();i++) {
-    HashMap<String, Object> event = events.get(i);
-    start=(Long)event.get("start_time");
-    end=(Long)event.get("finish_time");
-    String event_time = format.format(start);
-    String launch_time = format.format(event.get("start_time"));
-    String event_end_time = format.format(end);
-    String cell = (String) event.get("state_name");
-    start_millis = Integer.parseInt(((String)event.get("start_time_millis")));
-    end_millis = Integer.parseInt(((String)event.get("finish_time_millis")));
-
-    String colourstring = null;
-    if (state_colours.containsKey(cell)) {
-      colourstring = state_colours.get(cell);
-    } else {
-      colourstring = defaultcolour;
-    }
-    %>// <%= event.get("friendly_id") %>
-<%
-  float ytick;
-  if (cell.startsWith("reduce")) { 
-    Integer thenum = null;
-    thenum = reduce_ytick_ids.get((String)event.get("friendly_id"));
-    if (thenum != null) {
-      ytick = thenum.intValue();%> // old
-<%      
-    } else {
-      ytick = global_ycounter;
-      reduce_ytick_ids.put((String)event.get("friendly_id"),new Integer(global_ycounter));
-      global_ycounter++; %> // new
-<%
-    } 
-    if (cell.endsWith("reducer")) {
-      ytick += 0.75;
-    } else if (cell.endsWith("sort")) {
-      ytick += 0.5;
-    } else if (cell.endsWith("shufflewait")) {
-      ytick += 0.25;
-    }
-%> var d<%= i %> = [[<%= start %>,<%= ytick %>],[<%= end %>,<%= ytick %>]];
-<%   
-  } else { 
-    ytick = global_ycounter;
-%> var d<%= i %> = [[<%= start %>,<%= global_ycounter %>],[<%= end %>,<%= global_ycounter %>]];
-<%
-    global_ycounter++;
-  }
-
-%> var ds<%= i %> = [[<%= start %>,<%= ytick %>]];
-<%
-  start_points_data_string.append(",");
-  start_points_data_string.append("ds");
-  start_points_data_string.append(i);
-  
-  lookupFunctionString.append("if (y == ");
-  lookupFunctionString.append(ytick);
-  lookupFunctionString.append(" ) {\n");
-  lookupFunctionString.append("return '");
-  lookupFunctionString.append("State: ");
-  lookupFunctionString.append(event.get("state_name"));
-  lookupFunctionString.append(" / Status: ");
-  lookupFunctionString.append(event.get("status"));
-  lookupFunctionString.append(" <br />");
-  lookupFunctionString.append("Host: ");
-  lookupFunctionString.append(event.get("hostname"));
-  lookupFunctionString.append(" <br />");
-  lookupFunctionString.append("Duration: ");
-  lookupFunctionString.append((end-start)+(end_millis-start_millis));
-  lookupFunctionString.append("ms <br />");
-  lookupFunctionString.append("[");
-  lookupFunctionString.append(event.get("friendly_id"));
-  lookupFunctionString.append("]");
-  lookupFunctionString.append("';\n");
-  lookupFunctionString.append("}\n");
-
-  opts_series_string.append("lines: { show:true }, \n");
-  withstart_points_series_string.append("points: {show:true}, \n");
-  nostart_points_series_string.append("points: {show:false}, \n");
-  if (i > 0) opts_colour_string.append(", ");
-  opts_colour_string.append("\"");
-  opts_colour_string.append(colourstring);
-  opts_colour_string.append("\"");
-  start_points_colour_string.append(",");
-  start_points_colour_string.append("\"");
-  start_points_colour_string.append(colourstring);
-  start_points_colour_string.append("\"");
-  if (i > 0) opts_data_string.append(", ");
-  opts_data_string.append("d");
-  opts_data_string.append(i);     
-} 
-
-StringBuilder opts_data_withstart_string = new StringBuilder(opts_data_string.toString());
-opts_data_withstart_string.append(start_points_data_string.toString());
-opts_data_string.append("];");
-opts_data_withstart_string.append("];");
-%>
-var data = <%= opts_data_string.toString() %>
-var data_withstart = <%= opts_data_withstart_string.toString() %>
-var options_withstart = {
-  legend: { show: true, container: $("#legend") },
-  colors: [ <%= opts_colour_string.toString() %>],
-  shadowSize: 0, 
-  xaxis: { mode: "time", timeformat: "%H%M.%S" }, 
-  yaxis: { autoscaleMargin: 0 },
-  <%= opts_series_string.toString() %> 
-  <%= withstart_points_series_string.toString() %> selection: { mode: "xy" }
-};
-
-var options_small = {
-  legend: { show: true, container: $("#legend") },
-  colors: [ <%= opts_colour_string.toString() %> ], 
-  shadowSize: 0, 
-  xaxis: { mode: "time", timeformat: "%H:%M" }, 
-  yaxis: { autoscaleMargin: 0 },
-  <%= opts_series_string.toString() %> 
-  <%= nostart_points_series_string.toString() %> selection: { mode: "xy" }
-};
-
-
-var placeholder = $("#placeholder");
-var plot = $.plot(placeholder, data_withstart, options_withstart);
-
-var smallplotplaceholder = $("#smallplotplaceholder");
-var smallplot = $.plot(smallplotplaceholder, data_withstart, options_small);
-
-placeholder.bind("plotselected", function (event, ranges) {
-  if (ranges.xaxis.to - ranges.xaxis.from < 0.00001)
-    ranges.xaxis.to = ranges.xaxis.from + 0.00001;
-  if (ranges.yaxis.to - ranges.yaxis.from < 0.00001)
-    ranges.yaxis.to = ranges.yaxis.from + 0.00001;
-
-  plot = $.plot(placeholder, data_withstart,
-    $.extend(true, {}, options_withstart, {
-    grid: { hoverable: true },
-    xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to }, 
-    yaxis: { min: ranges.yaxis.from, max: ranges.yaxis.to },
-    }
-  )
-);
-
-// don't fire event on the overview to prevent eternal loop
-smallplot.setSelection(ranges, true);
-
-});
-
-smallplotplaceholder.bind("plotselected", function (event, ranges) {
-  plot.setSelection(ranges);
-});
-
-function lookupStateInfo(y) {
-  <%= lookupFunctionString %>
-}
-
-function showTooltip(x, y, contents) {
-  $('<div id="tooltip">' + contents + '</div>').css( {
-    position: 'absolute',
-    display: 'none',
-    top: y + 5,
-    left: x + 5,
-    border: '1px solid #fdd',
-    padding: '2px',
-    'background-color': '#fee',
-    opacity: 0.80
-  }).appendTo("body").fadeIn(200);
-}
-
-
-// Hover text
-var previousPoint = null;
-$("#placeholder").bind("plothover", function (event, pos, item) {
-  if (item) {
-    if (previousPoint != item.datapoint) {
-      previousPoint = item.datapoint;
-
-      $("#tooltip").remove();
-      var x = item.datapoint[0].toFixed(2),
-      y = item.datapoint[1].toFixed(2);
-
-      showTooltip(item.pageX, item.pageY, lookupStateInfo(item.datapoint[1]));
-
-    } else {
-      $("#tooltip").remove();
-      previousPoint = null;            
-    }
-  }
-});       
-
-$("#clearSelection").click(function () {
-    plot.clearSelection();
-  }
-);   
-
-});

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/swimlanes-static.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/swimlanes-static.jsp b/src/main/web/hicc/jsp/swimlanes-static.jsp
deleted file mode 100644
index 83b3a04..0000000
--- a/src/main/web/hicc/jsp/swimlanes-static.jsp
+++ /dev/null
@@ -1,70 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "org.apache.hadoop.chukwa.analysis.salsa.visualization.Swimlanes" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.ImageSlicer" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.ExceptionUtil" %>
-<%@ page import = "java.io.FileOutputStream" %>
-<%@ page import = "java.io.File" %>
-<%@ page import = "java.util.HashMap" %>
-<%@ page import = "java.util.HashMap" %>
-<%@ page import = "org.apache.commons.logging.Log" %>
-<%@ page import = "org.apache.commons.logging.LogFactory" %>
-<%
-   Log log = LogFactory.getLog(Swimlanes.class);
-   XssFilter xf = new XssFilter(request);
-   String boxId = xf.getParameter("boxId");
-   int max = 0;
-   try {
-     StringBuilder fileName = new StringBuilder();
-     fileName.append(System.getenv("CHUKWA_HOME"));
-     fileName.append(File.separator);
-     fileName.append("webapps");
-     fileName.append(File.separator);
-     fileName.append("sandbox");
-     fileName.append(File.separator);
-     fileName.append(boxId);
-     fileName.append(xf.getParameter("_s"));
-     fileName.append(".png");
-     StringBuilder baseFileName = new StringBuilder();
-     baseFileName.append(boxId);
-     baseFileName.append(xf.getParameter("_s"));
-     baseFileName.append(".png");
- 
-     FileOutputStream fos = new FileOutputStream(fileName.toString());
-
-     Swimlanes sw = new Swimlanes(request);
-     sw.run();
-     if(sw.getImage(fos,"PNG", 1.0)) {
-       fos.close();
-       ImageSlicer slicer = new ImageSlicer();
-       max = slicer.process(baseFileName.toString());
-     }
-     RequestDispatcher disp = getServletContext().getRequestDispatcher("/jsp/image-viewer.jsp");
-     request.setAttribute("image-viewer",baseFileName.toString());
-     request.setAttribute("maxLevel",max);
-     disp.forward(request, response);
-   } catch(Exception e) {
-     response.setHeader("boxId", xf.getParameter("boxId"));
-     response.setContentType("text/html; chartset=UTF-8//IGNORE");
-     out.println("No data available.");
-     log.error(ExceptionUtil.getStackTrace(e));
-   }
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/swimlanes.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/swimlanes.jsp b/src/main/web/hicc/jsp/swimlanes.jsp
deleted file mode 100644
index 7ba47df..0000000
--- a/src/main/web/hicc/jsp/swimlanes.jsp
+++ /dev/null
@@ -1,72 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Calendar, java.util.Date, java.sql.*, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*,java.lang.Math, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.lang.StringBuilder, org.apache.hadoop.chukwa.util.XssFilter" %>
-  <% response.setContentType("text/html"); %>
-  <html><head> 
-
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
-      <title>2D Spectrum Viewer</title> 
-      <link href="/hicc/css/heatmap/layout.css" rel="stylesheet" type="text/css"> 
-        <script language="javascript" type="text/javascript" src="/hicc/js/jquery-1.3.2.min.js"></script>
-        <script language="javascript" type="text/javascript" src="/hicc/js/jquery.flot.pack.js"></script>
-
-        <script language="javascript" type="text/javascript" src="/hicc/js/excanvas.pack.js"></script>
-        <script>
-          function activateplot()
-          {
-          document.getElementById('clearSelection').click();
-          }
-        </script>
-        <script id="source" language="javascript" type="text/javascript" src="swimlanes-event-data-js.jsp"> 
-        </script> 
-      </head><div FirebugVersion="1.3.3" style="display: none;" id="_firebugConsole"></div><body onload="activateplot()">
-      <table cellpadding="0" cellspacing="0">
-        <tbody>
-          <tr>
-
-            <td align="right" valign="top" rowspan="2"><div id="placeholder" style="width: 600px; height: 400px; position: relative;"><canvas width="600" height="400"></canvas><canvas style="position: absolute; left: 0px; top: 0px;" width="600" height="400"></canvas></div></td>
-
-            <td rowspan="2"><div style="width:10px">&nbsp;</div></td>
-
-            <td><div id="smallplotplaceholder", style="width:166px;height:100px;"><canvas style="position: absolute; left: 0px; top: 0px;" width="166" height="100"></canvas></div></td>
-
-          </tr>
-
-          <tr>
-            <td align="right">
-
-              <span id="resultcountholder">No results returned. </span>
-
-              <br />
-
-              <table cellpadding="0" cellspacing="2"><tbody>
-                <tr><th colspan="2">Legend</th></tr>
-                <tr><td bgcolor="#0000cc">&nbsp;&nbsp;</td><td>Map</td></tr>
-                <tr><td bgcolor="#00cc00">&nbsp;&nbsp;</td><td>Reduce</td></tr>
-                <tr><td bgcolor="#ff0000">&nbsp;&nbsp;</td><td>Reduce-ShuffleWait</td></tr>
-                <tr><td bgcolor="#330000">&nbsp;&nbsp;</td><td>Reduce-Sort</td></tr>
-                <tr><td bgcolor="#990000">&nbsp;&nbsp;</td><td>Reduce-Reducer</td></tr>
-                <tr><td bgcolor="#333333">&nbsp;&nbsp;</td><td>Other</td></tr>
-              </tbody></table>
-            </td>
-          </tr>
-
-        </tbody></table> 
-      </body></html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/swimlanes_viewer.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/swimlanes_viewer.jsp b/src/main/web/hicc/jsp/swimlanes_viewer.jsp
deleted file mode 100644
index d99b44a..0000000
--- a/src/main/web/hicc/jsp/swimlanes_viewer.jsp
+++ /dev/null
@@ -1,25 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = " org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
- %>
-<IFRAME id="<%= xf.getParameter("boxId") %>iframe" src="/hicc/jsp/swimlanes.jsp?<%= xf.filter(request.getQueryString()) %>" width="100%" frameborder="0" height="800" scrolling="yes"></IFRAME>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/table.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/table.jsp b/src/main/web/hicc/jsp/table.jsp
deleted file mode 100644
index 2576925..0000000
--- a/src/main/web/hicc/jsp/table.jsp
+++ /dev/null
@@ -1,71 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.sql.*" %>
-<%@ page import = "java.text.NumberFormat" %>
-<%@ page import = "java.util.Hashtable" %>
-<%@ page import = "java.util.Enumeration" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.DatabaseWriter" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.Macro" %>
-<%
-  RequestDispatcher disp = null;
-  XssFilter xf = new XssFilter(request);
-  response.setContentType("text/html; chartset=UTF-8//IGNORE");
-  response.setHeader("boxId", xf.getParameter("boxId"));
-  String cluster = (String) session.getAttribute("cluster");
-  DatabaseWriter dbw = new DatabaseWriter(cluster);
-
-  TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-  long start = time.getStartTime();
-  long end = time.getEndTime();
-
-  Macro mp = new Macro(start,end,request.getParameter("query"));
-  String query = mp.toString();
-  ResultSet rs = dbw.query(query);
-  ResultSetMetaData rmeta = rs.getMetaData();
-  int col = rmeta.getColumnCount();
-  rs.last();
-  int size = rs.getRow();
-  StringBuilder url = new StringBuilder();
-  url.append("/jsp/table_viewer.jsp?");
-  url.append("total=");
-  url.append(size);
-  url.append("&boxId=");
-  url.append(xf.getParameter("boxId"));
-  url.append("&report=/hicc/jsp/query.jsp&height=");
-  url.append(xf.getParameter("height"));
-  url.append("&query=");
-  StringBuilder qid = new StringBuilder();
-  qid.append("query_");
-  qid.append(xf.getParameter("boxId"));
-  session.setAttribute(qid.toString(),request.getParameter("query"));
-  for(int i=1;i<=col;i++) {
-    url.append("&column=");
-    url.append(rmeta.getColumnName(i));
-    url.append("&columnSize=200");
-    url.append("&columnAlign=left");
-  }
-  disp = getServletContext( ).getRequestDispatcher(url.toString());
-  disp.forward(request, response);
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/table_viewer.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/table_viewer.jsp b/src/main/web/hicc/jsp/table_viewer.jsp
deleted file mode 100644
index 799a9e7..0000000
--- a/src/main/web/hicc/jsp/table_viewer.jsp
+++ /dev/null
@@ -1,85 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
-   response.setContentType("text/html; chartset=UTF-8//IGNORE");
-%>
-<%@ page import = "java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.extraction.engine.*, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.util.XssFilter" %>
-<% String filter=(String)session.getAttribute("filter");
-   if(filter==null) {
-     filter="";
-   } 
-   int height = Integer.parseInt(xf.getParameter("height")) - 65;
-   String url = request.getQueryString();
-   StringBuffer tmp = new StringBuffer();
-   tmp.append(xf.getParameter("report"));
-   tmp.append("?");
-   tmp.append(url);
-   url = tmp.toString();
-   String[] columns = xf.getParameterValues("column");
-   String[] columnsSize = xf.getParameterValues("columnSize");
-   String[] columnsAlign = xf.getParameterValues("columnAlign");
-   if(columnsSize==null) {
-     columnsSize = new String[columns.length];
-     for(int i=0;i<columns.length;i++) {
-       columnsSize[i]=""+columns[i].length()*12;
-     }
-   }
-   if(columnsAlign==null) {
-     columnsAlign = new String[columns.length];
-     for(int i=0;i<columns.length;i++) {
-       columnsAlign[i]="center";
-     }
-   }
-%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-<link href="/hicc/css/flexigrid/flexigrid.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="/hicc/js/jquery-1.3.2.min.js"></script>
-<script type="text/javascript" src="/hicc/js/flexigrid.js"></script>
-</head>
-<body>
-<div class="flexigrid"><table id="flex1" style="display:none"></table></div>
-<script type="text/javascript">
-$(document).ready(function(){
-  $('#flex1').flexigrid({
-    url: '<%= url %>',
-    dataType: 'json',
-    colModel : [
-<% for(int i=0;i<columns.length;i++) { %>
-    { display: '<%= columns[i] %>', name: '<%= columns[i] %>', width: '<%= columnsSize[i] %>', sortable: true, align:'<%= columnsAlign[i] %>'}, 
-<% } %>
-    ],
-    sortorder: "asc",
-    usepager: true,
-    useRp: false,
-    rp: 15,
-    striped:false,
-    showTableToggleBtn: true,
-    width: 'auto',
-    height: <%= height %>
-  });
-});
-</script>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/time.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/time.jsp b/src/main/web/hicc/jsp/time.jsp
deleted file mode 100644
index 7471e96..0000000
--- a/src/main/web/hicc/jsp/time.jsp
+++ /dev/null
@@ -1,50 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Hashtable, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setContentType("text/html; chartset=UTF-8//IGNORE");
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<% 
-   if(request.getParameter("time_zone")!=null) {
-       session.setAttribute("time_zone",xf.getParameter("time_zone"));
-   }
-   String timeType="combo";
-   if(request.getParameter("time_type")!=null) {
-       timeType=xf.getParameter("time_type");
-   }
-   if(((String)request.getHeader("user-agent")).indexOf("iPhone")>0) {
-%>
-       <jsp:include page="workspace/time_iphone.jsp" flush="true" />
-<%
-   } else if(timeType.equals("date")) {
-%>
-       <jsp:include page="time_frame.jsp" flush="true" />
-<%
-   } else if(timeType.equals("range")) {
-%>
-       <jsp:include page="time_range.jsp" flush="true" />
-<%
-   } else if(timeType.equals("slider")) {
-%>
-       <jsp:include page="time_slider_wrapper.jsp" flush="true" />
-<%
-   } %>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/time_frame.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/time_frame.jsp b/src/main/web/hicc/jsp/time_frame.jsp
deleted file mode 100644
index a052cdf..0000000
--- a/src/main/web/hicc/jsp/time_frame.jsp
+++ /dev/null
@@ -1,61 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Hashtable, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<% String boxId = xf.getParameter("boxId");
-   TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-%>
-<table width="100%" class="clear_table">
-<tr><td align="center">
-<a href="#" onclick="return false;" id="<%= boxId %>previous"><img src="/hicc/images/arrow_left.png" border="0"></a>
-</td><td align="center">
-<a href="#" onclick="return false;" id="<%= boxId %>today">Today</a>
-</td><td align="center">
-<a href="#" onclick="return false;" id="<%= boxId %>next"><img src="/hicc/images/arrow_right.png" border="0"></a>
-</td></tr>
-<tr><td colspan="3" align="center">
-<div id="<%= boxId %>calendars" class="timeframe_calendar"></div>
-</td></tr>
-<tr><td colspan="3" align="center">
-<span>
-  <input type="text" name="<%= boxId %>start" value="<%= time.getStartDate("MMMMM dd, yyyy") %>" id="<%= boxId %>start" size="10"/>
-  &ndash;
-  <input type="text" name="<%= boxId %>end" value="<%= time.getEndDate("MMMMM dd, yyyy") %>" id="<%= boxId %>end" size="10"/>
-</span>
-</td></tr>
-</table>
-<div style="display:none"><a href="#" onclick="return false;" id="<%= boxId %>reset">Reset</a></a></div>
-<input type="button" name="<%=boxId%>apply" value="Apply" onclick="save_timeframe('<%= boxId %>');">
-<script type="text/javascript">
-      new Timeframe('<%= boxId %>calendars', {
-        previousButton: "<%= boxId %>previous",
-        todayButton: "<%= boxId %>today",
-        nextButton: "<%= boxId %>next",
-        resetButton: "<%= boxId %>reset",
-        months: 1,
-        format: '%Y-%m-%d',
-        startField: '<%= boxId %>start',
-        endField: '<%= boxId %>end'
-        }
-        );
-</script>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/time_range.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/time_range.jsp b/src/main/web/hicc/jsp/time_range.jsp
deleted file mode 100644
index 31186eb..0000000
--- a/src/main/web/hicc/jsp/time_range.jsp
+++ /dev/null
@@ -1,142 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Hashtable, java.util.StringTokenizer, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<% String boxId = xf.getParameter("boxId"); 
-   TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone")); %>
-Time Period 
-<select class="timeWidgetPeriodControl" id="<%= boxId %>period" name="<%= boxId %>time_period" class="formSelect">
-<%
-   boolean fCustom=false;
-
-   String period = (String) session.getAttribute("period");
-   String[][] periodMap = new String[9][2];
-   periodMap[0][0]="last1hr";
-   periodMap[0][1]="Last 1 Hour";
-   periodMap[1][0]="last2hr";
-   periodMap[1][1]="Last 2 Hours";
-   periodMap[2][0]="last3hr";
-   periodMap[2][1]="Last 3 Hours";
-   periodMap[3][0]="last6hr";
-   periodMap[3][1]="Last 6 Hours";
-   periodMap[4][0]="last12hr";
-   periodMap[4][1]="Last 12 Hours";
-   periodMap[5][0]="last24hr";
-   periodMap[5][1]="Last 24 Hours";
-   periodMap[6][0]="last7d";
-   periodMap[6][1]="Last 7 Days";
-   periodMap[7][0]="last30d";
-   periodMap[7][1]="Last 30 Days";
-   periodMap[8][0]="custom";
-   periodMap[8][1]="Custom Period";
-   for (int i=0;i<periodMap.length;i++) {
-       String meta = "";
-       if (period!=null && period.equals(periodMap[i][0])) {
-           meta = "selected";
-       } else if (period.startsWith("custom;") && (periodMap[i][0].equals("custom"))) {
-           meta = "selected";
-	   fCustom = true;       	   
-       }
-
-       out.println("<option value='"+periodMap[i][0]+"' "+meta+">"+periodMap[i][1]+"</option>");
-   }
- %>
-</select>
-<div id="<%= boxId %>period_custom_block" style="display:<%= (fCustom?"block":"none") %>;">
-<%
-    String start_string="2 days ago";
-    String end_string="now";
-    if (period.startsWith("custom;")) {
-      // the string should be custom;<start>;<end>
-      StringTokenizer st=new StringTokenizer(period,";");
-      if (st.hasMoreTokens()) {
-        st.nextToken(); // skip custom;
-	if (st.hasMoreTokens()) {
-	   start_string=st.nextToken();
-	   if (st.hasMoreTokens()) {
-	      end_string=st.nextToken();
-	   }
-	}
-      }
-    }
-%>
-    <br/>
-    <fieldset>
-    <legend>Custom Period</legend>
-    <table>
-    <tr><td>
-    <label for="start_period">Start Period:</label>
-    </td><td>
-    <input type="edit" name="<%= boxId %>_start_time" id="<%= boxId %>_start_time" value="<%= start_string %>"/>
-    </td><td>
-    <a href="#" id="help_edit_start_time" class="<%= boxId %>help_control">?</a>
-    </td></tr>
-    <tr><td>
-    <label for="end_period">End Period:</label>
-    </td><td>
-    <input type="edit" name="<%= boxId %>_end_time" id="<%= boxId %>_end_time" value="<%= end_string %>"/>
-    </td><td>
-    <a href="#" id="help_edit_start_time" class="<%= boxId %>help_control">?</a>
-    </td></tr>
-    </table>
-    </fieldset>
-
-    </div>
-<input type="button" name="<%= boxId %>apply" value="Apply" onclick="save_time_range('<%= boxId %>')">
-
-<script type='text/javascript' src="/hicc/js/"></script>
-<script>
-/*
- * popup the online help
- */
-function popup_help(event) {
-  var element = Event.element(event);
-  window.open("/hicc/jsp/help.jsp?id="+element.id,
-	      "Help",
-	      "width=500,height=400");
-}
-
-/*
- * toggle the custom period control
- */
-function togglePeriodControl(event) {
-  var element = Event.element(event);
-  value=$F(element.id);
-  if (value=='custom') {
-    $(element.id+'_custom_block').show();
-  } else {
-    $(element.id+'_custom_block').hide();
-  }
-}
-
-
-period_control = document.getElementById("<%= boxId %>period");
-
-if (period_control != null) {
-   //period_control.observe('change',togglePeriodControl);
-   help_controls=document.getElementsByClassName("<%= boxId %>help_control");
-   for (i=0;i<help_controls.length;i++) {
-       //help_controls[i].observe("click",popup_help);
-   }
-}
-</script>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/time_slider.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/time_slider.jsp b/src/main/web/hicc/jsp/time_slider.jsp
deleted file mode 100644
index f5f9c97..0000000
--- a/src/main/web/hicc/jsp/time_slider.jsp
+++ /dev/null
@@ -1,155 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<% TimeHandler time = new TimeHandler(request,(String)session.getAttribute("time_zone"));
-   String startDate = time.getStartDate();
-   String endDate = time.getEndDate();
-   SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
-   long start = formatter.parse(startDate).getTime(); 
-   long end = formatter.parse(endDate).getTime(); 
-   end = end + (60*60*24*1000-1);
-   String label = "";
-   String label2 = "";
-   String label3 = "";
-   if(end-start>(60*60*24*1000*2)) {
-      label = formatter.format(start);
-      long mid = (end+start)/2;
-      label2 = formatter.format(mid);
-      label3 = formatter.format(end); 
-   } else {
-      SimpleDateFormat formatter2 = new SimpleDateFormat("HH:mm");
-      label = formatter2.format(start);
-      long mid = (end+start)/2;
-      label2 = formatter2.format(mid);
-      label3 = formatter2.format(end); 
-   }
-%>
-<html><head>
-<script type='text/javascript' src='/hicc/js/workspace/prototype.js'></script>
-<script type='text/javascript' src='/hicc/js/workspace/scriptaculous.js'></script>
-<link href="/hicc/css/default.css" rel="stylesheet" type="text/css">
-<style type="text/css">
-  div.slider3 { width:96%; margin:0px; height:15px; position: relative; opacity: 0.6; z-index:5; white-space: nowrap;}
-  div.slider { width:96%; margin:0px; height:10px; position: relative; opacity: 0.6; z-index:5; white-space:nowrap;}
-  div.slider2 { width:96%; margin:0px; background-color:#ccc; height:4px; position: relative; opacity: 0.4; z-index:5; white-space:nowrap;}
-  div.handle { cursor:move; position: absolute; z-index:10; opacity: 1.0; }
-  div.label { display: inline-block; text-align: center; position:absolute; z-index:4;}
-  span.label { text-align: center; }
-</style>
-</head>
-<body>
-  <table class="clear_table"><tr><td align="right">
-  Start Time</td><td>&nbsp;
-  <div id="start_time" style="display:inline;white-space: nowrap;"></div></td></tr>
-  <tr><td align="right">End Time</td><td>&nbsp;
-  <div id="end_time" style="display:inline;white-space: nowrap;"></div></td></tr>
-  </table>
-  <div id="time_slider" class="slider3">
-    <div class="handle" style="width:19px; height:30px;"><img src="/hicc/images/slider-images-handle.png" alt="" style="float: left;" /></div>
-    <div class="handle" style="width:19px; height:30px;"><img src="/hicc/images/slider-images-handle.png" alt="" style="float: left;" /></div>
-  </div>
-  <div class="slider2"></div>
-  <div id="range_slider" class="slider">
-    <div class="handle" style="width:19px; height:20px;"><img src="/hicc/images/slider-images-handle2.png" alt="" style="float: left;"/></div>
-  </div>
-  <div style="width:100%; height: 1em; font-size: 9px; color: gray;">
-  <div class="label" style="left:0%;"><span class="label"><%=label%></span></div>
-  <div class="label" style="left:45%;"><span class="label"><%=label2%></span></div>
-  <div class="label" style="right:3%;"><span class="label"><%=label3%></span></div>
-  </div>
-<div id="hidden_start" style="display:none;"></div>
-<div id="hidden_end" style="display:none;"></div>
-<script type="text/javascript">
-    var time_slider = $('time_slider');
-    var range_slider = $('range_slider');
-    var mid=(<%= time.getStartTime() %>+<%= time.getEndTime() %>)/2;
-    var slider = new Control.Slider(time_slider.select('.handle'), time_slider, {
-      range: $R(<%= start %>, <%= end %>),
-      sliderValue: [<%= time.getStartTime() %>, <%= time.getEndTime() %>],
-      restricted: true,
-      onSlide: function(values) {
-          display_dates(values[0],values[1]);
-      },
-      onChange: function(values) {
-          display_dates(values[0],values[1]);
-      }
-    });
-    var slider_range = new Control.Slider(range_slider.select('.handle'), range_slider, {
-                  range: $R(<%= start %>, <%= end %>),
-                  sliderValue: mid,
-                  onSlide: function(values) {
-                               var delta = values-mid;
-                               mid = values;
-                               slider.setValue(slider.values[0]+delta,0);
-                               slider.setValue(slider.values[1]+delta,1);
-                               display_dates(slider.values[0]+delta,slider.values[1]+delta);
-                  },
-                  onChange: function(values) {
-                  }
-    });
-
-function display_dates(start, end) {
-    var s = new Date();
-    s.setTime(start);
-    var sm = s.getUTCMonth();
-    sm = sm + 1;
-    if(sm<10) {
-        sm = "0" + sm;
-    }
-    var sd = s.getUTCDate();
-    if(sd<10) {
-        sd = "0" + sd;
-    }
-    var sh = s.getUTCHours();
-    if(sh<10) {
-        sh = "0" + sh;
-    }
-    var smin = s.getUTCMinutes();
-    if(smin<10) {
-        smin = "0" + smin;
-    }
-    var e = new Date();
-    e.setTime(end);
-    var em = e.getUTCMonth();
-    em = em + 1;
-    if(em<10) {
-        em = "0" + em;
-    }
-    var ed = e.getUTCDate();
-    if(ed<10) {
-        ed = "0" + ed;
-    }
-    var eh = e.getUTCHours();
-    if(eh<10) {
-        eh = "0" + eh;
-    }
-    var emin = e.getUTCMinutes();
-    if(emin<10) {
-        emin = "0" + emin;
-    }
-    $('start_time').innerHTML=s.getUTCFullYear()+"-"+sm+"-"+sd+" "+sh+":"+smin;
-    $('end_time').innerHTML=e.getUTCFullYear()+"-"+em+"-"+ed+" "+eh+":"+emin;
-    $('hidden_start').innerHTML=start;
-    $('hidden_end').innerHTML=end;
-}
-
-display_dates(<%= time.getStartTime() %>,<%= time.getEndTime() %>);
-</script>
-</body></html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/time_slider_wrapper.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/time_slider_wrapper.jsp b/src/main/web/hicc/jsp/time_slider_wrapper.jsp
deleted file mode 100644
index 7bc96e4..0000000
--- a/src/main/web/hicc/jsp/time_slider_wrapper.jsp
+++ /dev/null
@@ -1,27 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@page import ="org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<IFRAME id="<%= xf.getParameter("boxId") %>iframe" src="/hicc/jsp/time_slider.jsp" width="100%" frameborder="0" height="80" scrolling="no"></IFRAME>
-  <input type=button id="time_slider_apply" name="time_slider_apply" value="Apply" onclick="save_time_slider(document.getElementById('<%= xf.getParameter("boxId") %>iframe').contentDocument.getElementById('hidden_start').innerHTML,document.getElementById('<%= xf.getParameter("boxId") %>iframe').contentDocument.getElementById('hidden_end').innerHTML);">
-

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/util.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/util.jsp b/src/main/web/hicc/jsp/util.jsp
deleted file mode 100644
index e3ddaea..0000000
--- a/src/main/web/hicc/jsp/util.jsp
+++ /dev/null
@@ -1,187 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.text.DecimalFormat,java.text.NumberFormat" %>
-<%@ page import = "java.sql.*" %>
-<%@ page import = "java.io.*" %>
-<%@ page import = "org.json.*" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.util.*" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.ClusterConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.DatabaseWriter" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.Macro" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.DatabaseConfig" %>
-<%
-    XssFilter xf = new XssFilter(request);
-    NumberFormat nf = new DecimalFormat("###,###,###,##0.00");
-    response.setHeader("boxId", xf.getParameter("boxId"));
-    response.setContentType("text/html; chartset=UTF-8//IGNORE");
-    String boxId=xf.getParameter("boxId");
-    String cluster = (String) session.getAttribute("cluster");
-    DatabaseWriter dbw = new DatabaseWriter(cluster);
-    String path = "";
-    Calendar now = Calendar.getInstance();
-    HashMap<String, Integer> index = new HashMap<String, Integer>();
-    long start = 0;
-    long end = now.getTimeInMillis();
-    String startS="";
-    String endS="";
-    String[] columns = xf.getParameterValues("column");
-    TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-    startS = time.getStartTimeText();
-    endS = time.getEndTimeText();
-    start = time.getStartTime();
-    end = time.getEndTime();
-    Macro mp = new Macro(start,end,"[util]", request);
-    int averageBy=600;
-    String tmpTable = mp.toString();
-    DatabaseConfig dbc = new DatabaseConfig();
-    String[] tableList = dbc.findTableNameForCharts("util", start, end);
-    if(tableList[0].endsWith("_week")) {
-      averageBy=600;
-    } else if(tableList[0].endsWith("_month")) {
-      averageBy=600;
-    } else if(tableList[0].endsWith("_quarter")) {
-      averageBy=1800;
-    } else if(tableList[0].endsWith("_year")) {
-      averageBy=10800;
-    } else if(tableList[0].endsWith("_decade")) {
-      averageBy=43200;
-    }
-    StringBuilder queryBuilder = new StringBuilder();
-    int pageNum = 0;
-    int rp = 0;
-    if(xf.getParameter("page")!=null) {
-      pageNum = Integer.parseInt(xf.getParameter("page"));
-      rp = Integer.parseInt(xf.getParameter("rp")); 
-    }
-    int total=0;
-    String query = "";
-    if(xf.getParameter("queue")==null) {
-      query = "select count(*) from [util] where timestamp between '[start]' and '[end]' group by queue;";
-      mp = new Macro(start,end,query, request);
-      query = mp.toString();
-      ResultSet rs = dbw.query(query);
-      if(rs.next()) {
-        total = rs.getInt(1);
-      }
-      queryBuilder.append("select queue,sum(bytes)/((unix_timestamp('[end]')-unix_timestamp('[start]'))/");
-      queryBuilder.append(averageBy);
-      queryBuilder.append("*2) as hdfs_usage,sum(slot_hours)/((unix_timestamp('[end]')-unix_timestamp('[start]'))/");
-      queryBuilder.append(averageBy);
-      queryBuilder.append("*2) as slot_hour from [util] where timestamp between '[start]' and '[end]' group by queue");
-      mp = new Macro(start,end,queryBuilder.toString(), request);
-      query = mp.toString();
-      if(tableList.length>1) { 
-        StringBuilder queryAdd = new StringBuilder();
-        queryAdd.append("(select * from (");
-        queryAdd.append(query);
-        queryAdd.append(") as t group by queue)");
-        query = queryAdd.toString();
-      }
-    } else {
-      query = "select count(*) from [util] where timestamp between '[start]' and '[end]' and queue=? group by user;";
-      mp = new Macro(start,end,query, request);
-      query = mp.toString();
-      ArrayList<Object> parms = new ArrayList<Object>();
-      parms.add(xf.getParameter("queue"));
-      ResultSet rs = dbw.query(query, parms);
-      if(rs.next()) {
-        total = rs.getInt(1);
-      }
-      queryBuilder.append("select user,sum(bytes)/((unix_timestamp('[end]')-unix_timestamp('[start]'))/");
-      queryBuilder.append(averageBy);
-      queryBuilder.append("*2) as hdfs_usage,sum(slot_hours)/((unix_timestamp('[end]')-unix_timestamp('[start]'))/");
-      queryBuilder.append(averageBy);
-      queryBuilder.append("*2) as slot_hour from [util] where timestamp between '[start]' and '[end]' and queue='");
-      queryBuilder.append(xf.getParameter("queue"));
-      queryBuilder.append("' group by user");
-      mp = new Macro(start,end,queryBuilder.toString(), request);
-      query = mp.toString();
-      if(tableList.length>1) {
-        StringBuilder queryAdd = new StringBuilder();
-        queryAdd.append("(select * from (");
-        queryAdd.append(query);
-        queryAdd.append(") as t group by user)");
-        query = queryAdd.toString();
-      }
-    }
-    ResultSet rs = dbw.query(query);
-    ResultSetMetaData rmeta = rs.getMetaData();
-    int col = rmeta.getColumnCount();
-    JSONObject data = new JSONObject();
-    JSONArray rows = new JSONArray();
-    while(rs.next()) {
-      JSONArray cells = new JSONArray();
-      for(int i=1;i<=col;i++) {
-        if(xf.getParameter("queue")==null && i==1) {
-          StringBuilder sb = new StringBuilder();
-          sb.append("<a href='/hicc/jsp/table_viewer.jsp?report=%2Fhicc%2Fjsp%2Futil.jsp&column=User&column=HDFS Storage Usage (GB Per Hour)&column=Slot Hours&columnSize=400&columnSize=100&columnSize=100&height=");
-          sb.append(xf.getParameter("height"));
-          sb.append("&queue=");
-          sb.append(rs.getString(i));
-          sb.append("'>");
-          sb.append(rs.getString(i));
-          sb.append("</a>");
-          cells.put(sb.toString());
-        } else if(xf.getParameter("queue")!=null && i==1) {
-          StringBuilder sb = new StringBuilder();
-          sb.append("<a href='/hicc/jsp/table_viewer.jsp?report=%2Fhicc%2Fjsp%2Fjobs_viewer.jsp&column=Job ID&column=Submit Time&column=Launch Time&column=Finish Time&column=Status&columnSize=150&columnSize=110&columnSize=110&columnSize=110&columnSize=110&height=");
-          sb.append(xf.getParameter("height"));
-          sb.append("&user=");
-          sb.append(rs.getString(i));
-          sb.append("'>");
-          sb.append(rs.getString(i));
-          sb.append("</a>");
-          cells.put(sb.toString());
-        } else {
-          if(rmeta.getColumnType(i)==java.sql.Types.BIGINT) {
-            cells.put(nf.format(rs.getBigDecimal(i)));
-          } else if(rmeta.getColumnType(i)==java.sql.Types.TINYINT ||
-            rmeta.getColumnType(i)==java.sql.Types.INTEGER) {
-            cells.put(nf.format(rs.getInt(i)));
-          } else if(rmeta.getColumnType(i)==java.sql.Types.FLOAT ||
-            rmeta.getColumnType(i)==java.sql.Types.DOUBLE ||
-            rmeta.getColumnType(i)==java.sql.Types.DECIMAL ) {
-            cells.put(nf.format(rs.getDouble(i)));
-          } else {
-            cells.put(rs.getString(i));
-          }
-        }
-      }
-      JSONObject row = new JSONObject();
-      if(rs.getString(1)!=null) {
-        row.put("id",rs.getString(1));
-      } else {
-        row.put("id","null");
-      }
-      row.put("cell",cells);
-      rows.put(row);
-      total++;
-    }
-    data.put("page",xf.getParameter("page"));
-    data.put("rows",rows);
-    data.put("total",total);
-    dbw.close();
-    out.println(data.toString());
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/workspace/manage_view.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/workspace/manage_view.jsp b/src/main/web/hicc/jsp/workspace/manage_view.jsp
deleted file mode 100644
index d863bf1..0000000
--- a/src/main/web/hicc/jsp/workspace/manage_view.jsp
+++ /dev/null
@@ -1,132 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ taglib prefix="my" uri="/WEB-INF/jsp2/taglib.tld" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
-<table class="portal_table" cellpadding="2" cellspacing="0" width="100%">
-<thead><tr bgcolor="lightgrey">
-<th>Name</th>
-<th>Owner</th>
-<th>Permission</th>
-<th colspan="4">Operations</th>
-</tr></thead>
-<%
-  String[] users= {"Mac", "Eric", "Linyun", "Rounpin", "Jerome", "admin"};
-  pageContext.setAttribute("users", users);
-  pageContext.setAttribute("user","admin");
-  pageContext.setAttribute("permission.all.read","1");
-  pageContext.setAttribute("permission.all.write","2");
-  pageContext.setAttribute("default_view","default");
-%>
-<my:findViews>
-	<tr><td>
-<div id="displayViewNameBlock${key}">
-<a href="#" onClick="javascript:set_current_view('${key}');initScript('${key}');">${description}</a></div>
-<div id="changeViewNameBlock${key}" style="display:none;">
-<input type=text name="changeViewNameField${key}" id="changeViewNameField${key}" value='${description}'/>
-</div>
-</td><td align='center'>${owner}</td>
-<td align='center' width="270">
-<!-- begin permission -->
-<div id="displayViewPermissionBlock${key}" style="display:block;">
-<c:choose>
-  <c:when test="${permission.all.read=='1'}">
-    Public
-  </c:when>
-  <c:otherwise>
-    Private
-  </c:otherwise>
-</c:choose>
-</div>
-<div id="editViewPermissionBlock${key}" style="display:none;">
-  <div id="permission${key}">
-<input type=hidden name="permissionRowCount${key}" value="${fn:length(permissions)}"/>
-<table class="portal_table" id="permissionTable${key}" cellspacing=0 cellpadding=0>
-<thead><tr bgcolor="lightgrey"><th>User</th><th>Allow To Read</th><th>Allow to Modify</th><th></th></tr></thead>
-<tbody>
-<!-- begin permission -->
-<c:forEach items="${permission}" var="pK">
-  <tr><td>
-    <select id='userid_permission' class='formSelect'>
-    <c:forEach items="${users}" var="user">
-      <c:choose>
-        <c:when test="${user==pK}">
-          <option value='${user}' selected>${user}</option>
-        </c:when>
-        <c:otherwise>
-          <option value='${user}'>${user}</option>
-        </c:otherwise>
-      </c:choose>
-    </c:forEach>
-    </select>
-  </td><td align="middle">
-    <input type='checkbox' class='formCheckbox' id='read_permission' name='read_permission'>
-  </td><td align="middle">
-    <input type='checkbox' class='formCheckbox' id='modify_permission' name='modify_permission'>
-  </td><td>
-    <img src='/sim/images/close16.gif' onClick="deleteCurrentRow('${key}',this);"/>
-  </td></tr>
-</c:forEach>
-<!-- end permission -->
-</tbody>
-</table>
-<br/>
-<input type=button name="addPermissionRowButton" value="Add More Permission" onClick="addPermissionRow('${key}','',false,false);"/>
-  </div>
-</div>
-<!-- end permission -->
-</td><td width="115">
-<!-- begin operations -->
-<!--c:if test="${permission.all.modify=='1'} || ${permission.user.modify=='1'}"-->
-  <div id="changeViewNameButtonBlock${key}" style="display:block;">
-    <input name="changeNameButton${key}" id="changeNameButton${key}" value="Change" type="button" onClick="changeViewName('${key}',false);"/>&nbsp;
-  </div>
-  <div id="cancelChangeViewNameBlock${key}" style="display:none;">
-    <input name="saveNameButton${key}" id="saveNameButton${key}" value="Save" type="button" onClick="changeViewName('${key}',true);"/>&nbsp;
-    <input name="cancelChangeNameButton${key}" id="cancelChangeNameButton${key}" value="Cancel" type="button" onClick="changeViewName('${key}',false);"/>&nbsp;
-  </div>
-<!--/c:if-->
-</td>
-<td nowrap width="60">
-<input name="cloneview" value="Clone" type="button" onClick="cloneView('${key}');"/>&nbsp;
-</td>
-<td nowrap width="60">
-<!--c:if test="${key=='default'}"-->
-<!--  <input name="restoreview" value="Restore" type="button" onClick="if (confirm(Are you sure you want to restore the default workspace?)){ restoreView('${key}');}"/> -->
-<!--/c:if-->
-
-<!--c:if test="${permision.all.modify=='1'} || ${permission.user.modify=='1'} && ${key!='default'}"-->
-  <input name="delelete" value="Delete" type="button" onClick="if (confirm('Are you sure you want to delete the workspace?')){ deleteView('${key}');}"/>
-<!--/c:if-->
-</td>
-<td nowrap width="60">
-<c:choose>
-  <c:when test="${key!=default_view}"> 
-    <input name="setDefault" value="Set As Default" type="button" onClick="setDefaultView('${key}');"/>
-  </c:when>
-  <c:otherwise>
-    Default View
-  </c:otherwise>
-</c:choose>
-</td>
-<!-- end operation -->
-</td></tr>
-</my:findViews>
-</table>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/workspace/time_iphone.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/workspace/time_iphone.jsp b/src/main/web/hicc/jsp/workspace/time_iphone.jsp
deleted file mode 100644
index bb81434..0000000
--- a/src/main/web/hicc/jsp/workspace/time_iphone.jsp
+++ /dev/null
@@ -1,113 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%
-   response.setHeader("boxId", request.getParameter("boxId"));
-%>
-<%@ page import = "java.util.Hashtable, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat" %>
-<% String boxId = request.getParameter("boxId");
-   session.setAttribute("time_type","range");
-   TimeHandler time = new TimeHandler(request,(String)session.getAttribute("time_zone"));
-%>
-<div class="panel">
-<h2>Date/Time</h2>
-<fieldset>
-<div class="row">
-    <label>Start Date</label>
-<input type=text id="<%= boxId %>start" name="<%= boxId %>start" value="<%= time.getStartDate() %>" size="10"/>
-</div>
-<div class="row">
-    <label>Start Time</label>
-<select id="<%= boxId %>start_hour" name="<%= boxId %>start_hour">
-<%
-   String startHour = time.getStartHour();
-   for(int i=0;i < 24; i++) {
-       String meta = "";
-       String hour = ""+i;
-       if(i<10) {
-           hour = "0"+i;
-       }
-       if(startHour.equals(hour)) {
-           meta = "selected";
-       }
-       out.println("<option value='"+hour+"' "+meta+">"+hour+"</option>");
-   } 
-%>
-</select> : 
-<select id="<%= boxId %>start_min" name="<%= boxId %>start_min">
-<%
-   String startMin = time.getStartMinute();
-   for(int i=0;i < 60; i++) {
-       String meta = "";
-       String minute = ""+i;
-       if(i<10) {
-           minute = "0"+i;
-       }
-       if(startMin.equals(minute)) {
-           meta = "selected";
-       }
-       out.println("<option value='"+minute+"' "+meta+">"+minute+"</option>");
-   } 
-%>
-</select>
-</div>
-<div class="row">
-    <label>End Date</label>
-<input type=text id="<%= boxId %>end" name="<%= boxId %>end" value="<%= time.getEndDate() %>" size="10"/>
-</div>
-<div class="row">
-    <label>End Time</label>
-<select id="<%= boxId %>end_hour" name="<%= boxId %>end_hour">
-<%
-   String endHour = time.getEndHour();
-   for(int i=0;i < 24; i++) {
-       String meta = "";
-       String hour = ""+i;
-       if(i<10) {
-           hour = "0"+i;
-       }
-       if(endHour.equals(hour)) {
-           meta = "selected";
-       }
-       out.println("<option value='"+hour+"' "+meta+">"+hour+"</option>");
-   } 
-%>
-</select> : 
-<select id="<%= boxId %>end_min" name="<%= boxId %>end_min">
-<%
-   String endMin = time.getEndMinute();
-   for(int i=0;i < 60; i++) {
-       String meta = "";
-       String minute = ""+i;
-       if(i<10) {
-           minute = "0"+i;
-       }
-       if(endMin.equals(minute)) {
-           meta = "selected";
-       }
-       out.println("<option value='"+minute+"' "+meta+">"+minute+"</option>");
-   } 
-%>
-</select>
-</div>
-<div class="row">
-<input type="button" name="apply" value="Apply" onclick="save_time('<%= boxId %>');">
-</div>
-</fieldset>
-</div>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/login.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/login.jsp b/src/main/web/hicc/login.jsp
deleted file mode 100644
index f0c1002..0000000
--- a/src/main/web/hicc/login.jsp
+++ /dev/null
@@ -1,56 +0,0 @@
-<%--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  --%>
-<%@ page import = "org.apache.hadoop.chukwa.datastore.ChukwaHBaseStore" %>
-<%
-  ChukwaHBaseStore.populateDefaults();
-%>
-<html>
-<head>
-    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
-    <meta http-equiv="Pragma" content="no-cache" />
-    <meta http-equiv="Expires" content="0" />
-    <link type="text/css" rel="stylesheet" href="css/login.css"/>
-    <link href="css/bootstrap.min.css" type="text/css" rel="stylesheet" />
-    <link href="css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
-    <script src="js/jquery.js" type="text/javascript"></script>
-    <script src="js/bootstrap.min.js" type="text/javascript"></script>
-</head>
-<body>
-
-<div class="container">
-    <form class="form-signin" name="loginform" action="" method="post">
-      <h2 class="form-signin-heading">Sign in to Chukwa</h2>
-      <label for="inputEmail" class="sr-only">Username</label>
-      <input type="text" class="form-control" name="username" placeholder="Username" required autofocus>
-      <label for="inputPassword" class="sr-only">Password:</label>
-      <input type="password" class="form-control" name="password" placeholder="Password" required>
-      <div class="checkbox">
-        <label> 
-          <input type="checkbox" name="rememberMe"> Keep me signed in
-        </label>
-      </div>
-      <input type="submit" class="btn btn-lg btn-primary btn-block" name="submit" value="Login">
-      <span class="form-signin-footer">
-        Copyright (c) 2008-2015 Apache Software Foundation
-      </span>
-    </form>
-</div>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/logs/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/logs/index.html b/src/main/web/hicc/logs/index.html
new file mode 100644
index 0000000..a671297
--- /dev/null
+++ b/src/main/web/hicc/logs/index.html
@@ -0,0 +1,76 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--> 
+<!DOCTYPE html>
+<html lang="en" class="no-js">
+  <head>
+    <title>Tile</title>
+    <link href="../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../js/jquery.js" type="text/javascript"></script>
+    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
+    <style>
+      .tile {
+        color: #ffffff;
+        background-color: #5bc0de;
+      }
+      .row {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display:         flex;
+      }
+      .banner {
+        background-color: #ffffff;
+      }
+    </style>
+  </head>
+  <body onResize="resize()">
+    <div class="jumbotron">
+    <div class="container">
+      <div class="row">
+        <div class="col-xs-5 col-md-5 text-center tile">
+            <h2><span class="glyphicon glyphicon-list" aria-hidden="true"></span></h2>
+            Logs
+        </div>
+        <div class="col-xs-7 col-md-7 text-center banner">
+          <p><h1>85</h1> Errors</p>
+        </div>
+      </div>
+    </div>
+    </div>
+
+    <script src="js/jquery.js"></script>
+    <script>
+      var tracker;
+
+      function resize() {
+        clearTimeout(tracker);
+        tracker = setTimeout(render, 50);
+      }
+
+      function render() {
+        document.body.style.overflow = 'hidden';
+        tracker = setTimeout(render, 3000);
+      }
+
+      $( document ).ready(function() {
+        render();
+      });
+    </script>
+  </body>
+</html>


[8/9] chukwa git commit: CHUKWA-779. Remove support for JSP pages. (Eric Yang)

Posted by ey...@apache.org.
http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/heatmap-datanode-data-js.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/heatmap-datanode-data-js.jsp b/src/main/web/hicc/jsp/heatmap-datanode-data-js.jsp
deleted file mode 100644
index 2e93a23..0000000
--- a/src/main/web/hicc/jsp/heatmap-datanode-data-js.jsp
+++ /dev/null
@@ -1,255 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Calendar, java.util.Date, java.sql.*, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*,java.lang.Math, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.lang.StringBuilder, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.util.DatabaseWriter, org.apache.hadoop.chukwa.database.Macro, org.apache.hadoop.chukwa.database.DatabaseConfig, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page session="true" %> 
-<%
-
-// TODO: Read parameters from query string or environment to choose mode
-// of data desired, e.g. duration, # transactions, etc. ; 
-// use widget properties to create selectors for these various modes
-
-response.setContentType("text/javascript");
-
-// initial setup
-XssFilter xf = new XssFilter(request);
-TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-long start = time.getStartTime();
-long end = time.getEndTime();
-String cluster = (String) session.getAttribute("cluster");
-String table = "filesystem_fsm";
-
-// decide type of statistics we want
-String query_stats_mode = (String) xf.getParameter("heatmap_datanode_stattype");
-if (query_stats_mode == null || query_stats_mode.length() <= 0) {
-  query_stats_mode = new String("transaction_count");
-}
-
-// decide type of state we're interested in
-String query_state = (String) xf.getParameter("heatmap_datanode_state");
-out.println("/" + "/ " + "state: " + query_state);
-if (query_state == null || query_state.length() <= 0) {
-  query_state = new String("read_local");
-}
-
-// actual work: process query
-if(xf.getParameter("event_type")!=null) {
-  table = xf.getParameter("event_type");
-}
-String query = "select block_id,start_time,finish_time,start_time_millis,finish_time_millis,status,state_name,hostname,other_host,bytes from ["+table+"] where finish_time between '[start]' and '[end]' and state_name like '" + query_state + "'";
-Macro mp = new Macro(start,end,query, request);
-query = mp.toString() + " order by start_time";
-
-out.println("/" + "/" + "datanode: " + query + " cluster: " + cluster);
-
-ArrayList<HashMap<String, Object>> events = new ArrayList<HashMap<String, Object>>();
-
-Connection conn = null;
-Statement stmt = null;
-ResultSet rs = null;
-
-DatabaseWriter dbw = new DatabaseWriter(cluster);
-try {
-  rs = dbw.query(query);
-  ResultSetMetaData rmeta = rs.getMetaData();
-  int col = rmeta.getColumnCount();
-  while (rs.next()) {
-    HashMap<String, Object> event = new HashMap<String, Object>();
-    long event_time=0;
-    for(int i=1;i<=col;i++) {
-      if(rmeta.getColumnType(i)==java.sql.Types.TIMESTAMP) {
-        event.put(rmeta.getColumnName(i),rs.getTimestamp(i).getTime());
-      } else {
-        event.put(rmeta.getColumnName(i),rs.getString(i));
-      }
-    }
-    events.add(event);
-  }
-} catch (SQLException ex) {
-  // handle any errors
-  //out.println("SQLException: " + ex.getMessage());
-  //out.println("SQLState: " + ex.getSQLState());
-  //out.println("VendorError: " + ex.getErrorCode());
-} finally {
-  // it is a good idea to release
-  // resources in a finally{} block
-  // in reverse-order of their creation
-  // if they are no-longer needed
-  dbw.close();
-}
-%>
-
-function generateData() {
-<%
-  SimpleDateFormat format = new SimpleDateFormat("MMM dd yyyy HH:mm:ss");
-  HashMap<String, Integer> reduce_ytick_ids = new HashMap<String, Integer>();
-
-  out.println("/" + "/ " + events.size() + " results returned.");
-
-  HashSet<String> host_set = new HashSet<String>();
-  HashMap<String, Integer> host_indices = new HashMap<String, Integer>();
-
-  // collect hosts
-  for(int i = 0; i < events.size(); i++) {
-    HashMap<String, Object> event = events.get(i);
-    String curr_host = (String) event.get("hostname");
-    String other_host = (String) event.get("other_host");
-    host_set.add(curr_host);
-    host_set.add(other_host);
-  }
-  int num_hosts = host_set.size();
-  
-  Iterator<String> host_iter = host_set.iterator();
-  for (int i = 0; i < num_hosts && host_iter.hasNext(); i++) {
-    String curr_host = host_iter.next();
-    host_indices.put(curr_host, new Integer(i));
-  }
-  
-  out.println("/" + "/" + " Number of hosts: " + num_hosts);
-  long stats[][] = new long[num_hosts][num_hosts];
-  long count[][] = new long[num_hosts][num_hosts]; // used for averaging
-
-  int start_millis = 0, end_millis = 0;
-
-  // deliberate design choice to duplicate code PER possible operation
-  // otherwise we have to do the mode check N times, for N states returned
-  if (query_stats_mode.equals("transaction_count")) {
-    for(int i=0;i<events.size();i++) {
-      HashMap<String, Object> event = events.get(i);
-      start=(Long)event.get("start_time");
-      end=(Long)event.get("finish_time");
-      start_millis = Integer.parseInt(((String)event.get("start_time_millis")));
-      end_millis = Integer.parseInt(((String)event.get("finish_time_millis")));      
-      String cell = (String) event.get("state_name");      
-      String this_host = (String) event.get("hostname");
-      String other_host = (String) event.get("other_host");
-      int this_host_idx = host_indices.get(this_host).intValue();
-      int other_host_idx = host_indices.get(other_host).intValue();
-      
-      // from, to
-      stats[this_host_idx][other_host_idx] += 1;
-    }
-  } else if (query_stats_mode.equals("avg_duration")) {
-    for(int i=0;i<events.size();i++) {
-      HashMap<String, Object> event = events.get(i);
-      start=(Long)event.get("start_time");
-      end=(Long)event.get("finish_time");
-      start_millis = Integer.parseInt(((String)event.get("start_time_millis")));
-      end_millis = Integer.parseInt(((String)event.get("finish_time_millis")));      
-      String cell = (String) event.get("state_name");      
-      String this_host = (String) event.get("hostname");
-      String other_host = (String) event.get("other_host");
-      int this_host_idx = host_indices.get(this_host).intValue();
-      int other_host_idx = host_indices.get(other_host).intValue();
-      
-      long curr_val = end_millis - start_millis + ((end - start)*1000);
-      
-      // from, to
-      stats[this_host_idx][other_host_idx] += curr_val;
-      count[this_host_idx][other_host_idx] += 1;
-    }    
-    for (int i = 0; i < num_hosts; i++) {
-      for (int j = 0; j < num_hosts; j++) {
-        if (count[i][j] > 0) stats[i][j] = stats[i][j] / count[i][j];
-      }
-    }
-  } else if (query_stats_mode.equals("avg_volume")) {
-    for(int i=0;i<events.size();i++) {
-      HashMap<String, Object> event = events.get(i);
-      start=(Long)event.get("start_time");
-      end=(Long)event.get("finish_time");
-      start_millis = Integer.parseInt(((String)event.get("start_time_millis")));
-      end_millis = Integer.parseInt(((String)event.get("finish_time_millis")));      
-      String cell = (String) event.get("state_name");      
-      String this_host = (String) event.get("hostname");
-      String other_host = (String) event.get("other_host");
-      int this_host_idx = host_indices.get(this_host).intValue();
-      int other_host_idx = host_indices.get(other_host).intValue();
-      
-      long curr_val = Long.parseLong((String)event.get("bytes"));
-      
-      // from, to
-      stats[this_host_idx][other_host_idx] += curr_val;
-      count[this_host_idx][other_host_idx] += 1;
-    }    
-    for (int i = 0; i < num_hosts; i++) {
-      for (int j = 0; j < num_hosts; j++) {
-        if (count[i][j] > 0) stats[i][j] = stats[i][j] / count[i][j];
-      }
-    }
-  } else if (query_stats_mode.equals("total_duration")) {
-    for(int i=0;i<events.size();i++) {
-      HashMap<String, Object> event = events.get(i);
-      start=(Long)event.get("start_time");
-      end=(Long)event.get("finish_time");
-      start_millis = Integer.parseInt(((String)event.get("start_time_millis")));
-      end_millis = Integer.parseInt(((String)event.get("finish_time_millis")));      
-      String cell = (String) event.get("state_name");      
-      String this_host = (String) event.get("hostname");
-      String other_host = (String) event.get("other_host");
-      int this_host_idx = host_indices.get(this_host).intValue();
-      int other_host_idx = host_indices.get(other_host).intValue();
-      
-      double curr_val = end_millis - start_millis + ((end - start)*1000);
-      
-      // from, to
-      stats[this_host_idx][other_host_idx] += curr_val;
-    } 
-  } else if (query_stats_mode.equals("total_volume")) {
-    for(int i=0;i<events.size();i++) {
-      HashMap<String, Object> event = events.get(i);
-      start=(Long)event.get("start_time");
-      end=(Long)event.get("finish_time");
-      start_millis = Integer.parseInt(((String)event.get("start_time_millis")));
-      end_millis = Integer.parseInt(((String)event.get("finish_time_millis")));      
-      String cell = (String) event.get("state_name");      
-      String this_host = (String) event.get("hostname");
-      String other_host = (String) event.get("other_host");
-      int this_host_idx = host_indices.get(this_host).intValue();
-      int other_host_idx = host_indices.get(other_host).intValue();
-      
-      long curr_val = Long.parseLong((String)event.get("bytes"));
-      
-      // from, to
-      stats[this_host_idx][other_host_idx] += curr_val;
-    }    
-  }
-  
-%>
-heatmap_size = <%= num_hosts %>;
-heatmap_data = [<%
-  for (int i = 0; i < num_hosts; i++) {
-    for (int j = 0; j < num_hosts; j++) {
-      if (i > 0 || j > 0) out.println(",");
-      out.print("[" + i + "," + j + "," + stats[j][i] + "]");
-    }
-  }
-%>];
-heatmap_names = [<%
-  host_iter = host_set.iterator();
-  for (int i = 0; i < num_hosts && host_iter.hasNext(); i++) {
-    if (i > 0) out.print(",");
-    out.print("'" + host_iter.next() + "'");
-  }
-%>];
-
- $("#resultcountholder").text("<%= events.size() %> states returned.");
-
-}
-

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/heatmap-static.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/heatmap-static.jsp b/src/main/web/hicc/jsp/heatmap-static.jsp
deleted file mode 100644
index d6df7ec..0000000
--- a/src/main/web/hicc/jsp/heatmap-static.jsp
+++ /dev/null
@@ -1,71 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "org.apache.hadoop.chukwa.analysis.salsa.visualization.Heatmap" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.ImageSlicer" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.ExceptionUtil" %>
-<%@ page import = "java.io.FileOutputStream" %>
-<%@ page import = "java.io.File" %>
-<%@ page import = "java.util.HashMap" %>
-<%@ page import = "java.util.HashMap" %>
-<%@ page import = "org.apache.commons.logging.Log" %>
-<%@ page import = "org.apache.commons.logging.LogFactory" %>
-<%
-   Log log = LogFactory.getLog(Heatmap.class);
-   XssFilter xf = new XssFilter(request);
-   String boxId = xf.getParameter("boxId");
-   int max = 0;
-   try {
-     StringBuilder fileName = new StringBuilder();
-     fileName.append(System.getenv("CHUKWA_HOME"));
-     fileName.append(File.separator);
-     fileName.append("webapps");
-     fileName.append(File.separator);
-     fileName.append("sandbox");
-     fileName.append(File.separator);
-     fileName.append(boxId);
-     fileName.append(xf.getParameter("_s"));
-     fileName.append(".png");
-     StringBuilder baseFileName = new StringBuilder();
-     baseFileName.append(boxId);
-     baseFileName.append(xf.getParameter("_s"));
-     baseFileName.append(".png");
- 
-     FileOutputStream fos = new FileOutputStream(fileName.toString());
-
-     Heatmap sw = new Heatmap(request);
-     sw.setDimensions(2000,2000);
-     sw.run();
-     if(sw.getImage(fos,"PNG", 1.0)) {
-       fos.close();
-       ImageSlicer slicer = new ImageSlicer();
-       max = slicer.process(baseFileName.toString());
-     }
-     RequestDispatcher disp = getServletContext().getRequestDispatcher("/jsp/image-viewer.jsp");
-     request.setAttribute("image-viewer",baseFileName.toString());
-     request.setAttribute("maxLevel",max);
-     disp.forward(request, response);
-   } catch(Exception e) {
-     response.setHeader("boxId", xf.getParameter("boxId"));
-     response.setContentType("text/html; chartset=UTF-8//IGNORE");
-     out.println("No data available.");
-     log.error(ExceptionUtil.getStackTrace(e));
-   }
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/heatmap.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/heatmap.jsp b/src/main/web/hicc/jsp/heatmap.jsp
deleted file mode 100644
index b16e718..0000000
--- a/src/main/web/hicc/jsp/heatmap.jsp
+++ /dev/null
@@ -1,136 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Hashtable, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-   XssFilter xf = new XssFilter(request);
-   response.setContentType("text/html; chartset=UTF-8//IGNORE");
-   response.setHeader("boxId", xf.getParameter("boxId"));
-
-   String width = "700";
-   if(xf.getParameter("width")!=null) {
-     width=xf.getParameter("width");
-   }
-
-   String height = "400";
-   if(xf.getParameter("height")!=null) {
-     height=xf.getParameter("height");
-   }
-
-   String yLabel = "device";
-   if(xf.getParameter("yLabel")!=null) {
-     yLabel=xf.getParameter("yLabel");
-   }
-
-   String url = "/hicc/v1/heatmap/SystemMetrics/cpu.combined.?max=100";
-   if(xf.getParameter("url")!=null) {
-     url=xf.getParameter("url");
-   }
-
-   String title = "CPU Utilization";
-   if(xf.getParameter("title")!=null) {
-     title=xf.getParameter("title");
-   }
-%>
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <style>
-
-      #heatmapArea {
-        display: block;
-        position:absolute;
-        float:left;
-        width: <%= width %>px;
-        height: <%= height %>px;
-        top:0;
-        left: 50px;
-      }
-
-      #yaxis {
-        text-align: center;
-        width: 50px;
-        height: <%= height %>px;
-        line-height: 400px;
-      }
-
-      p {
-        border:0px solid red;
-        writing-mode:lr-tb;
-        -webkit-transform:rotate(270deg);
-        -moz-transform:rotate(270deg);
-        -o-transform: rotate(270deg);
-        white-space:nowrap;
-        bottom:0;
-      }
-
-      #xaxis {
-        width: <%= width %>px;
-        position: relative;
-        left: 0px;
-        height: 20px;
-        text-align: center;
-        display: block;
-      }
-
-      body {
-        color:#333;
-        font-family: Oswald, Helvetica, Arial;
-        font-weight:normal;
-      }
-
-    </style>
-    <link href="/hicc/css/default.css" rel="stylesheet" type="text/css">
-  </head>
-  <body>
-    <div id="yaxis">
-      <p id="yLabel"></p>
-    </div>
-    <div id="heatmapArea"></div>
-    <div id="xaxis">Time</div>
-    <script src="/hicc/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
-    <script type="text/javascript" src="/hicc/js/heatmap.js"></script>
-    <script type="text/javascript">
-      function load() {
-        $.ajax({ 
-          url: "<%= url %>", 
-          dataType: "json", 
-          success: function(data) {
-            $('#yLabel').html(data.series + " <%= yLabel %>(s)");
-            var config = {
-              element: document.getElementById("heatmapArea"),
-              radius: data.radius/6,
-              opacity: 50,
-              legend: {
-                position: 'br',
-                title: '<%= title %> Distribution'
-              }
-            };
-            var heatmap = h337.create(config);
-            heatmap.store.setDataSet(data);
-            setTimeout(load, 5000);
-          }
-        });
-      }
-      window.onload = function() {
-        setTimeout(load, 5000);
-      };
-    </script>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/heatmap_datanode.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/heatmap_datanode.jsp b/src/main/web/hicc/jsp/heatmap_datanode.jsp
deleted file mode 100644
index df6ce67..0000000
--- a/src/main/web/hicc/jsp/heatmap_datanode.jsp
+++ /dev/null
@@ -1,349 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.util.Calendar, java.util.Date, java.sql.*, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*,java.lang.Math, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.lang.StringBuilder, org.apache.hadoop.chukwa.util.XssFilter" %>
-<% response.setContentType("text/html"); %>
-<%
-
-XssFilter xf = new XssFilter(request);
-
-// decide type of statistics we want
-String query_stats_mode = (String) xf.getParameter("heatmap_datanode_stattype");
-if (query_stats_mode == null || query_stats_mode.length() <= 0) {
-  query_stats_mode = new String("transaction_count");
-}
-
-// decide type of state we're interested in
-String query_state = (String) xf.getParameter("heatmap_datanode_state");
-if (query_state == null || query_state.length() <= 0) {
-  query_state = new String("read_local");
-}
-
-HashMap<String, String> prettyStateNames = new HashMap<String, String>();
-
-prettyStateNames.put("read_local", "Local Block Reads");
-prettyStateNames.put("write_local", "Local Block Writes");
-prettyStateNames.put("read_remote", "Remote Block Reads");
-prettyStateNames.put("write_remote", "Remote Block Writes");
-prettyStateNames.put("write_replicated", "Replicated Block Writes");
-
-HashMap<String, String> prettyStatisticNames = new HashMap<String, String>();
-
-prettyStatisticNames.put("transaction_count", "Number of Transactions");
-prettyStatisticNames.put("avg_duration", "Average Duration<br />(ms)");
-prettyStatisticNames.put("avg_volume", "Average Volume<br />(bytes)");
-prettyStatisticNames.put("total_duration", "Total Duration<br />(ms)");
-prettyStatisticNames.put("total_volume", "Total Volume<br />(bytes)");
-
-%>
-  <html><head> 
-
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
-      <title>2D Spectrum Viewer</title> 
-      <link href="/hicc/css/heatmap/layout.css" rel="stylesheet" type="text/css"> 
-        <script language="javascript" type="text/javascript" src="/hicc/js/jquery-1.3.2.min.js"></script>
-        <script language="javascript" type="text/javascript" src="/hicc/js/jquery.flot.pack.js"></script>
-
-        <script language="javascript" type="text/javascript" src="/hicc/js/excanvas.pack.js"></script>
-        <script id="source" language="javascript" type="text/javascript" src="heatmap-datanode-data-js.jsp?heatmap_datanode_stattype=<%= query_stats_mode %>&heatmap_datanode_state=<%= query_state %>"></script> 
-        <script>
-          function activateplot()
-          {
-            document.getElementById('clearSelection').click();
-          }
-        </script>
-        <script id="source2" language="javascript" type="text/javascript">
-// to eventually be moved out
-// this takes the data structures from the data generation and
-// generates data structures for flot to plot
-
-          function d2h(d) {return (Math.round(d).toString(16));}
-
-          // external vars: heatmap_size, heatmap_data, heatmap_names
-          function generateGraph() 
-          {
-            var tmpstring = ' ';
-            var count = 0;
-            var minvalue = 0, maxvalue = 0;
-            var COLOR_MAX = 255;
-            var COLOR_MIN = 0;
-            var SCALE=1;
-
-            color_array = new Array(heatmap_size * heatmap_size);
-            graph_data_array = new Array(heatmap_size * heatmap_size);
-            graph_data_array_small = new Array(heatmap_size * heatmap_size);
-            series_array = new Array(heatmap_size * heatmap_size);
-            ticknames_array = new Array(heatmap_size);
-            graph_tooltips = new Array(heatmap_size+1);
-            
-            var minstarted = 0;
-            for (i = 0; i < heatmap_size; i++) {
-              graph_tooltips[i+1] = new Array(heatmap_size+1);
-              for (j = 0; j < heatmap_size; j++) {
-                // determine min/max
-                if (count <= 0) {
-                  if (heatmap_data[count][2] > 0) {
-                    minvalue = heatmap_data[count][2];
-                    minstarted = 1;
-                  }
-                  maxvalue = heatmap_data[count][2];
-                } else {
-                  if (heatmap_data[count][2] > 0) {
-                    if (minstarted > 0) {
-                      minvalue = heatmap_data[count][2] > minvalue ? minvalue : heatmap_data[count][2];
-                    } else {
-                      minvalue = heatmap_data[count][2];
-                      minstarted = 1;
-                    }
-                  }
-                  maxvalue = heatmap_data[count][2] < maxvalue ? maxvalue : heatmap_data[count][2];
-                }
-                // create coordinates
-                // graph_data_array[count] = {
-                //   data: [i+1,j+1]
-                // };
-                // graph_data_array[count] = new Array(2);
-                // graph_data_array[count][0] = i+1;
-                // graph_data_array[count][1] = j+1;
-
-                graph_tooltips[i+1][j+1] = 'State: <%= prettyStateNames.get(query_state) %><br />Statistic: <%= prettyStatisticNames.get(query_stats_mode) %><br />Value: ' 
-                  + heatmap_data[count][2] + "<br />From: " + heatmap_names[i] + "<br />"
-                  + "To: " + heatmap_names[j];
-                  
-                count++;                
-              }
-              ticknames_array[i] = [i+1, heatmap_names[i]];
-            }
-            
-            $("#scale_max_placeholder").text(maxvalue);
-            $("#scale_mid_placeholder").text(((maxvalue-minvalue)/2)+minvalue);
-            $("#scale_min_placeholder").text(minvalue);
-            
-            var colorMap = new Array(7);
-            colorMap[0]="0000ff";
-            colorMap[1]="0099ff"; 
-            colorMap[2]="00ffff";
-            colorMap[3]="00ff00"; 
-            colorMap[4]="ffff00";
-            colorMap[5]="ff9900"; 
-            colorMap[6]="ff0000";
-            count = 0;
-            for (i = 0; i < heatmap_size; i++) {
-              for (j = 0; j < heatmap_size; j++) {
-                var opacity=0.9;
-                if (heatmap_data[count][2] == 0) {
-                  colorstring = '000099';
-                  opacity=0;
-                } else {
-                  opacity=0.9;
-                  var index = Math.round((heatmap_data[count][2] - minvalue) / (maxvalue - minvalue) * 7);
-                  if(index>6) {
-                    index=6;
-                  } else if(index<0) {
-                    index=0;
-                  }
-                  if(index==6) {
-                    opacity=0.9;
-                  } else if(index==5) {
-                    opacity=0.8;
-                  } else if(index==4) {
-                    opacity=0.7;
-                  } else if(index==3) {
-                    opacity=0.6;
-                  } else if(index==2) {
-                    opacity=0.5;
-                  } else if(index==1) {
-                    opacity=0.4;
-                  } else if(index==0) {
-                    opacity=0.3;
-                  }
-                  colorstring = colorMap[index];
-                }
-                
-                colorstring = '#' + colorstring;
-                color_array[count] = colorstring;
-                series_array[count] = { lines: {show: true, radius:999} };
-
-                graph_data_array[count] = {
-                  points: {show: true, radius: 20*opacity, lineWidth: 0, fill: opacity, fillColor: false }, 
-                  color: colorstring,
-                  data: [[(heatmap_data[count][0]+1)/SCALE, (heatmap_data[count][1]+1)/SCALE]]
-                }
-                graph_data_array_small[count] = {
-                  points: {show: true, radius: 4*opacity, lineWidth: 0, fill: opacity, fillColor: false}, 
-                  color: colorstring,
-                  data: [[(heatmap_data[count][0]+1)/SCALE, (heatmap_data[count][1]+1)/SCALE]]
-                }
-
-                count++;
-              }
-            }
-
-            graph_options = {
-              grid: { hoverable: true, backgroundColor: '#000099' },
-              yaxis: {autoscaleMargin: 0.1, ticks: [] },
-              xaxis: {autoscaleMargin: 0.1, ticks: [] },
-              selection: { mode: "xy" },
-              shadowSize: 0
-            };
-            graph_options_small = {
-              grid: { hoverable: true, backgroundColor: '#000099' },
-              yaxis: {autoscaleMargin: 0.1, ticks: [] },
-              xaxis: {autoscaleMargin: 0.1, ticks: [] },
-              selection: { mode: "xy" },
-              shadowSize: 0
-            };            
-          }
-        </script>
-        <script id="source3" language="javascript" type="text/javascript">
-// to eventually be moved out
-// this generates the actual flot options
-
-function plotGraph() {
-
-var placeholder = $("#placeholder");
-var plot = $.plot(placeholder, graph_data_array, graph_options);
-
-var smallplotplaceholder = $("#smallplotplaceholder");
-var smallplot = $.plot(smallplotplaceholder, graph_data_array_small, graph_options_small);
-
-placeholder.bind("plotselected", function (event, ranges) {
-  if (ranges.xaxis.to - ranges.xaxis.from < 0.00001)
-    ranges.xaxis.to = ranges.xaxis.from + 0.00001;
-  if (ranges.yaxis.to - ranges.yaxis.from < 0.00001)
-    ranges.yaxis.to = ranges.yaxis.from + 0.00001;
-
-  plot = $.plot(placeholder, graph_data_array,
-    $.extend(true, {}, graph_options, {
-    grid: { hoverable: true },
-    xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to }, 
-    yaxis: { min: ranges.yaxis.from, max: ranges.yaxis.to }
-    }
-  )
-);
-
-// don't fire event on the overview to prevent eternal loop
-smallplot.setSelection(ranges, true);
-
-});
-
-smallplotplaceholder.bind("plotselected", function (event, ranges) {
-  plot.setSelection(ranges);
-});
-
-
-
-// Hover text
-var previousPoint = null;
-$("#placeholder").bind("plothover", function (event, pos, item) {
-  if (item) {
-    if (previousPoint != item.datapoint) {
-      previousPoint = item.datapoint;
-
-      $("#tooltip").remove();
-      var x = item.datapoint[0].toFixed(2),
-      y = item.datapoint[1].toFixed(2);
-
-      showTooltip(item.pageX, item.pageY, lookupStateInfo(item.datapoint[0], item.datapoint[1]));
-
-    } else {
-      $("#tooltip").remove();
-      previousPoint = null;            
-    }
-  }
-});       
-
-}
-
-function lookupStateInfo(x,y) {
-  return graph_tooltips[x][y];
-}
-
-function showTooltip(x, y, contents) {
-  $('<div id="tooltip">' + contents + '</div>').css( {
-    position: 'absolute',
-    display: 'none',
-    top: y + 5,
-    left: x + 5,
-    border: '1px solid #fdd',
-    padding: '2px',
-    'background-color': '#fee',
-    opacity: 0.80
-  }).appendTo("body").fadeIn(200);
-}
-
-        </script>
-      </head><div FirebugVersion="1.3.3" style="display: none;" id="_firebugConsole"></div><body onload="generateData(); generateGraph(); plotGraph();">
-      <table cellpadding="0" cellspacing="0">
-        <tbody>
-          <tr>
-
-            <td align="right" valign="top" rowspan="1"><div id="placeholder" style="width: 400px; height: 400px; position: relative;"><canvas width="400" height="400"></canvas><canvas style="position: absolute; left: 0px; top: 0px;" width="400" height="400"></canvas></div></td>
-
-            <td rowspan="1"><div style="width:10px">&nbsp;</div></td>
-
-            <td align="middle"><div id="smallplotplaceholder", style="width:100px;height:100px;"><canvas style="position: absolute; left: 0px; top: 0px;" width="100" height="100"></canvas></div>
-            
-              <br />
-              
-              State: <b><%= prettyStateNames.get(query_state) %></b><br />
-              Statistic: <b><%= prettyStatisticNames.get(query_stats_mode) %></b>
-            
-            </td>
-
-          </tr>
-
-          <tr>
-            <td colspan="3" align="middle" valign="top">
-
-              <br />
-
-              <span id="resultcountholder">No results returned. </span>
-
-              <br />
-
-              <table cellpadding="0" cellspacing="4"><tbody>
-                <tr><th colspan="2">Scale</th></tr>
-                <tr>
-                  <td bgcolor="#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                  <td bgcolor="#ff9900">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                  <td bgcolor="#ffff00">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                  <td bgcolor="#00ff00">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                  <td bgcolor="#00ffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                  <td bgcolor="#0099ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                  <td bgcolor="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                  <td bgcolor="#000099">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                </tr>
-                
-                <tr>
-                  <td><span id="scale_max_placeholder"></span></td>
-                  <td>&nbsp;</td>
-                  <td>&nbsp;</td>
-                  <td><span id="scale_mid_placeholder"></span></td>
-                  <td>&nbsp;</td>
-                  <td>&nbsp;</td>
-                  <td><span id="scale_min_placeholder"></span></td>
-                  <td>0</td>
-                </tr>
-              </tbody></table>
-            </td>
-          </tr>
-
-        </tbody></table> 
-      </body></html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/help.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/help.jsp b/src/main/web/hicc/jsp/help.jsp
deleted file mode 100644
index 9d0fdb2..0000000
--- a/src/main/web/hicc/jsp/help.jsp
+++ /dev/null
@@ -1,48 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<html>
-<head>
-<link href="css/default.css" rel="stylesheet" type="text/css">
-</head>
-<body>
-<!-- TODO: check the parameter ID and forward to the proper help content -->
-<h1>Custom Period Input String Format</h1>
-You can type in normal English time string or absolute time string to specify the date. For example:
-<ul>
-<li>Time relative to now
-  <ul>
-     <li>2 months ago</li>
-     <li>3 weeks ago</li>
-     <li>2 hours ago</li>
-     <li>20 minutes ago</li>
-  </ul>
-</li>
-<li>Absolute Time
-  <ul>
-     <li>may 27 2009</li>
-     <li>may 27 5:00 pm</li>
-     <li>may 27 09 4:30</li>
-     <li>2009/04/12 04:30:50</li>
-     <li>2009-04-12 04:30:50</li>
-  </ul>
-</li>
-</ul>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/host_selector.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/host_selector.jsp b/src/main/web/hicc/jsp/host_selector.jsp
deleted file mode 100644
index 9ff8670..0000000
--- a/src/main/web/hicc/jsp/host_selector.jsp
+++ /dev/null
@@ -1,47 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.text.NumberFormat" %>
-<%@ page import = "java.util.Hashtable" %>
-<%@ page import = "java.util.Enumeration" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-  RequestDispatcher disp = null;
-  XssFilter xf = new XssFilter(request);
-  response.setContentType("text/html; chartset=UTF-8//IGNORE");
-  response.setHeader("boxId", xf.getParameter("boxId"));
-  String hostSelectorType="dropdown";
-  if(request.getParameter("style")!=null) {
-    hostSelectorType=xf.getParameter("style");
-  }
-  if(hostSelectorType.intern()=="role".intern()) {
-    disp = getServletContext( ).getRequestDispatcher("/jsp/host_selector_role.jsp");
-    disp.forward(request, response);
-  } else if(hostSelectorType.intern()=="dropdown".intern()) {
-    disp = getServletContext( ).getRequestDispatcher("/jsp/host_selector_dropdown.jsp");
-    disp.forward(request, response);
-  } else if(hostSelectorType.intern()=="user".intern()) {
-    disp = getServletContext( ).getRequestDispatcher("/jsp/host_selector_user.jsp");
-    disp.forward(request, response);
-  } 
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/host_selector_dropdown.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/host_selector_dropdown.jsp b/src/main/web/hicc/jsp/host_selector_dropdown.jsp
deleted file mode 100644
index f8e316b..0000000
--- a/src/main/web/hicc/jsp/host_selector_dropdown.jsp
+++ /dev/null
@@ -1,92 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "javax.servlet.http.*" %>
-<%@ page import = "java.sql.*" %>
-<%@ page import = "java.io.*" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.util.*" %>
-<%@ page import = "org.json.*" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.ClusterConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.DatabaseConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter"  %>
-<%@ page import = "org.apache.hadoop.chukwa.datastore.ChukwaHBaseStore"  %>
-<%@ page import = "org.apache.commons.logging.Log" %>
-<%@ page import = "org.apache.commons.logging.LogFactory" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.ExceptionUtil" %>
-<%
-  Log log = LogFactory.getLog(this.getClass());
-  XssFilter xf = new XssFilter(request);
-  String boxId = xf.getParameter("boxId");
-  response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<div class="panel">
-<h2>Hosts</h2>
-<fieldset>
-<div class="row">
-<select id="<%= boxId %>group_items" name="<%= boxId %>group_items" MULTIPLE size=10 class="formSelect" style="width:200px;">
-<%
-    JSONArray machineNames = null;
-    if(session.getAttribute("cache.machine_names")!=null) {
-      machineNames = new JSONArray(session.getAttribute("cache.machine_names").toString());
-    }
-    String cluster=xf.getParameter("cluster");
-    if(cluster!=null && !cluster.equals("null")) {
-      session.setAttribute("cluster",cluster);
-    } else {
-      cluster = (String) session.getAttribute("cluster");
-      if(cluster==null || cluster.equals("null")) {
-          cluster="demo";
-          session.setAttribute("cluster",cluster);
-      }
-    }
-    ClusterConfig cc = new ClusterConfig();
-    TimeHandler time = new TimeHandler(request,(String)session.getAttribute("time_zone"));
-    String startS = time.getStartTimeText();
-    String endS = time.getEndTimeText();
-    try {
-      HashMap<String, String> hosts = new HashMap<String, String>();      
-      try {
-        String[] selected_hosts = ((String)session.getAttribute("hosts")).split(",");
-        for(String name: selected_hosts) {
-          hosts.put(name,name);
-        }
-      } catch (NullPointerException e) {
-      }
-      Set<String> machines = ChukwaHBaseStore.getSourceNames("ChukwaMetrics");
-      for(String machine : machines) {
-        if(hosts.containsKey(machine)) {
-          out.println("<option selected>"+machine+"</option>");
-        } else {
-          out.println("<option>"+machine+"</option>");
-        }
-      }
-    } catch (Exception e) {
-      log.error(ExceptionUtil.getStackTrace(e));
-    }
-%>
-</select></div>
-<div class="row">
-<input type="button" onClick="save_host('<%= boxId %>');" name="Apply" value="Apply">
-</div>
-</fieldset>
-</div>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/host_selector_role.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/host_selector_role.jsp b/src/main/web/hicc/jsp/host_selector_role.jsp
deleted file mode 100644
index 33e62d0..0000000
--- a/src/main/web/hicc/jsp/host_selector_role.jsp
+++ /dev/null
@@ -1,90 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "javax.servlet.http.*" %>
-<%@ page import = "java.sql.*" %>
-<%@ page import = "java.io.*" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.util.*" %>
-<%@ page import = "org.json.*" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.Macro" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.ClusterConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.DatabaseWriter" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter"  %>
-<% XssFilter xf = new XssFilter(request);
-   String boxId = xf.getParameter("boxId");
-   response.setHeader("boxId", xf.getParameter("boxId"));
-   TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-   long start = time.getStartTime();
-   long end = time.getEndTime();
-   String cluster = (String) session.getAttribute("cluster");
-   boolean first = false;
-   String[] types = {"namenode","datanode","jobtracker","tasktracker"};
-   String[] queries = {"select distinct host from [dfs_namenode] where timestamp between '[start]' and '[end]'",
-                       "select distinct host from [hadoop_jvm] where process_name='datanode' and timestamp between '[start]' and '[end]'",
-                       "select distinct host from [hadoop_jvm] where process_name='jobtracker' and timestamp between '[start]' and '[end]'",
-                       "select distinct host from [hadoop_jvm] where process_name='tasktracker' and timestamp between '[start]' and '[end]'"};
-   int i = 0;
-   StringBuffer hosts = new StringBuffer();
-   JSONObject roles = new JSONObject();
-   for(String type : types) {
-     if(xf.getParameter(type)!=null) {
-       Macro mp = new Macro(start, end, queries[i]);
-       String query = mp.toString();
-       DatabaseWriter db = new DatabaseWriter(cluster);
-       try {
-         ResultSet rs = db.query(query);
-         while(rs.next()) {
-           if(!first) {
-             hosts.append(",");
-           }
-           hosts.append(rs.getString(1));
-           first=false;
-         }
-         roles.put(type,"checked");
-       } catch(SQLException ex) {
-       	 System.out.println("SQLException "+ ex + " on query " + query);
-         // Ignore if there is no data for the cluster.
-       } finally {
-         db.close();
-       }
-     } else {
-       roles.put(type,"");
-     }
-     i++;
-   }
-   if(xf.getParameter("save")!=null) {
-     session.setAttribute("hosts",hosts.toString());
-     session.setAttribute("host.selector.role",roles.toString());
-   } else {
-     if(session.getAttribute("host.selector.role")!=null) {
-       roles = new JSONObject(session.getAttribute("host.selector.role").toString());
-     }
-   }
-%>
-HDFS Cluster<br>
-<input type="checkbox" id="<%= boxId %>namenode" value="true" <%= roles.get("namenode") %>> Name Nodes<br>
-<input type="checkbox" id="<%= boxId %>datanode" value="true" <%= roles.get("datanode") %>> Data Nodes<br><br>
-Map Reduce Cluster<br>
-<input type="checkbox" id="<%= boxId %>jobtracker" value="true" <%= roles.get("jobtracker") %>> Job Tracker<br>
-<input type="checkbox" id="<%= boxId %>tasktracker" value="true" <%= roles.get("tasktracker") %>> Task Trackers<br><br>
-<input type="button" onClick="save_host_role('<%= boxId %>');" name="Apply" value="Apply">

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/host_selector_user.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/host_selector_user.jsp b/src/main/web/hicc/jsp/host_selector_user.jsp
deleted file mode 100644
index 0f67a35..0000000
--- a/src/main/web/hicc/jsp/host_selector_user.jsp
+++ /dev/null
@@ -1,35 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "javax.servlet.http.*" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter"  %>
-<% XssFilter xf = new XssFilter(request);
-   String boxId = xf.getParameter("boxId");
-   response.setHeader("boxId", xf.getParameter("boxId"));
-%>
-<h2>Hosts</h2>
-<textarea id="<%= boxId %>group_items" name="<%= boxId %>group_items" class="formSelect" style="width:200px;"><%
-  if(session.getAttribute("hosts")!=null) {
-    String[] machineNames = (session.getAttribute("hosts").toString()).split(",");
-    for(String node: machineNames) {
-      out.println(node);
-    }
-  }
-%></textarea><br>
-<input type="button" onClick="save_host_user('<%= boxId %>');" name="Apply" value="Apply">

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/image-viewer.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/image-viewer.jsp b/src/main/web/hicc/jsp/image-viewer.jsp
deleted file mode 100644
index d739077..0000000
--- a/src/main/web/hicc/jsp/image-viewer.jsp
+++ /dev/null
@@ -1,195 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "java.util.regex.Matcher" %>
-<%@ page import = "java.util.regex.Pattern" %>
-<%
-  Pattern p = Pattern.compile("(.*)\\.(.*)");
-  Matcher m = p.matcher(request.getAttribute("image-viewer").toString());
-  String filename = "";
-  if(m.matches()) {
-    filename = m.group(1);
-  }
-  int maxLevel = Integer.parseInt(request.getAttribute("maxLevel").toString());
-%>
-<html>
-  <head>
-    <style type="text/css" title="text/css">
-    <!--
-        body
-        {
-            color: black;
-            background-color: white;
-            font-family: helvetica, arial, sans-serif;
-        }
-        
-        .imageViewer
-        {
-            position: relative;
-            top: 0;
-            left: 0;
-            width: 100%;
-            height: 100%;
-        }
-        
-        .imageViewer .well, .imageViewer .surface
-        {
-            margin: 0;
-            padding: 0;
-            width: 100%;
-            height: 100%;
-            position: absolute;
-            top: 0px;
-            left: 0px;
-            cursor: default;
-            border: 1px solid black;
-        }
-        
-        .imageViewer .well
-        {
-            background-color: gray;
-            background-image: url("/hicc/images/blank.gif");
-            overflow: hidden;
-        }
-        
-        .imageViewer .surface        
-        {
-            background-color: transparent;
-            background-image: url("/hicc/images/blank.gif");
-            background-repeat: no-repeat;
-            background-position: center center;
-        }
-        
-        .imageViewer .status
-        {
-            margin: 0;
-            padding: 0;
-            position: absolute;
-            top: 480px;
-            left: 0px;
-            display: none;
-        }
-        
-            .imageViewer .well .tile
-            {
-                border: 0;
-                margin: 0;
-                padding: 0;
-                position: absolute;
-                top: 0px;
-                left: 0px;
-                display: block;
-            }
-            
-        .imageViewer .zoom        
-        {
-            background-color: white;
-            position: absolute;
-            top: 0px;
-            right: 0px;
-            width: 32px;
-            height: 20px;
-            margin: 0;
-            padding: 0 0 0 4px;
-            font-size: 20px;
-            line-height: 20px;
-            font-weight: bold;
-            border-left: 1px solid black;
-            border-top: 1px solid black;
-        }
-        
-            .imageViewer .zoom a
-            {
-                text-decoration: none;
-                color: black;
-            }
-        
-            .imageViewer .zoom .dump
-            {
-                font-size: 16px;
-            }
-        
-        h1, .description
-        {
-            margin-left: 100px;
-            width: 400px;
-        }
-        
-        h1
-        {
-            margin-top: 40px;
-        }
-        
-            h1 em
-            {
-                font-size: 50%;
-                color: gray;
-            }
-        
-    -->
-    </style>
-
-    <script src="/hicc/js/gsv.js" type="text/javascript"></script>
-    <script src="/hicc/js/behaviour.js" type="text/javascript"></script>
-
-    <script type="text/javascript">
-    <!--
-
-        Behaviour.register({
-            '.imageViewer' : function(el) {
-                prepareViewer(el, '/sandbox/<%= filename %>', 256);
-            },
-            '.imageViewer .zoom .up' : function(el) {
-                el.onclick = function() {
-                    zoomImageUp(el.parentNode.parentNode, undefined, <%= maxLevel %>);
-                    return false;
-                }
-            },
-            '.imageViewer .zoom .down' : function(el) {
-                el.onclick = function() {
-                    zoomImageDown(el.parentNode.parentNode, undefined, <%= maxLevel %>);
-                    return false;
-                }
-            },
-            '.imageViewer .zoom .dump' : function(el) {
-                el.onclick = function() {
-                    dumpInfo(el.parentNode.parentNode);
-                    return false;
-                }
-            }
-        });
-    
-    //-->
-    </script>
-  </head>
-<body>
-    <div class="imageViewer">
-        <div class="well"> </div>
-        <div class="surface"> </div>
-        <p class="status"> </p>
-        <p class="zoom">
-
-            <a class="up" href="#">+</a>
-            <a class="down" href="#">-</a>
-            <!-- a class="dump" href="#">?</a -->
-        </p>
-    </div>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/job_viewer.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/job_viewer.jsp b/src/main/web/hicc/jsp/job_viewer.jsp
deleted file mode 100644
index 56dbc32..0000000
--- a/src/main/web/hicc/jsp/job_viewer.jsp
+++ /dev/null
@@ -1,133 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.text.DecimalFormat,java.text.NumberFormat,java.sql.*,java.io.*, org.json.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.util.DatabaseWriter, org.apache.hadoop.chukwa.database.Macro, org.apache.hadoop.chukwa.util.XssFilter, org.apache.hadoop.chukwa.database.DatabaseConfig, java.util.ArrayList, org.apache.hadoop.hbase.HBaseConfiguration, org.apache.hadoop.hbase.client.HTableInterface, org.apache.hadoop.hbase.client.HTablePool, org.apache.hadoop.hbase.client.Result, org.apache.hadoop.hbase.client.ResultScanner, org.apache.hadoop.hbase.client.Scan, org.apache.hadoop.conf.Configuration"  %> 
-<%! final static private Configuration hconf = HBaseConfiguration.create(); %>
-<%! final static private HTablePool pool = new HTablePool(hconf, 60); %>
-<%
-    XssFilter xf = new XssFilter(request);
-    NumberFormat nf = new DecimalFormat("###,###,###,##0.00");
-    SimpleDateFormat format = new SimpleDateFormat("MMM dd yyyy HH:mm:ss");
-    response.setHeader("boxId", xf.getParameter("boxId"));
-    response.setContentType("text/html; chartset=UTF-8//IGNORE"); %>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-<link href="/hicc/css/flexigrid/flexigrid.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="/hicc/js/jquery-1.3.2.min.js"></script>
-<script type="text/javascript" src="/hicc/js/flexigrid.js"></script>
-</head>
-<body>
-<div class="flexigrid">
-<%
-    String boxId=xf.getParameter("boxId");
-    String cluster = (String) session.getAttribute("cluster");
-
-    TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-    long start = time.getStartTime();
-    long end = time.getEndTime();
-
-    HTableInterface table = pool.getTable("Jobs");
-    String family = "summary";
-
-    Scan scan = new Scan();
-    scan.addColumn(family.getBytes(), "jobId".getBytes());
-    scan.addColumn(family.getBytes(), "user".getBytes());
-    scan.addColumn(family.getBytes(), "submitTime".getBytes());
-    scan.addColumn(family.getBytes(), "launchTime".getBytes());
-    scan.addColumn(family.getBytes(), "finishTime".getBytes());
-    scan.addColumn(family.getBytes(), "status".getBytes());
-    scan.addColumn(family.getBytes(), "cluster".getBytes());
-    scan.addColumn(family.getBytes(), "queue".getBytes());
-    scan.addColumn(family.getBytes(), "numMaps".getBytes());
-    scan.addColumn(family.getBytes(), "numReduces".getBytes());
-    scan.addColumn(family.getBytes(), "numSlotsPerMap".getBytes());
-    scan.addColumn(family.getBytes(), "numSlotsPerReduce".getBytes());
-    scan.addColumn(family.getBytes(), "mapSlotSeconds".getBytes());
-    scan.addColumn(family.getBytes(), "reduceSlotsSeconds".getBytes());
-    scan.addColumn(family.getBytes(), "status".getBytes());
-    scan.setTimeRange(start, end);
-    scan.setMaxVersions();
-
-    ResultScanner results = table.getScanner(scan);
-    Iterator<Result> it = results.iterator();
-%>
-<table id="job_summary">
-<tr>
-  <td>Job ID</td>
-  <td>Cluster</td>
-  <td>User</td>
-  <td>Queue</td>
-  <td>Status</td>
-  <td>Submit Time</td>
-  <td>Launch Time</td>
-  <td>Finish Time</td>
-  <td>Number of Maps</td>
-  <td>Number of Reduces</td>
-  <td>Number of Slots Per Map</td>
-  <td>Number of Slots Per Reduce</td>
-  <td>Map Slots Seconds</td>
-  <td>Reduce Slots Seconds</td>
-</tr>
-<%
-    while(it.hasNext()) {
-      Result result = it.next();
-      boolean print = true;
-      if(xf.getParameter("job_id")!=null) {
-        print = false;
-      }
-      String jobId = new String(result.getValue(family.getBytes(), "jobId".getBytes()));
-      if(jobId.equals(xf.getParameter("job_id"))) {
-        print = true;
-      }
-      if(cluster!=null && cluster.equals(new String(result.getValue(family.getBytes(), "cluster".getBytes())))) {
-        print = true;
-      }
-      if(print) {
-%>
-<tr>
-  <td><%= new String(result.getValue(family.getBytes(), "jobId".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "cluster".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "user".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "queue".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "status".getBytes())) %></td>
-  <td><%= format.format(Long.parseLong(new String(result.getValue(family.getBytes(), "submitTime".getBytes())))) %></td>
-  <td><%= format.format(Long.parseLong(new String(result.getValue(family.getBytes(), "launchTime".getBytes())))) %></td>
-  <td><%= format.format(Long.parseLong(new String(result.getValue(family.getBytes(), "finishTime".getBytes())))) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "numMaps".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "numReduces".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "numSlotsPerMap".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "numSlotsPerReduce".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "mapSlotSeconds".getBytes())) %></td>
-  <td><%= new String(result.getValue(family.getBytes(), "reduceSlotsSeconds".getBytes())) %></td>
-</tr>
-<%
-      }
-    }
-    results.close();
-    table.close();
-%>
-</table>
-<script type="text/javascript">
-$(document).ready(function(){
-  $('#job_summary').flexigrid({title:'Job Summary',height:'340'});
-});
-</script>
-</div></body></html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/jobs_viewer.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/jobs_viewer.jsp b/src/main/web/hicc/jsp/jobs_viewer.jsp
deleted file mode 100644
index 549f8b5..0000000
--- a/src/main/web/hicc/jsp/jobs_viewer.jsp
+++ /dev/null
@@ -1,130 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.text.DecimalFormat,java.text.NumberFormat,java.sql.*,java.io.*, org.json.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.util.DatabaseWriter, org.apache.hadoop.chukwa.database.Macro, org.apache.hadoop.chukwa.util.XssFilter, org.apache.hadoop.chukwa.database.DatabaseConfig"  %> 
-<%
-    XssFilter xf = new XssFilter(request);
-    NumberFormat nf = new DecimalFormat("###,###,###,##0.00");
-    response.setHeader("boxId", xf.getParameter("boxId"));
-    response.setContentType("text/html; chartset=UTF-8//IGNORE");
-    String boxId=xf.getParameter("boxId");
-    String cluster = (String) session.getAttribute("cluster");
-    DatabaseWriter dbw = new DatabaseWriter(cluster);
-    String path = "";
-    Calendar now = Calendar.getInstance();
-    HashMap<String, Integer> index = new HashMap<String, Integer>();
-    long start = 0;
-    long end = now.getTimeInMillis();
-    String startS="";
-    String endS="";
-    String[] columns = xf.getParameterValues("column");
-    TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-    startS = time.getStartTimeText();
-    endS = time.getEndTimeText();
-    start = time.getStartTime();
-    end = time.getEndTime();
-    Macro mp = new Macro(start,end,"[util]", request);
-    int averageBy=600;
-    String tmpTable = mp.toString();
-    DatabaseConfig dbc = new DatabaseConfig();
-    String[] tableList = dbc.findTableNameForCharts("util", start, end);
-    if(tableList[0].endsWith("_week")) {
-      averageBy=600;
-    } else if(tableList[0].endsWith("_month")) {
-      averageBy=600;
-    } else if(tableList[0].endsWith("_quarter")) {
-      averageBy=1800;
-    } else if(tableList[0].endsWith("_year")) {
-      averageBy=10800;
-    } else if(tableList[0].endsWith("_decade")) {
-      averageBy=43200;
-    }
-    String query = "select count(*) from [mr_job] where finish_time between '[start]' and '[end]';";
-    mp = new Macro(start,end,query, request);
-    query = mp.toString();
-    ResultSet rs = dbw.query(query);
-    int total = 0;
-    if(rs.next()) {
-      total = rs.getInt(1);
-    }
-    StringBuilder queryBuilder = new StringBuilder();
-    queryBuilder.append("select job_id,submit_time,launch_time,finish_time,status from [mr_job]  where finish_time between '[start]' and '[end]' ");
-    if(xf.getParameter("user")!=null) {
-      queryBuilder.append("and user='");
-      queryBuilder.append(xf.getParameter("user"));
-      queryBuilder.append("'");
-    }
-    int pageNum = 0;
-    if(xf.getParameter("page")!=null) {
-      pageNum = Integer.parseInt(xf.getParameter("page"));
-      int rp = Integer.parseInt(xf.getParameter("rp"));
-      queryBuilder.append(" limit ");
-      queryBuilder.append((pageNum-1)*rp);
-      queryBuilder.append(",");
-      queryBuilder.append(rp);
-    }
-    mp = new Macro(start,end,queryBuilder.toString(), request);
-    query = mp.toString();
-    rs = dbw.query(query);
-    ResultSetMetaData rmeta = rs.getMetaData();
-    int col = rmeta.getColumnCount();
-    JSONObject data = new JSONObject();
-    JSONArray rows = new JSONArray();
-    while(rs.next()) {
-      JSONArray cells = new JSONArray();
-      for(int i=1;i<=col;i++) {
-        if(i==1) {
-          StringBuilder sb = new StringBuilder();
-          sb.append("<a href='/hicc/jsp/job_viewer.jsp?job_id=");
-          sb.append(rs.getString(i));
-          sb.append("&height=");
-          sb.append(xf.getParameter("height"));
-          sb.append("'>");
-          sb.append(rs.getString(i));
-          sb.append("</a>");
-          cells.put(sb.toString());
-        } else {
-          if(rmeta.getColumnType(i)==java.sql.Types.BIGINT ||
-            rmeta.getColumnType(i)==java.sql.Types.TINYINT ||
-            rmeta.getColumnType(i)==java.sql.Types.INTEGER) {
-            cells.put(nf.format(rs.getInt(i)));
-          } else if(rmeta.getColumnType(i)==java.sql.Types.FLOAT ||
-            rmeta.getColumnType(i)==java.sql.Types.DOUBLE ||
-            rmeta.getColumnType(i)==java.sql.Types.DECIMAL ) {
-            cells.put(nf.format(rs.getDouble(i)));
-          } else {
-            cells.put(rs.getString(i));
-          }
-        }
-      }
-      JSONObject row = new JSONObject();
-      if(rs.getString(1)!=null) {
-        row.put("id",rs.getString(1));
-      } else {
-        row.put("id","null");
-      }
-      row.put("cell",cells);
-      rows.put(row);
-    }
-    data.put("page",pageNum);
-    data.put("rows",rows);
-    data.put("total",total);
-    dbw.close();
-    out.println(data.toString());
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/permlink.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/permlink.jsp b/src/main/web/hicc/jsp/permlink.jsp
deleted file mode 100644
index 7e89fc9..0000000
--- a/src/main/web/hicc/jsp/permlink.jsp
+++ /dev/null
@@ -1,46 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "javax.servlet.http.*, java.net.URLEncoder, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*" %>
-<%!
-   public static String HTMLEntityEncode( String s ) {
-       StringBuffer buf = new StringBuffer();
-       int len = (s == null ? -1 : s.length());
-       for ( int i = 0; i < len; i++ ) {
-           char c = s.charAt( i );
-           if ( c>='a' && c<='z' || c>='A' && c<='Z' || c>='0' && c<='9' ) {
-               buf.append( c );
-           } else {
-               buf.append( "&#" + (int)c + ";" );
-           }
-       }
-       return buf.toString();
-   }
-%>
-<%
-   StringBuffer buf = new StringBuffer();
-   for (Enumeration e = session.getAttributeNames() ; e.hasMoreElements() ;) {
-       String name = (String) e.nextElement();
-       if(name.indexOf("_session.cache.")==-1) {
-           buf.append("_session."+name+"="+URLEncoder.encode(session.getAttribute(name).toString(),"UTF-8"));
-       }
-       buf.append("&");
-   }
-   out.println(buf.toString());
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/query.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/query.jsp b/src/main/web/hicc/jsp/query.jsp
deleted file mode 100644
index 89f6eca..0000000
--- a/src/main/web/hicc/jsp/query.jsp
+++ /dev/null
@@ -1,113 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.text.DecimalFormat,java.text.NumberFormat" %>
-<%@ page import = "java.sql.*" %>
-<%@ page import = "java.io.*" %>
-<%@ page import = "org.json.*" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.util.*" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.ClusterConfig" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.DatabaseWriter" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.Macro" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "org.apache.hadoop.chukwa.database.DatabaseConfig" %>
-<%
-    XssFilter xf = new XssFilter(request);
-    NumberFormat nf = new DecimalFormat("###,###,###,##0.00");
-    response.setHeader("boxId", xf.getParameter("boxId"));
-    response.setContentType("text/html; chartset=UTF-8//IGNORE");
-    String boxId=xf.getParameter("boxId");
-    String cluster = (String) session.getAttribute("cluster");
-    DatabaseWriter dbw = new DatabaseWriter(cluster);
-    String path = "";
-    Calendar now = Calendar.getInstance();
-    HashMap<String, Integer> index = new HashMap<String, Integer>();
-    long start = 0;
-    long end = now.getTimeInMillis();
-    String startS="";
-    String endS="";
-    String[] columns = xf.getParameterValues("column");
-    TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
-    startS = time.getStartTimeText();
-    endS = time.getEndTimeText();
-    start = time.getStartTime();
-    end = time.getEndTime();
-    String queryMacro = session.getAttribute("query_"+xf.getParameter("boxId")).toString();
-    Macro mp = new Macro(start,end,queryMacro, request);
-    int pageNum = 0;
-    int rp = 15;
-    if(xf.getParameter("page")!=null) {
-      pageNum = Integer.parseInt(xf.getParameter("page"));
-      rp = Integer.parseInt(xf.getParameter("rp")); 
-    }
-    int total=0;
-    if(xf.getParameter("total")!=null) {
-      total = Integer.parseInt(xf.getParameter("total"));
-    }
-    StringBuilder query = new StringBuilder();
-    String q = mp.toString();
-    query.append(q);
-    
-    if(q.indexOf("select ")!=-1 && q.indexOf("limit")==-1) {
-      query.append(" limit ");
-      query.append(pageNum);
-      query.append(",");
-      query.append(rp);
-    }
-    
-    ResultSet rs = dbw.query(query.toString());
-    ResultSetMetaData rmeta = rs.getMetaData();
-    int col = rmeta.getColumnCount();
-    JSONObject data = new JSONObject();
-    JSONArray rows = new JSONArray();
-    while(rs.next()) {
-      JSONArray cells = new JSONArray();
-      for(int i=1;i<=col;i++) {
-        if(rmeta.getColumnType(i)==java.sql.Types.BIGINT) {
-          cells.put(nf.format(rs.getBigDecimal(i)));
-        } else if(rmeta.getColumnType(i)==java.sql.Types.TINYINT ||
-          rmeta.getColumnType(i)==java.sql.Types.INTEGER) {
-          cells.put(nf.format(rs.getInt(i)));
-        } else if(rmeta.getColumnType(i)==java.sql.Types.FLOAT ||
-          rmeta.getColumnType(i)==java.sql.Types.DOUBLE ||
-          rmeta.getColumnType(i)==java.sql.Types.DECIMAL ) {
-          cells.put(nf.format(rs.getDouble(i)));
-        } else {
-          cells.put(rs.getString(i));
-        }
-      }
-      JSONObject row = new JSONObject();
-      if(rs.getString(1)!=null) {
-        row.put("id",rs.getString(1));
-      } else {
-        row.put("id","null");
-      }
-      row.put("cell",cells);
-      rows.put(row);
-    }
-    data.put("page",pageNum);
-    data.put("rows",rows);
-    data.put("total",total);
-    dbw.close();
-    out.println(data.toString());
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/session.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/session.jsp b/src/main/web/hicc/jsp/session.jsp
deleted file mode 100644
index 8973a0a..0000000
--- a/src/main/web/hicc/jsp/session.jsp
+++ /dev/null
@@ -1,31 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "javax.servlet.http.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, org.apache.hadoop.chukwa.util.XssFilter" %>
-<%
-       XssFilter xf = new XssFilter(request);
-       for (Enumeration e = request.getParameterNames() ; e.hasMoreElements() ;) {
-           String name = (String) e.nextElement();
-           if(name.equals("_delete")) {
-               session.setAttribute(xf.getParameter(name),null);
-           } else {
-               session.setAttribute(xf.filter(name),xf.getParameter(name));
-           }
-       }
-%>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/6e9e7899/src/main/web/hicc/jsp/sql_client.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/sql_client.jsp b/src/main/web/hicc/jsp/sql_client.jsp
deleted file mode 100644
index c7cada9..0000000
--- a/src/main/web/hicc/jsp/sql_client.jsp
+++ /dev/null
@@ -1,69 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page import = "java.text.SimpleDateFormat" %>
-<%@ page import = "java.text.NumberFormat" %>
-<%@ page import = "java.util.Hashtable" %>
-<%@ page import = "java.util.Enumeration" %>
-<%@ page import = "java.util.Calendar" %>
-<%@ page import = "java.util.Date" %>
-<%@ page import = "java.util.regex.Pattern" %>
-<%@ page import = "java.util.regex.Matcher" %>
-<%@ page import = "org.apache.hadoop.chukwa.hicc.TimeHandler" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.XssFilter" %>
-<%@ page import = "org.apache.hadoop.chukwa.util.ExceptionUtil" %>
-<%
-  RequestDispatcher disp = null;
-  XssFilter xf = new XssFilter(request);
-  response.setContentType("text/html; chartset=UTF-8//IGNORE");
-  response.setHeader("boxId", xf.getParameter("boxId"));
-  Pattern pDelete = Pattern.compile("delete*from", Pattern.CASE_INSENSITIVE);
-  Pattern pInsert = Pattern.compile("insert ", Pattern.CASE_INSENSITIVE);
-  Pattern pReplace = Pattern.compile("replace ", Pattern.CASE_INSENSITIVE);
-  Pattern pDrop = Pattern.compile("drop ", Pattern.CASE_INSENSITIVE);
-  Pattern pUpdate = Pattern.compile("update ", Pattern.CASE_INSENSITIVE);
-  try {
-    String format="table";
-    if(request.getParameter("render")!=null) {
-      format=xf.getParameter("render");
-    }
-    if(pDelete.matcher(xf.getParameter("query")).matches() ||
-       pInsert.matcher(xf.getParameter("query")).matches() ||
-       pReplace.matcher(xf.getParameter("query")).matches() ||
-       pDrop.matcher(xf.getParameter("query")).matches() ||
-       pUpdate.matcher(xf.getParameter("query")).matches()) {
-       throw new Exception("Read only query supported");
-    }
-    if(format.intern()=="table".intern()) {
-      disp = getServletContext( ).getRequestDispatcher("/jsp/table.jsp");
-      disp.forward(request, response);
-    } else if(format.intern()=="area".intern() ||
-        format.intern()=="bar".intern() ||
-        format.intern()=="line".intern() ||
-        format.intern()=="point".intern() ||
-        format.intern()=="stack-area".intern()) {
-      disp = getServletContext( ).getRequestDispatcher("/jsp/single-series-chart-javascript.jsp");
-      disp.forward(request, response);
-    }
-  } catch(Exception ex) {
-    out.println("Unsupported query.<pre>");
-    out.println(ExceptionUtil.getStackTrace(ex));
-    out.println("</pre>");
-  } 
-%>


[4/9] chukwa git commit: CHUKWA-778. Added pie chart, circle chart and timeline javascripts. (Eric Yang)

Posted by ey...@apache.org.
http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/src/main/web/hicc/timeline/css/styles.css
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/timeline/css/styles.css b/src/main/web/hicc/timeline/css/styles.css
new file mode 100644
index 0000000..075c8c7
--- /dev/null
+++ b/src/main/web/hicc/timeline/css/styles.css
@@ -0,0 +1,621 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*----------------------------------------------------------------------------------- */
+/*  Fonts */
+/*----------------------------------------------------------------------------------- */
+@font-face {
+  font-family: "Source Sans Pro";
+  font-style: normal;
+  font-weight: 400;
+  src: local("Source Sans Pro"), local("SourceSansPro-Regular"), url(https://themes.googleusercontent.com/static/fonts/sourcesanspro/v7/ODelI1aHBYDBqgeIAH2zlNHq-FFgoDNV3GTKpHwuvtI.woff) format("woff"); }
+
+@font-face {
+  font-family: "Source Sans Pro";
+  font-style: normal;
+  font-weight: 600;
+  src: local("Source Sans Pro Semibold"), local("SourceSansPro-Semibold"), url(https://themes.googleusercontent.com/static/fonts/sourcesanspro/v7/toadOcfmlt9b38dHJxOBGCmgpmuQqK2I-L2S9cF65Ek.woff) format("woff"); }
+
+@font-face {
+  font-family: "Source Sans Pro";
+  font-style: normal;
+  font-weight: 700;
+  src: local("Source Sans Pro Bold"), local("SourceSansPro-Bold"), url(https://themes.googleusercontent.com/static/fonts/sourcesanspro/v7/toadOcfmlt9b38dHJxOBGIqjGYJUyOXcBwUQbRaNH6c.woff) format("woff"); }
+
+@font-face {
+  font-family: "Source Sans Pro";
+  font-style: normal;
+  font-weight: 900;
+  src: local("Source Sans Pro Black"), local("SourceSansPro-Black"), url(https://themes.googleusercontent.com/static/fonts/sourcesanspro/v7/toadOcfmlt9b38dHJxOBGC7eGk4PJkA83J1AXCmgUfc.woff) format("woff"); }
+
+/*----------------------------------------------------------------------------------- */
+/*  Document Setup */
+/*----------------------------------------------------------------------------------- */
+* {
+  outline: none !important; }
+
+body {
+  font-family: "Source Sans Pro", sans-serif;
+  color: black;
+  background-color: #eef2f2;
+  font-size: 15px;
+  padding-bottom: 50px; }
+
+h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
+  font-weight: 700; }
+  h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small {
+    font-size: 55%; }
+
+h1, .h1 {
+  font-size: 60px;
+  letter-spacing: -0.03em; }
+
+h2, .h2 {
+  font-size: 30px; }
+
+h3, .h3 {
+  font-size: 25px; }
+
+h4, .h4 {
+  font-size: 20px; }
+
+h5, .h5 {
+  font-size: 15px;
+  font-weight: 400; }
+
+h6, .h6 {
+  font-size: 13px;
+  font-weight: 600; }
+
+p {
+  margin-bottom: 15px; }
+
+.lead {
+  font-weight: 300; }
+
+strong {
+  font-weight: 700; }
+
+a {
+  color: #32b9b1; }
+  a:hover {
+    color: #666666;
+    text-decoration: none; }
+
+blockquote {
+  border-color: #dddddd; }
+
+hr {
+  border-color: #d0d0d0; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Background color helper classes */
+/*----------------------------------------------------------------------------------- */
+.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger, .bg-muted {
+  color: white; }
+  .bg-primary .page-header, .bg-success .page-header, .bg-info .page-header, .bg-warning .page-header, .bg-danger .page-header, .bg-muted .page-header {
+    color: white; }
+
+.bg-primary {
+  background-color: #32b9b1; }
+
+.bg-success {
+  background-color: #51be38; }
+
+.bg-info {
+  background-color: #5bc0de; }
+
+.bg-warning {
+  background-color: #ef9544; }
+
+.bg-danger {
+  background-color: #f05a5b; }
+
+.bg-muted {
+  background-color: #bbbbbb; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Buttons */
+/*----------------------------------------------------------------------------------- */
+.btn {
+  border: 1px solid rgba(0, 0, 0, 0.25) !important;
+  font-weight: 600; }
+  .btn.active, .btn:active {
+    box-shadow: none; }
+
+.btn-primary {
+  background: #32b9b1; }
+  .btn-primary:hover, .btn-primary.active, .btn-primary:focus {
+    background: #2ea9a2; }
+
+.btn-success {
+  background: #51be38; }
+  .btn-success:hover, .btn-success.active, .btn-success:focus {
+    background: #4aae33; }
+
+.btn-info {
+  background: #5bc0de; }
+  .btn-info:hover, .btn-info.active, .btn-info:focus {
+    background: #4ab9db; }
+
+.btn-warning {
+  background: #ef9544; }
+  .btn-warning:hover, .btn-warning.active, .btn-warning:focus {
+    background: #ed8a31; }
+
+.btn-danger {
+  background: #f05a5b; }
+  .btn-danger:hover, .btn-danger.active, .btn-danger:focus {
+    background: #ee4748; }
+
+.btn-link {
+  color: #32b9b1; }
+
+.btn-group.open .dropdown-toggle {
+  box-shadow: none; }
+  .btn-group.open .dropdown-toggle.btn-primary {
+    background-color: #227d77;
+    border-color: #227d77; }
+    .btn-group.open .dropdown-toggle.btn-primary .caret {
+      border-top-color: white; }
+  .btn-group.open .dropdown-toggle.btn-success {
+    background-color: #388327;
+    border-color: #388327; }
+    .btn-group.open .dropdown-toggle.btn-success .caret {
+      border-top-color: white; }
+  .btn-group.open .dropdown-toggle.btn-info {
+    background-color: #28a1c5;
+    border-color: #28a1c5; }
+    .btn-group.open .dropdown-toggle.btn-info .caret {
+      border-top-color: white; }
+  .btn-group.open .dropdown-toggle.btn-warning {
+    background-color: #d46e12;
+    border-color: #d46e12; }
+    .btn-group.open .dropdown-toggle.btn-warning .caret {
+      border-top-color: white; }
+  .btn-group.open .dropdown-toggle.btn-danger {
+    background-color: #e81517;
+    border-color: #e81517; }
+    .btn-group.open .dropdown-toggle.btn-danger .caret {
+      border-top-color: white; }
+
+.btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group {
+  margin-left: -2px; }
+.btn-group.open .dropdown-toggle {
+  box-shadow: none; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Nav pills */
+/*----------------------------------------------------------------------------------- */
+.nav-pills > li > a {
+  font-weight: 600; }
+  .nav-pills > li > a:hover {
+    background-color: rgba(0, 0, 0, 0.05); }
+
+.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
+  background-color: #32b9b1; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Dropdowns */
+/*----------------------------------------------------------------------------------- */
+.dropdown-menu {
+  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
+  text-align: left; }
+  .dropdown-menu > li > a {
+    color: black;
+    padding: 5px 12px 7px; }
+  .dropdown-menu > li:first-child a {
+    border: 0; }
+  .dropdown-menu .divider {
+    margin: 4px 0; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Tables */
+/*----------------------------------------------------------------------------------- */
+.table thead tr th {
+  font-weight: 700;
+  background-color: rgba(255, 255, 255, 0.6) !important;
+  color: black;
+  border: 0;
+  vertical-align: middle; }
+.table tbody {
+  background-color: white; }
+  .table tbody tr td {
+    font-size: 14px;
+    border-top: 0;
+    vertical-align: middle; }
+.table tfoot > tr > td {
+  border-top: 0; }
+.table tfoot > tr:first-child > td {
+  border-top: 1px solid #dddddd;
+  padding-top: 15px; }
+
+.table-striped > tbody > tr:nth-child(odd) > td, .table-striped > tbody > tr:nth-child(odd) > th {
+  background-color: rgba(0, 0, 0, 0.05); }
+
+.table > thead > tr > td.success, .table > tbody > tr > td.success, .table > tfoot > tr > td.success, .table > thead > tr > th.success, .table > tbody > tr > th.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > tbody > tr.success > td, .table > tfoot > tr.success > td, .table > thead > tr.success > th, .table > tbody > tr.success > th, .table > tfoot > tr.success > th {
+  background-color: #51be38;
+  color: white; }
+
+.table > thead > tr > td.info, .table > tbody > tr > td.info, .table > tfoot > tr > td.info, .table > thead > tr > th.info, .table > tbody > tr > th.info, .table > tfoot > tr > th.info, .table > thead > tr.info > td, .table > tbody > tr.info > td, .table > tfoot > tr.info > td, .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th {
+  background-color: #5bc0de;
+  color: white; }
+
+.table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot > tr > td.warning, .table > thead > tr > th.warning, .table > tbody > tr > th.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > tbody > tr.warning > td, .table > tfoot > tr.warning > td, .table > thead > tr.warning > th, .table > tbody > tr.warning > th, .table > tfoot > tr.warning > th {
+  background-color: #ef9544;
+  color: white; }
+
+.table > thead > tr > td.danger, .table > tbody > tr > td.danger, .table > tfoot > tr > td.danger, .table > thead > tr > th.danger, .table > tbody > tr > th.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > tbody > tr.danger > td, .table > tfoot > tr.danger > td, .table > thead > tr.danger > th, .table > tbody > tr.danger > th, .table > tfoot > tr.danger > th {
+  background-color: #f05a5b;
+  color: white; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Labels */
+/*----------------------------------------------------------------------------------- */
+.label-primary {
+  background-color: #32b9b1; }
+
+.label-default {
+  background-color: #bbbbbb; }
+
+.label-success {
+  background-color: #51be38; }
+
+.label-info {
+  background-color: #5bc0de; }
+
+.label-warning {
+  background-color: #ef9544; }
+
+.label-danger {
+  background-color: #f05a5b; }
+
+/*----------------------------------------------------------------------------------- */
+/*  List groups */
+/*----------------------------------------------------------------------------------- */
+.list-group .list-group-item.active, .list-group .list-group-item.active:hover, .list-group .list-group-item.active:focus {
+  color: white;
+  background-color: #32b9b1;
+  border-color: #27918b; }
+  .list-group .list-group-item.active .badge, .list-group .list-group-item.active:hover .badge, .list-group .list-group-item.active:focus .badge {
+    color: #32b9b1;
+    background-color: white; }
+
+a.list-group-item.active, a.list-group-item.active:hover, a.list-group-item.active:focus {
+  background-color: #32b9b1;
+  border-color: #32b9b1; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Form styles */
+/*----------------------------------------------------------------------------------- */
+label {
+  font-weight: 600;
+  font-size: 16px;
+  margin-bottom: 8px; }
+
+.form-group {
+  margin-bottom: 25px; }
+
+.form-control {
+  border: 0;
+  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
+  .form-control:focus {
+    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
+
+.input-group {
+  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
+  border-radius: 4px; }
+  .input-group.input-group-lg {
+    border-radius: 6px; }
+  .input-group.input-daterange {
+    border-radius: 4px; }
+  .input-group .form-control {
+    border: 0;
+    box-shadow: none; }
+  .input-group .input-group-btn .btn {
+    margin: 0 !important;
+    border: 0 !important; }
+  .input-group .input-group-addon {
+    background-color: rgba(255, 255, 255, 0.2);
+    border: 0;
+    color: black; }
+
+.input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group {
+  margin-right: -2px;
+  position: relative;
+  z-index: 10; }
+
+.input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group {
+  margin-left: -2px; }
+
+.has-feedback .form-control-feedback {
+  top: 50%;
+  margin-top: -17px; }
+
+.has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline {
+  color: #60c560; }
+.has-success .form-control {
+  border-color: #60c560; }
+.has-success .form-control-feedback {
+  color: #60c560; }
+
+.has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline {
+  color: #f0ad4e; }
+.has-warning .form-control {
+  border-color: #f0ad4e; }
+.has-warning .form-control-feedback {
+  color: #f0ad4e; }
+
+.has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline {
+  color: #d9534f; }
+.has-error .form-control {
+  border-color: #d9534f; }
+.has-error .form-control-feedback {
+  color: #d9534f; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Emphasis Classes */
+/*----------------------------------------------------------------------------------- */
+.text-primary {
+  color: #32b9b1; }
+
+.text-success {
+  color: #51be38; }
+
+.text-info {
+  color: #5bc0de; }
+
+.text-warning {
+  color: #ef9544; }
+
+.text-danger {
+  color: #f05a5b; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Panels */
+/*----------------------------------------------------------------------------------- */
+.panel {
+  border: 0; }
+  .panel .panel-body {
+    padding: 20px; }
+
+.panel-heading .panel-toggle {
+  background: #f9fafa; }
+.panel-heading .panel-title {
+  font-size: 18px; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Tab Styles */
+/*----------------------------------------------------------------------------------- */
+.nav-tabs > li > a {
+  border-radius: 0px; }
+  .nav-tabs > li > a:hover {
+    background-color: rgba(0, 0, 0, 0.05); }
+.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
+  background-color: white; }
+
+.tab-content {
+  background-color: white;
+  border: 1px solid #dddddd;
+  border-top: 0;
+  padding: 15px 15px 5px; }
+
+/*----------------------------------------------------------------------------------- */
+/*  Progress Bars */
+/*----------------------------------------------------------------------------------- */
+.progress {
+  box-shadow: none;
+  border-radius: 10px;
+  background-color: rgba(0, 0, 0, 0.06); }
+  .progress .progress-bar {
+    box-shadow: none;
+    background-color: #32b9b1; }
+  .progress .progress-bar-success {
+    background-color: #51be38; }
+  .progress .progress-bar-info {
+    background-color: #5bc0de; }
+  .progress .progress-bar-warning {
+    background-color: #ef9544; }
+  .progress .progress-bar-danger {
+    background-color: #f05a5b; }
+
+.well {
+  box-shadow: none;
+  background-color: rgba(0, 0, 0, 0.05); }
+
+body {
+  background-color: #5bbcd5;
+  padding: 5em 0; }
+
+.timeline {
+  list-style: none;
+  position: relative;
+  max-width: 1200px;
+  padding: 20px;
+  margin: 0 auto;
+  overflow: hidden; }
+  .timeline:after {
+    content: "";
+    position: absolute;
+    top: 0;
+    left: 50%;
+    margin-left: -2px;
+    background-color: rgba(0, 0, 0, 0.2);
+    height: 100%;
+    width: 4px;
+    border-radius: 2px;
+    display: block; }
+  .timeline .timeline-row {
+    padding-left: 50%;
+    position: relative;
+    z-index: 10; }
+    .timeline .timeline-row .timeline-time {
+      position: absolute;
+      right: 50%;
+      top: 31px;
+      text-align: right;
+      margin-right: 40px;
+      font-size: 16px;
+      line-height: 1.3;
+      font-weight: 600; }
+      .timeline .timeline-row .timeline-time small {
+        display: block;
+        color: white;
+        text-transform: uppercase;
+        opacity: 0.75;
+        font-size: 11px;
+        font-weight: 400; }
+    .timeline .timeline-row .timeline-icon {
+      position: absolute;
+      top: 30px;
+      left: 50%;
+      margin-left: -20px;
+      width: 40px;
+      height: 40px;
+      border-radius: 50%;
+      background-color: white;
+      text-align: center;
+      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
+      overflow: hidden;
+      padding: 3px;
+      color: white;
+      font-size: 14px;
+      z-index: 100; }
+      .timeline .timeline-row .timeline-icon > div {
+        border-radius: 50%;
+        line-height: 34px;
+        font-size: 16px; }
+    .timeline .timeline-row .timeline-content {
+      margin-left: 40px;
+      position: relative;
+      background-color: white;
+      color: #333333; }
+      .timeline .timeline-row .timeline-content:after {
+        content: "";
+        position: absolute;
+        top: 48px;
+        left: -41px;
+        height: 4px;
+        width: 40px;
+        background-color: rgba(0, 0, 0, 0.2);
+        z-index: -1; }
+      .timeline .timeline-row .timeline-content .panel-body {
+        padding: 15px 15px 2px;
+        position: relative;
+        z-index: 10; }
+      .timeline .timeline-row .timeline-content h2 {
+        font-size: 22px;
+        margin-bottom: 12px;
+        margin-top: 0;
+        line-height: 1.2; }
+      .timeline .timeline-row .timeline-content p {
+        margin-bottom: 15px; }
+      .timeline .timeline-row .timeline-content img {
+        margin-bottom: 15px; }
+      .timeline .timeline-row .timeline-content blockquote {
+        border-color: #eeeeee; }
+        .timeline .timeline-row .timeline-content blockquote footer, .timeline .timeline-row .timeline-content blockquote small, .timeline .timeline-row .timeline-content blockquote .small, .timeline .timeline-row .timeline-content blockquote.blockquote-reverse footer, .timeline .timeline-row .timeline-content blockquote.blockquote-reverse small, .timeline .timeline-row .timeline-content blockquote.blockquote-reverse .small {
+          color: #999999; }
+      .timeline .timeline-row .timeline-content .video-container {
+        position: relative;
+        padding-bottom: 56.25%;
+        padding-top: 30px;
+        height: 0;
+        margin-bottom: 15px;
+        overflow: hidden; }
+        .timeline .timeline-row .timeline-content .video-container iframe, .timeline .timeline-row .timeline-content .video-container object, .timeline .timeline-row .timeline-content .video-container embed {
+          position: absolute;
+          top: 0;
+          left: 0;
+          width: 100%;
+          height: 100%; }
+    .timeline .timeline-row:nth-child(odd) {
+      padding-left: 0;
+      padding-right: 50%; }
+      .timeline .timeline-row:nth-child(odd) .timeline-time {
+        right: auto;
+        left: 50%;
+        text-align: left;
+        margin-right: 0;
+        margin-left: 40px; }
+      .timeline .timeline-row:nth-child(odd) .timeline-content {
+        margin-right: 40px;
+        margin-left: 0; }
+        .timeline .timeline-row:nth-child(odd) .timeline-content:after {
+          left: auto;
+          right: -41px; }
+  .timeline.animated .timeline-row .timeline-content {
+    opacity: 0;
+    left: 20px;
+    -webkit-transition: all 0.8s;
+    -moz-transition: all 0.8s;
+    transition: all 0.8s; }
+  .timeline.animated .timeline-row:nth-child(odd) .timeline-content {
+    left: -20px; }
+  .timeline.animated .timeline-row.active .timeline-content {
+    opacity: 1;
+    left: 0; }
+  .timeline.animated .timeline-row.active:nth-child(odd) .timeline-content {
+    left: 0; }
+
+@media (max-width: 1200px) {
+  .timeline {
+    padding: 15px 10px; }
+    .timeline:after {
+      left: 28px; }
+    .timeline .timeline-row {
+      padding-left: 0;
+      margin-bottom: 16px; }
+      .timeline .timeline-row .timeline-time {
+        position: relative;
+        right: auto;
+        top: 0;
+        text-align: left;
+        margin: 0 0 6px 56px; }
+        .timeline .timeline-row .timeline-time strong {
+          display: inline-block;
+          margin-right: 10px; }
+      .timeline .timeline-row .timeline-icon {
+        top: 52px;
+        left: -2px;
+        margin-left: 0; }
+      .timeline .timeline-row .timeline-content {
+        margin-left: 56px;
+        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
+        position: relative; }
+        .timeline .timeline-row .timeline-content:after {
+          right: auto !important;
+          left: -20px !important;
+          top: 32px; }
+      .timeline .timeline-row:nth-child(odd) {
+        padding-right: 0; }
+        .timeline .timeline-row:nth-child(odd) .timeline-time {
+          position: relative;
+          right: auto;
+          left: auto;
+          top: 0;
+          text-align: left;
+          margin: 0 0 6px 56px; }
+        .timeline .timeline-row:nth-child(odd) .timeline-content {
+          margin-right: 0;
+          margin-left: 55px; }
+    .timeline.animated .timeline-row:nth-child(odd) .timeline-content {
+      left: 20px; }
+    .timeline.animated .timeline-row.active:nth-child(odd) .timeline-content {
+      left: 0; } }
+
+

http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/src/main/web/hicc/timeline/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/timeline/index.html b/src/main/web/hicc/timeline/index.html
new file mode 100644
index 0000000..f5bdfc4
--- /dev/null
+++ b/src/main/web/hicc/timeline/index.html
@@ -0,0 +1,192 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Timeline</title>
+    <link href="/hicc/css/bootstrap.min.css" media="all" rel="stylesheet">
+    <link href="/hicc/css/font-awesome.min.css" media="all" rel="stylesheet">
+    <link href="css/styles.css" media="all" rel="stylesheet">
+    <script src="/hicc/home/js/modernizr.min.js"></script>
+    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
+  </head>
+  <body>
+    <div class="timeline animated">
+      <div class="timeline-row">
+        <div class="timeline-time">
+          <small>Oct 30</small>4:53 PM
+        </div>
+        <div class="timeline-icon">
+          <div class="bg-primary">
+            <i class="fa fa-pencil"></i>
+          </div>
+        </div>
+        <div class="panel timeline-content">
+          <div class="panel-body">
+            <h2>
+              Restart Cluster
+            </h2>
+            <p>
+              Cluster restarted normally.
+            </p>
+          </div>
+        </div>
+      </div>
+      <div class="timeline-row">
+        <div class="timeline-time">
+          <small>Oct 25</small>6:14 PM
+        </div>
+        <div class="timeline-icon">
+          <div class="bg-warning">
+            <i class="fa fa-quote-right"></i>
+          </div>
+        </div>
+        <div class="panel timeline-content">
+          <div class="panel-body">
+            <blockquote>
+              <p>
+                Hive metastore node is disk full.
+              </p>
+              <small>Hive alert check</small></blockquote>
+          </div>
+        </div>
+      </div>
+      <div class="timeline-row">
+        <div class="timeline-time">
+          <small>Oct 16</small>9:00 AM
+        </div>
+        <div class="timeline-icon">
+          <div class="bg-info">
+            <i class="fa fa-camera"></i>
+          </div>
+        </div>
+        <div class="panel timeline-content">
+          <div class="panel-body">
+            <h2>
+              Configure HDFS Heap Size
+            </h2>
+            <p>
+              Adjusted Namenode Heap to 2048MB.
+            </p>
+          </div>
+        </div>
+      </div>
+      <div class="timeline-row">
+        <div class="timeline-time">
+          <small>Oct 12</small>1:14 PM
+        </div>
+        <div class="timeline-icon">
+          <div class="bg-primary">
+            <i class="fa fa-video-camera"></i>
+          </div>
+        </div>
+        <div class="panel timeline-content">
+          <div class="panel-body">
+            <h2>
+              Add a new datanode
+            </h2>
+            <p>
+              Host bdvs1296.svl.ibm.com added to HDFS service.
+            </p>
+          </div>
+        </div>
+      </div>
+      <div class="timeline-row">
+        <div class="timeline-time">
+          <small>Oct 10</small>4:53 PM
+        </div>
+        <div class="timeline-icon">
+          <div class="bg-primary">
+            <i class="fa fa-pencil"></i>
+          </div>
+        </div>
+        <div class="panel timeline-content">
+          <div class="panel-body">
+            <h2>
+              Filesystem Check
+            </h2>
+            <p>
+              File system is running normally.
+            </p>
+          </div>
+        </div>
+      </div>
+      <div class="timeline-row">
+        <div class="timeline-time">
+          <small>Oct 9</small>6:14 PM
+        </div>
+        <div class="timeline-icon">
+          <div class="bg-warning">
+            <i class="fa fa-quote-right"></i>
+          </div>
+        </div>
+        <div class="panel timeline-content">
+          <div class="panel-body">
+            <blockquote>
+              <p>
+                HBase major compaction started.
+              </p>
+              <small>HBase Health Check</small></blockquote>
+          </div>
+        </div>
+      </div>
+      <div class="timeline-row">
+        <div class="timeline-time">
+          <small>Oct 6</small>9:00 AM
+        </div>
+        <div class="timeline-icon">
+          <div class="bg-info">
+            <i class="fa fa-camera"></i>
+          </div>
+        </div>
+        <div class="panel timeline-content">
+          <div class="panel-body">
+            <h2>
+              HBase major compaction completed in 2 hours.
+            </h2>
+            <p>
+              HBase Service completed
+            </p>
+          </div>
+        </div>
+      </div>
+      <div class="timeline-row">
+        <div class="timeline-time">
+          <small>Oct 2</small>1:14 PM
+        </div>
+        <div class="timeline-icon">
+          <div class="bg-primary">
+            <i class="fa fa-video-camera"></i>
+          </div>
+        </div>
+        <div class="panel timeline-content">
+          <div class="panel-body">
+            <h2>
+              Cluster deployed
+            </h2>
+            <p>
+              Trial Cluster started.
+            </p>
+          </div>
+        </div>
+      </div>
+    </div>
+    <script src="/hicc/js/jquery.js"></script>
+    <script src="/hicc/js/bootstrap.min.js"></script>
+    <script src="js/main.js"></script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/src/main/web/hicc/timeline/js/main.js
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/timeline/js/main.js b/src/main/web/hicc/timeline/js/main.js
new file mode 100644
index 0000000..2210b4b
--- /dev/null
+++ b/src/main/web/hicc/timeline/js/main.js
@@ -0,0 +1,22 @@
+(function() {
+  $(document).ready(function() {
+    var timelineAnimate;
+    timelineAnimate = function(elem) {
+      return $(".timeline.animated .timeline-row").each(function(i) {
+        var bottom_of_object, bottom_of_window;
+        bottom_of_object = $(this).position().top + $(this).outerHeight();
+        bottom_of_window = $(window).scrollTop() + $(window).height();
+        if (bottom_of_window > bottom_of_object) {
+          return $(this).addClass("active");
+        }
+      });
+    };
+    timelineAnimate();
+    return $(window).scroll(function() {
+      return timelineAnimate();
+    });
+  });
+
+}).call(this);
+
+


[6/9] chukwa git commit: CHUKWA-778. Added pie chart, circle chart and timeline javascripts. (Eric Yang)

Posted by ey...@apache.org.
CHUKWA-778. Added pie chart, circle chart and timeline javascripts.  (Eric Yang)


Project: http://git-wip-us.apache.org/repos/asf/chukwa/repo
Commit: http://git-wip-us.apache.org/repos/asf/chukwa/commit/666dbb9c
Tree: http://git-wip-us.apache.org/repos/asf/chukwa/tree/666dbb9c
Diff: http://git-wip-us.apache.org/repos/asf/chukwa/diff/666dbb9c

Branch: refs/heads/master
Commit: 666dbb9c12eb1078c345b4a281f3da629298b425
Parents: 602b55f
Author: Eric Yang <ey...@apache.org>
Authored: Sat Sep 5 19:35:22 2015 -0700
Committer: Eric Yang <ey...@apache.org>
Committed: Sat Sep 5 20:57:30 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                               |   2 +
 LICENSE.txt                               |  38 ++
 NOTICE.txt                                |   6 +
 src/main/web/hicc/css/chartist.css        | 167 +++++++
 src/main/web/hicc/css/chartist.css.map    |   7 +
 src/main/web/hicc/js/chartist.min.js      |   9 +
 src/main/web/hicc/js/chartist.min.js.map  |   1 +
 src/main/web/hicc/timeline/css/styles.css | 621 +++++++++++++++++++++++++
 src/main/web/hicc/timeline/index.html     | 192 ++++++++
 src/main/web/hicc/timeline/js/main.js     |  22 +
 10 files changed, 1065 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d70aa71..bb0f3f1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
   NEW FEATURES
 
+    CHUKWA-778. Added pie chart, circle chart and timeline javascripts.  (Eric Yang)
+
     CHUKWA-777. Added Home page and some widgets for the demo purpose. (Eric Yang)
 
     CHUKWA-776. Added Docker support.  (Eric Yang)

http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/LICENSE.txt
----------------------------------------------------------------------
diff --git a/LICENSE.txt b/LICENSE.txt
index da71e6c..734b897 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1228,4 +1228,42 @@ own licenses; we recommend you read them, as their terms may differ from
 the terms above.
 
 ------
+jquery-circliful
 
+The MIT License (MIT)
+
+Copyright (c) 2014 Patric Gutersohn
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+------
+chartist.js
+
+DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                    Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sa...@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. You just DO WHAT THE FUCK YOU WANT TO.

http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/NOTICE.txt
----------------------------------------------------------------------
diff --git a/NOTICE.txt b/NOTICE.txt
index 7afdda8..9990966 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -96,3 +96,9 @@ Copyright (c) 2011-2015, https://github.com/evolvingweb/ajax-solr
 
 This product includes jquery-ui
 Copyright (c) 2008-2015, https://jqueryui.com
+
+This product includes jquery-circliful
+Copyright (c) 2014-2015, https://github.com/pguso/jquery-plugin-circliful
+
+This product includes chartist.js
+Copyright (c) 2014-2015, https://gionkunz.github.io/chartist-js/

http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/src/main/web/hicc/css/chartist.css
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/css/chartist.css b/src/main/web/hicc/css/chartist.css
new file mode 100644
index 0000000..13d519e
--- /dev/null
+++ b/src/main/web/hicc/css/chartist.css
@@ -0,0 +1,167 @@
+.ct-label { fill: rgba(0, 0, 0, 0.4); color: rgba(0, 0, 0, 0.4); font-size: 0.75rem; line-height: 1; }
+
+.ct-chart-line .ct-label, .ct-chart-bar .ct-label { display: block; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; }
+
+.ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; }
+
+.ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; }
+
+.ct-label.ct-vertical.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-end; -webkit-justify-content: flex-end; -ms-flex-pack: flex-end; justify-content: flex-end; text-align: right; text-anchor: end; }
+
+.ct-label.ct-vertical.ct-end { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; }
+
+.ct-chart-bar .ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; text-align: center; text-anchor: start; }
+
+.ct-chart-bar .ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; text-align: center; text-anchor: start; }
+
+.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; }
+
+.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; }
+
+.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: flex-end; -webkit-justify-content: flex-end; -ms-flex-pack: flex-end; justify-content: flex-end; text-align: right; text-anchor: end; }
+
+.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: end; }
+
+.ct-grid { stroke: rgba(0, 0, 0, 0.2); stroke-width: 1px; stroke-dasharray: 2px; }
+
+.ct-point { stroke-width: 10px; stroke-linecap: round; }
+
+.ct-line { fill: none; stroke-width: 4px; }
+
+.ct-area { stroke: none; fill-opacity: 0.1; }
+
+.ct-bar { fill: none; stroke-width: 10px; }
+
+.ct-slice-donut { fill: none; stroke-width: 60px; }
+
+.ct-series-a .ct-point, .ct-series-a .ct-line, .ct-series-a .ct-bar, .ct-series-a .ct-slice-donut { stroke: #fc6e64; }
+.ct-series-a .ct-slice-pie, .ct-series-a .ct-area { fill: #fc6e64; }
+
+.ct-series-b .ct-point, .ct-series-b .ct-line, .ct-series-b .ct-bar, .ct-series-b .ct-slice-donut { stroke: #aad762; }
+.ct-series-b .ct-slice-pie, .ct-series-b .ct-area { fill: #aad762; }
+
+.ct-series-c .ct-point, .ct-series-c .ct-line, .ct-series-c .ct-bar, .ct-series-c .ct-slice-donut { stroke: #5dc9f0; }
+.ct-series-c .ct-slice-pie, .ct-series-c .ct-area { fill: #5dc9f0; }
+
+.ct-series-d .ct-point, .ct-series-d .ct-line, .ct-series-d .ct-bar, .ct-series-d .ct-slice-donut { stroke: #f7d254; }
+.ct-series-d .ct-slice-pie, .ct-series-d .ct-area { fill: #f7d254; }
+
+.ct-series-e .ct-point, .ct-series-e .ct-line, .ct-series-e .ct-bar, .ct-series-e .ct-slice-donut { stroke: #8177c5; }
+.ct-series-e .ct-slice-pie, .ct-series-e .ct-area { fill: #8177c5; }
+
+.ct-series-f .ct-point, .ct-series-f .ct-line, .ct-series-f .ct-bar, .ct-series-f .ct-slice-donut { stroke: #ff9289; }
+.ct-series-f .ct-slice-pie, .ct-series-f .ct-area { fill: #ff9289; }
+
+.ct-series-g .ct-point, .ct-series-g .ct-line, .ct-series-g .ct-bar, .ct-series-g .ct-slice-donut { stroke: #cbef91; }
+.ct-series-g .ct-slice-pie, .ct-series-g .ct-area { fill: #cbef91; }
+
+.ct-series-h .ct-point, .ct-series-h .ct-line, .ct-series-h .ct-bar, .ct-series-h .ct-slice-donut { stroke: #87d7f6; }
+.ct-series-h .ct-slice-pie, .ct-series-h .ct-area { fill: #87d7f6; }
+
+.ct-series-i .ct-point, .ct-series-i .ct-line, .ct-series-i .ct-bar, .ct-series-i .ct-slice-donut { stroke: #ffe079; }
+.ct-series-i .ct-slice-pie, .ct-series-i .ct-area { fill: #ffe079; }
+
+.ct-series-j .ct-point, .ct-series-j .ct-line, .ct-series-j .ct-bar, .ct-series-j .ct-slice-donut { stroke: #aaa3df; }
+.ct-series-j .ct-slice-pie, .ct-series-j .ct-area { fill: #aaa3df; }
+
+.ct-series-k .ct-point, .ct-series-k .ct-line, .ct-series-k .ct-bar, .ct-series-k .ct-slice-donut { stroke: #ffbab4; }
+.ct-series-k .ct-slice-pie, .ct-series-k .ct-area { fill: #ffbab4; }
+
+.ct-series-l .ct-point, .ct-series-l .ct-line, .ct-series-l .ct-bar, .ct-series-l .ct-slice-donut { stroke: #e0f6bc; }
+.ct-series-l .ct-slice-pie, .ct-series-l .ct-area { fill: #e0f6bc; }
+
+.ct-series-m .ct-point, .ct-series-m .ct-line, .ct-series-m .ct-bar, .ct-series-m .ct-slice-donut { stroke: #bceafc; }
+.ct-series-m .ct-slice-pie, .ct-series-m .ct-area { fill: #bceafc; }
+
+.ct-series-n .ct-point, .ct-series-n .ct-line, .ct-series-n .ct-bar, .ct-series-n .ct-slice-donut { stroke: #ffeaa5; }
+.ct-series-n .ct-slice-pie, .ct-series-n .ct-area { fill: #ffeaa5; }
+
+.ct-series-o .ct-point, .ct-series-o .ct-line, .ct-series-o .ct-bar, .ct-series-o .ct-slice-donut { stroke: #d6d2f3; }
+.ct-series-o .ct-slice-pie, .ct-series-o .ct-area { fill: #d6d2f3; }
+
+.ct-square { display: block; position: relative; width: 100%; }
+.ct-square:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 100%; }
+.ct-square:after { content: ""; display: table; clear: both; }
+.ct-square > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-minor-second { display: block; position: relative; width: 100%; }
+.ct-minor-second:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 93.75%; }
+.ct-minor-second:after { content: ""; display: table; clear: both; }
+.ct-minor-second > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-major-second { display: block; position: relative; width: 100%; }
+.ct-major-second:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 88.88889%; }
+.ct-major-second:after { content: ""; display: table; clear: both; }
+.ct-major-second > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-minor-third { display: block; position: relative; width: 100%; }
+.ct-minor-third:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 83.33333%; }
+.ct-minor-third:after { content: ""; display: table; clear: both; }
+.ct-minor-third > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-major-third { display: block; position: relative; width: 100%; }
+.ct-major-third:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 80%; }
+.ct-major-third:after { content: ""; display: table; clear: both; }
+.ct-major-third > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-perfect-fourth { display: block; position: relative; width: 100%; }
+.ct-perfect-fourth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 75%; }
+.ct-perfect-fourth:after { content: ""; display: table; clear: both; }
+.ct-perfect-fourth > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-perfect-fifth { display: block; position: relative; width: 100%; }
+.ct-perfect-fifth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 66.66667%; }
+.ct-perfect-fifth:after { content: ""; display: table; clear: both; }
+.ct-perfect-fifth > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-minor-sixth { display: block; position: relative; width: 100%; }
+.ct-minor-sixth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 62.5%; }
+.ct-minor-sixth:after { content: ""; display: table; clear: both; }
+.ct-minor-sixth > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-golden-section { display: block; position: relative; width: 100%; }
+.ct-golden-section:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 61.8047%; }
+.ct-golden-section:after { content: ""; display: table; clear: both; }
+.ct-golden-section > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-major-sixth { display: block; position: relative; width: 100%; }
+.ct-major-sixth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 60%; }
+.ct-major-sixth:after { content: ""; display: table; clear: both; }
+.ct-major-sixth > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-minor-seventh { display: block; position: relative; width: 100%; }
+.ct-minor-seventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 56.25%; }
+.ct-minor-seventh:after { content: ""; display: table; clear: both; }
+.ct-minor-seventh > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-major-seventh { display: block; position: relative; width: 100%; }
+.ct-major-seventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 53.33333%; }
+.ct-major-seventh:after { content: ""; display: table; clear: both; }
+.ct-major-seventh > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-octave { display: block; position: relative; width: 100%; }
+.ct-octave:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 50%; }
+.ct-octave:after { content: ""; display: table; clear: both; }
+.ct-octave > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-major-tenth { display: block; position: relative; width: 100%; }
+.ct-major-tenth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 40%; }
+.ct-major-tenth:after { content: ""; display: table; clear: both; }
+.ct-major-tenth > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-major-eleventh { display: block; position: relative; width: 100%; }
+.ct-major-eleventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 37.5%; }
+.ct-major-eleventh:after { content: ""; display: table; clear: both; }
+.ct-major-eleventh > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-major-twelfth { display: block; position: relative; width: 100%; }
+.ct-major-twelfth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 33.33333%; }
+.ct-major-twelfth:after { content: ""; display: table; clear: both; }
+.ct-major-twelfth > svg { display: block; position: absolute; top: 0; left: 0; }
+
+.ct-double-octave { display: block; position: relative; width: 100%; }
+.ct-double-octave:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 25%; }
+.ct-double-octave:after { content: ""; display: table; clear: both; }
+.ct-double-octave > svg { display: block; position: absolute; top: 0; left: 0; }
+
+/*# sourceMappingURL=chartist.css.map */

http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/src/main/web/hicc/css/chartist.css.map
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/css/chartist.css.map b/src/main/web/hicc/css/chartist.css.map
new file mode 100644
index 0000000..aa48c55
--- /dev/null
+++ b/src/main/web/hicc/css/chartist.css.map
@@ -0,0 +1,7 @@
+{
+"version": 3,
+"mappings": "AAoHE,SAAoB,GAxDpB,IAAI,EC/BU,kBAAkB,EDgChC,KAAK,EChCS,kBAAkB,EDiChC,SAAS,EChCI,OAAO,EDiCpB,WAAW,EC9BS,CAAC;;ADuFrB,iDAC4C,GAtE5C,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,IAAI;;AAqEb,gCAA+D,GA9F/D,iBAAiB,EA+FW,QAAQ,EA9FpC,mBAAmB,EA8FS,QAAQ,EA7FpC,cAAc,EA6Fc,QAAQ,EA5FpC,WAAW,EA4FiB,QAAQ,EA3FpC,gBAAgB,EA2FsB,UAAU,EA1FhD,uBAAuB,EA0Fe,U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ACN,OAAO,EAAE,EAAE,EACX,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,IAAI;AAGb,wBAAM,GACJ,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,CAAC;;AAwML,iBAAkC,GA/NtC,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,QAAQ,EAClB,KA
 AK,EAHoC,IAAI;AAK7C,wBAAS,GACP,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,EAAE,EACX,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,EACT,cAAc,EAAE,SAAa;AAG/B,uBAAQ,GACN,OAAO,EAAE,EAAE,EACX,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,IAAI;AAGb,uBAAM,GACJ,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,CAAC;;AAwML,iBAAkC,GA/NtC,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAHoC,IAAI;AAK7C,wBAAS,GACP,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,EAAE,EACX,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,EACT,cAAc,EAAE,GAAa;AAG/B,uBAAQ,GACN,OAAO,EAAE,EAAE,EACX,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,IAAI;AAGb,uBAAM,GACJ,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,CAAC",
+"sources": ["chartist.scss","settings/_chartist-settings.scss"],
+"names": [],
+"file": "chartist.css"
+}

http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/src/main/web/hicc/js/chartist.min.js
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/js/chartist.min.js b/src/main/web/hicc/js/chartist.min.js
new file mode 100644
index 0000000..b69e484
--- /dev/null
+++ b/src/main/web/hicc/js/chartist.min.js
@@ -0,0 +1,9 @@
+/* Chartist.js 0.9.4
+ * Copyright © 2015 Gion Kunz
+ * Free to use under the WTFPL license.
+ * http://www.wtfpl.net/
+ */
+
+!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.Chartist=b()}):"object"==typeof exports?module.exports=b():a.Chartist=b()}(this,function(){var a={version:"0.9.4"};return function(a,b,c){"use strict";c.noop=function(a){return a},c.alphaNumerate=function(a){return String.fromCharCode(97+a%26)},c.extend=function(a){a=a||{};var b=Array.prototype.slice.call(arguments,1);return b.forEach(function(b){for(var d in b)"object"!=typeof b[d]||null===b[d]||b[d]instanceof Array?a[d]=b[d]:a[d]=c.extend({},a[d],b[d])}),a},c.replaceAll=function(a,b,c){return a.replace(new RegExp(b,"g"),c)},c.stripUnit=function(a){return"string"==typeof a&&(a=a.replace(/[^0-9\+-\.]/g,"")),+a},c.ensureUnit=function(a,b){return"number"==typeof a&&(a+=b),a},c.querySelector=function(a){return a instanceof Node?a:b.querySelector(a)},c.times=function(a){return Array.apply(null,new Array(a))},c.sum=function(a,b){return a+(b?b:0)},c.mapMultiply=function(a){return function(b){return b*a}},c.
 mapAdd=function(a){return function(b){return b+a}},c.serialMap=function(a,b){var d=[],e=Math.max.apply(null,a.map(function(a){return a.length}));return c.times(e).forEach(function(c,e){var f=a.map(function(a){return a[e]});d[e]=b.apply(null,f)}),d},c.roundWithPrecision=function(a,b){var d=Math.pow(10,b||c.precision);return Math.round(a*d)/d},c.precision=8,c.escapingMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"},c.serialize=function(a){return null===a||void 0===a?a:("number"==typeof a?a=""+a:"object"==typeof a&&(a=JSON.stringify({data:a})),Object.keys(c.escapingMap).reduce(function(a,b){return c.replaceAll(a,b,c.escapingMap[b])},a))},c.deserialize=function(a){if("string"!=typeof a)return a;a=Object.keys(c.escapingMap).reduce(function(a,b){return c.replaceAll(a,c.escapingMap[b],b)},a);try{a=JSON.parse(a),a=void 0!==a.data?a.data:a}catch(b){}return a},c.createSvg=function(a,b,d,e){var f;return b=b||"100%",d=d||"100%",Array.prototype.slice.call(a.querySelectorAll("svg
 ")).filter(function(a){return a.getAttributeNS("http://www.w3.org/2000/xmlns/",c.xmlNs.prefix)}).forEach(function(b){a.removeChild(b)}),f=new c.Svg("svg").attr({width:b,height:d}).addClass(e).attr({style:"width: "+b+"; height: "+d+";"}),a.appendChild(f._node),f},c.reverseData=function(a){a.labels.reverse(),a.series.reverse();for(var b=0;b<a.series.length;b++)"object"==typeof a.series[b]&&void 0!==a.series[b].data?a.series[b].data.reverse():a.series[b]instanceof Array&&a.series[b].reverse()},c.getDataArray=function(a,b,d){function e(a){if(c.isFalseyButZero(a))return void 0;if((a.data||a)instanceof Array)return(a.data||a).map(e);if(a.hasOwnProperty("value"))return e(a.value);if(d){var b={};return"string"==typeof d?b[d]=c.getNumberOrUndefined(a):b.y=c.getNumberOrUndefined(a),b.x=a.hasOwnProperty("x")?c.getNumberOrUndefined(a.x):b.x,b.y=a.hasOwnProperty("y")?c.getNumberOrUndefined(a.y):b.y,b}return c.getNumberOrUndefined(a)}return(b&&!a.reversed||!b&&a.reversed)&&(c.reverseData(a),a.rev
 ersed=!a.reversed),a.series.map(e)},c.normalizePadding=function(a,b){return b=b||0,"number"==typeof a?{top:a,right:a,bottom:a,left:a}:{top:"number"==typeof a.top?a.top:b,right:"number"==typeof a.right?a.right:b,bottom:"number"==typeof a.bottom?a.bottom:b,left:"number"==typeof a.left?a.left:b}},c.getMetaData=function(a,b){var d=a.data?a.data[b]:a[b];return d?c.serialize(d.meta):void 0},c.orderOfMagnitude=function(a){return Math.floor(Math.log(Math.abs(a))/Math.LN10)},c.projectLength=function(a,b,c){return b/c.range*a},c.getAvailableHeight=function(a,b){return Math.max((c.stripUnit(b.height)||a.height())-(b.chartPadding.top+b.chartPadding.bottom)-b.axisX.offset,0)},c.getHighLow=function(a,b,d){function e(a){if(void 0===a)return void 0;if(a instanceof Array)for(var b=0;b<a.length;b++)e(a[b]);else{var c=d?+a[d]:+a;g&&c>f.high&&(f.high=c),h&&c<f.low&&(f.low=c)}}b=c.extend({},b,d?b["axis"+d.toUpperCase()]:{});var f={high:void 0===b.high?-Number.MAX_VALUE:+b.high,low:void 0===b.low?Number.
 MAX_VALUE:+b.low},g=void 0===b.high,h=void 0===b.low;return(g||h)&&e(a),(b.referenceValue||0===b.referenceValue)&&(f.high=Math.max(b.referenceValue,f.high),f.low=Math.min(b.referenceValue,f.low)),f.high<=f.low&&(0===f.low?f.high=1:f.low<0?f.high=0:f.low=0),f},c.isNum=function(a){return!isNaN(a)&&isFinite(a)},c.isFalseyButZero=function(a){return!a&&0!==a},c.getNumberOrUndefined=function(a){return isNaN(+a)?void 0:+a},c.getMultiValue=function(a,b){return c.isNum(a)?+a:a?a[b||"y"]||0:0},c.rho=function(a){function b(a,c){return a%c===0?c:b(c,a%c)}function c(a){return a*a+1}if(1===a)return a;var d,e=2,f=2;if(a%2===0)return 2;do e=c(e)%a,f=c(c(f))%a,d=b(Math.abs(e-f),a);while(1===d);return d},c.getBounds=function(a,b,d,e){var f,g,h,i=0,j={high:b.high,low:b.low};j.valueRange=j.high-j.low,j.oom=c.orderOfMagnitude(j.valueRange),j.step=Math.pow(10,j.oom),j.min=Math.floor(j.low/j.step)*j.step,j.max=Math.ceil(j.high/j.step)*j.step,j.range=j.max-j.min,j.numberOfSteps=Math.round(j.range/j.step);v
 ar k=c.projectLength(a,j.step,j),l=d>k,m=e?c.rho(j.range):0;if(e&&c.projectLength(a,1,j)>=d)j.step=1;else if(e&&m<j.step&&c.projectLength(a,m,j)>=d)j.step=m;else for(;;){if(l&&c.projectLength(a,j.step,j)<=d)j.step*=2;else{if(l||!(c.projectLength(a,j.step/2,j)>=d))break;if(j.step/=2,e&&j.step%1!==0){j.step*=2;break}}if(i++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}for(g=j.min,h=j.max;g+j.step<=j.low;)g+=j.step;for(;h-j.step>=j.high;)h-=j.step;for(j.min=g,j.max=h,j.range=j.max-j.min,j.values=[],f=j.min;f<=j.max;f+=j.step)j.values.push(c.roundWithPrecision(f));return j},c.polarToCartesian=function(a,b,c,d){var e=(d-90)*Math.PI/180;return{x:a+c*Math.cos(e),y:b+c*Math.sin(e)}},c.createChartRect=function(a,b,d){var e=!(!b.axisX&&!b.axisY),f=e?b.axisY.offset:0,g=e?b.axisX.offset:0,h=a.width()||c.stripUnit(b.width)||0,i=a.height()||c.stripUnit(b.height)||0,j=c.normalizePadding(b.chartPadding,d);h=Math.max(h,f+j.left+j.right),i=Math.max(i,g+j.t
 op+j.bottom);var k={padding:j,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return e?("start"===b.axisX.position?(k.y2=j.top+g,k.y1=Math.max(i-j.bottom,k.y2+1)):(k.y2=j.top,k.y1=Math.max(i-j.bottom-g,k.y2+1)),"start"===b.axisY.position?(k.x1=j.left+f,k.x2=Math.max(h-j.right,k.x1+1)):(k.x1=j.left,k.x2=Math.max(h-j.right-f,k.x1+1))):(k.x1=j.left,k.x2=Math.max(h-j.right,k.x1+1),k.y2=j.top,k.y1=Math.max(i-j.bottom,k.y2+1)),k},c.createGrid=function(a,b,d,e,f,g,h,i){var j={};j[d.units.pos+"1"]=a,j[d.units.pos+"2"]=a,j[d.counterUnits.pos+"1"]=e,j[d.counterUnits.pos+"2"]=e+f;var k=g.elem("line",j,h.join(" "));i.emit("draw",c.extend({type:"grid",axis:d,index:b,group:g,element:k},j))},c.createLabel=function(a,b,d,e,f,g,h,i,j,k,l){var m,n={};if(n[f.units.pos]=a+h[f.units.pos],n[f.counterUnits.pos]=h[f.counterUnits.pos],n[f.units.len]=b,n[f.counterUnits.len]=g-10,k){var o='<span class="'+j.join(" ")+'" style="'+f.units.len+": "+Math.round(n[f.units.len])+"p
 x; "+f.counterUnits.len+": "+Math.round(n[f.counterUnits.len])+'px">'+e[d]+"</span>";m=i.foreignObject(o,c.extend({style:"overflow: visible;"},n))}else m=i.elem("text",n,j.join(" ")).text(e[d]);l.emit("draw",c.extend({type:"label",axis:f,index:d,group:i,element:m,text:e[d]},n))},c.getSeriesOption=function(a,b,c){if(a.name&&b.series&&b.series[a.name]){var d=b.series[a.name];return d.hasOwnProperty(c)?d[c]:b[c]}return b[c]},c.optionsProvider=function(b,d,e){function f(b){var f=h;if(h=c.extend({},j),d)for(i=0;i<d.length;i++){var g=a.matchMedia(d[i][0]);g.matches&&(h=c.extend(h,d[i][1]))}e&&!b&&e.emit("optionsChanged",{previousOptions:f,currentOptions:h})}function g(){k.forEach(function(a){a.removeListener(f)})}var h,i,j=c.extend({},b),k=[];if(!a.matchMedia)throw"window.matchMedia not found! Make sure you're using a polyfill.";if(d)for(i=0;i<d.length;i++){var l=a.matchMedia(d[i][0]);l.addListener(f),k.push(l)}return f(!0),{removeMediaQueryListeners:g,getCurrentOptions:function(){return 
 c.extend({},h)}}}}(window,document,a),function(a,b,c){"use strict";c.Interpolation={},c.Interpolation.none=function(){return function(a,b){for(var d=new c.Svg.Path,e=!0,f=1;f<a.length;f+=2){var g=b[(f-1)/2];void 0===g.value?e=!0:e?(d.move(a[f-1],a[f],!1,g),e=!1):d.line(a[f-1],a[f],!1,g)}return d}},c.Interpolation.simple=function(a){var b={divisor:2};a=c.extend({},b,a);var d=1/Math.max(1,a.divisor);return function(a,b){for(var e=new c.Svg.Path,f=!0,g=2;g<a.length;g+=2){var h=a[g-2],i=a[g-1],j=a[g],k=a[g+1],l=(j-h)*d,m=b[g/2-1],n=b[g/2];void 0===m.value?f=!0:(f&&e.move(h,i,!1,m),void 0!==n.value&&(e.curve(h+l,i,j-l,k,j,k,!1,n),f=!1))}return e}},c.Interpolation.cardinal=function(a){function b(a,b){for(var c=[],d=!0,e=0;e<a.length;e+=2)void 0===b[e/2].value?d=!0:(d&&(c.push({pathCoordinates:[],valueData:[]}),d=!1),c[c.length-1].pathCoordinates.push(a[e],a[e+1]),c[c.length-1].valueData.push(b[e/2]));return c}var d={tension:1};a=c.extend({},d,a);var e=Math.min(1,Math.max(0,a.tension)),f=1
 -e;return function g(a,d){var h=b(a,d);if(h.length>1){var i=[];return h.forEach(function(a){i.push(g(a.pathCoordinates,a.valueData))}),c.Svg.Path.join(i)}if(a=h[0].pathCoordinates,d=h[0].valueData,a.length<=4)return c.Interpolation.none()(a,d);for(var j,k=(new c.Svg.Path).move(a[0],a[1],!1,d[0]),l=0,m=a.length;m-2*!j>l;l+=2){var n=[{x:+a[l-2],y:+a[l-1]},{x:+a[l],y:+a[l+1]},{x:+a[l+2],y:+a[l+3]},{x:+a[l+4],y:+a[l+5]}];j?l?m-4===l?n[3]={x:+a[0],y:+a[1]}:m-2===l&&(n[2]={x:+a[0],y:+a[1]},n[3]={x:+a[2],y:+a[3]}):n[0]={x:+a[m-2],y:+a[m-1]}:m-4===l?n[3]=n[2]:l||(n[0]={x:+a[l],y:+a[l+1]}),k.curve(e*(-n[0].x+6*n[1].x+n[2].x)/6+f*n[2].x,e*(-n[0].y+6*n[1].y+n[2].y)/6+f*n[2].y,e*(n[1].x+6*n[2].x-n[3].x)/6+f*n[2].x,e*(n[1].y+6*n[2].y-n[3].y)/6+f*n[2].y,n[2].x,n[2].y,!1,d[(l+2)/2])}return k}},c.Interpolation.step=function(a){var b={postpone:!0};return a=c.extend({},b,a),function(b,d){for(var e=new c.Svg.Path,f=!0,g=2;g<b.length;g+=2){var h=b[g-2],i=b[g-1],j=b[g],k=b[g+1],l=d[g/2-1],m=d[g/2];void 
 0===l.value?f=!0:(f&&e.move(h,i,!1,l),void 0!==m.value&&(a.postpone?e.line(j,i,!1,l):e.line(h,k,!1,m),e.line(j,k,!1,m),f=!1))}return e}}}(window,document,a),function(a,b,c){"use strict";c.EventEmitter=function(){function a(a,b){d[a]=d[a]||[],d[a].push(b)}function b(a,b){d[a]&&(b?(d[a].splice(d[a].indexOf(b),1),0===d[a].length&&delete d[a]):delete d[a])}function c(a,b){d[a]&&d[a].forEach(function(a){a(b)}),d["*"]&&d["*"].forEach(function(c){c(a,b)})}var d=[];return{addEventHandler:a,removeEventHandler:b,emit:c}}}(window,document,a),function(a,b,c){"use strict";function d(a){var b=[];if(a.length)for(var c=0;c<a.length;c++)b.push(a[c]);return b}function e(a,b){var d=b||this.prototype||c.Class,e=Object.create(d);c.Class.cloneDefinitions(e,a);var f=function(){var a,b=e.constructor||function(){};return a=this===c?Object.create(e):this,b.apply(a,Array.prototype.slice.call(arguments,0)),a};return f.prototype=e,f["super"]=d,f.extend=this.extend,f}function f(){var a=d(arguments),b=a[0];return
  a.splice(1,a.length-1).forEach(function(a){Object.getOwnPropertyNames(a).forEach(function(c){delete b[c],Object.defineProperty(b,c,Object.getOwnPropertyDescriptor(a,c))})}),b}c.Class={extend:e,cloneDefinitions:f}}(window,document,a),function(a,b,c){"use strict";function d(a,b,d){return a&&(this.data=a,this.eventEmitter.emit("data",{type:"update",data:this.data})),b&&(this.options=c.extend({},d?this.options:this.defaultOptions,b),this.initializeTimeoutId||(this.optionsProvider.removeMediaQueryListeners(),this.optionsProvider=c.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter))),this.initializeTimeoutId||this.createChart(this.optionsProvider.getCurrentOptions()),this}function e(){return this.initializeTimeoutId?a.clearTimeout(this.initializeTimeoutId):(a.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this}function f(a,b){return this.eventEmitter.addEventHandler(a,b),this}function g(a,b){return this.eventEmitter
 .removeEventHandler(a,b),this}function h(){a.addEventListener("resize",this.resizeListener),this.optionsProvider=c.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.addEventHandler("optionsChanged",function(){this.update()}.bind(this)),this.options.plugins&&this.options.plugins.forEach(function(a){a instanceof Array?a[0](this,a[1]):a(this)}.bind(this)),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=void 0}function i(a,b,d,e,f){this.container=c.querySelector(a),this.data=b,this.defaultOptions=d,this.options=e,this.responsiveOptions=f,this.eventEmitter=c.EventEmitter(),this.supportsForeignObject=c.Svg.isSupported("Extensibility"),this.supportsAnimations=c.Svg.isSupported("AnimationEventsAttribute"),this.resizeListener=function(){this.update()}.bind(this),this.container&&(this.container.__chartist__&&this.container.__chartist__.detach(),this.contain
 er.__chartist__=this),this.initializeTimeoutId=setTimeout(h.bind(this),0)}c.Base=c.Class.extend({constructor:i,optionsProvider:void 0,container:void 0,svg:void 0,eventEmitter:void 0,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:d,detach:e,on:f,off:g,version:c.version,supportsForeignObject:!1})}(window,document,a),function(a,b,c){"use strict";function d(a,d,e,f,g){a instanceof Element?this._node=a:(this._node=b.createElementNS(z,a),"svg"===a&&this._node.setAttributeNS(A,c.xmlNs.qualifiedName,c.xmlNs.uri)),d&&this.attr(d),e&&this.addClass(e),f&&(g&&f._node.firstChild?f._node.insertBefore(this._node,f._node.firstChild):f._node.appendChild(this._node))}function e(a,b){return"string"==typeof a?b?this._node.getAttributeNS(b,a):this._node.getAttribute(a):(Object.keys(a).forEach(function(d){void 0!==a[d]&&(b?this._node.setAttributeNS(b,[c.xmlNs.prefix,":",d].join(""),a[d]):this._node.setAttribute(d,a[d]))}.bind(this)),this)}function f(a,b,d,e){retu
 rn new c.Svg(a,b,d,this,e)}function g(){return this._node.parentNode instanceof SVGElement?new c.Svg(this._node.parentNode):null}function h(){for(var a=this._node;"svg"!==a.nodeName;)a=a.parentNode;return new c.Svg(a)}function i(a){var b=this._node.querySelector(a);return b?new c.Svg(b):null}function j(a){var b=this._node.querySelectorAll(a);return b.length?new c.Svg.List(b):null}function k(a,c,d,e){if("string"==typeof a){var f=b.createElement("div");f.innerHTML=a,a=f.firstChild}a.setAttribute("xmlns",B);var g=this.elem("foreignObject",c,d,e);return g._node.appendChild(a),g}function l(a){return this._node.appendChild(b.createTextNode(a)),this}function m(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this}function n(){return this._node.parentNode.removeChild(this._node),this.parent()}function o(a){return this._node.parentNode.replaceChild(a._node,this._node),a}function p(a,b){return b&&this._node.firstChild?this._node.insertBefore(a._node,this._nod
 e.firstChild):this._node.appendChild(a._node),this}function q(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]}function r(a){return this._node.setAttribute("class",this.classes(this._node).concat(a.trim().split(/\s+/)).filter(function(a,b,c){return c.indexOf(a)===b}).join(" ")),this}function s(a){var b=a.trim().split(/\s+/);return this._node.setAttribute("class",this.classes(this._node).filter(function(a){return-1===b.indexOf(a)}).join(" ")),this}function t(){return this._node.setAttribute("class",""),this}function u(a,b){try{return a.getBBox()[b]}catch(c){}return 0}function v(){return this._node.clientHeight||Math.round(u(this._node,"height"))||this._node.parentNode.clientHeight}function w(){return this._node.clientWidth||Math.round(u(this._node,"width"))||this._node.parentNode.clientWidth}function x(a,b,d){return void 0===b&&(b=!0),Object.keys(a).forEach(function(e){function f(a,b){var f,g,h,i={};a.easing&&(h=a.easing instanceof Arr
 ay?a.easing:c.Svg.Easing[a.easing],delete a.easing),a.begin=c.ensureUnit(a.begin,"ms"),a.dur=c.ensureUnit(a.dur,"ms"),h&&(a.calcMode="spline",a.keySplines=h.join(" "),a.keyTimes="0;1"),b&&(a.fill="freeze",i[e]=a.from,this.attr(i),g=c.stripUnit(a.begin||0),a.begin="indefinite"),f=this.elem("animate",c.extend({attributeName:e},a)),b&&setTimeout(function(){try{f._node.beginElement()}catch(b){i[e]=a.to,this.attr(i),f.remove()}}.bind(this),g),d&&f._node.addEventListener("beginEvent",function(){d.emit("animationBegin",{element:this,animate:f._node,params:a})}.bind(this)),f._node.addEventListener("endEvent",function(){d&&d.emit("animationEnd",{element:this,animate:f._node,params:a}),b&&(i[e]=a.to,this.attr(i),f.remove())}.bind(this))}a[e]instanceof Array?a[e].forEach(function(a){f.bind(this)(a,!1)}.bind(this)):f.bind(this)(a[e],b)}.bind(this)),this}function y(a){var b=this;this.svgElements=[];for(var d=0;d<a.length;d++)this.svgElements.push(new c.Svg(a[d]));Object.keys(c.Svg.prototype).fil
 ter(function(a){return-1===["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(a)}).forEach(function(a){b[a]=function(){var d=Array.prototype.slice.call(arguments,0);return b.svgElements.forEach(function(b){c.Svg.prototype[a].apply(b,d)}),b}})}var z="http://www.w3.org/2000/svg",A="http://www.w3.org/2000/xmlns/",B="http://www.w3.org/1999/xhtml";c.xmlNs={qualifiedName:"xmlns:ct",prefix:"ct",uri:"http://gionkunz.github.com/chartist-js/ct"},c.Svg=c.Class.extend({constructor:d,attr:e,elem:f,parent:g,root:h,querySelector:i,querySelectorAll:j,foreignObject:k,text:l,empty:m,remove:n,replace:o,append:p,classes:q,addClass:r,removeClass:s,removeAllClasses:t,height:v,width:w,animate:x}),c.Svg.isSupported=function(a){return b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+a,"1.1")};var C={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQu
 ad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]};c.Svg.Easing=C,c.Svg.List=c.Class.extend({constructor:y})}(window,document,a),function(a,b,c){"use strict";function d(a,b,d,e,f,g){var h=c.extend({command:f?a.toLowerCase():a.toUpperCase()},b,g?{data:g}:{});d.splice(e,0,h)}function e(a,b){a.forEach(function(c,d){u[c.command.toLowerCase()].forEach(function(e,f){b(c,e,d,f,a)})})}function f(a,b){this.pathElements=[],this.pos=0,this.close=a
 ,this.options=c.extend({},v,b)}function g(a){return void 0!==a?(this.pos=Math.max(0,Math.min(this.pathElements.length,a)),this):this.pos}function h(a){return this.pathElements.splice(this.pos,a),this}function i(a,b,c,e){return d("M",{x:+a,y:+b},this.pathElements,this.pos++,c,e),this}function j(a,b,c,e){return d("L",{x:+a,y:+b},this.pathElements,this.pos++,c,e),this}function k(a,b,c,e,f,g,h,i){return d("C",{x1:+a,y1:+b,x2:+c,y2:+e,x:+f,y:+g},this.pathElements,this.pos++,h,i),this}function l(a,b,c,e,f,g,h,i,j){return d("A",{rx:+a,ry:+b,xAr:+c,lAf:+e,sf:+f,x:+g,y:+h},this.pathElements,this.pos++,i,j),this}function m(a){var b=a.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(function(a,b){return b.match(/[A-Za-z]/)&&a.push([]),a[a.length-1].push(b),a},[]);"Z"===b[b.length-1][0].toUpperCase()&&b.pop();var d=b.map(function(a){var b=a.shift(),d=u[b.toLowerCase()];return c.extend({command:b},d.reduce(function(b,c,d){return b[c]=+a[d],b},{})
 )}),e=[this.pos,0];return Array.prototype.push.apply(e,d),Array.prototype.splice.apply(this.pathElements,e),this.pos+=d.length,this}function n(){var a=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(function(b,c){var d=u[c.command.toLowerCase()].map(function(b){return this.options.accuracy?Math.round(c[b]*a)/a:c[b]}.bind(this));return b+c.command+d.join(",")}.bind(this),"")+(this.close?"Z":"")}function o(a,b){return e(this.pathElements,function(c,d){c[d]*="x"===d[0]?a:b}),this}function p(a,b){return e(this.pathElements,function(c,d){c[d]+="x"===d[0]?a:b}),this}function q(a){return e(this.pathElements,function(b,c,d,e,f){var g=a(b,c,d,e,f);(g||0===g)&&(b[c]=g)}),this}function r(a){var b=new c.Svg.Path(a||this.close);return b.pos=this.pos,b.pathElements=this.pathElements.slice().map(function(a){return c.extend({},a)}),b.options=c.extend({},this.options),b}function s(a){var b=[new c.Svg.Path];return this.pathElements.forEach(function(d){d.command===a.toUpperCase()&&0
 !==b[b.length-1].pathElements.length&&b.push(new c.Svg.Path),b[b.length-1].pathElements.push(d)}),b}function t(a,b,d){for(var e=new c.Svg.Path(b,d),f=0;f<a.length;f++)for(var g=a[f],h=0;h<g.pathElements.length;h++)e.pathElements.push(g.pathElements[h]);return e}var u={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},v={accuracy:3};c.Svg.Path=c.Class.extend({constructor:f,position:g,remove:h,move:i,line:j,curve:k,arc:l,scale:o,translate:p,transform:q,parse:m,stringify:n,clone:r,splitByCommand:s}),c.Svg.Path.elementDescriptions=u,c.Svg.Path.join=t}(window,document,a),function(a,b,c){"use strict";function d(a,b,c,d){this.units=a,this.counterUnits=a===f.x?f.y:f.x,this.chartRect=b,this.axisLength=b[a.rectEnd]-b[a.rectStart],this.gridOffset=b[a.rectOffset],this.ticks=c,this.options=d}function e(a,b,d,e,f){var g=e["axis"+this.units.pos.toUpperCase()],h=this.ticks.map(this.projectValue.bind(this)),i=this.ticks.map(g.labelInterpolationFnc);h.for
 Each(function(j,k){var l,m={x:0,y:0};l=h[k+1]?h[k+1]-j:Math.max(this.axisLength-j,30),(i[k]||0===i[k])&&("x"===this.units.pos?(j=this.chartRect.x1+j,m.x=e.axisX.labelOffset.x,"start"===e.axisX.position?m.y=this.chartRect.padding.top+e.axisX.labelOffset.y+(d?5:20):m.y=this.chartRect.y1+e.axisX.labelOffset.y+(d?5:20)):(j=this.chartRect.y1-j,m.y=e.axisY.labelOffset.y-(d?l:0),"start"===e.axisY.position?m.x=d?this.chartRect.padding.left+e.axisY.labelOffset.x:this.chartRect.x1-10:m.x=this.chartRect.x2+e.axisY.labelOffset.x+10),g.showGrid&&c.createGrid(j,k,this,this.gridOffset,this.chartRect[this.counterUnits.len](),a,[e.classNames.grid,e.classNames[this.units.dir]],f),g.showLabel&&c.createLabel(j,l,k,i,this,g.offset,m,b,[e.classNames.label,e.classNames[this.units.dir],e.classNames[g.position]],d,f))}.bind(this))}var f={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};c.
 Axis=c.Class.extend({constructor:d,createGridAndLabels:e,projectValue:function(a,b,c){throw new Error("Base axis can't be instantiated!")}}),c.Axis.units=f}(window,document,a),function(a,b,c){"use strict";function d(a,b,d,e){var f=e.highLow||c.getHighLow(b.normalized,e,a.pos);this.bounds=c.getBounds(d[a.rectEnd]-d[a.rectStart],f,e.scaleMinSpace||20,e.onlyInteger),this.range={min:this.bounds.min,max:this.bounds.max},c.AutoScaleAxis["super"].constructor.call(this,a,d,this.bounds.values,e)}function e(a){return this.axisLength*(+c.getMultiValue(a,this.units.pos)-this.bounds.min)/this.bounds.range}c.AutoScaleAxis=c.Axis.extend({constructor:d,projectValue:e})}(window,document,a),function(a,b,c){"use strict";function d(a,b,d,e){var f=e.highLow||c.getHighLow(b.normalized,e,a.pos);this.divisor=e.divisor||1,this.ticks=e.ticks||c.times(this.divisor).map(function(a,b){return f.low+(f.high-f.low)/this.divisor*b}.bind(this)),this.range={min:f.low,max:f.high},c.FixedScaleAxis["super"].constructor.
 call(this,a,d,this.ticks,e),this.stepLength=this.axisLength/this.divisor}function e(a){return this.axisLength*(+c.getMultiValue(a,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}c.FixedScaleAxis=c.Axis.extend({constructor:d,projectValue:e})}(window,document,a),function(a,b,c){"use strict";function d(a,b,d,e){c.StepAxis["super"].constructor.call(this,a,d,e.ticks,e),this.stepLength=this.axisLength/(e.ticks.length-(e.stretch?1:0))}function e(a,b){return this.stepLength*b}c.StepAxis=c.Axis.extend({constructor:d,projectValue:e})}(window,document,a),function(a,b,c){"use strict";function d(a){var b={raw:this.data,normalized:c.getDataArray(this.data,a.reverseData,!0)};this.svg=c.createSvg(this.container,a.width,a.height,a.classNames.chart);var d,e,g=this.svg.elem("g").addClass(a.classNames.gridGroup),h=this.svg.elem("g"),i=this.svg.elem("g").addClass(a.classNames.labelGroup),j=c.createChartRect(this.svg,a,f.padding);d=void 0===a.axisX.type?new c.StepAxis(c.Axis.units.x,b,j,c
 .extend({},a.axisX,{ticks:b.raw.labels,stretch:a.fullWidth})):a.axisX.type.call(c,c.Axis.units.x,b,j,a.axisX),e=void 0===a.axisY.type?new c.AutoScaleAxis(c.Axis.units.y,b,j,c.extend({},a.axisY,{high:c.isNum(a.high)?a.high:a.axisY.high,low:c.isNum(a.low)?a.low:a.axisY.low})):a.axisY.type.call(c,c.Axis.units.y,b,j,a.axisY),d.createGridAndLabels(g,i,this.supportsForeignObject,a,this.eventEmitter),e.createGridAndLabels(g,i,this.supportsForeignObject,a,this.eventEmitter),b.raw.series.forEach(function(f,g){var i=h.elem("g");i.attr({"series-name":f.name,meta:c.serialize(f.meta)},c.xmlNs.uri),i.addClass([a.classNames.series,f.className||a.classNames.series+"-"+c.alphaNumerate(g)].join(" "));var k=[],l=[];b.normalized[g].forEach(function(a,h){var i={x:j.x1+d.projectValue(a,h,b.normalized[g]),y:j.y1-e.projectValue(a,h,b.normalized[g])};k.push(i.x,i.y),l.push({value:a,valueIndex:h,meta:c.getMetaData(f,h)})}.bind(this));var m={lineSmooth:c.getSeriesOption(f,a,"lineSmooth"),showPoint:c.getSeries
 Option(f,a,"showPoint"),showLine:c.getSeriesOption(f,a,"showLine"),showArea:c.getSeriesOption(f,a,"showArea"),areaBase:c.getSeriesOption(f,a,"areaBase")},n="function"==typeof m.lineSmooth?m.lineSmooth:m.lineSmooth?c.Interpolation.cardinal():c.Interpolation.none(),o=n(k,l);if(m.showPoint&&o.pathElements.forEach(function(b){var h=i.elem("line",{x1:b.x,y1:b.y,x2:b.x+.01,y2:b.y},a.classNames.point).attr({value:[b.data.value.x,b.data.value.y].filter(function(a){return a}).join(","),meta:b.data.meta},c.xmlNs.uri);this.eventEmitter.emit("draw",{type:"point",value:b.data.value,index:b.data.valueIndex,meta:b.data.meta,series:f,seriesIndex:g,axisX:d,axisY:e,group:i,element:h,x:b.x,y:b.y})}.bind(this)),m.showLine){var p=i.elem("path",{d:o.stringify()},a.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:b.normalized[g],path:o.clone(),chartRect:j,index:g,series:f,seriesIndex:g,axisX:d,axisY:e,group:i,element:p})}if(m.showArea&&e.range){var q=Math.max(Math.min(m.areaBase,e.ran
 ge.max),e.range.min),r=j.y1-e.projectValue(q);o.splitByCommand("M").filter(function(a){return a.pathElements.length>1}).map(function(a){var b=a.pathElements[0],c=a.pathElements[a.pathElements.length-1];return a.clone(!0).position(0).remove(1).move(b.x,r).line(b.x,b.y).position(a.pathElements.length+1).line(c.x,r)}).forEach(function(h){var k=i.elem("path",{d:h.stringify()},a.classNames.area,!0).attr({values:b.normalized[g]},c.xmlNs.uri);this.eventEmitter.emit("draw",{type:"area",values:b.normalized[g],path:h.clone(),series:f,seriesIndex:g,axisX:d,axisY:e,chartRect:j,index:g,group:i,element:k})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:e.bounds,chartRect:j,axisX:d,axisY:e,svg:this.svg,options:a})}function e(a,b,d,e){c.Line["super"].constructor.call(this,a,b,f,c.extend({},f,d),e)}var f={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0}
 ,showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};c.Line=c.Base.extend({constructor:e,createChart:d})}(window,document,a),function(a,b,c){"use strict";function d(a){var b,d={raw:this.data,normalized:a.distributeSeries?c.getDataArray(this.data,a.reverseData,a.horizontalBars?"x":"y").map(function(a){return[a]}):c.getDataArray(this.data,a.reverseData,a.horizontalBars?"x":"y")};this.svg=c.createSvg(this.container,a.width,a.height,a.classNames.chart+(a.horizontalBars?" "+a.classNames.horizontalBars:""
 ));var e=this.svg.elem("g").addClass(a.classNames.gridGroup),g=this.svg.elem("g"),h=this.svg.elem("g").addClass(a.classNames.labelGroup);if(a.stackBars){var i=c.serialMap(d.normalized,function(){return Array.prototype.slice.call(arguments).map(function(a){return a}).reduce(function(a,b){return{x:a.x+b.x||0,y:a.y+b.y||0}},{x:0,y:0})});b=c.getHighLow([i],c.extend({},a,{referenceValue:0}),a.horizontalBars?"x":"y")}else b=c.getHighLow(d.normalized,c.extend({},a,{referenceValue:0}),a.horizontalBars?"x":"y");b.high=+a.high||(0===a.high?0:b.high),b.low=+a.low||(0===a.low?0:b.low);var j,k,l,m,n,o=c.createChartRect(this.svg,a,f.padding);k=a.distributeSeries&&a.stackBars?d.raw.labels.slice(0,1):d.raw.labels,a.horizontalBars?(j=m=void 0===a.axisX.type?new c.AutoScaleAxis(c.Axis.units.x,d,o,c.extend({},a.axisX,{highLow:b,referenceValue:0})):a.axisX.type.call(c,c.Axis.units.x,d,o,c.extend({},a.axisX,{highLow:b,referenceValue:0})),l=n=void 0===a.axisY.type?new c.StepAxis(c.Axis.units.y,d,o,{ticks
 :k}):a.axisY.type.call(c,c.Axis.units.y,d,o,a.axisY)):(l=m=void 0===a.axisX.type?new c.StepAxis(c.Axis.units.x,d,o,{ticks:k}):a.axisX.type.call(c,c.Axis.units.x,d,o,a.axisX),j=n=void 0===a.axisY.type?new c.AutoScaleAxis(c.Axis.units.y,d,o,c.extend({},a.axisY,{highLow:b,referenceValue:0})):a.axisY.type.call(c,c.Axis.units.y,d,o,c.extend({},a.axisY,{highLow:b,referenceValue:0})));var p=a.horizontalBars?o.x1+j.projectValue(0):o.y1-j.projectValue(0),q=[];l.createGridAndLabels(e,h,this.supportsForeignObject,a,this.eventEmitter),j.createGridAndLabels(e,h,this.supportsForeignObject,a,this.eventEmitter),d.raw.series.forEach(function(b,e){var f,h,i=e-(d.raw.series.length-1)/2;f=a.distributeSeries&&!a.stackBars?l.axisLength/d.normalized.length/2:a.distributeSeries&&a.stackBars?l.axisLength/2:l.axisLength/d.normalized[e].length/2,h=g.elem("g"),h.attr({"series-name":b.name,meta:c.serialize(b.meta)},c.xmlNs.uri),h.addClass([a.classNames.series,b.className||a.classNames.series+"-"+c.alphaNumerate
 (e)].join(" ")),d.normalized[e].forEach(function(g,k){var r,s,t,u;if(u=a.distributeSeries&&!a.stackBars?e:a.distributeSeries&&a.stackBars?0:k,r=a.horizontalBars?{x:o.x1+j.projectValue(g&&g.x?g.x:0,k,d.normalized[e]),y:o.y1-l.projectValue(g&&g.y?g.y:0,u,d.normalized[e])}:{x:o.x1+l.projectValue(g&&g.x?g.x:0,u,d.normalized[e]),y:o.y1-j.projectValue(g&&g.y?g.y:0,k,d.normalized[e])},l instanceof c.StepAxis&&(l.options.stretch||(r[l.units.pos]+=f*(a.horizontalBars?-1:1)),r[l.units.pos]+=a.stackBars||a.distributeSeries?0:i*a.seriesBarDistance*(a.horizontalBars?-1:1)),t=q[k]||p,q[k]=t-(p-r[l.counterUnits.pos]),void 0!==g){var v={};v[l.units.pos+"1"]=r[l.units.pos],v[l.units.pos+"2"]=r[l.units.pos],v[l.counterUnits.pos+"1"]=a.stackBars?t:p,v[l.counterUnits.pos+"2"]=a.stackBars?q[k]:r[l.counterUnits.pos],v.x1=Math.min(Math.max(v.x1,o.x1),o.x2),v.x2=Math.min(Math.max(v.x2,o.x1),o.x2),v.y1=Math.min(Math.max(v.y1,o.y2),o.y1),v.y2=Math.min(Math.max(v.y2,o.y2),o.y1),s=h.elem("line",v,a.classNames.
 bar).attr({value:[g.x,g.y].filter(function(a){return a}).join(","),meta:c.getMetaData(b,k)},c.xmlNs.uri),
+this.eventEmitter.emit("draw",c.extend({type:"bar",value:g,index:k,meta:c.getMetaData(b,k),series:b,seriesIndex:e,axisX:m,axisY:n,chartRect:o,group:h,element:s},v))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:j.bounds,chartRect:o,axisX:m,axisY:n,svg:this.svg,options:a})}function e(a,b,d,e){c.Bar["super"].constructor.call(this,a,b,f,c.extend({},f,d),e)}var f={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,onlyInteger:!1,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,horizontalBars:!1,distributeSeries:!1,reverseData:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",
 bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};c.Bar=c.Base.extend({constructor:e,createChart:d})}(window,document,a),function(a,b,c){"use strict";function d(a,b,c){var d=b.x>a.x;return d&&"explode"===c||!d&&"implode"===c?"start":d&&"implode"===c||!d&&"explode"===c?"end":"middle"}function e(a){var b,e,f,h,i,j=[],k=a.startAngle,l=c.getDataArray(this.data,a.reverseData);this.svg=c.createSvg(this.container,a.width,a.height,a.donut?a.classNames.chartDonut:a.classNames.chartPie),e=c.createChartRect(this.svg,a,g.padding),f=Math.min(e.width()/2,e.height()/2),i=a.total||l.reduce(function(a,b){return a+b},0),f-=a.donut?a.donutWidth/2:0,h="outside"===a.labelPosition||a.donut?f:"center"===a.labelPosition?0:f/2,h+=a.labelOffset;var m={x:e.x1+e.width()/2,y:e.y2+e.height()/2},n=1===this.data.series.filter(function(a){return a.hasOwnProperty("value")?0!==a.value:0!==a}).length;a.showLabel&&(b=this.svg.elem("g",null
 ,null,!0));for(var o=0;o<this.data.series.length;o++){var p=this.data.series[o];j[o]=this.svg.elem("g",null,null,!0),j[o].attr({"series-name":p.name},c.xmlNs.uri),j[o].addClass([a.classNames.series,p.className||a.classNames.series+"-"+c.alphaNumerate(o)].join(" "));var q=k+l[o]/i*360;q-k===360&&(q-=.01);var r=c.polarToCartesian(m.x,m.y,f,k-(0===o||n?0:.2)),s=c.polarToCartesian(m.x,m.y,f,q),t=new c.Svg.Path(!a.donut).move(s.x,s.y).arc(f,f,0,q-k>180,0,r.x,r.y);a.donut||t.line(m.x,m.y);var u=j[o].elem("path",{d:t.stringify()},a.donut?a.classNames.sliceDonut:a.classNames.slicePie);if(u.attr({value:l[o],meta:c.serialize(p.meta)},c.xmlNs.uri),a.donut&&u.attr({style:"stroke-width: "+ +a.donutWidth+"px"}),this.eventEmitter.emit("draw",{type:"slice",value:l[o],totalDataSum:i,index:o,meta:p.meta,series:p,group:j[o],element:u,path:t.clone(),center:m,radius:f,startAngle:k,endAngle:q}),a.showLabel){var v=c.polarToCartesian(m.x,m.y,h,k+(q-k)/2),w=a.labelInterpolationFnc(this.data.labels?this.data
 .labels[o]:l[o],o);if(w||0===w){var x=b.elem("text",{dx:v.x,dy:v.y,"text-anchor":d(m,v,a.labelDirection)},a.classNames.label).text(""+w);this.eventEmitter.emit("draw",{type:"label",index:o,group:b,element:x,text:""+w,x:v.x,y:v.y})}}k=q}this.eventEmitter.emit("created",{chartRect:e,svg:this.svg,options:a})}function f(a,b,d,e){c.Pie["super"].constructor.call(this,a,b,g,c.extend({},g,d),e)}var g={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:c.noop,labelDirection:"neutral",reverseData:!1};c.Pie=c.Base.extend({constructor:f,createChart:e,determineAnchorPosition:d})}(window,document,a),a});
+//# sourceMappingURL=chartist.min.js.map
\ No newline at end of file


[2/9] chukwa git commit: Add ability to generate circles graph.

Posted by ey...@apache.org.
Add ability to generate circles graph.


Project: http://git-wip-us.apache.org/repos/asf/chukwa/repo
Commit: http://git-wip-us.apache.org/repos/asf/chukwa/commit/253797e8
Tree: http://git-wip-us.apache.org/repos/asf/chukwa/tree/253797e8
Diff: http://git-wip-us.apache.org/repos/asf/chukwa/diff/253797e8

Branch: refs/heads/master
Commit: 253797e830c51e5e542d654987f8e54681636bd1
Parents: 112d3bb
Author: Eric Yang <ey...@apache.org>
Authored: Wed Aug 19 19:42:28 2015 -0700
Committer: Eric Yang <ey...@apache.org>
Committed: Sat Sep 5 20:55:57 2015 -0700

----------------------------------------------------------------------
 conf/chukwa-agent-conf.xml                      |   3 +-
 .../org/apache/hadoop/chukwa/ChunkImpl.java     |   2 +-
 .../chukwa/datastore/ChukwaHBaseStore.java      |  16 ++-
 .../hbase/HadoopMetricsProcessor.java           |   2 +-
 .../chukwa/hicc/rest/CirclesController.java     | 129 +++++++++++++++++++
 src/main/web/hicc/WEB-INF/vm/circles.vm         | 114 ++++++++++++++++
 src/main/web/hicc/css/font-awesome.min.css      |   4 +
 src/main/web/hicc/css/jquery.circliful.css      |  20 +++
 src/main/web/hicc/home/css/jquery.gridster.css  |   6 +-
 src/main/web/hicc/home/index.html               |   4 +-
 src/main/web/hicc/home/tile.html                |  52 ++++++++
 src/main/web/hicc/js/jquery.circliful.min.js    |   1 +
 12 files changed, 343 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/conf/chukwa-agent-conf.xml
----------------------------------------------------------------------
diff --git a/conf/chukwa-agent-conf.xml b/conf/chukwa-agent-conf.xml
index ba47154..72a0bd3 100644
--- a/conf/chukwa-agent-conf.xml
+++ b/conf/chukwa-agent-conf.xml
@@ -78,7 +78,8 @@
 
   <property>
     <name>chukwa.pipeline</name>
-    <value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter,org.apache.hadoop.chukwa.datacollection.writer.solr.SolrWriter</value>
+    <!--<value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter,org.apache.hadoop.chukwa.datacollection.writer.solr.SolrWriter</value>-->
+    <value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter</value>
   </property>
 
   <property>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/java/org/apache/hadoop/chukwa/ChunkImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/ChunkImpl.java b/src/main/java/org/apache/hadoop/chukwa/ChunkImpl.java
index ed90d4a..d8d948e 100644
--- a/src/main/java/org/apache/hadoop/chukwa/ChunkImpl.java
+++ b/src/main/java/org/apache/hadoop/chukwa/ChunkImpl.java
@@ -50,7 +50,7 @@ public class ChunkImpl implements org.apache.hadoop.io.Writable, Chunk {
   private static String localHostAddr;
   static {
     try {
-      setHostAddress(InetAddress.getLocalHost().getHostName());
+      setHostAddress(InetAddress.getLocalHost().getHostName().toLowerCase());
     } catch (UnknownHostException e) {
       setHostAddress("localhost");
     }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java b/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
index f828ff1..721f290 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
@@ -808,7 +808,7 @@ public class ChukwaHBaseStore {
       if(defaultExists) {
         return;
       }
-      String hostname = InetAddress.getLocalHost().getHostName();
+      String hostname = InetAddress.getLocalHost().getHostName().toLowerCase();
       // Populate example chart widgets
       String[] metrics = { "SystemMetrics.LoadAverage.1" };
       createChart("1", "", "System Load Average", metrics, hostname);
@@ -822,7 +822,11 @@ public class ChukwaHBaseStore {
       createChart("5", "bytes", "Network Utilization", netMetrics, hostname);
       String[] swapMetrics = { "SystemMetrics.swap.Total", "SystemMetrics.swap.Used", "SystemMetrics.swap.Free" };
       createChart("6", "bytes-decimal", "Swap Utilization", swapMetrics, hostname);
-      
+      StringBuilder namenode = new StringBuilder();
+      namenode.append(hostname);
+      namenode.append(":NameNode");
+      String[] namenodeHeap = { "HadoopMetrics.jvm.JvmMetrics.MemHeapUsedM", "HadoopMetrics.jvm.JvmMetrics.MemHeapMaxM" };
+      createChart("7", "percent", "Namenode Memory", namenodeHeap, namenode.toString());
       // Populate default widgets
       Widget widget = new Widget();
       widget.setTitle("System Load Average");
@@ -918,6 +922,14 @@ public class ChukwaHBaseStore {
       createWidget(widget);
       dashboard.add(widget);
 
+      widget = new Widget();
+      widget.setTitle("Namenode Memory");
+      widget.setSrc(new URI("/hicc/v1/circles/draw/7"));
+      widget.setCol(1);
+      widget.setRow(1);
+      widget.setSize_x(2);
+      widget.setSize_y(2);
+      createWidget(widget);
       updateDashboard("system", "", dashboard);
       
     } catch (Throwable ex) {

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/HadoopMetricsProcessor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/HadoopMetricsProcessor.java b/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/HadoopMetricsProcessor.java
index de64a0d..9c719e4 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/HadoopMetricsProcessor.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/HadoopMetricsProcessor.java
@@ -51,7 +51,7 @@ public class HadoopMetricsProcessor extends AbstractProcessor {
       time = ((Long) json.get(timestampField)).longValue();
       String contextName = (String) json.get(contextNameField);
       String recordName = (String) json.get(recordNameField);
-      String src = (String) json.get(hostName);
+      String src = ((String) json.get(hostName)).toLowerCase();
       if(json.get(processName)!=null) {
         src = new StringBuilder(src).append(":").append(json.get(processName)).toString();
       }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java
new file mode 100644
index 0000000..62b4b71
--- /dev/null
+++ b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.chukwa.hicc.rest;
+
+import java.io.StringWriter;
+import java.lang.reflect.Type;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.hadoop.chukwa.datastore.ChukwaHBaseStore;
+import org.apache.hadoop.chukwa.hicc.TimeHandler;
+import org.apache.hadoop.chukwa.hicc.bean.Chart;
+import org.apache.hadoop.chukwa.hicc.bean.Series;
+import org.apache.hadoop.chukwa.hicc.bean.SeriesMetaData;
+import org.apache.log4j.Logger;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+@Path("/circles")
+public class CirclesController {
+  static Logger LOG = Logger.getLogger(CirclesController.class);
+  SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+
+  @Context
+  VelocityEngine velocity;
+  
+  /**
+   * Render circle using jquery circliful.js
+   * 
+   * @param title Title of the tile.
+   * @param metric Metric name to lookup in hbase.
+   * @param source Metric source.
+   * @param invert Toggle to display warning, error color by upper bound or lower bound.
+   * @return html circle widget.
+   */
+  @GET
+  @Path("draw/{id}")
+  @Produces(MediaType.TEXT_HTML)
+  public String draw(@PathParam("id") String id, @DefaultValue("false") @QueryParam("invert") boolean invert) {
+    VelocityContext context = new VelocityContext();
+    StringWriter sw = null;
+    try {
+      Chart chart = ChukwaHBaseStore.getChart(id);
+      List<SeriesMetaData> series = chart.getSeries();
+      Gson gson = new Gson();
+      String seriesMetaData = gson.toJson(series);
+
+      context.put("chart", chart);
+      context.put("seriesMetaData", seriesMetaData);
+      Template template = velocity.getTemplate("circles.vm");
+      sw = new StringWriter();
+      template.merge(context, sw);
+    } catch (Exception e) {
+      e.printStackTrace();
+      return e.getMessage();
+    }
+    return sw.toString();
+  }
+
+  @PUT
+  @Path("preview/series")
+  @Produces("application/json")
+  public String previewSeries(@Context HttpServletRequest request, String buffer) {
+    Type listType = new TypeToken<ArrayList<SeriesMetaData>>() {
+    }.getType();
+    long startTime = 0;
+    long endTime = 0;
+    TimeHandler time = new TimeHandler(request);
+    startTime = time.getEndTime() - TimeUnit.SECONDS.toMillis(300);
+    endTime = time.getEndTime();
+    Gson gson = new Gson();
+    ArrayList<SeriesMetaData> series = gson.fromJson(buffer, listType);
+    double percent;
+    long timestamp;
+    series = ChukwaHBaseStore.getChartSeries(series, startTime, endTime);
+    if(series.size()>=2) {
+      ArrayList<ArrayList<Number>> a = series.get(0).getData();
+      ArrayList<Number> b = a.get(a.size()-1);
+      timestamp = b.get(0).longValue();
+      double x = b.get(b.size()-1).doubleValue();
+      a = series.get(1).getData();
+      b = a.get(a.size()-1);
+      double y = b.get(b.size()-1).doubleValue();
+      percent = x / y * 100d;
+    } else {
+      ArrayList<ArrayList<Number>> a = series.get(0).getData();
+      ArrayList<Number> b = a.get(a.size()-1);
+      timestamp = b.get(0).longValue();
+      percent = b.get(b.size()-1).doubleValue();
+    }
+    percent = Math.round(percent * 100d) / 100d;
+    Series answer = new Series("circle");
+    answer.add(timestamp, percent);
+    String result = gson.toJson(answer);
+    return result;
+  }
+}

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/web/hicc/WEB-INF/vm/circles.vm
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/WEB-INF/vm/circles.vm b/src/main/web/hicc/WEB-INF/vm/circles.vm
new file mode 100644
index 0000000..76acfda
--- /dev/null
+++ b/src/main/web/hicc/WEB-INF/vm/circles.vm
@@ -0,0 +1,114 @@
+#*
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ *#
+<html>
+<head>
+<title>Circliful</title>
+
+<link href="/hicc/css/jquery.circliful.css" rel="stylesheet" type="text/css" />
+<link href="/hicc/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
+
+<script src="/hicc/js/jquery.js"></script>
+<script src="/hicc/js/jquery.circliful.min.js"></script>
+
+<style>
+body {
+    font-family: arial,verdana, sans-serif;
+    font-size: 12px;
+}
+
+.outer {
+    display: table;
+    position: absolute;
+    height: 100%;
+    width: 100%;
+}
+
+.middle {
+    display: table-cell;
+    vertical-align: middle;
+}
+
+.inner {
+    margin-left: auto;
+    margin-right: auto; 
+}
+
+</style>
+</head>
+<body onResize="resize()">
+<div class="outer">
+<div class="middle">
+<div class="inner" id="ring" data-startdegree="270" data-text="35%" data-info="$chart.getTitle()" data-width="30" data-fontsize="38" data-percent="35" data-fgcolor="#61a9dc" data-bgcolor="#eee" data-animationstep="0"></div>
+</div>
+</div>
+
+<script>
+var tracker;
+
+function resize() {
+    clearTimeout(tracker);
+    tracker = setTimeout(load, 50);
+}
+
+function load() {
+    var _series=$seriesMetaData;
+    var buffer=JSON.stringify(_series);
+    $.ajax({
+      url: '/hicc/v1/circles/preview/series',
+      type: 'PUT',
+      contentType: 'application/json',
+      data: buffer,
+      dataType: 'json',
+      success: function(result) {
+        render(result);
+      }
+    });
+}
+
+function render(result) {
+    var radius = $(document).width() / 1.3334;
+    var width = 30;
+    var fontsize = 38;
+    var percent = result.series.data[0][1];
+    var text = percent+"%";
+    var color = "#70cac8";
+    if(percent > 75) {
+      color = "#fc6e64";
+    } else if (percent > 50) {
+      color = "#f7d254";
+    }
+    if(radius < 200) {
+      width=10;
+      fontsize = 12;
+    }
+    $('#ring').empty().removeData().attr('data-percent', percent).
+    attr('data-width', width).
+    attr('data-fontsize', fontsize).
+    attr('data-dimension', radius).
+    attr('data-fgcolor', color).
+    attr('data-text', text).circliful();
+    document.body.style.overflow = 'hidden';
+    tracker = setTimeout(load, 3000);
+}
+
+$( document ).ready(function() {
+  load();
+});
+</script>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/web/hicc/css/font-awesome.min.css
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/css/font-awesome.min.css b/src/main/web/hicc/css/font-awesome.min.css
new file mode 100644
index 0000000..3d920fc
--- /dev/null
+++ b/src/main/web/hicc/css/font-awesome.min.css
@@ -0,0 +1,4 @@
+/*!
+ *  Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
+ *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.1.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-l
 g{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-
 rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-al
 ign:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{conten
 t:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035
 "}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.f
 a-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\
 f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.f
 a-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-le
 ft:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:
 before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment
 -o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-do
 uble-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.
 fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"
 \f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\
 f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content
 :"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"
 \f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-
 yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:b
 efore{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empi
 re:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/web/hicc/css/jquery.circliful.css
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/css/jquery.circliful.css b/src/main/web/hicc/css/jquery.circliful.css
new file mode 100644
index 0000000..d4ea801
--- /dev/null
+++ b/src/main/web/hicc/css/jquery.circliful.css
@@ -0,0 +1,20 @@
+.circliful {
+    position: relative; 
+}
+
+.circle-text, .circle-info, .circle-text-half, .circle-info-half {
+    width: 100%;
+    position: absolute;
+    text-align: center;
+    display: inline-block;
+}
+
+.circle-info, .circle-info-half {
+	color: #999;
+}
+
+.circliful .fa {
+	margin: -10px 3px 0 3px;
+	position: relative;
+	bottom: 4px;
+}

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/web/hicc/home/css/jquery.gridster.css
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/css/jquery.gridster.css b/src/main/web/hicc/home/css/jquery.gridster.css
index 6c8969e..a0f3acf 100755
--- a/src/main/web/hicc/home/css/jquery.gridster.css
+++ b/src/main/web/hicc/home/css/jquery.gridster.css
@@ -61,8 +61,8 @@ body {
 .gridster .gs-w {
     background: #FFF;
     cursor: pointer;
-    -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3);
-    box-shadow: 0 0 5px rgba(0,0,0,0.3);
+    //-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3);
+    //box-shadow: 0 0 5px rgba(0,0,0,0.3);
     z-index: 2;
     position: absolute;
     min-width: 140px;
@@ -176,7 +176,7 @@ body {
 
 .gs-w:hover .gs-header {
     opacity: .9;
-    filter: blur(5px);
+    //filter: blur(5px);
 }
 
 .gs-header {

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/web/hicc/home/index.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/index.html b/src/main/web/hicc/home/index.html
index f83de5c..38578bd 100755
--- a/src/main/web/hicc/home/index.html
+++ b/src/main/web/hicc/home/index.html
@@ -129,10 +129,10 @@ function load() {
         save();
       };
       var gridster = $(".gridster ul").gridster({
-        widget_margins: [10, 10],
+        widget_margins: [0, 0],
         widget_base_dimensions: [140, 140],
         autogrow_cols: true,
-	max_cols: 9,
+	max_cols: 10,
         limit: true,
         draggable: {
           handle: 'header',

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/web/hicc/home/tile.html
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/tile.html b/src/main/web/hicc/home/tile.html
new file mode 100644
index 0000000..1fc905e
--- /dev/null
+++ b/src/main/web/hicc/home/tile.html
@@ -0,0 +1,52 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--> 
+<!DOCTYPE html>
+<html lang="en" class="no-js">
+  <head>
+    <title>Tile</title>
+    <link href="../../css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+    <link href="../../css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+    <script src="../../js/jquery.js" type="text/javascript"></script>
+    <script src="../../js/bootstrap.min.js" type="text/javascript"></script>
+  </head>
+  <body onResize="resize()">
+    <div class="container-fluid">
+      <div class="row">
+        <div class=".col-xs-1 .col-sm-1 .col-md-1 .col-lg-1 glyhicon-hdd"></div>
+        <div class=".col-xs-1 .col-sm-2 .col-md-2 .col-lg-2">1000</div>
+      </div>
+    </div>
+    <script src="js/jquery.js"></script>
+    <script>
+      var tracker;
+
+      function resize() {
+        clearTimeout(tracker);
+        tracker = setTimeout(render, 50);
+      }
+
+      function render() {
+        tracker = setTimeout(render, 3000);
+      }
+
+      $( document ).ready(function() {
+        render();
+      });
+    </script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/253797e8/src/main/web/hicc/js/jquery.circliful.min.js
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/js/jquery.circliful.min.js b/src/main/web/hicc/js/jquery.circliful.min.js
new file mode 100644
index 0000000..ab9fcd7
--- /dev/null
+++ b/src/main/web/hicc/js/jquery.circliful.min.js
@@ -0,0 +1 @@
+(function(t){t.fn.circliful=function(i){var e=t.extend({startdegree:0,fgcolor:"#556b2f",bgcolor:"#eee",fill:!1,width:15,dimension:200,fontsize:15,percent:50,animationstep:1,iconsize:"20px",iconcolor:"#999",border:"default",complete:null,bordersize:10},i);return this.each(function(){function a(i,e,a){t("<span></span>").appendTo(i).addClass(e).text(s).prepend(l).css({"line-height":a+"px","font-size":h.fontsize+"px"})}function n(i,e){t("<span></span>").appendTo(i).addClass("circle-info-half").css("line-height",h.dimension*e+"px").text(r)}function o(i){t.each(c,function(a,n){h[n]=void 0!=i.data(n)?i.data(n):t(e).attr(n),"fill"==n&&void 0!=i.data("fill")&&(m=!0)})}function d(e){u.clearRect(0,0,g.width,g.height),u.beginPath(),u.arc(x,b,w,z,y,!1),u.lineWidth=h.width+1,u.strokeStyle=h.bgcolor,u.stroke(),m&&(u.fillStyle=h.fill,u.fill()),u.beginPath(),u.arc(x,b,w,-k+T,C*e-k+T,!1),"outline"==h.border?u.lineWidth=h.width+13:"inline"==h.border&&(u.lineWidth=h.width-13),u.strokeStyle=h.fgcolor,u.
 stroke(),p>M&&(M+=I,requestAnimationFrame(function(){d(Math.min(M,p)/100)},f)),M==p&&S&&i!==void 0&&t.isFunction(i.complete)&&(i.complete(),S=!1)}var s,r,c=["fgcolor","bgcolor","fill","width","dimension","fontsize","animationstep","endPercent","icon","iconcolor","iconsize","border","startdegree","bordersize"],h={},l="",p=0,f=t(this),m=!1;if(f.addClass("circliful"),o(f),void 0!=f.data("text")&&(s=f.data("text"),void 0!=f.data("icon")&&(l=t("<i></i>").addClass("fa "+t(this).data("icon")).css({color:h.iconcolor,"font-size":h.iconsize})),void 0!=f.data("type")?(F=t(this).data("type"),"half"==F?a(f,"circle-text-half",h.dimension/1.45):a(f,"circle-text",h.dimension)):a(f,"circle-text",h.dimension)),void 0!=t(this).data("total")&&void 0!=t(this).data("part")){var v=t(this).data("total")/100;percent=(t(this).data("part")/v/100).toFixed(3),p=(t(this).data("part")/v).toFixed(3)}else void 0!=t(this).data("percent")?(percent=t(this).data("percent")/100,p=t(this).data("percent")):percent=e.perce
 nt/100;void 0!=t(this).data("info")&&(r=t(this).data("info"),void 0!=t(this).data("type")?(F=t(this).data("type"),"half"==F?n(f,.9):n(f,1.25)):n(f,1.25)),t(this).width(h.dimension+"px");var g=t("<canvas></canvas>").attr({width:h.dimension,height:h.dimension}).appendTo(t(this)).get(0),u=g.getContext("2d");t(g).parent();var x=g.width/2,b=g.height/2,P=360*h.percent;P*(Math.PI/180);var w=g.width/2.5,y=2.3*Math.PI,z=0,M=0===h.animationstep?p:0,I=Math.max(h.animationstep,0),C=2*Math.PI,k=Math.PI/2,F="",S=!0,T=h.startdegree/180*Math.PI;void 0!=t(this).data("type")&&(F=t(this).data("type"),"half"==F&&(y=2*Math.PI,z=3.13,C=Math.PI,k=Math.PI/.996)),d(M/100)})}})(jQuery);
\ No newline at end of file


[5/9] chukwa git commit: CHUKWA-778. Added pie chart, circle chart and timeline javascripts. (Eric Yang)

Posted by ey...@apache.org.
http://git-wip-us.apache.org/repos/asf/chukwa/blob/666dbb9c/src/main/web/hicc/js/chartist.min.js.map
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/js/chartist.min.js.map b/src/main/web/hicc/js/chartist.min.js.map
new file mode 100644
index 0000000..513c272
--- /dev/null
+++ b/src/main/web/hicc/js/chartist.min.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chartist.min.js","sources":["chartist.js"],"names":["root","factory","define","amd","exports","module","this","Chartist","version","window","document","noop","n","alphaNumerate","String","fromCharCode","extend","target","sources","Array","prototype","slice","call","arguments","forEach","source","prop","replaceAll","str","subStr","newSubStr","replace","RegExp","stripUnit","value","ensureUnit","unit","querySelector","query","Node","times","length","apply","sum","previous","current","mapMultiply","factor","num","mapAdd","addend","serialMap","arr","cb","result","Math","max","map","e","index","args","roundWithPrecision","digits","precision","pow","round","escapingMap","&","<",">","\"","'","serialize","data","undefined","JSON","stringify","Object","keys","reduce","key","deserialize","parse","createSvg","container","width","height","className","svg","querySelectorAll","filter","getAttributeNS","xmlNs","prefix","removeChild","Svg","attr","addClass","style","appendChild"
 ,"_node","reverseData","labels","reverse","series","i","getDataArray","multi","recursiveConvert","isFalseyButZero","hasOwnProperty","multiValue","getNumberOrUndefined","y","x","reversed","normalizePadding","padding","fallback","top","right","bottom","left","getMetaData","meta","orderOfMagnitude","floor","log","abs","LN10","projectLength","axisLength","bounds","range","getAvailableHeight","options","chartPadding","axisX","offset","getHighLow","dimension","recursiveHighLow","findHigh","highLow","high","findLow","low","toUpperCase","Number","MAX_VALUE","referenceValue","min","isNum","isNaN","isFinite","getMultiValue","rho","gcd","p","q","f","divisor","x1","x2","getBounds","scaleMinSpace","onlyInteger","newMin","newMax","optimizationCounter","valueRange","oom","step","ceil","numberOfSteps","scaleUp","smallestFactor","Error","values","push","polarToCartesian","centerX","centerY","radius","angleInDegrees","angleInRadians","PI","cos","sin","createChartRect","fallbackPadding","hasAxis","axi
 sY","yAxisOffset","xAxisOffset","normalizedPadding","chartRect","y1","y2","position","createGrid","axis","group","classes","eventEmitter","positionalData","units","pos","counterUnits","gridElement","elem","join","emit","type","element","createLabel","axisOffset","labelOffset","useForeignObject","labelElement","len","content","foreignObject","text","getSeriesOption","name","seriesOptions","optionsProvider","responsiveOptions","updateCurrentOptions","preventChangedEvent","previousOptions","currentOptions","baseOptions","mql","matchMedia","matches","removeMediaQueryListeners","mediaQueryListeners","removeListener","addListener","getCurrentOptions","Interpolation","none","pathCoordinates","valueData","path","Path","hole","move","line","simple","defaultOptions","d","prevX","prevY","currX","currY","prevData","currData","curve","cardinal","splitIntoSegments","segments","tension","t","c","paths","segment","z","iLen","postpone","EventEmitter","addEventHandler","event","handler","handlers","r
 emoveEventHandler","splice","indexOf","starHandler","listToArray","list","properties","superProtoOverride","superProto","Class","proto","create","cloneDefinitions","constr","instance","fn","constructor","getOwnPropertyNames","propName","defineProperty","getOwnPropertyDescriptor","update","override","initializeTimeoutId","createChart","detach","clearTimeout","removeEventListener","resizeListener","on","off","initialize","addEventListener","bind","plugins","plugin","Base","supportsForeignObject","isSupported","supportsAnimations","__chartist__","setTimeout","attributes","parent","insertFirst","Element","createElementNS","svgNs","setAttributeNS","qualifiedName","uri","firstChild","insertBefore","ns","getAttribute","setAttribute","parentNode","SVGElement","node","nodeName","selector","foundNode","foundNodes","List","createElement","innerHTML","xhtmlNs","fnObj","createTextNode","empty","remove","newElement","replaceChild","append","trim","split","names","concat","self","removeClass","rem
 ovedClasses","removeAllClasses","getBBoxProperty","getBBox","clientHeight","clientWidth","animate","animations","guided","attribute","createAnimate","animationDefinition","timeout","easing","attributeProperties","Easing","begin","dur","calcMode","keySplines","keyTimes","fill","from","attributeName","beginElement","err","to","params","SvgList","nodeList","svgElements","prototypeProperty","feature","implementation","hasFeature","easingCubicBeziers","easeInSine","easeOutSine","easeInOutSine","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","command","pathElements","relative","pathElement","toLowerCase","forEachParam","pathElementIndex","elementDescriptions","paramName","paramIndex","SvgPath","close","count","arc","rx","ry","xAr",
 "lAf","sf","chunks","match","pop","elements","chunk","shift","description","spliceArgs","accuracyMultiplier","accuracy","scale","translate","transform","transformFnc","transformed","clone","splitByCommand","joinedPath","j","m","l","a","Axis","ticks","axisUnits","rectEnd","rectStart","gridOffset","rectOffset","createGridAndLabels","gridGroup","labelGroup","chartOptions","axisOptions","projectedValues","projectValue","labelValues","labelInterpolationFnc","projectedValue","labelLength","showGrid","classNames","grid","dir","showLabel","label","AutoScaleAxis","axisUnit","normalized","FixedScaleAxis","stepLength","StepAxis","stretch","raw","chart","seriesGroup","fullWidth","seriesIndex","seriesElement","series-name","pathData","valueIndex","lineSmooth","showPoint","showLine","showArea","areaBase","smoothing","point","v","areaBaseProjected","pathSegment","solidPathSegments","firstElement","lastElement","areaPath","area","Line","vertical","horizontal","start","end","distributeSeries","horiz
 ontalBars","stackBars","serialSums","prev","curr","valueAxis","labelAxisTicks","labelAxis","zeroPoint","stackedBarValues","periodHalfLength","biPol","projected","bar","previousStack","labelAxisValueIndex","seriesBarDistance","positions","Bar","determineAnchorPosition","center","direction","toTheRight","labelsGroup","labelRadius","totalDataSum","seriesGroups","startAngle","dataArray","donut","chartDonut","chartPie","total","previousValue","currentValue","donutWidth","labelPosition","hasSingleValInSeries","val","endAngle","sliceDonut","slicePie","interpolatedValue","dx","dy","text-anchor","labelDirection","Pie"],"mappings":";;;;;;CAAC,SAAUA,EAAMC,GACO,kBAAXC,SAAyBA,OAAOC,IAEzCD,UAAW,WACT,MAAQF,GAAe,SAAIC,MAED,gB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AAKkV,EACX/b,EAAGyb,EAAczb,EACjBD,EAAG0b,EAAc1b,KAOvBib,EAAaY,EAGfxiB,KAAKsM,aAAaQ,KAAK,WACrBhB,UAAWA,EACX5G,IAAKlF,KAAK
 kF,IACV+C,QAASA,IAwEb,QAAS+a,GAAIhhB,EAAOmC,EAAM8D,EAAS6F,GACjC7N,EAAS+iB,IAAT/iB,SAAmB8R,YAAY/Q,KAAKhB,KAClCgC,EACAmC,EACAmL,EACArP,EAASS,UAAW4O,EAAgBrH,GACpC6F,GAnTJ,GAAIwB,IAEFvK,MAAOX,OAEPY,OAAQZ,OAER8D,aAAc,EAEdqV,YACEyE,SAAU,eACVD,WAAY,iBACZ7b,OAAQ,YACRwc,SAAU,eACVD,WAAY,iBACZ9E,MAAO,YAGTiE,WAAY,EAEZK,MAAO7d,OAEP0d,OAAO,EAEPM,WAAY,GAEZ1E,WAAW,EAEXvQ,YAAa,EAEbkV,cAAe,SAEflF,sBAAuBld,EAASI,KAEhC0iB,eAAgB,UAEhBhd,aAAa,EAoRf9F,GAAS+iB,IAAM/iB,EAASkT,KAAKzS,QAC3BqR,YAAaiR,EACbzQ,YAAaA,EACb6O,wBAAyBA,KAG3BjhB,OAAQC,SAAUH,GAEbA","sourcesContent":["(function (root, factory) {\n  if (typeof define === 'function' && define.amd) {\n    // AMD. Register as an anonymous module unless amdModuleId is set\n    define([], function () {\n      return (root['Chartist'] = factory());\n    });\n  } else if (typeof exports === 'object') {\n    // Node. Does not work with strict CommonJS, but\n    // only CommonJS-like environments that support module.exports,\n    // like Node.\n    module.exports 
 = factory();\n  } else {\n    root['Chartist'] = factory();\n  }\n}(this, function () {\n\n/* Chartist.js 0.9.4\n * Copyright © 2015 Gion Kunz\n * Free to use under the WTFPL license.\n * http://www.wtfpl.net/\n */\n/**\n * The core module of Chartist that is mainly providing static functions and higher level functions for chart modules.\n *\n * @module Chartist.Core\n */\nvar Chartist = {\n  version: '0.9.4'\n};\n\n(function (window, document, Chartist) {\n  'use strict';\n\n  /**\n   * Helps to simplify functional style code\n   *\n   * @memberof Chartist.Core\n   * @param {*} n This exact value will be returned by the noop function\n   * @return {*} The same value that was provided to the n parameter\n   */\n  Chartist.noop = function (n) {\n    return n;\n  };\n\n  /**\n   * Generates a-z from a number 0 to 26\n   *\n   * @memberof Chartist.Core\n   * @param {Number} n A number from 0 to 26 that will result in a letter a-z\n   * @return {String} A character from a-z based on th
 e input number n\n   */\n  Chartist.alphaNumerate = function (n) {\n    // Limit to a-z\n    return String.fromCharCode(97 + n % 26);\n  };\n\n  /**\n   * Simple recursive object extend\n   *\n   * @memberof Chartist.Core\n   * @param {Object} target Target object where the source will be merged into\n   * @param {Object...} sources This object (objects) will be merged into target and then target is returned\n   * @return {Object} An object that has the same reference as target but is extended and merged with the properties of source\n   */\n  Chartist.extend = function (target) {\n    target = target || {};\n\n    var sources = Array.prototype.slice.call(arguments, 1);\n    sources.forEach(function(source) {\n      for (var prop in source) {\n        if (typeof source[prop] === 'object' && source[prop] !== null && !(source[prop] instanceof Array)) {\n          target[prop] = Chartist.extend({}, target[prop], source[prop]);\n        } else {\n          target[prop] = source[prop];\n
         }\n      }\n    });\n\n    return target;\n  };\n\n  /**\n   * Replaces all occurrences of subStr in str with newSubStr and returns a new string.\n   *\n   * @memberof Chartist.Core\n   * @param {String} str\n   * @param {String} subStr\n   * @param {String} newSubStr\n   * @return {String}\n   */\n  Chartist.replaceAll = function(str, subStr, newSubStr) {\n    return str.replace(new RegExp(subStr, 'g'), newSubStr);\n  };\n\n  /**\n   * Converts a string to a number while removing the unit if present. If a number is passed then this will be returned unmodified.\n   *\n   * @memberof Chartist.Core\n   * @param {String|Number} value\n   * @return {Number} Returns the string as number or NaN if the passed length could not be converted to pixel\n   */\n  Chartist.stripUnit = function(value) {\n    if(typeof value === 'string') {\n      value = value.replace(/[^0-9\\+-\\.]/g, '');\n    }\n\n    return +value;\n  };\n\n  /**\n   * Converts a number to a string with a unit. If a st
 ring is passed then this will be returned unmodified.\n   *\n   * @memberof Chartist.Core\n   * @param {Number} value\n   * @param {String} unit\n   * @return {String} Returns the passed number value with unit.\n   */\n  Chartist.ensureUnit = function(value, unit) {\n    if(typeof value === 'number') {\n      value = value + unit;\n    }\n\n    return value;\n  };\n\n  /**\n   * This is a wrapper around document.querySelector that will return the query if it's already of type Node\n   *\n   * @memberof Chartist.Core\n   * @param {String|Node} query The query to use for selecting a Node or a DOM node that will be returned directly\n   * @return {Node}\n   */\n  Chartist.querySelector = function(query) {\n    return query instanceof Node ? query : document.querySelector(query);\n  };\n\n  /**\n   * Functional style helper to produce array with given length initialized with undefined values\n   *\n   * @memberof Chartist.Core\n   * @param length\n   * @return {Array}\n   */\n  Chartist
 .times = function(length) {\n    return Array.apply(null, new Array(length));\n  };\n\n  /**\n   * Sum helper to be used in reduce functions\n   *\n   * @memberof Chartist.Core\n   * @param previous\n   * @param current\n   * @return {*}\n   */\n  Chartist.sum = function(previous, current) {\n    return previous + (current ? current : 0);\n  };\n\n  /**\n   * Multiply helper to be used in `Array.map` for multiplying each value of an array with a factor.\n   *\n   * @memberof Chartist.Core\n   * @param {Number} factor\n   * @returns {Function} Function that can be used in `Array.map` to multiply each value in an array\n   */\n  Chartist.mapMultiply = function(factor) {\n    return function(num) {\n      return num * factor;\n    };\n  };\n\n  /**\n   * Add helper to be used in `Array.map` for adding a addend to each value of an array.\n   *\n   * @memberof Chartist.Core\n   * @param {Number} addend\n   * @returns {Function} Function that can be used in `Array.map` to add a addend to 
 each value in an array\n   */\n  Chartist.mapAdd = function(addend) {\n    return function(num) {\n      return num + addend;\n    };\n  };\n\n  /**\n   * Map for multi dimensional arrays where their nested arrays will be mapped in serial. The output array will have the length of the largest nested array. The callback function is called with variable arguments where each argument is the nested array value (or undefined if there are no more values).\n   *\n   * @memberof Chartist.Core\n   * @param arr\n   * @param cb\n   * @return {Array}\n   */\n  Chartist.serialMap = function(arr, cb) {\n    var result = [],\n        length = Math.max.apply(null, arr.map(function(e) {\n          return e.length;\n        }));\n\n    Chartist.times(length).forEach(function(e, index) {\n      var args = arr.map(function(e) {\n        return e[index];\n      });\n\n      result[index] = cb.apply(null, args);\n    });\n\n    return result;\n  };\n\n  /**\n   * This helper function can be used to round 
 values with certain precision level after decimal. This is used to prevent rounding errors near float point precision limit.\n   *\n   * @memberof Chartist.Core\n   * @param {Number} value The value that should be rounded with precision\n   * @param {Number} [digits] The number of digits after decimal used to do the rounding\n   * @returns {number} Rounded value\n   */\n  Chartist.roundWithPrecision = function(value, digits) {\n    var precision = Math.pow(10, digits || Chartist.precision);\n    return Math.round(value * precision) / precision;\n  };\n\n  /**\n   * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number.\n   *\n   * @memberof Chartist.Core\n   * @type {number}\n   */\n  Chartist.precision = 8;\n\n  /**\n   * A map with characters to escape for strings to be safely used as attribute values.\n   *\n   * @memberof Chartist.Core\n   * @type {Object}\n   */\n  Chartist.escapingMap = {\n    '&': '&amp;',\n 
    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    '\\'': '&#039;'\n  };\n\n  /**\n   * This function serializes arbitrary data to a string. In case of data that can't be easily converted to a string, this function will create a wrapper object and serialize the data using JSON.stringify. The outcoming string will always be escaped using Chartist.escapingMap.\n   * If called with null or undefined the function will return immediately with null or undefined.\n   *\n   * @memberof Chartist.Core\n   * @param {Number|String|Object} data\n   * @return {String}\n   */\n  Chartist.serialize = function(data) {\n    if(data === null || data === undefined) {\n      return data;\n    } else if(typeof data === 'number') {\n      data = ''+data;\n    } else if(typeof data === 'object') {\n      data = JSON.stringify({data: data});\n    }\n\n    return Object.keys(Chartist.escapingMap).reduce(function(result, key) {\n      return Chartist.replaceAll(result, key, Chartist.escapingMap[key])
 ;\n    }, data);\n  };\n\n  /**\n   * This function de-serializes a string previously serialized with Chartist.serialize. The string will always be unescaped using Chartist.escapingMap before it's returned. Based on the input value the return type can be Number, String or Object. JSON.parse is used with try / catch to see if the unescaped string can be parsed into an Object and this Object will be returned on success.\n   *\n   * @memberof Chartist.Core\n   * @param {String} data\n   * @return {String|Number|Object}\n   */\n  Chartist.deserialize = function(data) {\n    if(typeof data !== 'string') {\n      return data;\n    }\n\n    data = Object.keys(Chartist.escapingMap).reduce(function(result, key) {\n      return Chartist.replaceAll(result, Chartist.escapingMap[key], key);\n    }, data);\n\n    try {\n      data = JSON.parse(data);\n      data = data.data !== undefined ? data.data : data;\n    } catch(e) {}\n\n    return data;\n  };\n\n  /**\n   * Create or reinitialize the SVG
  element for the chart\n   *\n   * @memberof Chartist.Core\n   * @param {Node} container The containing DOM Node object that will be used to plant the SVG element\n   * @param {String} width Set the width of the SVG element. Default is 100%\n   * @param {String} height Set the height of the SVG element. Default is 100%\n   * @param {String} className Specify a class to be added to the SVG element\n   * @return {Object} The created/reinitialized SVG element\n   */\n  Chartist.createSvg = function (container, width, height, className) {\n    var svg;\n\n    width = width || '100%';\n    height = height || '100%';\n\n    // Check if there is a previous SVG element in the container that contains the Chartist XML namespace and remove it\n    // Since the DOM API does not support namespaces we need to manually search the returned list http://www.w3.org/TR/selectors-api/\n    Array.prototype.slice.call(container.querySelectorAll('svg')).filter(function filterChartistSvgObjects(svg) {\n    
   return svg.getAttributeNS('http://www.w3.org/2000/xmlns/', Chartist.xmlNs.prefix);\n    }).forEach(function removePreviousElement(svg) {\n      container.removeChild(svg);\n    });\n\n    // Create svg object with width and height or use 100% as default\n    svg = new Chartist.Svg('svg').attr({\n      width: width,\n      height: height\n    }).addClass(className).attr({\n      style: 'width: ' + width + '; height: ' + height + ';'\n    });\n\n    // Add the DOM node to our container\n    container.appendChild(svg._node);\n\n    return svg;\n  };\n\n\n  /**\n   * Reverses the series, labels and series data arrays.\n   *\n   * @memberof Chartist.Core\n   * @param data\n   */\n  Chartist.reverseData = function(data) {\n    data.labels.reverse();\n    data.series.reverse();\n    for (var i = 0; i < data.series.length; i++) {\n      if(typeof(data.series[i]) === 'object' && data.series[i].data !== undefined) {\n        data.series[i].data.reverse();\n      } else if(data.series[i] ins
 tanceof Array) {\n        data.series[i].reverse();\n      }\n    }\n  };\n\n  /**\n   * Convert data series into plain array\n   *\n   * @memberof Chartist.Core\n   * @param {Object} data The series object that contains the data to be visualized in the chart\n   * @param {Boolean} reverse If true the whole data is reversed by the getDataArray call. This will modify the data object passed as first parameter. The labels as well as the series order is reversed. The whole series data arrays are reversed too.\n   * @param {Boolean} multi Create a multi dimensional array from a series data array where a value object with `x` and `y` values will be created.\n   * @return {Array} A plain array that contains the data to be visualized in the chart\n   */\n  Chartist.getDataArray = function (data, reverse, multi) {\n    // If the data should be reversed but isn't we need to reverse it\n    // If it's reversed but it shouldn't we need to reverse it back\n    // That's required to handle data u
 pdates correctly and to reflect the responsive configurations\n    if(reverse && !data.reversed || !reverse && data.reversed) {\n      Chartist.reverseData(data);\n      data.reversed = !data.reversed;\n    }\n\n    // Recursively walks through nested arrays and convert string values to numbers and objects with value properties\n    // to values. Check the tests in data core -> data normalization for a detailed specification of expected values\n    function recursiveConvert(value) {\n      if(Chartist.isFalseyButZero(value)) {\n        // This is a hole in data and we should return undefined\n        return undefined;\n      } else if((value.data || value) instanceof Array) {\n        return (value.data || value).map(recursiveConvert);\n      } else if(value.hasOwnProperty('value')) {\n        return recursiveConvert(value.value);\n      } else {\n        if(multi) {\n          var multiValue = {};\n\n          // Single series value arrays are assumed to specify the Y-Axis value\n 
          // For example: [1, 2] => [{x: undefined, y: 1}, {x: undefined, y: 2}]\n          // If multi is a string then it's assumed that it specified which dimension should be filled as default\n          if(typeof multi === 'string') {\n            multiValue[multi] = Chartist.getNumberOrUndefined(value);\n          } else {\n            multiValue.y = Chartist.getNumberOrUndefined(value);\n          }\n\n          multiValue.x = value.hasOwnProperty('x') ? Chartist.getNumberOrUndefined(value.x) : multiValue.x;\n          multiValue.y = value.hasOwnProperty('y') ? Chartist.getNumberOrUndefined(value.y) : multiValue.y;\n\n          return multiValue;\n\n        } else {\n          return Chartist.getNumberOrUndefined(value);\n        }\n      }\n    }\n\n    return data.series.map(recursiveConvert);\n  };\n\n  /**\n   * Converts a number into a padding object.\n   *\n   * @memberof Chartist.Core\n   * @param {Object|Number} padding\n   * @param {Number} [fallback] This value is use
 d to fill missing values if a incomplete padding object was passed\n   * @returns {Object} Returns a padding object containing top, right, bottom, left properties filled with the padding number passed in as argument. If the argument is something else than a number (presumably already a correct padding object) then this argument is directly returned.\n   */\n  Chartist.normalizePadding = function(padding, fallback) {\n    fallback = fallback || 0;\n\n    return typeof padding === 'number' ? {\n      top: padding,\n      right: padding,\n      bottom: padding,\n      left: padding\n    } : {\n      top: typeof padding.top === 'number' ? padding.top : fallback,\n      right: typeof padding.right === 'number' ? padding.right : fallback,\n      bottom: typeof padding.bottom === 'number' ? padding.bottom : fallback,\n      left: typeof padding.left === 'number' ? padding.left : fallback\n    };\n  };\n\n  Chartist.getMetaData = function(series, index) {\n    var value = series.data ? seri
 es.data[index] : series[index];\n    return value ? Chartist.serialize(value.meta) : undefined;\n  };\n\n  /**\n   * Calculate the order of magnitude for the chart scale\n   *\n   * @memberof Chartist.Core\n   * @param {Number} value The value Range of the chart\n   * @return {Number} The order of magnitude\n   */\n  Chartist.orderOfMagnitude = function (value) {\n    return Math.floor(Math.log(Math.abs(value)) / Math.LN10);\n  };\n\n  /**\n   * Project a data length into screen coordinates (pixels)\n   *\n   * @memberof Chartist.Core\n   * @param {Object} axisLength The svg element for the chart\n   * @param {Number} length Single data value from a series array\n   * @param {Object} bounds All the values to set the bounds of the chart\n   * @return {Number} The projected data length in pixels\n   */\n  Chartist.projectLength = function (axisLength, length, bounds) {\n    return length / bounds.range * axisLength;\n  };\n\n  /**\n   * Get the height of the area in the chart for the 
 data series\n   *\n   * @memberof Chartist.Core\n   * @param {Object} svg The svg element for the chart\n   * @param {Object} options The Object that contains all the optional values for the chart\n   * @return {Number} The height of the area in the chart for the data series\n   */\n  Chartist.getAvailableHeight = function (svg, options) {\n    return Math.max((Chartist.stripUnit(options.height) || svg.height()) - (options.chartPadding.top +  options.chartPadding.bottom) - options.axisX.offset, 0);\n  };\n\n  /**\n   * Get highest and lowest value of data array. This Array contains the data that will be visualized in the chart.\n   *\n   * @memberof Chartist.Core\n   * @param {Array} data The array that contains the data to be visualized in the chart\n   * @param {Object} options The Object that contains the chart options\n   * @param {String} dimension Axis dimension 'x' or 'y' used to access the correct value and high / low configuration\n   * @return {Object} An object that conta
 ins the highest and lowest value that will be visualized on the chart.\n   */\n  Chartist.getHighLow = function (data, options, dimension) {\n    // TODO: Remove workaround for deprecated global high / low config. Axis high / low configuration is preferred\n    options = Chartist.extend({}, options, dimension ? options['axis' + dimension.toUpperCase()] : {});\n\n    var highLow = {\n        high: options.high === undefined ? -Number.MAX_VALUE : +options.high,\n        low: options.low === undefined ? Number.MAX_VALUE : +options.low\n      };\n    var findHigh = options.high === undefined;\n    var findLow = options.low === undefined;\n\n    // Function to recursively walk through arrays and find highest and lowest number\n    function recursiveHighLow(data) {\n      if(data === undefined) {\n        return undefined;\n      } else if(data instanceof Array) {\n        for (var i = 0; i < data.length; i++) {\n          recursiveHighLow(data[i]);\n        }\n      } else {\n        var
  value = dimension ? +data[dimension] : +data;\n\n        if (findHigh && value > highLow.high) {\n          highLow.high = value;\n        }\n\n        if (findLow && value < highLow.low) {\n          highLow.low = value;\n        }\n      }\n    }\n\n    // Start to find highest and lowest number recursively\n    if(findHigh || findLow) {\n      recursiveHighLow(data);\n    }\n\n    // Overrides of high / low based on reference value, it will make sure that the invisible reference value is\n    // used to generate the chart. This is useful when the chart always needs to contain the position of the\n    // invisible reference value in the view i.e. for bipolar scales.\n    if (options.referenceValue || options.referenceValue === 0) {\n      highLow.high = Math.max(options.referenceValue, highLow.high);\n      highLow.low = Math.min(options.referenceValue, highLow.low);\n    }\n\n    // If high and low are the same because of misconfiguration or flat data (only the same value) we ne
 ed\n    // to set the high or low to 0 depending on the polarity\n    if (highLow.high <= highLow.low) {\n      // If both values are 0 we set high to 1\n      if (highLow.low === 0) {\n        highLow.high = 1;\n      } else if (highLow.low < 0) {\n        // If we have the same negative value for the bounds we set bounds.high to 0\n        highLow.high = 0;\n      } else {\n        // If we have the same positive value for the bounds we set bounds.low to 0\n        highLow.low = 0;\n      }\n    }\n\n    return highLow;\n  };\n\n  /**\n   * Checks if the value is a valid number or string with a number.\n   *\n   * @memberof Chartist.Core\n   * @param value\n   * @returns {Boolean}\n   */\n  Chartist.isNum = function(value) {\n    return !isNaN(value) && isFinite(value);\n  };\n\n  /**\n   * Returns true on all falsey values except the numeric value 0.\n   *\n   * @memberof Chartist.Core\n   * @param value\n   * @returns {boolean}\n   */\n  Chartist.isFalseyButZero = function(value
 ) {\n    return !value && value !== 0;\n  };\n\n  /**\n   * Returns a number if the passed parameter is a valid number or the function will return undefined. On all other values than a valid number, this function will return undefined.\n   *\n   * @memberof Chartist.Core\n   * @param value\n   * @returns {*}\n   */\n  Chartist.getNumberOrUndefined = function(value) {\n    return isNaN(+value) ? undefined : +value;\n  };\n\n  /**\n   * Gets a value from a dimension `value.x` or `value.y` while returning value directly if it's a valid numeric value. If the value is not numeric and it's falsey this function will return undefined.\n   *\n   * @param value\n   * @param dimension\n   * @returns {*}\n   */\n  Chartist.getMultiValue = function(value, dimension) {\n    if(Chartist.isNum(value)) {\n      return +value;\n    } else if(value) {\n      return value[dimension || 'y'] || 0;\n    } else {\n      return 0;\n    }\n  };\n\n  /**\n   * Pollard Rho Algorithm to find smallest factor of 
 an integer value. There are more efficient algorithms for factorization, but this one is quite efficient and not so complex.\n   *\n   * @memberof Chartist.Core\n   * @param {Number} num An integer number where the smallest factor should be searched for\n   * @returns {Number} The smallest integer factor of the parameter num.\n   */\n  Chartist.rho = function(num) {\n    if(num === 1) {\n      return num;\n    }\n\n    function gcd(p, q) {\n      if (p % q === 0) {\n        return q;\n      } else {\n        return gcd(q, p % q);\n      }\n    }\n\n    function f(x) {\n      return x * x + 1;\n    }\n\n    var x1 = 2, x2 = 2, divisor;\n    if (num % 2 === 0) {\n      return 2;\n    }\n\n    do {\n      x1 = f(x1) % num;\n      x2 = f(f(x2)) % num;\n      divisor = gcd(Math.abs(x1 - x2), num);\n    } while (divisor === 1);\n\n    return divisor;\n  };\n\n  /**\n   * Calculate and retrieve all the bounds for the chart and return them in one array\n   *\n   * @memberof Chartist.Core\n 
   * @param {Number} axisLength The length of the Axis used for\n   * @param {Object} highLow An object containing a high and low property indicating the value range of the chart.\n   * @param {Number} scaleMinSpace The minimum projected length a step should result in\n   * @param {Boolean} onlyInteger\n   * @return {Object} All the values to set the bounds of the chart\n   */\n  Chartist.getBounds = function (axisLength, highLow, scaleMinSpace, onlyInteger) {\n    var i,\n      optimizationCounter = 0,\n      newMin,\n      newMax,\n      bounds = {\n        high: highLow.high,\n        low: highLow.low\n      };\n\n    bounds.valueRange = bounds.high - bounds.low;\n    bounds.oom = Chartist.orderOfMagnitude(bounds.valueRange);\n    bounds.step = Math.pow(10, bounds.oom);\n    bounds.min = Math.floor(bounds.low / bounds.step) * bounds.step;\n    bounds.max = Math.ceil(bounds.high / bounds.step) * bounds.step;\n    bounds.range = bounds.max - bounds.min;\n    bounds.numberOfSteps = M
 ath.round(bounds.range / bounds.step);\n\n    // Optimize scale step by checking if subdivision is possible based on horizontalGridMinSpace\n    // If we are already below the scaleMinSpace value we will scale up\n    var length = Chartist.projectLength(axisLength, bounds.step, bounds);\n    var scaleUp = length < scaleMinSpace;\n    var smallestFactor = onlyInteger ? Chartist.rho(bounds.range) : 0;\n\n    // First check if we should only use integer steps and if step 1 is still larger than scaleMinSpace so we can use 1\n    if(onlyInteger && Chartist.projectLength(axisLength, 1, bounds) >= scaleMinSpace) {\n      bounds.step = 1;\n    } else if(onlyInteger && smallestFactor < bounds.step && Chartist.projectLength(axisLength, smallestFactor, bounds) >= scaleMinSpace) {\n      // If step 1 was too small, we can try the smallest factor of range\n      // If the smallest factor is smaller than the current bounds.step and the projected length of smallest factor\n      // is larger than 
 the scaleMinSpace we should go for it.\n      bounds.step = smallestFactor;\n    } else {\n      // Trying to divide or multiply by 2 and find the best step value\n      while (true) {\n        if (scaleUp && Chartist.projectLength(axisLength, bounds.step, bounds) <= scaleMinSpace) {\n          bounds.step *= 2;\n        } else if (!scaleUp && Chartist.projectLength(axisLength, bounds.step / 2, bounds) >= scaleMinSpace) {\n          bounds.step /= 2;\n          if(onlyInteger && bounds.step % 1 !== 0) {\n            bounds.step *= 2;\n            break;\n          }\n        } else {\n          break;\n        }\n\n        if(optimizationCounter++ > 1000) {\n          throw new Error('Exceeded maximum number of iterations while optimizing scale step!');\n        }\n      }\n    }\n\n    // Narrow min and max based on new step\n    newMin = bounds.min;\n    newMax = bounds.max;\n    while(newMin + bounds.step <= bounds.low) {\n      newMin += bounds.step;\n    }\n    while(newMax - b
 ounds.step >= bounds.high) {\n      newMax -= bounds.step;\n    }\n    bounds.min = newMin;\n    bounds.max = newMax;\n    bounds.range = bounds.max - bounds.min;\n\n    bounds.values = [];\n    for (i = bounds.min; i <= bounds.max; i += bounds.step) {\n      bounds.values.push(Chartist.roundWithPrecision(i));\n    }\n\n    return bounds;\n  };\n\n  /**\n   * Calculate cartesian coordinates of polar coordinates\n   *\n   * @memberof Chartist.Core\n   * @param {Number} centerX X-axis coordinates of center point of circle segment\n   * @param {Number} centerY X-axis coordinates of center point of circle segment\n   * @param {Number} radius Radius of circle segment\n   * @param {Number} angleInDegrees Angle of circle segment in degrees\n   * @return {Number} Coordinates of point on circumference\n   */\n  Chartist.polarToCartesian = function (centerX, centerY, radius, angleInDegrees) {\n    var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n\n    return {\n      x: centerX 
 + (radius * Math.cos(angleInRadians)),\n      y: centerY + (radius * Math.sin(angleInRadians))\n    };\n  };\n\n  /**\n   * Initialize chart drawing rectangle (area where chart is drawn) x1,y1 = bottom left / x2,y2 = top right\n   *\n   * @memberof Chartist.Core\n   * @param {Object} svg The svg element for the chart\n   * @param {Object} options The Object that contains all the optional values for the chart\n   * @param {Number} [fallbackPadding] The fallback padding if partial padding objects are used\n   * @return {Object} The chart rectangles coordinates inside the svg element plus the rectangles measurements\n   */\n  Chartist.createChartRect = function (svg, options, fallbackPadding) {\n    var hasAxis = !!(options.axisX || options.axisY);\n    var yAxisOffset = hasAxis ? options.axisY.offset : 0;\n    var xAxisOffset = hasAxis ? options.axisX.offset : 0;\n    // If width or height results in invalid value (including 0) we fallback to the unitless settings or even 0\n    var w
 idth = svg.width() || Chartist.stripUnit(options.width) || 0;\n    var height = svg.height() || Chartist.stripUnit(options.height) || 0;\n    var normalizedPadding = Chartist.normalizePadding(options.chartPadding, fallbackPadding);\n\n    // If settings were to small to cope with offset (legacy) and padding, we'll adjust\n    width = Math.max(width, yAxisOffset + normalizedPadding.left + normalizedPadding.right);\n    height = Math.max(height, xAxisOffset + normalizedPadding.top + normalizedPadding.bottom);\n\n    var chartRect = {\n      padding: normalizedPadding,\n      width: function () {\n        return this.x2 - this.x1;\n      },\n      height: function () {\n        return this.y1 - this.y2;\n      }\n    };\n\n    if(hasAxis) {\n      if (options.axisX.position === 'start') {\n        chartRect.y2 = normalizedPadding.top + xAxisOffset;\n        chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);\n      } else {\n        chartRect.y2 = normalizedPa
 dding.top;\n        chartRect.y1 = Math.max(height - normalizedPadding.bottom - xAxisOffset, chartRect.y2 + 1);\n      }\n\n      if (options.axisY.position === 'start') {\n        chartRect.x1 = normalizedPadding.left + yAxisOffset;\n        chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);\n      } else {\n        chartRect.x1 = normalizedPadding.left;\n        chartRect.x2 = Math.max(width - normalizedPadding.right - yAxisOffset, chartRect.x1 + 1);\n      }\n    } else {\n      chartRect.x1 = normalizedPadding.left;\n      chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);\n      chartRect.y2 = normalizedPadding.top;\n      chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);\n    }\n\n    return chartRect;\n  };\n\n  /**\n   * Creates a grid line based on a projected value.\n   *\n   * @memberof Chartist.Core\n   * @param position\n   * @param index\n   * @param axis\n   * @param offset\n   * @param leng
 th\n   * @param group\n   * @param classes\n   * @param eventEmitter\n   */\n  Chartist.createGrid = function(position, index, axis, offset, length, group, classes, eventEmitter) {\n    var positionalData = {};\n    positionalData[axis.units.pos + '1'] = position;\n    positionalData[axis.units.pos + '2'] = position;\n    positionalData[axis.counterUnits.pos + '1'] = offset;\n    positionalData[axis.counterUnits.pos + '2'] = offset + length;\n\n    var gridElement = group.elem('line', positionalData, classes.join(' '));\n\n    // Event for grid draw\n    eventEmitter.emit('draw',\n      Chartist.extend({\n        type: 'grid',\n        axis: axis,\n        index: index,\n        group: group,\n        element: gridElement\n      }, positionalData)\n    );\n  };\n\n  /**\n   * Creates a label based on a projected value and an axis.\n   *\n   * @memberof Chartist.Core\n   * @param position\n   * @param length\n   * @param index\n   * @param labels\n   * @param axis\n   * @param axisOf
 fset\n   * @param labelOffset\n   * @param group\n   * @param classes\n   * @param useForeignObject\n   * @param eventEmitter\n   */\n  Chartist.createLabel = function(position, length, index, labels, axis, axisOffset, labelOffset, group, classes, useForeignObject, eventEmitter) {\n    var labelElement;\n    var positionalData = {};\n\n    positionalData[axis.units.pos] = position + labelOffset[axis.units.pos];\n    positionalData[axis.counterUnits.pos] = labelOffset[axis.counterUnits.pos];\n    positionalData[axis.units.len] = length;\n    positionalData[axis.counterUnits.len] = axisOffset - 10;\n\n    if(useForeignObject) {\n      // We need to set width and height explicitly to px as span will not expand with width and height being\n      // 100% in all browsers\n      var content = '<span class=\"' + classes.join(' ') + '\" style=\"' +\n        axis.units.len + ': ' + Math.round(positionalData[axis.units.len]) + 'px; ' +\n        axis.counterUnits.len + ': ' + Math.round(positio
 nalData[axis.counterUnits.len]) + 'px\">' +\n        labels[index] + '</span>';\n\n      labelElement = group.foreignObject(content, Chartist.extend({\n        style: 'overflow: visible;'\n      }, positionalData));\n    } else {\n      labelElement = group.elem('text', positionalData, classes.join(' ')).text(labels[index]);\n    }\n\n    eventEmitter.emit('draw', Chartist.extend({\n      type: 'label',\n      axis: axis,\n      index: index,\n      group: group,\n      element: labelElement,\n      text: labels[index]\n    }, positionalData));\n  };\n\n  /**\n   * Helper to read series specific options from options object. It automatically falls back to the global option if\n   * there is no option in the series options.\n   *\n   * @param {Object} series Series object\n   * @param {Object} options Chartist options object\n   * @param {string} key The options key that should be used to obtain the options\n   * @returns {*}\n   */\n  Chartist.getSeriesOption = function(series, optio
 ns, key) {\n    if(series.name && options.series && options.series[series.name]) {\n      var seriesOptions = options.series[series.name];\n      return seriesOptions.hasOwnProperty(key) ? seriesOptions[key] : options[key];\n    } else {\n      return options[key];\n    }\n  };\n\n  /**\n   * Provides options handling functionality with callback for options changes triggered by responsive options and media query matches\n   *\n   * @memberof Chartist.Core\n   * @param {Object} options Options set by user\n   * @param {Array} responsiveOptions Optional functions to add responsive behavior to chart\n   * @param {Object} eventEmitter The event emitter that will be used to emit the options changed events\n   * @return {Object} The consolidated options object from the defaults, base and matching responsive options\n   */\n  Chartist.optionsProvider = function (options, responsiveOptions, eventEmitter) {\n    var baseOptions = Chartist.extend({}, options),\n      currentOptions,\n      me
 diaQueryListeners = [],\n      i;\n\n    function updateCurrentOptions(preventChangedEvent) {\n      var previousOptions = currentOptions;\n      currentOptions = Chartist.extend({}, baseOptions);\n\n      if (responsiveOptions) {\n        for (i = 0; i < responsiveOptions.length; i++) {\n          var mql = window.matchMedia(responsiveOptions[i][0]);\n          if (mql.matches) {\n            currentOptions = Chartist.extend(currentOptions, responsiveOptions[i][1]);\n          }\n        }\n      }\n\n      if(eventEmitter && !preventChangedEvent) {\n        eventEmitter.emit('optionsChanged', {\n          previousOptions: previousOptions,\n          currentOptions: currentOptions\n        });\n      }\n    }\n\n    function removeMediaQueryListeners() {\n      mediaQueryListeners.forEach(function(mql) {\n        mql.removeListener(updateCurrentOptions);\n      });\n    }\n\n    if (!window.matchMedia) {\n      throw 'window.matchMedia not found! Make sure you\\'re using a polyfill
 .';\n    } else if (responsiveOptions) {\n\n      for (i = 0; i < responsiveOptions.length; i++) {\n        var mql = window.matchMedia(responsiveOptions[i][0]);\n        mql.addListener(updateCurrentOptions);\n        mediaQueryListeners.push(mql);\n      }\n    }\n    // Execute initially so we get the correct options\n    updateCurrentOptions(true);\n\n    return {\n      removeMediaQueryListeners: removeMediaQueryListeners,\n      getCurrentOptions: function getCurrentOptions() {\n        return Chartist.extend({}, currentOptions);\n      }\n    };\n  };\n\n}(window, document, Chartist));\n;/**\n * Chartist path interpolation functions.\n *\n * @module Chartist.Interpolation\n */\n/* global Chartist */\n(function(window, document, Chartist) {\n  'use strict';\n\n  Chartist.Interpolation = {};\n\n  /**\n   * This interpolation function does not smooth the path and the result is only containing lines and no curves.\n   *\n   * @memberof Chartist.Interpolation\n   * @return {Functi
 on}\n   */\n  Chartist.Interpolation.none = function() {\n    return function none(pathCoordinates, valueData) {\n      var path = new Chartist.Svg.Path();\n      // We need to assume that the first value is a \"hole\"\n      var hole = true;\n\n      for(var i = 1; i < pathCoordinates.length; i += 2) {\n        var data = valueData[(i - 1) / 2];\n\n        // If the current value is undefined we should treat it as a hole start\n        if(data.value === undefined) {\n          hole = true;\n        } else {\n          // If this value is valid we need to check if we're coming out of a hole\n          if(hole) {\n            // If we are coming out of a hole we should first make a move and also reset the hole flag\n            path.move(pathCoordinates[i - 1], pathCoordinates[i], false, data);\n            hole = false;\n          } else {\n            path.line(pathCoordinates[i - 1], pathCoordinates[i], false, data);\n          }\n        }\n      }\n\n      return path;\n    };\n
   };\n\n  /**\n   * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing.\n   *\n   * Simple smoothing can be used instead of `Chartist.Smoothing.cardinal` if you'd like to get rid of the artifacts it produces sometimes. Simple smoothi

<TRUNCATED>