dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30665
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15584: change fields filter uses from include => fields in apps
------------------------------------------------------------
revno: 15584
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-06-07 16:03:55 +0200
message:
change fields filter uses from include => fields in apps
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextService.java
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js
dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextService.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextService.java 2014-06-05 11:22:46 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextService.java 2014-06-07 14:03:55 +0000
@@ -63,9 +63,6 @@
* Returns a list of values from a parameter, if the parameter doesn't exist, it will
* return a empty list.
*
- * Values will be split on comma, in normal Spring MVC style:
- * include=id,name&include=created,lastUpdated => [id,name,created,lastUpdated]
- *
* @param name Parameter to get
* @return List of parameter values, or empty if not found
*/
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-06-06 13:35:06 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-06-07 14:03:55 +0000
@@ -172,7 +172,7 @@
$.ajax({
url: '../api/programs.json',
type: 'GET',
- data:'type=3&paging=false&include=id,name,version,programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
+ data:'type=3&paging=false&fields=id,name,version,programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
}).done( function(response) {
var programs = [];
_.each( _.values( response.programs ), function ( program ) {
@@ -240,7 +240,7 @@
{
return function() {
return $.ajax( {
- url: '../api/programs.json?filter=id:eq:' + id +'&include=id,name,version,dateOfEnrollmentDescription,dateOfIncidentDescription,displayIncidentDate,ignoreOverdueEvents,organisationUnits[id,name],programStages[id,name]',
+ url: '../api/programs.json?filter=id:eq:' + id +'&fields=id,name,version,dateOfEnrollmentDescription,dateOfIncidentDescription,displayIncidentDate,ignoreOverdueEvents,organisationUnits[id,name],programStages[id,name]',
type: 'GET'
}).done( function( response ){
@@ -317,7 +317,7 @@
{
return function() {
return $.ajax( {
- url: '../api/programStages.json?filter=id:eq:' + id +'&include=id,name,dataEntryForm,description,minDaysFromStart,repeatable,programStageDataElements[displayInReports,allowProvidedElsewhere,allowDateInFuture,compulsory,dataElement[id,name,type,optionSet[id]]]',
+ url: '../api/programStages.json?filter=id:eq:' + id +'&fields=id,name,dataEntryForm,description,minDaysFromStart,repeatable,programStageDataElements[displayInReports,allowProvidedElsewhere,allowDateInFuture,compulsory,dataElement[id,name,type,optionSet[id]]]',
type: 'GET'
}).done( function( response ){
_.each( _.values( response.programStages ), function( programStage ) {
@@ -378,7 +378,7 @@
{
return function() {
return $.ajax( {
- url: '../api/optionSets.json?filter=id:eq:' + id +'&include=id,name,version,options',
+ url: '../api/optionSets.json?filter=id:eq:' + id +'&fields=id,name,version,options',
type: 'GET'
}).done( function( response ){
_.each( _.values( response.optionSets ), function( optionSet ) {
=== modified file 'dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js 2014-06-02 09:26:33 +0000
+++ dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js 2014-06-07 14:03:55 +0000
@@ -2320,7 +2320,7 @@
this.currentValue = this.getValue();
var value = this.getValue(),
- url = value ? ns.core.init.contextPath + '/api/eventReports.json?include=id,name,access&filter=name:like:' + value : null;
+ url = value ? ns.core.init.contextPath + '/api/eventReports.json?fields=id,name,access&filter=name:like:' + value : null;
store = ns.app.stores.eventReport;
store.page = 1;
@@ -2336,7 +2336,7 @@
text: NS.i18n.prev,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? ns.core.init.contextPath + '/api/eventReports.json?include=id,name,access&filter=name:like:' + value : null;
+ url = value ? ns.core.init.contextPath + '/api/eventReports.json?fields=id,name,access&filter=name:like:' + value : null;
store = ns.app.stores.eventReport;
store.page = store.page <= 1 ? 1 : store.page - 1;
@@ -3113,7 +3113,7 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/programs.json?include=id,name&paging=false',
+ url: ns.core.init.contextPath + '/api/programs.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'programs'
@@ -3367,7 +3367,7 @@
}
else {
Ext.Ajax.request({
- url: ns.core.init.contextPath + '/api/programs.json?filter=id:eq:' + programId + '&include=programStages[id,name],programTrackedEntityAttributes[attribute[id,name,valueType,optionSet[id,name]]]&paging=false',
+ url: ns.core.init.contextPath + '/api/programs.json?filter=id:eq:' + programId + '&fields=programStages[id,name],programTrackedEntityAttributes[attribute[id,name,valueType,optionSet[id,name]]]&paging=false',
success: function(r) {
var program = Ext.decode(r.responseText).programs[0],
stages,
@@ -3472,7 +3472,7 @@
}
else {
Ext.Ajax.request({
- url: ns.core.init.contextPath + '/api/programStages.json?filter=id:eq:' + stageId + '&include=programStageDataElements[dataElement[id,name,type,optionSet[id,name]]]',
+ url: ns.core.init.contextPath + '/api/programStages.json?filter=id:eq:' + stageId + '&fields=programStageDataElements[dataElement[id,name,type,optionSet[id,name]]]',
success: function(r) {
var objects = Ext.decode(r.responseText).programStages,
dataElements;
@@ -5931,7 +5931,7 @@
isLoaded: false,
pageSize: 10,
page: 1,
- defaultUrl: ns.core.init.contextPath + '/api/eventReports.json?include=id,name,access',
+ defaultUrl: ns.core.init.contextPath + '/api/eventReports.json?fields=id,name,access',
loadStore: function(url) {
this.proxy.url = url || this.defaultUrl;
@@ -6631,7 +6631,7 @@
// root nodes
requests.push({
- url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&paging=false&include=id,name,children[id,name]',
+ url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&paging=false&fields=id,name,children[id,name]',
success: function(r) {
init.rootNodes = Ext.decode(r.responseText).organisationUnits || [];
fn();
@@ -6640,7 +6640,7 @@
// organisation unit levels
requests.push({
- url: init.contextPath + '/api/organisationUnitLevels.json?include=id,name,level&paging=false',
+ url: init.contextPath + '/api/organisationUnitLevels.json?fields=id,name,level&paging=false',
success: function(r) {
init.organisationUnitLevels = Ext.decode(r.responseText).organisationUnitLevels || [];
@@ -6654,7 +6654,7 @@
// user orgunits and children
requests.push({
- url: init.contextPath + '/api/organisationUnits.json?userOnly=true&include=id,name,children[id,name]&paging=false',
+ url: init.contextPath + '/api/organisationUnits.json?userOnly=true&fields=id,name,children[id,name]&paging=false',
success: function(r) {
var organisationUnits = Ext.decode(r.responseText).organisationUnits || [],
ou = [],
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-06-02 09:26:33 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-06-07 14:03:55 +0000
@@ -596,7 +596,7 @@
isLoaded: false,
pageSize: 10,
page: 1,
- defaultUrl: gis.init.contextPath + gis.conf.finals.url.path_api + 'maps.json?viewClass=sharing&include=id,name,access',
+ defaultUrl: gis.init.contextPath + gis.conf.finals.url.path_api + 'maps.json?viewClass=sharing&fields=id,name,access',
loadStore: function(url) {
this.proxy.url = url || this.defaultUrl;
@@ -2672,7 +2672,7 @@
this.currentValue = this.getValue();
var value = this.getValue(),
- url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = gis.store.maps;
store.page = 1;
@@ -2688,7 +2688,7 @@
text: GIS.i18n.prev,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = gis.store.maps;
store.page = store.page <= 1 ? 1 : store.page - 1;
@@ -2700,7 +2700,7 @@
text: GIS.i18n.next,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = gis.store.maps;
store.page = store.page + 1;
@@ -3065,7 +3065,7 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'mapLegendSets.json?include=id,name&paging=false',
+ url: gis.init.contextPath + gis.conf.finals.url.path_api + 'mapLegendSets.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'mapLegendSets'
@@ -8601,7 +8601,7 @@
// root nodes
requests.push({
- url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&paging=false&include=id,name,children[id,name]',
+ url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&paging=false&fields=id,name,children[id,name]',
success: function(r) {
init.rootNodes = Ext.decode(r.responseText).organisationUnits || [];
fn();
@@ -8610,7 +8610,7 @@
// organisation unit levels
requests.push({
- url: init.contextPath + '/api/organisationUnitLevels.json?include=id,name,level&paging=false',
+ url: init.contextPath + '/api/organisationUnitLevels.json?fields=id,name,level&paging=false',
success: function(r) {
init.organisationUnitLevels = Ext.decode(r.responseText).organisationUnitLevels || [];
@@ -8624,7 +8624,7 @@
// user orgunits and children
requests.push({
- url: init.contextPath + '/api/organisationUnits.json?userOnly=true&include=id,name,children[id,name]&paging=false',
+ url: init.contextPath + '/api/organisationUnits.json?userOnly=true&fields=id,name,children[id,name]&paging=false',
success: function(r) {
var organisationUnits = Ext.decode(r.responseText).organisationUnits || [],
ou = [],
@@ -8660,7 +8660,7 @@
// indicator groups
requests.push({
- url: init.contextPath + '/api/indicatorGroups.json?include=id,name&paging=false',
+ url: init.contextPath + '/api/indicatorGroups.json?fields=id,name&paging=false',
success: function(r) {
init.indicatorGroups = Ext.decode(r.responseText).indicatorGroups || [];
fn();
@@ -8669,7 +8669,7 @@
// data element groups
requests.push({
- url: init.contextPath + '/api/dataElementGroups.json?include=id,name&paging=false',
+ url: init.contextPath + '/api/dataElementGroups.json?fields=id,name&paging=false',
success: function(r) {
init.dataElementGroups = Ext.decode(r.responseText).dataElementGroups || [];
fn();
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2014-06-02 09:26:33 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2014-06-07 14:03:55 +0000
@@ -1049,7 +1049,7 @@
this.currentValue = this.getValue();
var value = this.getValue(),
- url = value ? ns.core.init.contextPath + '/api/reportTables.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? ns.core.init.contextPath + '/api/reportTables.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = ns.app.stores.reportTable;
store.page = 1;
@@ -1065,7 +1065,7 @@
text: NS.i18n.prev,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? ns.core.init.contextPath + '/api/reportTables.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? ns.core.init.contextPath + '/api/reportTables.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = ns.app.stores.reportTable;
store.page = store.page <= 1 ? 1 : store.page - 1;
@@ -1077,7 +1077,7 @@
text: NS.i18n.next,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? ns.core.init.contextPath + '/api/reportTables.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? ns.core.init.contextPath + '/api/reportTables.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = ns.app.stores.reportTable;
store.page = store.page + 1;
@@ -2540,10 +2540,10 @@
}
if (Ext.isString(uid)) {
- path = '/indicators.json?include=id,name&filter=indicatorGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
+ path = '/indicators.json?fields=id,name&filter=indicatorGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
}
else if (uid === 0) {
- path = '/indicators.json?include=id,name' + (filter ? '&filter=name:like:' + filter : '');
+ path = '/indicators.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
}
if (!path) {
@@ -2600,7 +2600,7 @@
fields: ['id', 'name', 'index'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/indicatorGroups.json?include=id,name&paging=false',
+ url: ns.core.init.contextPath + '/api/indicatorGroups.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'indicatorGroups'
@@ -2668,10 +2668,10 @@
}
if (Ext.isString(uid)) {
- path = '/dataElements.json?include=id,name&filter=dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
+ path = '/dataElements.json?fields=id,name&filter=dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
}
else if (uid === 0) {
- path = '/dataElements.json?include=id,name' + (filter ? '&filter=name:like:' + filter : '');
+ path = '/dataElements.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
}
if (!path) {
@@ -2711,7 +2711,7 @@
path = '/dataElementGroups/' + uid + '/operands' + (filter ? '/query/' + filter : '') + '.json';
}
else if (uid === 0) {
- path = '/generatedDataElementOperands.json?include=id,name' + (filter ? '&filter=name:like:' + filter : '');
+ path = '/generatedDataElementOperands.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
}
if (!path) {
@@ -2770,7 +2770,7 @@
fields: ['id', 'name', 'index'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/dataElementGroups.json?include=id,name&paging=false',
+ url: ns.core.init.contextPath + '/api/dataElementGroups.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'dataElementGroups'
@@ -2800,7 +2800,7 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/dataSets.json?include=id,name',
+ url: ns.core.init.contextPath + '/api/dataSets.json?fields=id,name',
reader: {
type: 'json',
root: 'dataSets'
@@ -2871,7 +2871,7 @@
isLoaded: false,
pageSize: 10,
page: 1,
- defaultUrl: ns.core.init.contextPath + '/api/reportTables.json?viewClass=sharing&include=id,name,access',
+ defaultUrl: ns.core.init.contextPath + '/api/reportTables.json?viewClass=sharing&fields=id,name,access',
loadStore: function(url) {
this.proxy.url = url || this.defaultUrl;
@@ -2912,7 +2912,7 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/organisationUnitGroups.json?include=id,name&paging=false',
+ url: ns.core.init.contextPath + '/api/organisationUnitGroups.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'organisationUnitGroups'
@@ -5846,7 +5846,7 @@
// root nodes
requests.push({
- url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&paging=false&include=id,name,children[id,name]',
+ url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&paging=false&fields=id,name,children[id,name]',
success: function(r) {
init.rootNodes = Ext.decode(r.responseText).organisationUnits || [];
fn();
@@ -5855,7 +5855,7 @@
// organisation unit levels
requests.push({
- url: init.contextPath + '/api/organisationUnitLevels.json?include=id,name,level&paging=false',
+ url: init.contextPath + '/api/organisationUnitLevels.json?fields=id,name,level&paging=false',
success: function(r) {
init.organisationUnitLevels = Ext.decode(r.responseText).organisationUnitLevels || [];
@@ -5869,7 +5869,7 @@
// user orgunits and children
requests.push({
- url: init.contextPath + '/api/organisationUnits.json?userOnly=true&include=id,name,children[id,name]&paging=false',
+ url: init.contextPath + '/api/organisationUnits.json?userOnly=true&fields=id,name,children[id,name]&paging=false',
success: function(r) {
var organisationUnits = Ext.decode(r.responseText).organisationUnits || [],
ou = [],
@@ -5897,7 +5897,7 @@
// legend sets
requests.push({
- url: init.contextPath + '/api/mapLegendSets.json?include=id,name,mapLegends[id,name,startValue,endValue,color]&paging=false',
+ url: init.contextPath + '/api/mapLegendSets.json?fields=id,name,mapLegends[id,name,startValue,endValue,color]&paging=false',
success: function(r) {
init.legendSets = Ext.decode(r.responseText).mapLegendSets || [];
fn();
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-06-06 13:35:06 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-06-07 14:03:55 +0000
@@ -191,7 +191,7 @@
$.ajax({
url: '../api/trackedEntityAttributes.json',
type: 'GET',
- data: 'paging=false&include=id,name,version,description,valueType,inherit,displayOnVisitSchedule,displayInListNoProgram,unique,optionSet[id,version]'
+ data: 'paging=false&fields=id,name,version,description,valueType,inherit,displayOnVisitSchedule,displayInListNoProgram,unique,optionSet[id,version]'
}).done(function(response) {
dhis2.tc.store.setAll( 'attributes', response.trackedEntityAttributes );
def.resolve(response.trackedEntityAttributes);
@@ -268,7 +268,7 @@
$.ajax({
url: '../api/programs.json',
type: 'GET',
- data:'type=1&paging=false&include=id,name,version,programTrackedEntityAttributes[displayInList,mandatory,attribute[id]],programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
+ data:'type=1&paging=false&fields=id,name,version,programTrackedEntityAttributes[displayInList,mandatory,attribute[id]],programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
}).done( function(response) {
var programs = [];
_.each( _.values( response.programs ), function ( program ) {
@@ -338,7 +338,7 @@
return $.ajax( {
url: '../api/programs.json',
type: 'GET',
- data: 'paging=false&filter=id:eq:' + id +'&include=id,name,version,dateOfEnrollmentDescription,dateOfIncidentDescription,displayIncidentDate,ignoreOverdueEvents,realionshipText,trackedEntity[id,name,description],userRoles[id,name],organisationUnits[id,name],programStages[id,name,version,description,minDaysFromStart,repeatable],programTrackedEntityAttributes[displayInList,mandatory,attribute[id]]'
+ data: 'paging=false&filter=id:eq:' + id +'&fields=id,name,version,dateOfEnrollmentDescription,dateOfIncidentDescription,displayIncidentDate,ignoreOverdueEvents,realionshipText,trackedEntity[id,name,description],userRoles[id,name],organisationUnits[id,name],programStages[id,name,version,description,minDaysFromStart,repeatable],programTrackedEntityAttributes[displayInList,mandatory,attribute[id]]'
}).done( function( response ){
_.each( _.values( response.programs ), function ( program ) {
@@ -415,7 +415,7 @@
return $.ajax( {
url: '../api/programStages.json',
type: 'GET',
- data: 'filter=id:eq:' + id +'&include=id,name,dataEntryForm,description,minDaysFromStart,repeatable,programStageDataElements[displayInReports,allowProvidedElsewhere,allowDateInFuture,compulsory,dataElement[id,name,type,optionSet[id]]]'
+ data: 'filter=id:eq:' + id +'&fields=id,name,dataEntryForm,description,minDaysFromStart,repeatable,programStageDataElements[displayInReports,allowProvidedElsewhere,allowDateInFuture,compulsory,dataElement[id,name,type,optionSet[id]]]'
}).done( function( response ){
_.each( _.values( response.programStages ), function( programStage ) {
dhis2.tc.store.set( 'programStages', programStage );
@@ -477,7 +477,7 @@
return $.ajax( {
url: '../api/optionSets.json',
type: 'GET',
- data: 'filter=id:eq:' + id +'&include=id,name,version,options'
+ data: 'filter=id:eq:' + id +'&fields=id,name,version,options'
}).done( function( response ){
_.each( _.values( response.optionSets ), function( optionSet ) {
dhis2.tc.store.set( 'optionSets', optionSet );
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2014-06-02 09:26:33 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2014-06-07 14:03:55 +0000
@@ -742,7 +742,7 @@
this.currentValue = this.getValue();
var value = this.getValue(),
- url = value ? ns.core.init.contextPath + '/api/charts.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? ns.core.init.contextPath + '/api/charts.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = ns.app.stores.chart;
store.page = 1;
@@ -758,7 +758,7 @@
text: NS.i18n.prev,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? ns.core.init.contextPath + '/api/charts.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? ns.core.init.contextPath + '/api/charts.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = ns.app.stores.chart;
store.page = store.page <= 1 ? 1 : store.page - 1;
@@ -770,7 +770,7 @@
text: NS.i18n.next,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? ns.core.init.contextPath + '/api/charts.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
+ url = value ? ns.core.init.contextPath + '/api/charts.json?viewClass=sharing&fields=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = ns.app.stores.chart;
store.page = store.page + 1;
@@ -2352,10 +2352,10 @@
}
if (Ext.isString(uid)) {
- path = '/indicators.json?include=id,name&filter=indicatorGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
+ path = '/indicators.json?fields=id,name&filter=indicatorGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
}
else if (uid === 0) {
- path = '/indicators.json?include=id,name' + (filter ? '&filter=name:like:' + filter : '');
+ path = '/indicators.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
}
if (!path) {
@@ -2412,7 +2412,7 @@
fields: ['id', 'name', 'index'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/indicatorGroups.json?include=id,name&paging=false',
+ url: ns.core.init.contextPath + '/api/indicatorGroups.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'indicatorGroups'
@@ -2481,10 +2481,10 @@
}
if (Ext.isString(uid)) {
- path = '/dataElements.json?include=id,name&filter=dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
+ path = '/dataElements.json?fields=id,name&filter=dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
}
else if (uid === 0) {
- path = '/dataElements.json?include=id,name' + (filter ? '&filter=name:like:' + filter : '');
+ path = '/dataElements.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
}
if (!path) {
@@ -2525,7 +2525,7 @@
path = '/dataElementGroups/' + uid + '/operands' + (filter ? '/query/' + filter : '') + '.json';
}
else if (uid === 0) {
- path = '/generatedDataElementOperands.json?include=id,name' + (filter ? '&filter=name:like:' + filter : '');
+ path = '/generatedDataElementOperands.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
}
if (!path) {
@@ -2586,7 +2586,7 @@
fields: ['id', 'name', 'index'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/dataElementGroups.json?include=id,name&paging=false',
+ url: ns.core.init.contextPath + '/api/dataElementGroups.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'dataElementGroups'
@@ -2616,7 +2616,7 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/dataSets.json?include=id,name',
+ url: ns.core.init.contextPath + '/api/dataSets.json?fields=id,name',
reader: {
type: 'json',
root: 'dataSets'
@@ -2687,7 +2687,7 @@
isLoaded: false,
pageSize: 10,
page: 1,
- defaultUrl: ns.core.init.contextPath + '/api/charts.json?viewClass=sharing&include=id,name,access',
+ defaultUrl: ns.core.init.contextPath + '/api/charts.json?viewClass=sharing&fields=id,name,access',
loadStore: function(url) {
this.proxy.url = url || this.defaultUrl;
@@ -2728,7 +2728,7 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/organisationUnitGroups.json?include=id,name&paging=false',
+ url: ns.core.init.contextPath + '/api/organisationUnitGroups.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'organisationUnitGroups'
@@ -5501,7 +5501,7 @@
// root nodes
requests.push({
- url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&paging=false&include=id,name,children[id,name]',
+ url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&paging=false&fields=id,name,children[id,name]',
success: function(r) {
init.rootNodes = Ext.decode(r.responseText).organisationUnits || [];
fn();
@@ -5510,7 +5510,7 @@
// organisation unit levels
requests.push({
- url: init.contextPath + '/api/organisationUnitLevels.json?include=id,name,level&paging=false',
+ url: init.contextPath + '/api/organisationUnitLevels.json?fields=id,name,level&paging=false',
success: function(r) {
init.organisationUnitLevels = Ext.decode(r.responseText).organisationUnitLevels || [];
@@ -5524,7 +5524,7 @@
// user orgunits and children
requests.push({
- url: init.contextPath + '/api/organisationUnits.json?userOnly=true&include=id,name,children[id,name]&paging=false',
+ url: init.contextPath + '/api/organisationUnits.json?userOnly=true&fields=id,name,children[id,name]&paging=false',
success: function(r) {
var organisationUnits = Ext.decode(r.responseText).organisationUnits || [],
ou = [],