queryView_parameter = {}; function queryView_init() { $('#content').html(''); $('#result').html(''); var str = ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += '
list get execute
applicationFlag:
flag:
date
sample
{
'; str += '"dateRangeType": "none",
'; str += '"dateEffectType": "completed",
'; str += '"start": "",
'; str += '"completed": "",
'; str += '"year": "",
'; str += '"month": "",
'; str += '"date": "",
'; str += '"season": 0,
'; str += '"week": 0,
'; str += '"adjust": 0
'; str += '}'; str += '
filter
sample
{
'; str += '"path": "",
'; str += '"value": "",
'; str += '"formatType": "",
'; str += '"completed": "",
'; str += '"logic": "",
'; str += '"comparison": ""
'; str += '}'; str += '
where application
where process
where company
where department
where person
where identity
column
'; $('#content').html(str); $('#list').click(function() { queryView_list($('#applicationFlag').val()); }); $('#get').click(function() { queryView_get($('#flag').val(), $('#applicationFlag').val()); }); $('#execute').click(function() { queryView_execute($('#flag').val(), $('#applicationFlag').val()); }); } function queryView_list(applicationFlag) { $('#result').html(''); $.ajax({ type : 'get', dataType : 'json', url : '../jaxrs/queryview/list/application/flag/' + applicationFlag, xhrFields : { 'withCredentials' : true }, crossDomain : true }).always(function(json) { $('#result').html(JSON.stringify(json, null, 4)); }); } function queryView_get(flag, applicationFlag) { $('#result').html(''); $.ajax({ type : 'get', dataType : 'json', url : '../jaxrs/queryview/flag/' + flag + '/application/flag/' + applicationFlag, xhrFields : { 'withCredentials' : true }, crossDomain : true }).always(function(json) { $('#result').html(JSON.stringify(json, null, 4)); }); } function queryView_execute(flag, applicationFlag) { $('#result').html(''); var data = {}; if ($('#date').val().length > 0) { data.date = JSON.parse($('#date').val()); } if ($('#filter').val().length > 0) { data.filter = JSON.parse($('#filter').val()); } if ($('#application').val().length > 0) { data.application = JSON.parse($('#application').val()); } if ($('#process').val().length > 0) { data.process = JSON.parse($('#process').val()); } if ($('#company').val().length > 0) { data.company = JSON.parse($('#company').val()); } if ($('#department').val().length > 0) { data.department = JSON.parse($('#department').val()); } if ($('#person').val().length > 0) { data.person = JSON.parse($('#person').val()); } if ($('#identity').val().length > 0) { data.identity = JSON.parse($('#identity').val()); } if ($('#column').val().length > 0) { data.column = JSON.parse($('#column').val()); } $.ajax({ type : 'put', dataType : 'json', url : '../jaxrs/queryview/flag/' + flag + '/application/flag/' + applicationFlag + '/execute', contentType : 'application/json; charset=utf-8', data : JSON.stringify(data), xhrFields : { 'withCredentials' : true }, crossDomain : true }).always(function(json) { $('#result').html(JSON.stringify(json, null, 4)); }); }