Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
30c6a72
Add funding columns to this old GGW codebase
brianbrix Apr 26, 2026
5d998ec
Add workflow to old codebase
brianbrix Apr 27, 2026
6dbd505
Add workflow to old codebase
brianbrix Apr 27, 2026
01722e9
Add workflow to old codebase
brianbrix Apr 27, 2026
d487737
Resolve failing deployment
brianbrix Apr 27, 2026
f6b5be9
Add funding columns to the old GGW codebase DonorFundingJob
brianbrix Apr 27, 2026
d27116f
Add Missing global settings
brianbrix Apr 28, 2026
efc1653
Add Missing global settings
brianbrix Apr 28, 2026
d3f6db2
Failing xml patches
brianbrix Apr 28, 2026
8ac723a
Failing xml patches
brianbrix Apr 28, 2026
6e8d5ec
Failing xml patches
brianbrix Apr 28, 2026
8489239
Failing xml patches
brianbrix Apr 28, 2026
4737503
Failing xml patches
brianbrix Apr 28, 2026
2d506e6
Revert donor job columns
brianbrix Apr 28, 2026
eaf47c3
Revert donor job columns
brianbrix Apr 29, 2026
7824ac6
Resolve map popup issue
brianbrix May 13, 2026
9517e7f
Merge remote-tracking branch 'origin/future/v4.0' into future/GGW
brianbrix May 13, 2026
ccda24b
Resolve map popup issue
brianbrix May 13, 2026
d4c708f
Report engine failing
brianbrix May 14, 2026
0ed93d1
Report engine failing
brianbrix May 14, 2026
fd2781c
Internal error when saving activity
brianbrix May 14, 2026
d7e3293
Internal error when saving activity
brianbrix May 15, 2026
20a1394
Internal error when saving activity
brianbrix May 15, 2026
04fbc87
Project list folded on load
brianbrix May 15, 2026
2011c00
AMP-31125: Issue viewing/editing some activities from tab
brianbrix May 18, 2026
aaf11ce
AMP-31125: Issue viewing/editing some activities from tab
brianbrix May 19, 2026
3c6957d
AMP-31125: Issue some activities missing from GIS
brianbrix May 19, 2026
045d5f0
AMP-31125: Issue some activities missing from GIS
brianbrix May 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
708 changes: 708 additions & 0 deletions .github/workflows/deploy.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h5><%= obj.properties.admName%> <span data-i18n="amp.gis:popup-word-has">has</s
<!-- Tab panes -->
<div class="tab-content">

<div class="tab-pane" id="projects-pane">
<div class="tab-pane active" id="projects-pane">
<!-- this template is for adm clusters -->
<div class="scroll-container">
<table class="table table-striped table-condensed">
Expand Down
10 changes: 3 additions & 7 deletions amp/TEMPLATE/ampTemplate/js_2/esrigis/mainmapPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,14 @@ function initMap() {
function loadBaseMap() {
map = L.map('map').setView([latitude, longitude], 7);
// create the tile layer with correct attribution
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
if (isOsm) {
var subdomains = ['a', 'b', 'c'];
if (basemapurl !== undefined && basemapurl.indexOf("mqcdn") != -1) {
subdomains = ['otile1', 'otile2', 'otile3', 'otile4'];
}
var osmAttrib = 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
var osmAttrib = 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
tileLayer = new L.TileLayer(osmUrl, {
minZoom: 0,
maxZoom: 16,
attribution: osmAttrib,
subdomains: subdomains
subdomains: ['a', 'b', 'c']
});
} else {
tileLayer = L.esri.tiledMapLayer({
Expand Down
42 changes: 38 additions & 4 deletions amp/TEMPLATE/ampTemplate/tabs/js/business/grid/gridManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ define([ 'business/grid/columnsMapping', 'translationManager', 'util/tabUtils','
return '/aim/viewActivityPreview.do~activityId=' + id;
}

function getRowActivityId(grid, rowId) {
var activityId = jQuery(grid).jqGrid('getCell', rowId, app.TabsApp.COLUMN_ACTIVITY_ID);
// Strip whitespace and non-breaking spaces (\u00A0 / &nbsp;) which hidden jqGrid
// cells may contain — they are truthy but not a valid numeric ID.
if (activityId) {
activityId = String(activityId).replace(/[\s\u00A0]/g, '');
}
if (!activityId) {
try {
activityId = jQuery(grid).jqGrid('getCell', rowId, 'Activity Id');
if (activityId) {
activityId = String(activityId).replace(/[\s\u00A0]/g, '');
}
} catch (error) {
activityId = '';
}
}
return activityId;
}

GridManager.prototype = {
constructor : GridManager
};
Expand Down Expand Up @@ -230,7 +250,7 @@ define([ 'business/grid/columnsMapping', 'translationManager', 'util/tabUtils','
//set default color and link for rows
row = this.rows[iRow];
className = row.className;
var id = row.cells[1].textContent;
var id = getRowActivityId(grid, row.id);
var iconedit = "<a href='/wicket/onepager/"+ onePagerParameter +"/" + id
+ "'><img src='/TEMPLATE/ampTemplate/tabs/css/images/ico_edit.gif'/></a>";
var iconvalidated = "<a href='/wicket/onepager/"+ onePagerParameter +"/" + id
Expand Down Expand Up @@ -358,9 +378,11 @@ define([ 'business/grid/columnsMapping', 'translationManager', 'util/tabUtils','
colIndex = i;
}
});
var newContent = "<a class='preview-cell" + statusClass + "' href='" + getPreviewPageURL(id) + "'>"
+ jQuery(row.cells[colIndex]).html() + "</a>";
jQuery(row.cells[colIndex]).html(newContent);
if (id) {
var newContent = "<a class='preview-cell" + statusClass + "' href='" + getPreviewPageURL(id) + "'>"
+ jQuery(row.cells[colIndex]).html() + "</a>";
jQuery(row.cells[colIndex]).html(newContent);
}
}

TranslationManager.searchAndTranslate();
Expand Down Expand Up @@ -545,6 +567,18 @@ define([ 'business/grid/columnsMapping', 'translationManager', 'util/tabUtils','
row[column.columnName] = element.entityId;
}
});

// If AMP ID column is absent from the report the entityId was never extracted
// in the loop above. Every leaf element carries entityId regardless of column,
// so fall back to the first one we can find.
if (row[app.TabsApp.COLUMN_ACTIVITY_ID] === undefined) {
jQuery.each(obj.contents, function(hierarchicalName, element) {
if (element && element.entityId !== undefined) {
row[app.TabsApp.COLUMN_ACTIVITY_ID] = element.entityId;
return false; // break
}
});
}

// To flatten the tree structure and maintain hierarchies values on every row we add the values from "auxCurrentHierarchiesValues".
if (hierarchies.models.length > 0) {
Expand Down
250,698 changes: 250,698 additions & 0 deletions amp/doc/gazeteer.csv

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions amp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@
<name>amp</name>
<url>https://artifactory.dgdev.org/artifactory/amp/</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central-fallback</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand All @@ -79,6 +87,14 @@
<name>amp</name>
<url>https://artifactory.dgdev.org/artifactory/amp/</url>
</pluginRepository>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central-maven-plugins</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>

<profiles>
Expand Down Expand Up @@ -1218,10 +1234,12 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-translate</artifactId>
<version>1.95.3</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.111.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public static AmpActivityVersion saveActivityNewVersion(AmpActivityVersion a,
session.save(a);
else {
cleanObjectFromSession(session,AmpActivityVersion.class, a.getAmpActivityId());
session.saveOrUpdate(a);
session.merge(a);
}
} else {
// session.saveOrUpdate(a);
Expand Down Expand Up @@ -1372,8 +1372,6 @@ private static void saveStructures(AmpActivityVersion a, Session session) {
structure.setActivity(a);
if (structure.getAmpStructureId() == null) {
session.saveOrUpdate(structure);
} else {
session.merge(structure);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ public static ActivityList getActivities(PerformanceFilterParameters config, Lis
}
}
}
// If the AMP ID text cell was absent (activity has no AMP ID value), the id and
// ampUrl were never set in the loop above. Fall back to AreaOwner.id, which is
// always populated for every leaf row regardless of column configuration.
if (activity.getId() == null && reportArea.getOwner() != null && reportArea.getOwner().id > 0) {
long ownerId = reportArea.getOwner().id;
activity.setId(ownerId);
activity.setAmpUrl(ActivityGatekeeper.buildPreviewUrl(String.valueOf(ownerId)));
}
matchesFilters.put("Programs",programs);
activity.setMatchesFilters(matchesFilters);
activities.add(activity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.dgfoundation.amp.newreports.ReportAreaImpl;
import org.dgfoundation.amp.newreports.ReportCell;
import org.dgfoundation.amp.newreports.ReportColumn;
import org.dgfoundation.amp.newreports.ReportOutputColumn;
import org.dgfoundation.amp.newreports.ReportSettingsImpl;
import org.dgfoundation.amp.newreports.ReportSpecification;
import org.dgfoundation.amp.newreports.ReportSpecificationImpl;
Expand Down Expand Up @@ -303,25 +302,17 @@ private static Set<Long> getActivitiesForFiltering(PerformanceFilterParameters c
for (ReportArea reportArea : ll) {
if (implementationLevelColumn != null) {
List<ReportArea> childrenHierarchy = reportArea.getChildren();

for (ReportArea reportAreachi : childrenHierarchy) {
Map<ReportOutputColumn, ReportCell> row = reportAreachi.getContents();
Set<ReportOutputColumn> col = row.keySet();
for (ReportOutputColumn reportOutputColumn : col) {
if (reportOutputColumn.originalColumnName.equals(ColumnConstants.AMP_ID)) {
activitiesId.add(((IdentifiedReportCell) row.get(reportOutputColumn)).entityId);
}
// Use AreaOwner.id — always populated for every leaf row regardless of
// whether the activity has an AMP ID text value assigned.
if (reportAreachi.getOwner() != null && reportAreachi.getOwner().id > 0) {
activitiesId.add(reportAreachi.getOwner().id);
}
}

} else {
// we don't have hierarchy
Map<ReportOutputColumn, ReportCell> row = reportArea.getContents();
Set<ReportOutputColumn> col = row.keySet();
for (ReportOutputColumn reportOutputColumn : col) {
if (reportOutputColumn.originalColumnName.equals(ColumnConstants.AMP_ID)) {
activitiesId.add(((IdentifiedReportCell) row.get(reportOutputColumn)).entityId);
}
if (reportArea.getOwner() != null && reportArea.getOwner().id > 0) {
activitiesId.add(reportArea.getOwner().id);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,8 @@ public final static ArrayList<AmpStructure> eager_copy(Set<AmpStructure> structu
for(AmpStructure struc:structures)
{
AmpStructure z = (AmpStructure) struc.clone();
z.setImages(new HashSet(struc.getImages()));
z.getImages().clear();
z.getImages().addAll(struc.getImages());
/*z.setActivities(new HashSet(struc.getActivities()));
z.setAmpStructureId(struc.getAmpStructureId());
z.setCreationdate(struc.getCreationdate());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class AmpStructure implements Serializable, Comparable<Object>, Versionab
@InterchangeableBackReference
private AmpActivityVersion activity;

private Set<AmpStructureImg> images;
private Set<AmpStructureImg> images = new HashSet<>();

@Interchangeable(fieldTitle = "Coordinates", importable = true, fmPath = "/Activity Form/Structures/Map")
private List<AmpStructureCoordinate> coordinates = new ArrayList<>();
Expand Down Expand Up @@ -194,9 +194,12 @@ public Object prepareMerge(AmpActivityVersion newActivity) throws CloneNotSuppor
auxImg.setStructure(aux);
auxSetImages.add(auxImg);
}
aux.setImages(auxSetImages);
aux.getImages().clear();
aux.getImages().addAll(auxSetImages);
} else {
aux.setImages(new HashSet<>());

aux.getImages().clear();
aux.getImages().addAll(new HashSet<>());
}

if (aux.getCoordinates() != null && !aux.getCoordinates().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ public class GlobalSettingsConstants {

public static final List<String> ECOWAS_COUNTRIES = Arrays.asList(
"BJ", // Benin
"BF", // Burkina Faso
"CI", // Côte d'Ivoire
"GM", // Gambia
"GH", // Ghana
"GN", // Guinea
"GW", // Guinea-Bissau
"LR", // Liberia
"ML", // Mali
"NE", // Niger
"NG", // Nigeria
"SN", // Senegal
"SL", // Sierra Leone
Expand Down Expand Up @@ -278,6 +275,8 @@ public class GlobalSettingsConstants {
public static final String EXEMPT_ORGANIZATION_DOCUMENTS = "Exempt organization to see documents";

public static final String AMP_DASHBOARD_URL = "AMP Dashboard URL";
public static final String DONOR_FUNDING_ADM_LEVEL = "Donor Funding Administrative Level";
public static final String DASHBOARD_CURRENCIES = "Dashboard Currencies";

public static final String NUMBER_OF_INDICATORS_IN_DASHBOARD = "Number of indicators in M&E Dashboard";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ private List<ReportsDashboard> processReportData(GeneratedReport report, String
for (ReportArea statusData : location.getChildren()) {
TextCell statusCell = (TextCell) statusData.getContents().get(status);
for (ReportArea typeOfAssistanceData : statusData.getChildren()) {
//for (ReportArea reportSystemData : statusData.getChildren()) {
//for (ReportArea reportSystemData : statusData.getChildren()) {
TextCell typeOfAssistanceCell= (TextCell) typeOfAssistanceData.getContents().get(typeOfAssistance);
//TextCell reportSystemCell = (TextCell) reportSystemData.getContents().get(reportingSystem);
for (ReportArea reportSystemData : typeOfAssistanceData.getChildren()) {
//for (ReportArea typeOfAssistanceData : reportSystemData.getChildren()) {
//for (ReportArea typeOfAssistanceData : reportSystemData.getChildren()) {
TextCell reportSystemCell = (TextCell) reportSystemData.getContents().get(reportingSystem);
//TextCell typeOfAssistanceCell = (TextCell) typeOfAssistanceData.getContents().get(typeOfAssistance);
for (Map.Entry<ReportOutputColumn, ReportCell> content : reportSystemData.getContents().entrySet()) {
Expand Down Expand Up @@ -182,6 +182,7 @@ public static void sendReportsToServer(List<ReportsDashboard> ampDashboardFundin
// Convert the ampDashboardFunding to JSON using a JSON library (e.g., Gson)
Gson gson = new Gson();
String jsonData = gson.toJson(ampDashboardFunding);
logger.info("Data sent: "+jsonData);

// Get the output stream of the connection
try (OutputStream os = connection.getOutputStream()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
<key column="amp_structure_id" />
<one-to-many class="org.digijava.module.aim.dbentity.AmpStructureImg" />
</set>
<list name="coordinates" table="AMP_STRUCTURE_COORDINATE" lazy="false" cascade="all-delete-orphan" inverse="true">
<cache usage="read-write" />
<key column="amp_structure_id" />
<list-index column="index" />
<one-to-many class="org.digijava.module.aim.dbentity.AmpStructureCoordinate" />
</list>

<bag name="coordinates" table="AMP_STRUCTURE_COORDINATE" lazy="false" cascade="all-delete-orphan" inverse="true" order-by="amp_structure_coordinate_id">
<cache usage="read-write" />
<key column="amp_structure_id" />
<one-to-many class="org.digijava.module.aim.dbentity.AmpStructureCoordinate" />
</bag>


</class>
</hibernate-mapping>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<tns:patch closeOnSuccess="true" retryOnFail="true"
xmlns:tns="http://docs.ampdev.net/schemas/xmlpatcher" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docs.ampdev.net/schemas/xmlpatcher ../doc/xmlpatcher.xsd ">
<jira>AMP-31057</jira>
<author>bmokandu</author>
<description>Dashboard Currencies</description>
<apply>
<script>
<lang delimiter=";" type="postgres"><![CDATA[
INSERT INTO amp_global_settings (id, settingsname, settingsvalue, possiblevalues, description, section) VALUES
((select max(id) + 1 FROM amp_global_settings), 'Dashboard Currencies', 'USD|XOF|EUR', '',
'Dashboard Currencies Separated by pipe', 'general');
]]></lang>
</script>
</apply>
</tns:patch>
Loading
Loading