You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2014/12/03 02:00:44 UTC
incubator-usergrid git commit: fix write alias issue
Repository: incubator-usergrid
Updated Branches:
refs/heads/index-alias c083e6b42 -> 887bb476e
fix write alias issue
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/887bb476
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/887bb476
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/887bb476
Branch: refs/heads/index-alias
Commit: 887bb476e3616d8a972c761fcb1e0051d530cbef
Parents: c083e6b
Author: Shawn Feldman <sf...@apache.org>
Authored: Tue Dec 2 17:59:33 2014 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Tue Dec 2 17:59:33 2014 -0700
----------------------------------------------------------------------
portal/config.js | 94 ++++++++++++++------
.../index/impl/EsEntityIndexBatchImpl.java | 2 +-
2 files changed, 70 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/887bb476/portal/config.js
----------------------------------------------------------------------
diff --git a/portal/config.js b/portal/config.js
index 70138f4..36d68ed 100644
--- a/portal/config.js
+++ b/portal/config.js
@@ -1,4 +1,3 @@
-
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -28,42 +27,87 @@ Usergrid.overrideUrl = 'http://localhost:8080/';
//Usergrid.overrideUrl = 'https://api.usergrid.com/';
Usergrid.options = {
- client:{
- requiresDeveloperKey:false
- // apiKey:'123456'
+ client: {
+ requiresDeveloperKey: false
+ // apiKey:'123456'
},
- showAutoRefresh:true,
- autoUpdateTimer:61, //seconds
- menuItems:[
- {path:'#!/org-overview', active:true,pic:'🕪',title:'Org Administration'},
- {path:'#!/app-overview/summary',pic:'',title:'App Overview'},
- {path:'#!/users',pic:'👤',title:'Users'},
- {path:'#!/groups',pic:'👥',title:'Groups'},
- {path:'#!/roles',pic:'',title:'Roles'},
- {path:'#!/data',pic:'📸',title:'Data'},
- {path:'#!/activities',pic:'',title:'Activities'},
- {path:'#!/push/getStarted',pic:'',title:'Push', items:[
- {path:'#!/push/getStarted',pic:'',title:'Get Started'},
- {path:'#!/push/configuration',pic:'⚒',title:'Configure'},
- {path:'#!/push/history',pic:'✇',title:'History'},
- {path:'#!/push/sendNotification',pic:'',title:'Send'}
- ]},
-
+ showAutoRefresh: true,
+ autoUpdateTimer: 61, //seconds
+ menuItems: [{
+ path: '#!/org-overview',
+ active: true,
+ pic: '🕪',
+ title: 'Org Administration'
+ }, {
+ path: '#!/app-overview/summary',
+ pic: '',
+ title: 'App Overview'
+ }, {
+ path: '#!/users',
+ pic: '👤',
+ title: 'Users'
+ }, {
+ path: '#!/groups',
+ pic: '👥',
+ title: 'Groups'
+ }, {
+ path: '#!/roles',
+ pic: '',
+ title: 'Roles'
+ }, {
+ path: '#!/data',
+ pic: '📸',
+ title: 'Data'
+ }, {
+ path: '#!/activities',
+ pic: '',
+ title: 'Activities'
+ }, {
+ path: '#!/push/getStarted',
+ pic: '',
+ title: 'Push',
+ items: [{
+ path: '#!/push/getStarted',
+ pic: '',
+ title: 'Get Started'
+ }, {
+ path: '#!/push/configuration',
+ pic: '⚒',
+ title: 'Configure'
+ }, {
+ path: '#!/push/history',
+ pic: '✇',
+ title: 'History'
+ }, {
+ path: '#!/push/sendNotification',
+ pic: '',
+ title: 'Send'
+ }]
+ },
+
- {path:'#!/shell',pic:'⌨',title:'Shell'}
+ {
+ path: '#!/shell',
+ pic: '⌨',
+ title: 'Shell'
+ }
]
};
Usergrid.regex = {
appNameRegex: new RegExp("^[0-9a-zA-Z.-]{3,25}$"),
usernameRegex: new RegExp("^[0-9a-zA-Z@\.\_-]{4,25}$"),
- nameRegex: new RegExp("^([0-9a-zA-Z@#$%^&!?;:.,'\"~*-:+_\[\\](){}/\\ |]{3,60})+$"),
+ nameRegex: new RegExp(
+ "^([0-9a-zA-Z@#$%^&!?;:.,'\"~*-:+_\[\\](){}/\\ |]{3,60})+$"),
roleNameRegex: new RegExp("^([0-9a-zA-Z./-]{3,25})+$"),
- emailRegex: new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$"),
+ emailRegex: new RegExp(
+ "^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$"
+ ),
passwordRegex: /(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
pathRegex: new RegExp("^/[a-zA-Z0-9\.\*_~-]+(\/[a-zA-Z0-9\.\*_~-]+)*$"),
titleRegex: new RegExp("[a-zA-Z0-9.!-?]+[\/]?"),
- urlRegex: new RegExp("^(http?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$"),
+ urlRegex: new RegExp(
+ "^(http?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$"),
zipRegex: new RegExp("^[0-9]{5}(?:-[0-9]{4})?$"),
countryRegex: new RegExp("^[A-Za-z ]{3,100}$"),
stateRegex: new RegExp("^[A-Za-z ]{2,100}$"),
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/887bb476/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
index 0c2dec0..a3ca8a5 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
@@ -182,7 +182,7 @@ public class EsEntityIndexBatchImpl implements EntityIndexBatch {
log.debug( "De-indexing type {} with documentId '{}'" , entityType, indexId);
- bulkRequest.add( client.prepareDelete(alias.getReadAlias(), entityType, indexId ).setRefresh( refresh ) );
+ bulkRequest.add( client.prepareDelete(alias.getWriteAlias(), entityType, indexId ).setRefresh( refresh ) );
log.debug( "Deindexed Entity with index id " + indexId );