Merge branch 'master' of https://code.google.com/p/plexi
diff --git a/resources/com/google/enterprise/adaptor/resources/dashboard.js b/resources/com/google/enterprise/adaptor/resources/dashboard.js
index 3b213a9..d8d6a13 100755
--- a/resources/com/google/enterprise/adaptor/resources/dashboard.js
+++ b/resources/com/google/enterprise/adaptor/resources/dashboard.js
@@ -93,6 +93,13 @@
return data;
}
+function notAvailableInReducedMemMode(statValue) {
+ if (statValue < 0) {
+ return "Not available because journal.reducedMem is set to true";
+ }
+ return statValue.toString();
+}
+
function getStatsCallback(result, error) {
if (result === null) {
throw error;
@@ -111,13 +118,14 @@
$('#gaf-num-total-doc-ids-pushed').text(
data.simpleStats.numTotalDocIdsPushed);
$('#gaf-num-unique-doc-ids-pushed').text(
- data.simpleStats.numUniqueDocIdsPushed);
+ notAvailableInReducedMemMode(data.simpleStats.numUniqueDocIdsPushed));
$('#gaf-num-total-gsa-requests').text(data.simpleStats.numTotalGsaRequests);
- $('#gaf-num-unique-gsa-requests').text(data.simpleStats.numUniqueGsaRequests);
+ $('#gaf-num-unique-gsa-requests').text(
+ notAvailableInReducedMemMode(data.simpleStats.numUniqueGsaRequests));
$('#gaf-num-total-non-gsa-requests').text(
data.simpleStats.numTotalNonGsaRequests);
$('#gaf-num-unique-non-gsa-requests').text(
- data.simpleStats.numUniqueNonGsaRequests);
+ notAvailableInReducedMemMode(data.simpleStats.numUniqueNonGsaRequests));
$('#gaf-when-started').text(String(new Date(data.simpleStats.whenStarted)));
$('#gaf-time-resolution').text(data.simpleStats.timeResolution);
diff --git a/resources/com/google/enterprise/adaptor/resources/index.html b/resources/com/google/enterprise/adaptor/resources/index.html
index 6a6eb0d..51dd997 100644
--- a/resources/com/google/enterprise/adaptor/resources/index.html
+++ b/resources/com/google/enterprise/adaptor/resources/index.html
@@ -26,7 +26,7 @@
</div>
<div class="action-btn-grp">
<button class="g-button g-button-primary" id="gaf-incremental-feed-push">Run Incremental Push</button>
- <button class="g-button g-button-primary" id="gaf-start-feed-push">Start Feed Push</button>
+ <button class="g-button g-button-primary" id="gaf-start-feed-push">Run Full Push</button>
</div>
<div class="notifications">
<span id="gaf-incremental-feed-push-sending" style="display: none">Sending request...</span>
diff --git a/src/com/google/enterprise/adaptor/examples/GroupDefinitionsFromCsv.java b/src/com/google/enterprise/adaptor/examples/GroupDefinitionsFromCsv.java
index 6e6ee34..191bf7c 100644
--- a/src/com/google/enterprise/adaptor/examples/GroupDefinitionsFromCsv.java
+++ b/src/com/google/enterprise/adaptor/examples/GroupDefinitionsFromCsv.java
@@ -44,11 +44,13 @@
private File csvFile;
private String domain;
+ private String namespace;
@Override
public void initConfig(Config config) {
config.addKey("csv.filename", null);
config.addKey("csv.domain", null);
+ config.addKey("csv.namespace", Principal.DEFAULT_NAMESPACE);
}
@Override
@@ -59,6 +61,7 @@
throw new IllegalStateException("cannot find file: " + fname);
}
domain = context.getConfig().getValue("csv.domain");
+ namespace = context.getConfig().getValue("csv.namespace");
}
@Override
@@ -110,12 +113,12 @@
String name = makeName(id);
boolean entityIsGroup = src.containsKey(id);
if (entityIsGroup) {
- entities.add(new GroupPrincipal(name));
+ entities.add(new GroupPrincipal(name, namespace));
} else {
- entities.add(new UserPrincipal(name));
+ entities.add(new UserPrincipal(name, namespace));
}
}
- dest.put(new GroupPrincipal(makeName(e.getKey())), entities);
+ dest.put(new GroupPrincipal(makeName(e.getKey()), namespace), entities);
}
return dest;
}