usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject git commit: add push portal ui
Date Tue, 09 Sep 2014 23:50:17 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o bc1b1e737 -> ba1c278d0


add push portal ui


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

Branch: refs/heads/two-dot-o
Commit: ba1c278d06d483a0105330000bcab044cc520b5a
Parents: bc1b1e7
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Tue Sep 9 17:50:02 2014 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Tue Sep 9 17:50:02 2014 -0600

----------------------------------------------------------------------
 portal/config.js                                |   8 +
 portal/img/green_dot.png                        | Bin 0 -> 3472 bytes
 portal/img/push/APNS_cert_upload.png            | Bin 0 -> 33956 bytes
 portal/img/push/APNS_certification.png          | Bin 0 -> 16855 bytes
 portal/img/push/android-notification.png        | Bin 0 -> 41629 bytes
 portal/img/push/google_api_key.png              | Bin 0 -> 98118 bytes
 portal/img/push/iphone_message.png              | Bin 0 -> 90307 bytes
 portal/img/push/step_1.png                      | Bin 0 -> 1953 bytes
 portal/img/push/step_2.png                      | Bin 0 -> 2117 bytes
 portal/img/push/step_3.png                      | Bin 0 -> 2162 bytes
 portal/img/red_dot.png                          | Bin 0 -> 3482 bytes
 portal/img/yellow_dot.png                       | Bin 0 -> 3475 bytes
 portal/js/app.js                                |  17 ++
 portal/js/push/push-config-controller.js        |  93 +++++++++++
 portal/js/push/push-config.html                 | 164 +++++++++++++++++++
 portal/js/push/push-get-started-controller.js   |  26 +++
 portal/js/push/push-get-started.html            | 106 ++++++++++++
 portal/js/push/push-history-controller.js       | 132 +++++++++++++++
 portal/js/push/push-history.html                |  72 ++++++++
 portal/js/push/push-receipts-controller.js      |  98 +++++++++++
 portal/js/push/push-receipts.html               |  75 +++++++++
 .../push/push-send-notification-controller.js   |  99 +++++++++++
 portal/js/push/push-send-notification.html      | 154 +++++++++++++++++
 portal/js/push/test-controller.js               |  92 +++++++++++
 24 files changed, 1136 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/config.js
----------------------------------------------------------------------
diff --git a/portal/config.js b/portal/config.js
index e04ba9d..c65de7e 100644
--- a/portal/config.js
+++ b/portal/config.js
@@ -41,6 +41,14 @@ Usergrid.options = {
     {path:'#!/roles',pic:'&#59170;',title:'Roles'},
     {path:'#!/data',pic:'&#128248;',title:'Data'},
     {path:'#!/activities',pic:'&#59194;',title:'Activities'},
+    {path:'#!/push/getStarted',pic:'&#59200;',title:'Push', items:[
+      {path:'#!/push/getStarted',pic:'&#59176;',title:'Get Started'},
+      {path:'#!/push/configuration',pic:'&#9874;',title:'Configure'},
+      {path:'#!/push/history',pic:'&#9991;',title:'History'},
+      {path:'#!/push/sendNotification',pic:'&#59200;',title:'Send'}
+    ]},
+    
+
     {path:'#!/shell',pic:'&#9000;',title:'Shell'}
   ]
 };

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/green_dot.png
----------------------------------------------------------------------
diff --git a/portal/img/green_dot.png b/portal/img/green_dot.png
new file mode 100644
index 0000000..c9e18eb
Binary files /dev/null and b/portal/img/green_dot.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/push/APNS_cert_upload.png
----------------------------------------------------------------------
diff --git a/portal/img/push/APNS_cert_upload.png b/portal/img/push/APNS_cert_upload.png
new file mode 100644
index 0000000..2002b42
Binary files /dev/null and b/portal/img/push/APNS_cert_upload.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/push/APNS_certification.png
----------------------------------------------------------------------
diff --git a/portal/img/push/APNS_certification.png b/portal/img/push/APNS_certification.png
new file mode 100644
index 0000000..11848a3
Binary files /dev/null and b/portal/img/push/APNS_certification.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/push/android-notification.png
----------------------------------------------------------------------
diff --git a/portal/img/push/android-notification.png b/portal/img/push/android-notification.png
new file mode 100644
index 0000000..ac50bae
Binary files /dev/null and b/portal/img/push/android-notification.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/push/google_api_key.png
----------------------------------------------------------------------
diff --git a/portal/img/push/google_api_key.png b/portal/img/push/google_api_key.png
new file mode 100644
index 0000000..26f83f1
Binary files /dev/null and b/portal/img/push/google_api_key.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/push/iphone_message.png
----------------------------------------------------------------------
diff --git a/portal/img/push/iphone_message.png b/portal/img/push/iphone_message.png
new file mode 100644
index 0000000..6973699
Binary files /dev/null and b/portal/img/push/iphone_message.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/push/step_1.png
----------------------------------------------------------------------
diff --git a/portal/img/push/step_1.png b/portal/img/push/step_1.png
new file mode 100644
index 0000000..fef83c8
Binary files /dev/null and b/portal/img/push/step_1.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/push/step_2.png
----------------------------------------------------------------------
diff --git a/portal/img/push/step_2.png b/portal/img/push/step_2.png
new file mode 100644
index 0000000..87c1c53
Binary files /dev/null and b/portal/img/push/step_2.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/push/step_3.png
----------------------------------------------------------------------
diff --git a/portal/img/push/step_3.png b/portal/img/push/step_3.png
new file mode 100644
index 0000000..2f6be12
Binary files /dev/null and b/portal/img/push/step_3.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/red_dot.png
----------------------------------------------------------------------
diff --git a/portal/img/red_dot.png b/portal/img/red_dot.png
new file mode 100644
index 0000000..4f7fb26
Binary files /dev/null and b/portal/img/red_dot.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/img/yellow_dot.png
----------------------------------------------------------------------
diff --git a/portal/img/yellow_dot.png b/portal/img/yellow_dot.png
new file mode 100644
index 0000000..37fed66
Binary files /dev/null and b/portal/img/yellow_dot.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/app.js
----------------------------------------------------------------------
diff --git a/portal/js/app.js b/portal/js/app.js
index 53f7480..4404c49 100644
--- a/portal/js/app.js
+++ b/portal/js/app.js
@@ -204,6 +204,23 @@ angular.module('appservices', ['ngRoute',
         templateUrl: 'login/logout.html',
         controller: 'LogoutCtrl'
       })
+      .when('/push/sendNotification', {
+        templateUrl: 'push/push-send-notification.html', 
+        controller: 'PushSendNotificationCtrl'
+      })
+      .when('/push/getStarted', {
+        templateUrl: 'push/push-get-started.html', 
+        controller: 'PushGetStartedCtrl'
+      })
+      .when('/push/history', {
+        templateUrl: 'push/push-history.html', controller: 'PushHistoryCtrl'
+      })
+      .when('/push/history/receipts', {
+        templateUrl: 'push/push-receipts.html', controller: 'PushReceiptsCtrl'
+      })
+      .when('/push/configuration', {
+        templateUrl: 'push/push-config.html', controller: 'PushConfigCtrl'
+      })
       .otherwise({
         redirectTo: '/org-overview'
       });

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-config-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/push/push-config-controller.js b/portal/js/push/push-config-controller.js
new file mode 100644
index 0000000..0fb5c1c
--- /dev/null
+++ b/portal/js/push/push-config-controller.js
@@ -0,0 +1,93 @@
+
+/**
+ 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.
+ */
+ 'use strict'
+
+AppServices.Controllers.controller('PushConfigCtrl', ['ug', '$scope', '$rootScope', '$routeParams', '$location', function (ug, $scope, $rootScope, $routeParams, $location) {
+
+  $scope.notifier = {};
+  $scope.notifier.appleNotifierCert = [];
+  $scope.notifier.appleNotifierName = '';
+  $scope.notifier.appleEnvironment = '';
+  $scope.notifier.notifierCertPassword = '';
+  $scope.notifier.androidNotifierName = '';
+  $scope.notifier.androidNotifierAPIKey = '';
+
+
+
+  $scope.notifiersCollection = {};
+
+  ug.getNotifiers();
+  $scope.$on('app-changed',function(){
+    ug.getNotifiers();
+  });
+
+  $scope.deleteNotifiersDialog = function(modalId){
+    $scope.deleteEntities($scope.notifiersCollection, 'notifier-deleted', 'error deleting notifier');
+    $scope.hideModal(modalId)
+  };
+  $scope.$on('notifier-deleted', function(event, collection) {
+    $rootScope.$broadcast('alert', 'success', 'Notifier deleted successfully.');
+  });
+
+  $scope.$on('notifiers-received', function(event, collection) {
+    $scope.notifiersCollection = collection;
+    $scope.queryBoxesSelected = false;
+    $scope.applyScope();
+  });
+
+
+  $rootScope.createAppleNotifier = function() {
+    //$scope.appleNotifierCert - this comes from the directive below
+    ug.createAppleNotifier($scope.appleNotifierCert, $scope.notifier.appleNotifierName, $scope.notifier.appleEnvironment, $scope.notifier.appleCertPassword);
+    $scope.notifier = {};
+    $scope.clearNotificationFile();
+    //angular.element("#ios-cert")[0].value = ""; // this is bad
+  }
+
+  $rootScope.createAndroidNotifier = function() {
+    ug.createAndroidNotifier($scope.notifier.androidNotifierName, $scope.notifier.androidNotifierAPIKey);
+    $scope.notifier = {};
+  }
+
+  $scope.$on('notifier-update', function(event) {
+    ug.getNotifiers();
+  });
+
+}]);
+
+AppServices.Controllers.directive('file', function(){
+  return {
+    scope: {
+      file: '='
+    },
+    link: function(scope, el, attrs){
+      el.bind('change', function(event){
+        var files = event.target.files;
+        scope.$parent.$parent.$parent.$parent.appleNotifierCert = files[0];
+        scope.$parent.$parent.$parent.$parent.$apply();
+        scope.$parent.$parent.$parent.$parent.clearNotificationFile = function(newVal,oldVal){
+          event.target.value="";
+          scope.$parent.$parent.$parent.$parent.appleNotifierCert = "";
+        };
+
+      });
+    }
+  };
+});

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-config.html
----------------------------------------------------------------------
diff --git a/portal/js/push/push-config.html b/portal/js/push/push-config.html
new file mode 100644
index 0000000..b4ab1a3
--- /dev/null
+++ b/portal/js/push/push-config.html
@@ -0,0 +1,164 @@
+<div class="content-page">
+<!--
+  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-title icon="&#9874;" title="Configuration"></page-title>
+
+
+  <bsmodal id="deleteNotifier"
+           title="Delete Notifier"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="deleteNotifiersDialog"
+           extrabuttonlabel="Delete"
+           ng-cloak>
+    <p>Are you sure you want to delete the notifier(s)?</p>
+  </bsmodal>
+
+  <a style="float: right" target="_blank" href="http://apigee.com/docs/usergrid/content/push-notifications" class="notifications-links">Learn more in our docs</a>
+  <tabs>
+    <pane heading="Apple">
+      <div style="margin-top: 10px;"> <!-- ng-controller="PushConfigCtrl"-->
+        <div class="user-header-title">Apple Push Notification Service</div>
+        <br>
+        A Notifier allows App Services to connect to and deliver a message to a communication provider such as
+        Apple's APNs. Upload Development and Production Certificates (.p12) to set up a bridge between your app
+        and APNs for push notifications on iOS devices.
+
+          For more help: view our
+          <a href="#!/push/getStarted" class="notifications-links">getting started page</a>
+          for more info on how to generate and download an iOS .p12 certificate at the Apple Developer Connection website.
+          <br>
+          <br>
+        <form name="iosNotifierForm" id="iosNotifierForm"  ng-submit="createAppleNotifier()" class="form-horizontal" novalidate>
+
+          <fieldset>
+            <div class="control-group">
+              <label  for="ios-notifier-name"><strong>Name this notifier </strong></label>
+              <div class="">
+                <input type="text" id="ios-notifier-name" required ug-validate ng-model="notifier.appleNotifierName" class="" class="span6">
+                <br>
+                The notifier name is used as the key for push data.  Give this a name that describes the certificate being uploaded.
+              </div>
+            <br>
+              <label  for="ios-cert"><strong>Certificate </strong></label>
+              <div class="">
+                <input type="file" data-file="param.file"  id="ios-cert" />
+              </div>
+            <br>
+              <strong>Environment </strong>
+              <div class="">
+                <select ng-model="notifier.appleEnvironment" required ug-validate id="ios-env">
+                  <option value="development">development</option>
+                  <option value="production">production</option>
+                </select>
+              </div>
+            <br>
+              <strong>Certificate Password</strong>
+              <div class="">
+                <input ng-model="notifier.appleCertPassword" type="text"  title="Please enter a password." class="span6" autocomplete="off" placeholder="ex: appledev"/>
+                <br>
+                Only applicable if your certificate is password protected
+              </div>
+            </div>
+
+            <input type="submit" ng-disabled="!iosNotifierForm.$valid" class="btn btn-primary" value="Create Notifier"/>
+          </fieldset>
+        </form>
+
+      </div>
+
+    </pane>
+    <pane heading="Android">
+
+      <div style="margin-top: 10px;">
+        <span class="title">Google Cloud Messaging</span>
+        <br>
+        A Notifier allows App Services to connect to and deliver a message to a communication provider such as
+        Google Cloud Messaging (GCM). Copy and paste your API key to create a bridge between your app
+        and GCM for push notifications on Android devices..
+        <br><br>
+
+        For more help: see our <a href="#!/getting-started/setup" class="notifications-links">getting started page</a> page.
+
+        <form id="droidNotifierForm" name="droidNotifierForm" ng-submit="createAndroidNotifier()" class="form-horizontal" novalidate>
+          <fieldset>
+            <div class="control-group">
+              <strong>Name this notifier </strong>
+              <div  >
+                <input ng-model="notifier.androidNotifierName" id="droid-notifier-name" required ug-validate type="text" class="span6" autocomplete="off" placeholder="ex: androidDev"/>
+                <br>
+                The notifier name is used as the key for push data.  Give this a name that describes the API key being uploaded.
+              </div>
+            </div>
+
+            <div class="control-group">
+              <strong>API Key </strong>
+              <div  >
+                <input ng-model="notifier.androidNotifierAPIKey" id="droid-key-value" required type="text" class="span6" autocomplete="off" ug-validate/>
+              </div>
+            </div>
+            <input type="submit" href="" class="btn btn-primary" ng-disabled="!droidNotifierForm.$valid"  value="Create Notifier"/>
+          </fieldset>
+          </form>
+      </div>
+
+    </pane>
+    <pane heading="Notifiers">
+
+        <bsmodal id="deleteNotifiers"
+                 title="Are you sure you want to delete the notifiers(s)?"
+                 close="hideModal"
+                 closelabel="Cancel"
+                 extrabutton="deleteNotifiersDialog"
+                 extrabuttonlabel="Delete"
+                 ng-cloak>
+            <fieldset>
+                <div class="control-group">
+                </div>
+            </fieldset>
+        </bsmodal>
+
+      <span  class="button-strip">
+        <button class="btn btn-primary" ng-disabled="!valueSelected(notifiersCollection._list)" ng-click="deleteNotifiersDialog()">Delete Notifier(s)</button>
+      </span>
+      <table class="table table-striped collection-list">
+        <tbody>
+        <tr class="zebraRows notifications-row">
+          <td style="width: 30px;"><input type="checkbox"  ng-click="selectAllEntities(notifiersCollection._list,this,'queryBoxesSelected',true)"></td>
+          <td class="notifications-details bold-header">Provider</td>
+          <td class="notifications-details bold-header">Notifier</td>
+        </tr>
+
+        <tr class="zebraRows notifications-row" ng-repeat="notifier in notifiersCollection._list">
+          <td>
+            <input
+              type="checkbox"
+              ng-value="notifier.uuid"
+
+              ng-model="notifier.checked"
+              >
+          </td>
+          <td class="details">{{notifier.get('provider')}}</td>
+          <td class="details">{{notifier.get('name')}}</td>
+        </tr>
+      </table>
+    </pane>
+
+
+  </tabs>
+
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-get-started-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/push/push-get-started-controller.js b/portal/js/push/push-get-started-controller.js
new file mode 100644
index 0000000..71b9ad3
--- /dev/null
+++ b/portal/js/push/push-get-started-controller.js
@@ -0,0 +1,26 @@
+/**
+ 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.
+ */
+'use strict'
+ 
+AppServices.Controllers.controller('PushGetStartedCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+  //these aren't the droids you are looking for...
+
+}]);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-get-started.html
----------------------------------------------------------------------
diff --git a/portal/js/push/push-get-started.html b/portal/js/push/push-get-started.html
new file mode 100644
index 0000000..b77dc19
--- /dev/null
+++ b/portal/js/push/push-get-started.html
@@ -0,0 +1,106 @@
+
+<div class="content-page">
+<!--
+  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-title icon="&#59176;" title="Getting Started"></page-title>
+
+
+
+  <div>
+    <tabs>
+      <pane heading="Apple">
+        <span class="title">Set up Push Notifications for Apple iOS</span>
+        <div class="notifications-get-started">
+          <div class="header">
+            <img src="img/push/step_1.png" style="float: left;padding-right: 10px;">
+            <div style="padding-top: 9px;">
+              Follow <a target="_blank" href="http://apigee.com/docs/usergrid/content/push-notifications" class="notifications-links">the process</a> to generate and download an iOS .p12 certificate at the <a href="https://developer.apple.com/ios/manage/overview/index.action">Apple Developer Connection website</a>.
+            </div>
+          </div>
+          <img style="margin-bottom: -5px;" src="img/push/APNS_cert_upload.png">
+        </div>
+
+        <div class="notifications-get-started">
+          <div class="header">
+            <img src="img/push/step_2.png" style="float: left;padding-right: 10px;">
+            <div style="padding-top: 9px;">
+              Add the certificates to set up your notifiers.
+            </div>
+          </div>
+          <div style="">
+            <a href="#!/push/configuration">Upload a certificate and create the connection to APNs.</a>
+          </div>
+          <img style="margin-left: 50px; margin-bottom: -5px;" src="img/push/APNS_certification.png">
+        </div>
+
+        <div class="notifications-get-started">
+          <div class="header">
+            <img src="img/push/step_3.png" style="float: left;padding-right: 10px;">
+            <div style="padding-top: 9px;">
+              Compose and schedule a push notification.
+            </div>
+          </div>
+          <div style="">
+            <a href="#!/push/sendNotification">Send a push notification.</a>
+          </div>
+          <br><br>
+          <img style="margin-left: 58px; margin-bottom: -5px;" src="img/push/iphone_message.png">
+        </div>
+      </pane>
+      <pane heading="Android">
+        <span class="title">Set up Push Notifications for Google Android</span>
+        <div class="notifications-get-started">
+          <div class="header">
+            <img src="img/push/step_1.png" style="float: left;padding-right: 10px;">
+            <div style="padding-top: 9px;">
+              Retrieve your API key from the <a href="https://code.google.com/apis/console/" target="_blank">Android API Developer website</a>
+            </div>
+          </div>
+          <img style="margin-bottom: -5px;" src="img/push/google_api_key.png">
+        </div>
+
+        <div class="notifications-get-started">
+          <div class="header">
+            <img src="img/push/step_2.png" style="float: left;padding-right: 10px;">
+            <div style="padding-top: 9px;">
+              Add your API key to set up your notifiers.
+            </div>
+          </div>
+          <div style="">
+            <a href="#!/push/configuration">Copy and paste your Google API Access key.</a>
+          </div>
+          <img style="margin-left: 50px; margin-bottom: -5px;" src="img/push/APNS_certification.png">
+        </div>
+
+        <div class="notifications-get-started">
+          <div class="header">
+            <img src="img/push/step_3.png" style="float: left;padding-right: 10px;">
+            <div style="padding-top: 9px;">
+              Compose and schedule a push notification.
+            </div>
+          </div>
+          <div style="">
+            <a href="#!/push/sendNotification">Send a push notification.</a>
+          </div>
+          <br><br>
+          <img style="margin-left: 58px; margin-bottom: -5px;" src="img/push/android-notification.png">
+        </div>
+
+      </pane>
+    </tabs>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-history-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/push/push-history-controller.js b/portal/js/push/push-history-controller.js
new file mode 100644
index 0000000..734100b
--- /dev/null
+++ b/portal/js/push/push-history-controller.js
@@ -0,0 +1,132 @@
+/**
+ 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.
+ */
+'use strict' 
+AppServices.Controllers.controller('PushHistoryCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+    $scope.notificationCollection = {};
+    $scope.previous_display = 'none';
+    $scope.next_display = 'none';
+
+    $scope.historyList = [
+      {name:'All',value:''},
+      {name:'Scheduled',value:'SCHEDULED'},
+      {name:'Sending',value:'STARTED'},
+      {name:'Sent',value:'FINISHED'},
+      {name:'Failed',value:'FAILED'},
+      {name:'Cancelled',value:'CANCELED'}
+    ];
+
+    var stateImages = {
+      'FAILED': 'img/red_dot.png',
+      'FINISHED':'img/green_dot.png',
+      'STARTED':'img/green_dot.png',
+      'CANCELED':'img/red_dot.png',
+      'SCHEDULED':'img/green_dot.png',
+      'FINISHED_ERRORS':'img/yellow_dot.png'
+    };
+
+    $scope.getStateImage = function(notification){
+      var data = notification._data;
+      var image = stateImages[data.state] || stateImages.STARTED;
+      image = ( data.statistics && data.statistics.errors > 0) && image !== 'img/red_dot.png'
+        ?  'img/yellow_dot.png'
+        : image;
+      return image;
+    };
+    $scope.getStateMessage = function(notification){
+      var data = notification._data;
+      var state = data.state === 'FINISHED' &&   ( data.statistics && data.statistics.errors > 0)
+        ?  'FINISHED (WITH ERRORS)'
+        : data.state;
+      return state;
+    };
+
+    $scope.selectedHistory = $scope.historyList[0];
+
+    ug.getNotificationHistory();
+
+    $scope.$watch('currentApp',function(){
+      ug.getNotificationHistory();
+    });
+
+    $scope.$on('notifications-received', function(event, collection) {
+      $scope.notificationCollection = collection;
+      $scope.checkNextPrev();
+      if(!$scope.$$phase) {
+        $scope.$apply();
+      }
+    });
+
+    $scope.showHistory = function(option) {
+      $scope.selectedHistory = option;
+      $scope.notificationCollection = [];
+      ug.getNotificationHistory(option.value);
+    }
+
+    $scope.viewReceipts = function(uuid){
+      $rootScope.selectedNotification = $scope.notificationCollection.getEntityByUUID(uuid);
+      $location.path('/push/history/receipts');
+    }
+
+    $scope.resetNextPrev = function() {
+      $scope.previous_display = 'none';
+      $scope.next_display = 'none';
+    }
+
+    $scope.checkNextPrev = function() {
+      $scope.resetNextPrev();
+      if ($scope.notificationCollection.hasPreviousPage()) {
+        $scope.previous_display = 'block';
+      }
+      if($scope.notificationCollection.hasNextPage()) {
+        $scope.next_display = 'block';
+      }
+    }
+
+    $scope.getPrevious = function () {
+      $scope.notificationCollection.getPreviousPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting previous page');
+        }
+        $scope.checkNextPrev();
+        if(!$scope.$$phase) {
+          $scope.$apply();
+        }
+      });
+    };
+
+    $scope.getNext = function () {
+
+      $scope.notificationCollection.getNextPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting next page');
+        }
+        $scope.checkNextPrev();
+        if(!$scope.$$phase) {
+          $scope.$apply();
+        }
+      });
+    };
+
+    $scope.getNotificationStartedDate = function(notification){
+      return notification.started || notification.created;
+    }
+
+  }]);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-history.html
----------------------------------------------------------------------
diff --git a/portal/js/push/push-history.html b/portal/js/push/push-history.html
new file mode 100644
index 0000000..46ff212
--- /dev/null
+++ b/portal/js/push/push-history.html
@@ -0,0 +1,72 @@
+<div class="content-page" style="min-height: 500px;">
+<!--
+  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-title icon="&#9991;" title="Message History"></page-title>
+
+
+
+  <section class="row-fluid">
+    <div class="span12">
+        <a style="float: right" target="_blank" href="http://apigee.com/docs/usergrid/content/push-notifications" class="notifications-links">Learn more in our docs</a>
+
+        <div class="pull-left" style="margin-top: 10px;">
+          <ul class="nav nav-pills">
+            <li ng-class="selectedHistory.name === option.name ? 'active' : ''" ng-repeat="option in historyList"><a ng-click="showHistory(option)">{{option.name}}</a></li>
+          </ul>
+        </div>
+     </div>
+    </section>
+  <section class="row-fluid">
+    <div class="span12">
+      <div ng-if="notificationCollection._list.length === 0">
+        No messages found
+      </div>
+
+      <div ng-repeat="notification in notificationCollection._list">
+        <div style="border: 1px solid #aaa;">
+            <div class="notifications-header">
+              <div style="float: left">
+                <strong>Send Date:</strong>
+                {{getNotificationStartedDate(notification._data) | date:'EEEE, MMMM d, y h:mm:ss a'}}
+                <div style="margin-top: 10px;">
+                  <img ng-src="{{getStateImage(notification)}}" style="vertical-align:middle;margin-top: -3px;"> {{getStateMessage(notification)}}
+                </div>
+              </div>
+              <div style="float: right; text-align: right;">
+                &nbsp; <a href="" class="notifications-links" ng-click="viewReceipts(notification._data.uuid)">view details</a>
+                <br>Total Sent: {{notification._data.statistics.sent ? notification._data.statistics.sent : 0}} Total Errors: {{notification._data.statistics.errors ? notification._data.statistics.errors : 0}}
+                <br>
+                <b>UUID</b>:
+                <a href="" ng-click="viewReceipts('{{notification._data.uuid}}')">{{notification._data.uuid}}</a>
+              </div>
+            </div>
+            <div style="padding: 10px;">
+             <div> payload: {{notification._data.payloads}} </div>
+             <div ng-if="notification._data.errorMessage"> error message: {{notification._data.errorMessage}} </div>
+            </div>
+          </div>
+          <br>
+        </div>
+
+        <div style="height:20px">&nbsp;</div>
+        <div style="padding: 10px 5px 10px 5px">
+          <button class="btn btn-primary" ng-click="getPrevious()" style="display:{{previous_display}}">< Previous</button>
+          <button class="btn btn-primary" ng-click="getNext()" style="display:{{next_display}}; float:right;">Next ></button>
+        </div>
+      </div>
+   </section>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-receipts-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/push/push-receipts-controller.js b/portal/js/push/push-receipts-controller.js
new file mode 100644
index 0000000..97e363c
--- /dev/null
+++ b/portal/js/push/push-receipts-controller.js
@@ -0,0 +1,98 @@
+/**
+ 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.
+ */
+ 'use strict'
+ 
+AppServices.Controllers.controller('PushReceiptsCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+    $scope.receiptsCollection = {}
+    $scope.previous_display = 'none';
+    $scope.next_display = 'none';
+
+    $scope.statusList = [
+      {name:'All',value:''},
+      {name:'Received',value:'RECEIVED'},
+      {name:'Failed',value:'FAILED'}
+    ]
+
+    $scope.selectedStatus = $scope.statusList[0]
+
+    if (!$rootScope.selectedNotification) {
+      $location.path('/push/history');
+    }
+
+    ug.getNotificationReceipts($rootScope.selectedNotification.get('uuid'));
+
+    $scope.$on('receipts-received', function(event, collection) {
+      $scope.receiptsCollection = collection;
+      $scope.checkNextPrev();
+      if(!$scope.$$phase) {
+        $scope.$apply();
+      }
+    });
+
+    $scope.showHistory = function(type) {
+      ug.getNotificationReceipts($rootScope.selectedNotification.get('uuid'));
+    }
+
+    $scope.showReceipts = function(option) {
+      $scope.selectedStatus = option;
+      ug.getNotificationReceipts($rootScope.selectedNotification.get('uuid'),option.value);
+    }
+
+    $scope.resetNextPrev = function() {
+      $scope.previous_display = 'none';
+      $scope.next_display = 'none';
+    }
+    $scope.checkNextPrev = function() {
+      $scope.resetNextPrev();
+      if ($scope.receiptsCollection.hasPreviousPage()) {
+        $scope.previous_display = 'block';
+      }
+      if($scope.receiptsCollection.hasNextPage()) {
+        $scope.next_display = 'block';
+      }
+    }
+
+    $scope.getPrevious = function () {
+      $scope.receiptsCollection.getPreviousPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting previous page');
+        }
+        $scope.checkNextPrev();
+        if(!$scope.$$phase) {
+          $scope.$apply();
+        }
+      });
+    };
+
+    $scope.getNext = function () {
+
+      $scope.receiptsCollection.getNextPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting next page');
+        }
+        $scope.checkNextPrev();
+        if(!$scope.$$phase) {
+          $scope.$apply();
+        }
+      });
+    };
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-receipts.html
----------------------------------------------------------------------
diff --git a/portal/js/push/push-receipts.html b/portal/js/push/push-receipts.html
new file mode 100644
index 0000000..f91e4eb
--- /dev/null
+++ b/portal/js/push/push-receipts.html
@@ -0,0 +1,75 @@
+<div class="content-page" style="min-height: 500px;">
+<!--
+  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.
+-->
+  <span style="float: left">
+    <a href="#!/push/history" class="notifications-links" id="return-to-notifications"><- Return to All Notifications</a></span>
+  <br>
+
+  <div style="clear: both;">&nbsp;</div>
+  <table class="table">
+    <tbody>
+    <tr class="zebraRows notifications-row">
+      <td class="notifications-details bold-header">Created</td>
+      <td class="notifications-details bold-header">Payload</td>
+      <td class="notifications-details bold-header">Sent</td>
+      <td class="notifications-details bold-header">Error</td>
+    </tr>
+
+    <tr class="zebraRows notifications-row" ng-repeat="receipt in receiptsCollection._list">
+      <td class="details">{{receipt.get('created')}}</td>
+      <td class="details">{{receipt.get('payload')}}</td>
+      <td class="details">{{receipt.get('sent')}}</td>
+      <td class="view-details">{{receipt.get('errorCode') + (receipt.get('errorCode') ? ':' : '')}} {{receipt.get('errorMessage')}}</td>
+    </tr>
+  </table>
+  <br>
+
+
+
+  <div style="height:20px">&nbsp;</div>
+  <div style="padding: 10px 5px 10px 5px">
+    <button class="btn btn-primary" ng-click="getPrevious()" style="display:{{previous_display}}">< Previous</button>
+    <button class="btn btn-primary" ng-click="getNext()" style="display:{{next_display}}; float:right;">Next ></button>
+  </div>
+
+</div>
+
+
+
+<!--div id="notificationsReceipt-panel" class="panel-buffer">
+  <div class="well thingy">
+    <span class="title">Notification Receipts</span>
+    <span style="float: right"><a href="#" class="notifications-links" id="return-to-notifications"><- Return to All Notifications</a></span>
+  </div>
+  <div style="float: left">
+    <ul class="nav nav-pills">
+      <li class="active"><a href="#" id="view-notification-receipt-all">All</a></li>
+      <li><a href="#" id="view-notification-receipt-received">Received</a></li>
+      <li><a href="#" id="view-notification-receipt-failed">Failed</a></li>
+    </ul>
+  </div>
+  <div style="margin-top:35px;">&nbsp;</div>
+  <div id="notification-receipts-display">
+    <br><br>No Notifications found.
+  </div>
+
+  <ul id="notification-receipt-pagination" class="pager">
+    <li style="display: none" id="notification-receipt-previous" class="previous"><a >&larr; Previous</a></li>
+    <li style="display: none" id="notification-receipt-next" class="next"><a >Next &rarr;</a></li>
+  </ul>
+
+</div-->
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-send-notification-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/push/push-send-notification-controller.js b/portal/js/push/push-send-notification-controller.js
new file mode 100644
index 0000000..4dd7f4a
--- /dev/null
+++ b/portal/js/push/push-send-notification-controller.js
@@ -0,0 +1,99 @@
+/**
+ 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.
+ */
+ 'use strict'
+
+AppServices.Controllers.controller('PushSendNotificationCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+    $scope.send = {};
+    $scope.send.selectedNotifier = {};
+    $scope.send.controlGroup = 'all';
+    $scope.send.deliveryPeriod = {};
+    $scope.controlGroup = 'all';
+    $scope.notifiersCollection = {};
+
+    ug.getNotifiers();
+
+
+
+    $scope.$on('notifiers-received', function(event, collection) {
+      $scope.notifiersCollection = collection._list;
+      if(!$scope.$$phase) {
+        $scope.$apply();
+      }
+    });
+
+
+    $scope.selectDevices = function() {
+
+
+    }
+
+    $scope.scheduleNotification = function() {
+
+      if($scope.send.$valid){
+
+        var optionList = '';
+        var type = $scope.send.controlGroup;
+        var payload = {payloads:{},deliver:null};
+        payload.payloads[$scope.send.selectedNotifier._data.name] = $scope.send.notifierMessage;
+
+
+        if(type !== 'all'){
+          //get whatever is selected in the radio button options
+          optionList = $scope.send[type]
+          angular.forEach(optionList, function(value, index){
+            var path = type + '/' + value + '/notifications';
+            ug.sendNotification(path, payload);
+          });
+        }else{
+          ug.sendNotification('devices;ql=/notifications', payload);
+        }
+
+        $rootScope.$broadcast('alert', 'success', 'Notifications have been queued.');
+
+      }
+
+
+    }
+
+//    todo - this is copied over from old portal for calendar component
+
+    $('#notification-schedule-time-date').datepicker();
+    $('#notification-schedule-time-date').datepicker('setDate', Date.last().sunday());
+    $('#notification-schedule-time-time').val("12:00 AM");
+    $('#notification-schedule-time-time').timepicker({
+      showPeriod: true,
+      showLeadingZero: false
+    });
+
+    function pad(number, length){
+      var str = "" + number
+      while (str.length < length) {
+        str = '0'+str
+      }
+      return str
+    }
+
+    var offset = new Date().getTimezoneOffset();
+    offset = ((offset<0? '+':'-') + pad(parseInt(Math.abs(offset/60)), 2) + pad(Math.abs(offset%60), 2));
+
+    $('#gmt_display').html('GMT ' + offset);
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/push-send-notification.html
----------------------------------------------------------------------
diff --git a/portal/js/push/push-send-notification.html b/portal/js/push/push-send-notification.html
new file mode 100644
index 0000000..ba2240e
--- /dev/null
+++ b/portal/js/push/push-send-notification.html
@@ -0,0 +1,154 @@
+<div class="content-page">
+<!--
+  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-title icon="&#128319;" title="Send Notification"></page-title>
+
+
+  <a style="float: right" target="_blank" href="http://apigee.com/docs/usergrid/content/push-notifications" class="notifications-links">Learn more in our docs</a>
+
+  <form id="query-inputs" class="notifcations-form" ng-submit="scheduleNotification()" novalidate name="send">
+    <h4>Notifier and Recipients</h4>
+    Choose the Notifier (a configured notification service) to connect with for this push notification. Only users
+    with devices registered with this notifier will receive the push notification. If a group is selected, only the users
+    in the selected goup, with devices registered with this notifier, will receive the push notification.
+
+    <br/><br/>
+    <label for="send-notification-notifier">Notifier:</label>
+    <select name="notifierName" ng-required="true" id="send-notification-notifier" ng-model="send.selectedNotifier" ng-options="n._data.name for n in notifiersCollection">
+      <option value="">Choose Notifier</option>
+    </select>
+    <span ng-show="send.notifierName.$dirty && send.notifierName.$error.required">
+      You must choose a notifier
+    </span>
+
+    <div class="control-group">
+      <input type="radio" name="notification-user-group" id="notification-user-group-all"  ng-required="true"  ng-model="send.controlGroup" value="all" checked> All Devices
+      <input type="radio" name="notification-user-group" id="notification-user-group-devices" ng-required="true"  ng-model="send.controlGroup" value="devices"> Devices
+      <input type="radio" name="notification-user-group" id="notification-user-group-users" ng-required="true"  ng-model="send.controlGroup" value="users"> Users
+      <input type="radio" name="notification-user-group" id="notification-user-group-group" ng-required="true"  ng-model="send.controlGroup" value="groups"> Groups
+    </div>
+
+    <div class="control-group">
+      <div id="notificaitons-devices-select-container" ng-show="send.controlGroup === 'devices'">
+        Enter the device uuids:<br>
+        <textarea id="devices-list" placeholder="device-UUID-1,device-UUID-2,device-UUID-3,etc..."   ng-model="send.devices" ng-list class="span6 pull-left" rows="5" ng-required="send.controlGroup === 'devices'"></textarea>
+      </div>
+
+      <div id="notificaitons-users-select-container" ng-show="send.controlGroup === 'users'">
+      Enter the usernames:<br>
+      <textarea id="user-list" placeholder="username1,username2,username3,etc..."   ng-model="send.users" ng-list class="span6 pull-left" rows="5" ng-required="send.controlGroup === 'users'"></textarea>
+      <!--br>
+      <div class="thingy">
+      Or, use a form to look them up:<br>
+      <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-user-to-notification"> Add User</a>
+      </div-->
+    </div>
+      <div id="notificaitons-group-select-container" ng-show="send.controlGroup === 'groups'">
+        Enter the group paths:<br>
+        <textarea id="group-list" placeholder="group-path-1,group-path-2,group-path-3,etc..."   ng-model="send.groups" ng-list class="span6 pull-left" rows="5" ng-required="send.controlGroup === 'groups'"></textarea>
+        <!--br>
+        <div class="thingy">
+        <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-group-to-notification"> Add Group</a>
+        </div-->
+      </div>
+    </div>
+
+    <hr>
+    <h4>Notifier Message</h4>
+    Edit the "alert" message in the JSON payload.
+    <div class="controls">
+      <div>
+        <textarea id="notification-json" class="span6 pull-left" rows="3" ng-model="send.notifierMessage" required ug-validate>Your text here</textarea>
+        <br>
+        <a target="_blank" href="http://apigee.com/docs/usergrid/content/push-notifications" class="notifications-links">Learn more about messages in our docs</a>
+      </div>
+    </div>
+    <div style="display: none;">
+      <a class="btn" id="reset-notifications-payload" >Reset Payload</a>
+      <a class="btn" id="validate-notifications-json" >Validate JSON</a>
+      <span id="notifications-json-status" class="alert" style="width: 400px;">Validate your JSON!</span>
+    </div>
+    <hr>
+    <h4>Delivery</h4>
+    Select whether to schedule this push notification for immediate delivery or at a future date and time.
+
+    <div class="control-group">
+      <input type="radio" name="notification-schedule-time" id="notification-schedule-time-now"  ng-required="true" ng-model="send.deliveryPeriod" value="now" checked> Now
+      <input type="radio" name="notification-schedule-time" id="notification-schedule-time-later"  ng-required="true" ng-model="send.deliveryPeriod" value="later"> Schedule for later
+    </div>
+    <div id="notification-schedule-time-controls" ng-show="send.deliveryPeriod === 'later'">
+      <div id="notifications-start-time-span" class="control-group">
+        <label class="control-label" for="notification-schedule-time-date">Start Date/Time:</label>
+        <div class="controls">
+          <input type="text" id="notification-schedule-time-date" name="schedule-date" class="input-small"/>
+          <input type="text" id="notification-schedule-time-time" name="schedule-time" value="12:00 AM" class="input-small"/> (<span id="gmt_display"></span>)
+        </div>
+      </div>
+    </div>
+    <br/>
+    <p ng-show="send.$invalid">Please complete all required information before submitting.</p>
+    <input type="submit" ng-disabled="!send.$valid" name="submit" class="btn btn-primary" />
+  </form>
+</div>
+
+
+<form id="dialog-form-add-user-to-notification" class="modal hide fade">
+  <div class="modal-header">
+    <a class="close" data-dismiss="modal">&times</a>
+    <h4>Add a user to this Notification</h4>
+  </div>
+  <div class="modal-body">
+    <p class="validateTips">Search for the user you want to add to this notification.</p>
+    <fieldset>
+      <div class="control-group">
+        <label for="search-notification-user-name-input">User</label>
+        <div class="controls">
+          <input type="text" name="search-notification-user-name-input" id="search-notification-user-name-input" class="input-xlarge"/>
+          <p class="help-block hide"></p>
+        </div>
+      </div>
+    </fieldset>
+  </div>
+  <div class="modal-footer">
+    <input type="submit" class="btn btn-usergrid" value="Add"/>
+    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+  </div>
+</form>
+
+<form id="dialog-form-add-group-to-notification" class="modal hide fade">
+  <div class="modal-header">
+    <a class="close" data-dismiss="modal">&times</a>
+    <h4>Add a group to this Notification</h4>
+  </div>
+  <div class="modal-body">
+    <p class="validateTips">Search for the group you want to add to this notification.</p>
+    <fieldset>
+      <div class="control-group">
+        <label for="search-notification-group-name-input">Group</label>
+        <div class="controls">
+          <input type="text" name="search-notification-group-name-input" id="search-notification-group-name-input" class="input-xlarge"/>
+          <p class="help-block hide"></p>
+        </div>
+      </div>
+    </fieldset>
+  </div>
+  <div class="modal-footer">
+    <input type="submit" class="btn btn-usergrid" value="Add"/>
+    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+  </div>
+</form>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ba1c278d/portal/js/push/test-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/push/test-controller.js b/portal/js/push/test-controller.js
new file mode 100644
index 0000000..23f2c7c
--- /dev/null
+++ b/portal/js/push/test-controller.js
@@ -0,0 +1,92 @@
+/**
+ 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.
+ */
+ 'use strict'
+ 
+AppServices.Controllers.controller('TestCtrl', ['ug', '$scope', '$rootScope', '$routeParams', '$location', function (ug, $scope, $rootScope, $routeParams, $location) {
+ 
+  $scope.login = function() {
+    $rootScope.currentPath = '/login';
+    var username = $scope.login_username;
+    var password = $scope.login_password;
+
+    alert(username);
+/*
+    ug.client().orgLogin(username, password, function (err, data, user, organizations, applications) {
+      if (err){
+        //let the user know the login was not valid
+        $scope.loginMessage = "Error: the username / password combination was not valid";
+        if(!$scope.$$phase) {
+          $scope.$apply();
+        }
+      } else {
+        $rootScope.$broadcast('loginSuccesful', user, organizations, applications);
+      }
+    });
+    */
+  }
+
+  $rootScope.$on('userNotAuthenticated', function(event) {
+    $location.path('/login');
+    if(!$rootScope.$$phase) {
+      $rootScope.$apply();
+    }
+  });
+
+  $scope.$on('loginSuccesful', function(event, user, organizations, applications) {
+
+    //update org and app dropdowns
+
+    $rootScope.userEmail = user.get('email');
+
+    $rootScope.organizations = ug.client().getObject('organizations');
+    $rootScope.applications = ug.client().getObject('applications');
+    $rootScope.currentOrg = ug.client().get('orgName');
+    $rootScope.currentApp = ug.client().get('appName');
+
+
+    //if on login page, send to org overview page.  if on a different page, let them stay there
+    if ($rootScope.currentPath === '/login' || $rootScope.currentPath === '/login/loading') {
+      $location.path('/org-overview');
+    } else {
+      $location.path($rootScope.currentPath);
+    }
+    if(!$scope.$$phase) {
+      $scope.$apply();
+    }
+  });
+  $scope.$on('reauthSuccesful', function(event) {
+
+    $rootScope.organizations = ug.client().getObject('organizations');
+    $rootScope.applications = ug.client().getObject('applications');
+    $rootScope.currentOrg = ug.client().get('orgName');
+    $rootScope.currentApp = ug.client().get('appName');
+
+    //if on login page, send to org overview page.  if on a different page, let them stay there
+    if ($rootScope.currentPath === '/login') {
+      $location.path('/org-overview');
+    } else {
+      $location.path($rootScope.currentPath);
+    }
+    if(!$scope.$$phase) {
+      $scope.$apply();
+    }
+
+  });
+
+}]);
\ No newline at end of file


Mime
View raw message