You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2015/11/10 20:58:14 UTC

usergrid git commit: Add simple status page to portal that displays Usergrid API /status.

Repository: usergrid
Updated Branches:
  refs/heads/master 2b1f76130 -> bf5ef1518


Add simple status page to portal that displays Usergrid API /status.


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

Branch: refs/heads/master
Commit: bf5ef1518d3e7deda765f9d59e2fdacf10031251
Parents: 2b1f761
Author: Michael Russo <mi...@gmail.com>
Authored: Tue Nov 10 11:58:08 2015 -0800
Committer: Michael Russo <mi...@gmail.com>
Committed: Tue Nov 10 11:58:08 2015 -0800

----------------------------------------------------------------------
 portal/Gruntfile.js |  5 +++--
 portal/getStatus.js | 38 ++++++++++++++++++++++++++++++++++++++
 portal/status.html  | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 76 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/bf5ef151/portal/Gruntfile.js
----------------------------------------------------------------------
diff --git a/portal/Gruntfile.js b/portal/Gruntfile.js
index b3dfb7c..f0cdc94 100644
--- a/portal/Gruntfile.js
+++ b/portal/Gruntfile.js
@@ -190,7 +190,8 @@ module.exports = function(grunt) {
         '!css/main.min.css',
         '!js/libs/',
         '!js/generated/*.js',
-        '!js/generated-templates/*.js'
+        '!js/generated-templates/*.js',
+        'getStatus.js'
       ],
       tasks: ['build-dev']
     },
@@ -302,7 +303,7 @@ module.exports = function(grunt) {
           // includes files within path
           {
             expand: true,
-            src: ['*.html', 'config.js', '*.ico', 'helpJson.json'],
+            src: ['*.html', 'config.js', '*.ico', 'helpJson.json', 'getStatus.js'],
             dest: distPath,
             filter: 'isFile'
           }, {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/bf5ef151/portal/getStatus.js
----------------------------------------------------------------------
diff --git a/portal/getStatus.js b/portal/getStatus.js
new file mode 100644
index 0000000..ae74119
--- /dev/null
+++ b/portal/getStatus.js
@@ -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.
+ */
+
+var url = Usergrid.overrideUrl + '/status';
+
+var getStatus = function(){
+    var http = new XMLHttpRequest();
+
+    http.onload= function(){
+        if (http.readyState==4 || http.readyState=="complete")
+        {
+            console.log('response: \n'+http.responseText);
+            document.getElementById("statusResponse")
+                .innerHTML=http.responseText;
+        }
+    };
+
+
+    http.open("GET",url, true);
+    http.send();
+
+};

http://git-wip-us.apache.org/repos/asf/usergrid/blob/bf5ef151/portal/status.html
----------------------------------------------------------------------
diff --git a/portal/status.html b/portal/status.html
new file mode 100644
index 0000000..4b9ad1d
--- /dev/null
+++ b/portal/status.html
@@ -0,0 +1,35 @@
+<!--
+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>
+    <meta charset="UTF-8">
+    <title>Status Page</title>
+</head>
+<body>
+
+<script src="pre-config.js"></script>
+<script src="config.js"></script>
+<script src="getStatus.js"></script>
+
+<script> getStatus(); </script>
+<pre><div id="statusResponse"></div></pre>
+
+</body>
+</html>