Skip to content

Commit

Permalink
Merge branch 'master' into release-2.0.0-Alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
suhothayan committed May 22, 2015
2 parents cbdb348 + 9328675 commit ef8a6ee
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 69 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.class
target/

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

#idea files
.idea/
*.iml
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@
<span style="float: left; position: relative; margin-top: 5px;">
<fmt:message key="event.receiver.error.no.stream"/>
</span>
<a onclick="createImportedStreamDefinition()",
<a onclick="createImportedStreamDefinition()"
style="background-image:url(images/add.gif);"
class="icon-link">
Add Event Stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function loadEventAdapterProperties(messageProperty, eventPublisherInputTable, p
function showEventStreamDefinition() {

var selectedIndex = document.getElementById("streamIdFilter").selectedIndex;
var streamNameWithVersion = document.getElementById("streamIdFilter").options[selectedIndex].text
var streamNameWithVersion = document.getElementById("streamIdFilter").options[selectedIndex].text;
jQuery.ajax({
type:"POST",
url:"../eventpublisher/get_streamdefinition_ajaxprocessor.jsp?streamName=" + streamNameWithVersion + "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function addEventStream(form, option, eventStreamId) {
},
onSuccess: function (event) {
if ("true" == event.responseText.trim()) {
CARBON.showInfoDialog("Stream definition added successfully!!",function () {
CARBON.showInfoDialog("Stream definition added successfully!!", function () {
form.submit();
});
} else {
Expand All @@ -84,8 +84,8 @@ function addEventStream(form, option, eventStreamId) {
} else if (option == "edit") {

CARBON.showConfirmationDialog("If event stream is edited then related configuration files will be also affected! Are you sure want to edit?",
function () {
new Ajax.Request('../eventstream/edit_event_stream_ajaxprocessor.jsp',{
function () {
new Ajax.Request('../eventstream/edit_event_stream_ajaxprocessor.jsp', {
method: 'POST',
asynchronous: false,
parameters: {
Expand All @@ -98,15 +98,15 @@ function addEventStream(form, option, eventStreamId) {
indexData: indexData,
eventStreamDescription: eventStreamDescription,
eventStreamNickName: eventStreamNickName
},onSuccess: function (event) {
}, onSuccess: function (event) {
if ("true" == event.responseText.trim()) {
form.submit();
} else {
CARBON.showErrorDialog("Failed to edit event stream, Exception: " + event.responseText.trim());
}
}
})
}, null, null);
}, null, null);

}
}
Expand Down Expand Up @@ -155,7 +155,7 @@ function addEventStreamViaPopup(form, callback) {
CARBON.showErrorDialog("Mapping parameters cannot be empty.");
return;
} else {
new Ajax.Request('../eventstream/add_event_stream_ajaxprocessor.jsp',{
new Ajax.Request('../eventstream/add_event_stream_ajaxprocessor.jsp', {
method: 'POST',
asynchronous: false,
parameters: {
Expand All @@ -166,23 +166,22 @@ function addEventStreamViaPopup(form, callback) {
payloadData: payloadData,
eventStreamDescription: eventStreamDescription,
eventStreamNickName: eventStreamNickName
},onSuccess: function (event) {
}, onSuccess: function (event) {
if ("true" == event.responseText.trim()) {
CARBON.showInfoDialog("Stream definition added successfully!!");
//CARBON.showInfoDialog("Stream definition added successfully!!",
// function () {
// if (callback == "inflow") {
// onSuccessCreateInflowStreamDefinition(streamId);
// } else if (callback == "outflow") {
// onSuccessCreateOutflowStreamDefinition(streamId);
// }
// },function () {
// if (callback == "inflow") {
// onSuccessCreateInflowStreamDefinition(streamId);
// } else if (callback == "outflow") {
// onSuccessCreateOutflowStreamDefinition(streamId);
// }
// });customCarbonWindowClose();
if (callback == "inflow") {
CARBON.showInfoDialog("Stream definition added successfully!!", function () {
form.submit();
});

} else {
CARBON.showInfoDialog("Stream definition added successfully!!",
function () {
onSuccessCreateOutflowStreamDefinition(streamId);
}, function () {
onSuccessCreateOutflowStreamDefinition(streamId);
});
customCarbonWindowClose();
}
} else {
CARBON.showErrorDialog("Failed to add event stream, Exception: " + event.responseText.trim());
}
Expand Down Expand Up @@ -295,38 +294,38 @@ CARBON.customConfirmDialogBox = function (message, option1, option2, callback, c
jQuery("#dcontainer").html(strDialog);

jQuery("#dialog").dialog({ close: function () {
jQuery(this).dialog('destroy').remove();
jQuery("#dcontainer").empty();
if (closeCallback
&& typeof closeCallback == "function") {
closeCallback();
}
return false;
},

buttons: { "OK": function () {
var value = jQuery('input[name=dialogRadio]:checked').val();
jQuery(this).dialog("destroy").remove();
jQuery("#dcontainer").empty();
if (callback && typeof callback == "function") {
callback(value);
}
return false;
}, "Create Later": function () {
jQuery(this).dialog('destroy').remove();
jQuery("#dcontainer").empty();
if (closeCallback
&& typeof closeCallback == "function") {
if (closeCallback && typeof closeCallback == "function") {
closeCallback();
}
return false;
}
},

buttons: { "OK": function () {
var value = jQuery('input[name=dialogRadio]:checked').val();
jQuery(this).dialog("destroy").remove();
jQuery("#dcontainer").empty();
if (callback && typeof callback == "function") {
callback(value);
}
return false;
},"Create Later": function () {
jQuery(this).dialog('destroy').remove();
jQuery("#dcontainer").empty();
if (closeCallback && typeof closeCallback == "function") {
closeCallback();
}
return false;
}
},

height: 200,
width: 500,
minHeight: 200,
minWidth: 330,
modal: true
height: 200,
width: 500,
minHeight: 200,
minWidth: 330,
modal: true
});
};
if (!pageLoaded) {
Expand Down Expand Up @@ -367,7 +366,7 @@ function convertEventStreamInfoDtoToString() {
payloadData = getWSO2EventDataValues(payloadDataTable);
}

new Ajax.Request('../eventstream/transform_to_string_ajaxprocessor.jsp',{
new Ajax.Request('../eventstream/transform_to_string_ajaxprocessor.jsp', {
method: 'POST',
asynchronous: false,
dataType: "text",
Expand All @@ -379,18 +378,18 @@ function convertEventStreamInfoDtoToString() {
payloadData: payloadData,
eventStreamDescription: eventStreamDescription,
eventStreamNickName: eventStreamNickName
},onSuccess: function (data) {
var eventStreamDefinitionString = JSON.parse(data.responseText.trim());

if (eventStreamDefinitionString.success.localeCompare("fail") == 0) {
CARBON.showErrorDialog(eventStreamDefinitionString.message);
}else {
document.getElementById("streamDefinitionText").value = eventStreamDefinitionString.message;
document.getElementById("designWorkArea").style.display = "none";
document.getElementById("sourceWorkArea").style.display = "inline";
}
}, onSuccess: function (data) {
var eventStreamDefinitionString = JSON.parse(data.responseText.trim());

if (eventStreamDefinitionString.success.localeCompare("fail") == 0) {
CARBON.showErrorDialog(eventStreamDefinitionString.message);
} else {
document.getElementById("streamDefinitionText").value = eventStreamDefinitionString.message;
document.getElementById("designWorkArea").style.display = "none";
document.getElementById("sourceWorkArea").style.display = "inline";
}
});
}
});

}

Expand All @@ -399,8 +398,7 @@ function convertStringToEventStreamInfoDto() {
.getElementById("streamDefinitionText").value.trim();



new Ajax.Request('../eventstream/transform_to_dto_ajaxprocessor.jsp',{
new Ajax.Request('../eventstream/transform_to_dto_ajaxprocessor.jsp', {
method: 'POST',
asynchronous: false,
dataType: "text",
Expand All @@ -425,7 +423,6 @@ function convertStringToEventStreamInfoDto() {
//var design = document.getElementById("designWorkArea");



if (0 == eventStreamDefinitionDtoJSON.message.metaAttributes.length) {
var streamAttributeTable = document.getElementById("outputMetaDataTable");

Expand Down Expand Up @@ -521,18 +518,18 @@ function addEventStreamByString(form) {
var eventStreamDefinitionString = document.getElementById("streamDefinitionText").value.trim();


new Ajax.Request('../eventstream/add_event_stream_by_string_ajaxprocessor.jsp',{
new Ajax.Request('../eventstream/add_event_stream_by_string_ajaxprocessor.jsp', {
method: 'POST',
asynchronous: false,
parameters: {
eventStreamDefinitionString: eventStreamDefinitionString
},onSuccess: function (event) {
}, onSuccess: function (event) {

var addStreamResposeJSON = JSON.parse(event.responseText.trim());
if (addStreamResposeJSON.success.localeCompare("fail") == 0) {
CARBON.showErrorDialog("Failed to add event stream, Exception: " + addStreamResposeJSON.message);
} else {
CARBON.showInfoDialog("Stream definition added successfully!!",function () {
CARBON.showInfoDialog("Stream definition added successfully!!", function () {
form.submit();
});
}
Expand All @@ -549,13 +546,13 @@ function editEventStreamByString(form, eventStreamId) {
function () {

var eventStreamDefinitionString = document.getElementById("streamDefinitionText").value.trim();
new Ajax.Request('../eventstream/edit_event_stream_by_string_ajaxprocessor.jsp',{
new Ajax.Request('../eventstream/edit_event_stream_by_string_ajaxprocessor.jsp', {
method: 'POST',
asynchronous: false,
parameters: {
eventStreamDefinitionString: eventStreamDefinitionString,
oldEventStreamId: eventStreamId
},onSuccess: function (event) {
}, onSuccess: function (event) {

var addStreamResposeJSON = JSON.parse(event.responseText.trim());
if (addStreamResposeJSON.success.localeCompare("fail") == 0) {
Expand Down

0 comments on commit ef8a6ee

Please sign in to comment.