[AMBARI-24688] Backend changes for the newer version of AMS Grafana.
diff --git a/ambari-metrics-assembly/pom.xml b/ambari-metrics-assembly/pom.xml
index 6244649..4841f9c 100644
--- a/ambari-metrics-assembly/pom.xml
+++ b/ambari-metrics-assembly/pom.xml
@@ -516,8 +516,20 @@
                       <directory>/var/lib/ambari-metrics-grafana</directory>
                     </mapping>
                     <mapping>
+                      <directory>/var/lib/ambari-metrics-grafana/plugins</directory>
+                    </mapping>
+                    <mapping>
                       <directory>/var/log/ambari-metrics-grafana</directory>
                     </mapping>
+                    <mapping>
+                      <directory>/var/lib/ambari-metrics-grafana/plugins/ambari-metrics</directory>
+                      <filemode>755</filemode>
+                      <sources>
+                        <source>
+                          <location>${grafana.dir}/ambari-metrics</location>
+                        </source>
+                      </sources>
+                    </mapping>
                   </mappings>
                 </configuration>
               </execution>
@@ -754,6 +766,7 @@
                     <path>/var/lib/ambari-metrics-collector</path>
                     <path>/var/lib/ambari-metrics-monitor/lib</path>
                     <path>/var/lib/ambari-metrics-grafana</path>
+                    <path>/var/lib/ambari-metrics-grafana/plugins</path>
                     <path>/usr/lib/ambari-metrics-hadoop-sink</path>
                     <path>/usr/lib/ambari-metrics-kafka-sink</path>
                     <path>/usr/lib/ambari-metrics-kafka-sink/lib</path>
diff --git a/ambari-metrics-grafana/ambari-metrics/config_ctrl.d.ts b/ambari-metrics-grafana/ambari-metrics/config_ctrl.d.ts
index 33286c8..da4bca7 100644
--- a/ambari-metrics-grafana/ambari-metrics/config_ctrl.d.ts
+++ b/ambari-metrics-grafana/ambari-metrics/config_ctrl.d.ts
@@ -1,3 +1,21 @@
+/**
+ * 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.
+ */
+
 /// <reference path="../../../../../public/app/headers/common.d.ts" />
 export declare class AmbariMetricsConfigCtrl {
     static templateUrl: string;
diff --git a/ambari-metrics-grafana/ambari-metrics/config_ctrl.js.map b/ambari-metrics-grafana/ambari-metrics/config_ctrl.js.map
index 8c46be5..68d7464 100644
--- a/ambari-metrics-grafana/ambari-metrics/config_ctrl.js.map
+++ b/ambari-metrics-grafana/ambari-metrics/config_ctrl.js.map
@@ -1 +1,19 @@
+/**
+ * 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.
+ */
+
 {"version":3,"file":"config_ctrl.js","sourceRoot":"","sources":["../../../../../public/app/plugins/datasource/ambari-metrics/config_ctrl.ts"],"names":["AmbariMetricsConfigCtrl","AmbariMetricsConfigCtrl.constructor"],"mappings":"AAAA,oDAAoD;AACpD;;;;;;;;;;;;;;;;GAgBG;;;;;;YAKH;gBAAAA;gBAGAC,CAACA;gBAFUD,mCAAWA,GAAGA,sBAAsBA,CAACA;gBAEhDA,8BAACA;YAADA,CAACA,AAHD,IAGC;YAHD,6DAGC,CAAA"}
\ No newline at end of file
diff --git a/ambari-metrics-grafana/ambari-metrics/datasource.js b/ambari-metrics-grafana/ambari-metrics/datasource.js
index e34a1af..9050667 100644
--- a/ambari-metrics-grafana/ambari-metrics/datasource.js
+++ b/ambari-metrics-grafana/ambari-metrics/datasource.js
@@ -52,7 +52,7 @@
         }
 
         options.url = this.url + options.url;
-        options.inspect = {type: 'ambarimetrics'};
+        options.inspect = {type: 'ambari-metrics'};
 
         return backendSrv.datasourceRequest(options);
       };
diff --git a/ambari-metrics-grafana/ambari-metrics/module.js b/ambari-metrics-grafana/ambari-metrics/module.js
index ebc4f8a..f122e8e 100644
--- a/ambari-metrics-grafana/ambari-metrics/module.js
+++ b/ambari-metrics-grafana/ambari-metrics/module.js
@@ -1,3 +1,21 @@
+/**
+ * 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.
+ */
+
 System.register(['./datasource', './query_ctrl', './config_ctrl'], function(exports_1) {
     var datasource_1, query_ctrl_1, config_ctrl_1;
     return {
diff --git a/ambari-metrics-grafana/ambari-metrics/module.js.map b/ambari-metrics-grafana/ambari-metrics/module.js.map
index 5bdb60e..7faded7 100644
--- a/ambari-metrics-grafana/ambari-metrics/module.js.map
+++ b/ambari-metrics-grafana/ambari-metrics/module.js.map
@@ -1 +1,19 @@
+/**
+ * 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.
+ */
+
 {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../public/app/plugins/datasource/ambari-metrics/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;YAsB+B,6DAAU;YACX,2DAAS;YACR,8DAAU"}
\ No newline at end of file
diff --git a/ambari-metrics-grafana/ambari-metrics/partials/annotations.editor.html b/ambari-metrics-grafana/ambari-metrics/partials/annotations.editor.html
index e69de29..1d45f3b 100644
--- a/ambari-metrics-grafana/ambari-metrics/partials/annotations.editor.html
+++ b/ambari-metrics-grafana/ambari-metrics/partials/annotations.editor.html
@@ -0,0 +1,17 @@
+<!--
+  ~ 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.
+  -->
\ No newline at end of file
diff --git a/ambari-metrics-grafana/ambari-metrics/plugin.json b/ambari-metrics-grafana/ambari-metrics/plugin.json
index 643da57..69fef3c 100644
--- a/ambari-metrics-grafana/ambari-metrics/plugin.json
+++ b/ambari-metrics-grafana/ambari-metrics/plugin.json
@@ -1,7 +1,7 @@
 {
   "type": "datasource",
   "name": "Ambari Metrics",
-  "id": "praj-ams-datasource",
+  "id": "ambari-metrics",
   "metrics": true,
   "staticRoot": ".",
   "defaultMatchFormat": "glob",
@@ -16,6 +16,6 @@
       "small": "img/apache-ambari-logo-sm.png",
       "large": "img/apache-ambari-logo.png"
     },
-    "version": "1.0.1",
-  },
+    "version": "1.0.1"
+  }
 }
diff --git a/ambari-metrics-grafana/ambari-metrics/query_ctrl.d.ts b/ambari-metrics-grafana/ambari-metrics/query_ctrl.d.ts
index 83363f7..dc5ac8c 100644
--- a/ambari-metrics-grafana/ambari-metrics/query_ctrl.d.ts
+++ b/ambari-metrics-grafana/ambari-metrics/query_ctrl.d.ts
@@ -1,3 +1,21 @@
+/**
+ * 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.
+ */
+
 /// <reference path="../../../../../public/app/headers/common.d.ts" />
 import { QueryCtrl } from 'app/plugins/sdk';
 export declare class AmbariMetricsQueryCtrl extends QueryCtrl {
diff --git a/ambari-metrics-grafana/ambari-metrics/query_ctrl.js.map b/ambari-metrics-grafana/ambari-metrics/query_ctrl.js.map
index 2f80a63..19d0f77 100644
--- a/ambari-metrics-grafana/ambari-metrics/query_ctrl.js.map
+++ b/ambari-metrics-grafana/ambari-metrics/query_ctrl.js.map
@@ -1 +1,19 @@
+/**
+ * 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.
+ */
+
 {"version":3,"file":"query_ctrl.js","sourceRoot":"","sources":["../../../../../public/app/plugins/datasource/ambari-metrics/query_ctrl.ts"],"names":["AmbariMetricsQueryCtrl","AmbariMetricsQueryCtrl.constructor","AmbariMetricsQueryCtrl.targetBlur","AmbariMetricsQueryCtrl.getTextValues","AmbariMetricsQueryCtrl.getCollapsedText","AmbariMetricsQueryCtrl.validateTarget"],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,oDAAoD;;;;;;;;;;;;;;;;;;YAMpD;gBAA4CA,0CAASA;gBAajDA,iBAAiBA;gBACjBA,gCAAYA,MAAMA,EAAEA,SAASA;oBAdjCC,iBAyFCA;oBA1EOA,kBAAMA,MAAMA,EAAEA,SAASA,CAACA,CAACA;oBAEzBA,IAAIA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,cAAcA,EAAEA,CAACA;oBACpCA,IAAIA,CAACA,WAAWA,GAAGA,CAACA,MAAMA,EAACA,KAAKA,EAAEA,KAAKA,EAAEA,KAAKA,EAAEA,KAAKA,CAACA,CAACA;oBACvDA,IAAIA,CAACA,UAAUA,GAAGA,CAACA,SAASA,EAACA,SAASA,EAAEA,SAASA,EAAEA,OAAOA,EAAEA,MAAMA,CAACA,CAACA;oBACpEA,IAAIA,CAACA,UAAUA,GAAGA,CAACA,MAAMA,EAACA,MAAMA,CAACA,CAACA;oBAElCA,EAAEA,CAACA,CAACA,CAACA,IAAIA,CAACA,MAAMA,CAACA,UAAUA,CAACA,CAACA,CAACA;wBAC1BA,IAAIA,CAACA,MAAMA,CAACA,UAAUA,GAAGA,KAAKA,CAACA;oBACnCA,CAACA;oBAEDA,IAAIA,CAACA,aAAaA,GAAGA;wBAClB,EAAE,CAAC,C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,AAzFD,EAA4C,eAAS,EAyFpD;YAzFD,2DAyFC,CAAA"}
\ No newline at end of file
diff --git a/ambari-metrics-grafana/conf/unix/ams-grafana.ini b/ambari-metrics-grafana/conf/unix/ams-grafana.ini
index 78f30b5..9309d49 100644
--- a/ambari-metrics-grafana/conf/unix/ams-grafana.ini
+++ b/ambari-metrics-grafana/conf/unix/ams-grafana.ini
@@ -1,4 +1,3 @@
-
 ##################### Grafana Configuration Example #####################
 #
 # Everything has defaults so you only need to uncomment things you want to
@@ -7,6 +6,9 @@
 # possible values : production, development
 ; app_mode = production
 
+# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
+; instance_name = ${HOSTNAME}
+
 #################################### Paths ####################################
 [paths]
 # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
@@ -19,6 +21,11 @@
 ;logs = /var/log/grafana
 logs = /var/log/ambari-metrics-grafana
 
+#
+# Directory where grafana will automatically scan and look for plugins
+#
+plugins = /var/lib/ambari-metrics-grafana/plugins
+
 
 #################################### Server ####################################
 [server]
@@ -45,7 +52,6 @@
 ;router_logging = false
 
 # the path relative working path
-;static_root_path = public
 static_root_path = /usr/lib/ambari-metrics-grafana/public
 
 # enable gzip
@@ -55,6 +61,8 @@
 ;cert_file =
 ;cert_key =
 
+# Unix socket path
+;socket =
 #################################### Database ####################################
 [database]
 # Either "mysql", "postgres" or "sqlite3", it's your choice
@@ -62,8 +70,13 @@
 ;host = 127.0.0.1:3306
 ;name = grafana
 ;user = root
+# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
 ;password =
 
+# Use either URL or the previous fields to configure the database
+# Example: mysql://user:secret@host:port/database
+;url =
+
 # For "postgres" only, either "disable", "require" or "verify-full"
 ;ssl_mode = disable
 
@@ -92,6 +105,12 @@
 # Session life time, default is 86400
 ;session_life_time = 86400
 
+#################################### Data proxy ###########################
+[dataproxy]
+
+# This enables data proxy logging, default is false
+;logging = false
+
 #################################### Analytics ####################################
 [analytics]
 # Server reporting, sends usage counters to stats.grafana.org every 24 hours.
@@ -100,6 +119,13 @@
 # Change this option to false to disable reporting.
 ;reporting_enabled = true
 
+# Set to false to disable all checks to https://grafana.net
+# for new vesions (grafana itself and plugins), check is used
+# in some UI views to notify that grafana or plugin update exists
+# This option does not cause any auto updates, nor send any information
+# only a GET request to http://grafana.com to get latest versions
+;check_for_updates = true
+
 # Google Analytics universal tracking code, only enabled if you specify an id here
 ;google_analytics_ua_id =
 
@@ -125,6 +151,18 @@
 # data source proxy whitelist (ip_or_domain:port seperated by spaces)
 ;data_source_proxy_whitelist =
 
+[snapshots]
+# snapshot sharing options
+;external_enabled = true
+;external_snapshot_url = https://snapshots-origin.raintank.io
+;external_snapshot_name = Publish to snapshot.raintank.io
+
+# remove expired snapshot
+;snapshot_remove_expired = true
+
+# remove snapshots after 90 days
+;snapshot_TTL_days = 90
+
 #################################### Users ####################################
 [users]
 # disable user signup / registration
@@ -142,6 +180,21 @@
 # Background text for the user field on the login page
 ;login_hint = email or username
 
+# Default UI theme ("dark" or "light")
+;default_theme = dark
+
+# External user management, these options affect the organization users view
+;external_manage_link_url =
+;external_manage_link_name =
+;external_manage_info =
+
+[auth]
+# Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
+;disable_login_form = false
+
+# Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false
+;disable_signout_menu = false
+
 #################################### Anonymous Auth ##########################
 [auth.anonymous]
 # enable anonymous access
@@ -178,6 +231,29 @@
 ;api_url = https://www.googleapis.com/oauth2/v1/userinfo
 ;allowed_domains =
 
+#################################### Generic OAuth ##########################
+[auth.generic_oauth]
+;enabled = false
+;name = OAuth
+;allow_sign_up = true
+;client_id = some_id
+;client_secret = some_secret
+;scopes = user:email,read:org
+;auth_url = https://foo.bar/login/oauth/authorize
+;token_url = https://foo.bar/login/oauth/access_token
+;api_url = https://foo.bar/user
+;team_ids =
+;allowed_organizations =
+
+#################################### Grafana.com Auth ####################
+[auth.grafana_com]
+;enabled = false
+;allow_sign_up = true
+;client_id = some_id
+;client_secret = some_secret
+;scopes = user:email
+;allowed_organizations =
+
 #################################### Auth Proxy ##########################
 [auth.proxy]
 ;enabled = false
@@ -204,6 +280,9 @@
 ;key_file =
 ;skip_verify = false
 ;from_address = admin@grafana.localhost
+;from_name = Grafana
+# EHLO identity in SMTP dialog (defaults to instance_name)
+;ehlo_identity = dashboard.example.com
 
 [emails]
 ;welcome_email_on_sign_up = false
@@ -214,11 +293,11 @@
 # Use comma to separate multiple modes, e.g. "console, file"
 ;mode = console, file
 
-# Buffer length of channel, keep it as it is if you don't know what it is.
-;buffer_len = 10000
+# Either "debug", "info", "warn", "error", "critical", default is "info"
+;level = info
 
-# Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
-;level = Info
+# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
+;filters =
 
 # For "console" mode only
 [log.console]
@@ -252,4 +331,4 @@
 [dashboards.json]
 ;enabled = false
 ;path = /var/lib/grafana/dashboards
-path = /usr/lib/ambari-metrics-grafana/public/dashboards
+path = /usr/lib/ambari-metrics-grafana/public/dashboards
\ No newline at end of file
diff --git a/ambari-metrics-grafana/pom.xml b/ambari-metrics-grafana/pom.xml
index 6ca4f96..266a245 100644
--- a/ambari-metrics-grafana/pom.xml
+++ b/ambari-metrics-grafana/pom.xml
@@ -28,7 +28,7 @@
   <artifactId>ambari-metrics-grafana</artifactId>
   <name>Ambari Metrics Grafana</name>
   <packaging>pom</packaging>
-  <version>2.1.0.0.0</version>
+  <version>2.0.0.0-SNAPSHOT</version>
   <description>Ambari Metrics Grafana</description>
 
   <build>
@@ -124,12 +124,6 @@
                   dest="${project.build.directory}/grafana"
                   compression="gzip"
                   />
-                <copy
-                  todir="${project.build.directory}/grafana/${grafana.folder}/public/app/plugins/datasource">
-                  <fileset dir="${project.build.directory}/../">
-                    <include name="ambari-metrics/"/>
-                  </fileset>
-                </copy>
               </target>
             </configuration>
           </execution>
diff --git a/pom.xml b/pom.xml
index a655f9e..63069d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,8 +42,8 @@
     <hbase.folder>hbase-2.0.0.3.0.0.0-1634</hbase.folder>
     <hadoop.tar>http://dev.hortonworks.com.s3.amazonaws.com/HDP/centos7/3.x/BUILDS/3.0.0.0-1634/tars/hadoop/hadoop-3.1.0.3.0.0.0-1634.tar.gz</hadoop.tar>
     <hadoop.folder>hadoop-3.1.0.3.0.0.0-1634</hadoop.folder>
-    <grafana.folder>grafana-2.6.0</grafana.folder>
-    <grafana.tar>https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0.linux-x64.tar.gz</grafana.tar>
+    <grafana.folder>grafana-5.2.4</grafana.folder>
+    <grafana.tar>https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.2.4.linux-amd64.tar.gz</grafana.tar>
     <phoenix.tar>http://dev.hortonworks.com.s3.amazonaws.com/HDP/centos7/3.x/BUILDS/3.0.0.0-1634/tars/phoenix/phoenix-5.0.0.3.0.0.0-1634.tar.gz</phoenix.tar>
     <phoenix.folder>phoenix-5.0.0.3.0.0.0-1634</phoenix.folder>
     <resmonitor.install.dir>/usr/lib/python2.6/site-packages/resource_monitoring</resmonitor.install.dir>