You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/03/06 23:22:51 UTC
[06/28] USERGRID-86: Remove restriction on 10 apps in the portal
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bf075e6c/portal/js/libs/usergrid.sdk.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/usergrid.sdk.js b/portal/js/libs/usergrid.sdk.js
index 591ad60..78354b1 100755
--- a/portal/js/libs/usergrid.sdk.js
+++ b/portal/js/libs/usergrid.sdk.js
@@ -98,6 +98,10 @@ Usergrid.Client.prototype.request = function (options, callback) {
if (self.getToken()) {
qs.access_token = self.getToken();
}
+ var developerkey=this.get("developerkey");
+ if (developerkey) {
+ qs.developer_key = developerkey;
+ }
//append params to the path
var encoded_params = encodeParams(qs);
if (encoded_params) {
@@ -1010,6 +1014,7 @@ Usergrid.Client.prototype.logout = function () {
this.set('orgName', null);
this.set('appName', null);
this.set('email', null);
+ this.set("developerkey", null);
}
/*
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bf075e6c/portal/js/login/forgot-password-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/login/forgot-password-controller.js b/portal/js/login/forgot-password-controller.js
index ece3082..95c7765 100644
--- a/portal/js/login/forgot-password-controller.js
+++ b/portal/js/login/forgot-password-controller.js
@@ -1,6 +1,5 @@
'use strict'
-
AppServices.Controllers.controller('ForgotPasswordCtrl',
['ug',
'$scope',
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bf075e6c/portal/js/login/login-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/login/login-controller.js b/portal/js/login/login-controller.js
index 8cb86a0..b253d77 100755
--- a/portal/js/login/login-controller.js
+++ b/portal/js/login/login-controller.js
@@ -5,6 +5,7 @@ AppServices.Controllers.controller('LoginCtrl', ['ug', '$scope', '$rootScope', '
$scope.loading = false;
$scope.login = {};
$scope.activation = {};
+ $scope.requiresDeveloperKey=$scope.options.client.requiresDeveloperKey||false;
$rootScope.gotoForgotPasswordPage = function(){
$location.path("/forgot-password");
};
@@ -32,8 +33,9 @@ AppServices.Controllers.controller('LoginCtrl', ['ug', '$scope', '$rootScope', '
$scope.logout = function() {
ug.logout();
+ ug.setClientProperty('developerkey', null);
if($scope.use_sso){
- window.location = $rootScope.urls().LOGOUT_URL + '?callback=' + encodeURIComponent($location.absUrl().split('?')[0]);
+ window.location = $rootScope.urls().LOGOUT_URL + '?redirect=no&callback=' + encodeURIComponent($location.absUrl().split('?')[0]);
}else{
$location.path('/login');
$scope.applyScope();
@@ -45,13 +47,15 @@ AppServices.Controllers.controller('LoginCtrl', ['ug', '$scope', '$rootScope', '
$location.path('/login');
$scope.logout();
}
-
$scope.applyScope();
});
$scope.$on('loginSuccesful', function(event, user, organizations, applications) {
$scope.loading = false;
+ if($scope.requiresDeveloperKey){
+ ug.setClientProperty('developerkey', $scope.login.developerkey);
+ }
$scope.login = {};
//if on login page, send to org overview page. if on a different page, let them stay there
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bf075e6c/portal/js/login/login.html
----------------------------------------------------------------------
diff --git a/portal/js/login/login.html b/portal/js/login/login.html
index 458c742..d0286b1 100755
--- a/portal/js/login/login.html
+++ b/portal/js/login/login.html
@@ -26,6 +26,12 @@
<input type="password" ng-model="login.password" required id="login-password" class="" ng-value="login.password" size="20" ug-validate>
</div>
</div>
+ <div class="control-group" ng-show="requiresDeveloperKey">
+ <label class="control-label" for="login-developerkey">Developer Key:</label>
+ <div class="controls">
+ <input type="text" ng-model="login.developerkey" id="login-developerkey" class="" ng-value="login.developerkey" size="20" ug-validate>
+ </div>
+ </div>
<div class="form-actions">
<div class="submit">
<input type="submit" name="button-login" id="button-login" ng-disabled="!loginForm.$valid || loading" value="{{loading ? loadingText : 'Log In'}}" class="btn btn-primary pull-right">
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bf075e6c/portal/js/menus/appMenu.html
----------------------------------------------------------------------
diff --git a/portal/js/menus/appMenu.html b/portal/js/menus/appMenu.html
index 93cb1d4..3132bb5 100644
--- a/portal/js/menus/appMenu.html
+++ b/portal/js/menus/appMenu.html
@@ -27,15 +27,14 @@
<li class="span5">
<a ng-if="activeUI"
class="btn btn-create zero-out pull-right"
- ng-disabled="!addApplications"
- ng-click="addApplications ? showModal('newApplication') : ''"
+ ng-click="showModal('newApplication')"
analytics-on="click"
analytics-category="App Services"
analytics-label="Button"
analytics-event="Add New App"
>
- <i class="pictogram">{{addApplications ? '⊞' : '❌'}}</i>
- {{!addApplications ? '10 app limit.' : 'Add New App'}}
+ <i class="pictogram">⊞</i>
+ Add New App
</a>
</li>
</ul>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bf075e6c/portal/js/menus/menu-directives.js
----------------------------------------------------------------------
diff --git a/portal/js/menus/menu-directives.js b/portal/js/menus/menu-directives.js
index 805e7cf..72b1a6e 100644
--- a/portal/js/menus/menu-directives.js
+++ b/portal/js/menus/menu-directives.js
@@ -351,7 +351,6 @@ AppServices.Directives.directive('appMenu', ["$location", "$routeParams", "$root
for (key in applications) {
if (applications.hasOwnProperty(key)) size++;
}
- scope.addApplications = size<10;
scope.hasApplications = Object.keys(applications).length > 0;
if(!scope.myApp.currentApp){
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bf075e6c/portal/js/org-overview/org-overview.html
----------------------------------------------------------------------
diff --git a/portal/js/org-overview/org-overview.html b/portal/js/org-overview/org-overview.html
index b64f1de..5e4891d 100644
--- a/portal/js/org-overview/org-overview.html
+++ b/portal/js/org-overview/org-overview.html
@@ -26,8 +26,8 @@
<h2 class="title" > Applications
<div class="header-button btn-group pull-right">
- <a class="btn filter-selector" style="{{applicationsSize === 10 ? 'width:290px':''}}" ng-disabled="!addApplications" ng-click="(addApplications ? showModal('newApplication') : '')">
- <span class="filter-label">{{!addApplications ? 'You have met your 10 app limit' : 'Add New App'}}</span>
+ <a class="btn filter-selector" style="{{applicationsSize === 10 ? 'width:290px':''}}" ng-click="showModal('newApplication')">
+ <span class="filter-label">Add New App</span>
</a>
</div>
</h2>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bf075e6c/portal/js/templates.js
----------------------------------------------------------------------
diff --git a/portal/js/templates.js b/portal/js/templates.js
index ae28dd5..ba8724d 100644
--- a/portal/js/templates.js
+++ b/portal/js/templates.js
@@ -1145,7 +1145,7 @@ angular.module('appservices').run(['$templateCache', function($templateCache) {
"<section class=\"row-fluid\">\n" +
" <div class=\"span12\">\n" +
" <div class=\"page-filters\">\n" +
- " <h1 class=\"title pull-left\" id=\"pageTitle\"><i class=\"pictogram title\" style=\"padding-right: 5px;\">{{icon}}</i>{{title}} <a class=\"super-help\" href=\"#\" ng-click=\"showHelp()\" >(need help?)</a></h1>\n" +
+ " <h1 class=\"title pull-left\" id=\"pageTitle\"><i class=\"pictogram title\" style=\"padding-right: 5px;\">{{icon}}</i>{{title}} <a class=\"super-help\" href=\"http://community.apigee.com/content/apigee-customer-support\" target=\"_blank\" >(need help?)</a></h1>\n" +
" </div>\n" +
" </div>\n" +
" <bsmodal id=\"need-help\"\n" +
@@ -1610,6 +1610,18 @@ angular.module('appservices').run(['$templateCache', function($templateCache) {
"\n" +
" </div>\r" +
"\n" +
+ " <div class=\"control-group\" ng-show=\"requiresDeveloperKey\">\r" +
+ "\n" +
+ " <label class=\"control-label\" for=\"login-developerkey\">Developer Key:</label>\r" +
+ "\n" +
+ " <div class=\"controls\">\r" +
+ "\n" +
+ " <input type=\"text\" ng-model=\"login.developerkey\" id=\"login-developerkey\" class=\"\" ng-value=\"login.developerkey\" size=\"20\" ug-validate>\r" +
+ "\n" +
+ " </div>\r" +
+ "\n" +
+ " </div>\r" +
+ "\n" +
" <div class=\"form-actions\">\r" +
"\n" +
" <div class=\"submit\">\r" +
@@ -1772,15 +1784,14 @@ angular.module('appservices').run(['$templateCache', function($templateCache) {
" <li class=\"span5\">\n" +
" <a ng-if=\"activeUI\"\n" +
" class=\"btn btn-create zero-out pull-right\"\n" +
- " ng-disabled=\"!addApplications\"\n" +
- " ng-click=\"addApplications ? showModal('newApplication') : ''\"\n" +
+ " ng-click=\"showModal('newApplication')\"\n" +
" analytics-on=\"click\"\n" +
" analytics-category=\"App Services\"\n" +
" analytics-label=\"Button\"\n" +
" analytics-event=\"Add New App\"\n" +
" >\n" +
- " <i class=\"pictogram\">{{addApplications ? '⊞' : '❌'}}</i>\n" +
- " {{!addApplications ? '10 app limit.' : 'Add New App'}}\n" +
+ " <i class=\"pictogram\">⊞</i>\n" +
+ " Add New App\n" +
" </a>\n" +
" </li>\n" +
"</ul>"
@@ -1833,8 +1844,8 @@ angular.module('appservices').run(['$templateCache', function($templateCache) {
"\n" +
" <h2 class=\"title\" > Applications\n" +
" <div class=\"header-button btn-group pull-right\">\n" +
- " <a class=\"btn filter-selector\" style=\"{{applicationsSize === 10 ? 'width:290px':''}}\" ng-disabled=\"!addApplications\" ng-click=\"(addApplications ? showModal('newApplication') : '')\">\n" +
- " <span class=\"filter-label\">{{!addApplications ? 'You have met your 10 app limit' : 'Add New App'}}</span>\n" +
+ " <a class=\"btn filter-selector\" style=\"{{applicationsSize === 10 ? 'width:290px':''}}\" ng-click=\"showModal('newApplication')\">\n" +
+ " <span class=\"filter-label\">Add New App</span>\n" +
" </a>\n" +
" </div>\n" +
" </h2>\n" +
@@ -2484,6 +2495,37 @@ angular.module('appservices').run(['$templateCache', function($templateCache) {
);
+ $templateCache.put('users/users-feed.html',
+ "<div class=\"content-page\" ng-controller=\"UsersFeedCtrl\" >\n" +
+ "\n" +
+ " <div ng:include=\"'users/users-tabs.html'\"></div>\n" +
+ " <br>\n" +
+ " <div>\n" +
+ " <table class=\"table table-striped\">\n" +
+ " <tbody>\n" +
+ " <tr class=\"table-header\">\n" +
+ " <td>Date</td>\n" +
+ " <td>User</td>\n" +
+ " <td>Content</td>\n" +
+ " <td>Verb</td>\n" +
+ " <td>UUID</td>\n" +
+ " </tr>\n" +
+ " <tr class=\"zebraRows\" ng-repeat=\"activity in activities\">\n" +
+ " <td>{{activity.createdDate}}</td>\n" +
+ " <td>{{activity.actor.displayName}}</td>\n" +
+ " <td>{{activity.content}}</td>\n" +
+ " <td>{{activity.verb}}</td>\n" +
+ " <td>{{activity.uuid}}</td>\n" +
+ " </tr>\n" +
+ " </tbody>\n" +
+ " </table>\n" +
+ " </div>\n" +
+ "\n" +
+ "\n" +
+ "</div>\n"
+ );
+
+
$templateCache.put('users/users-graph.html',
"<div class=\"content-page\" ng-controller=\"UsersGraphCtrl\">\n" +
"\n" +
@@ -2950,6 +2992,7 @@ angular.module('appservices').run(['$templateCache', function($templateCache) {
" <li class=\"tab\" ng-class=\"currentUsersPage.route === '/users/profile' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectUserPage('/users/profile')\"><i class=\"pictogram\"></i>Profile</a></li>\n" +
" <li class=\"tab\" ng-class=\"currentUsersPage.route === '/users/groups' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectUserPage('/users/groups')\"><i class=\"pictogram\">👥</i>Groups</a></li>\n" +
" <li class=\"tab\" ng-class=\"currentUsersPage.route === '/users/activities' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectUserPage('/users/activities')\"><i class=\"pictogram\"></i>Activities</a></li>\n" +
+ " <li class=\"tab\" ng-class=\"currentUsersPage.route === '/users/feed' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectUserPage('/users/feed')\"><i class=\"pictogram\">📄</i>Feed</a></li>\n" +
" <li class=\"tab\" ng-class=\"currentUsersPage.route === '/users/graph' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectUserPage('/users/graph')\"><i class=\"pictogram\">☁</i>Graph</a></li>\n" +
" <li class=\"tab\" ng-class=\"currentUsersPage.route === '/users/roles' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectUserPage('/users/roles')\"><i class=\"pictogram\">🌎</i>Roles & Permissions</a></li>\n" +
" </ul>\n" +