Skip to content

Commit ef8a6ee

Browse files
committed
Merge branch 'master' into release-2.0.0-Alpha
2 parents cbdb348 + 9328675 commit ef8a6ee

File tree

4 files changed

+83
-69
lines changed

4 files changed

+83
-69
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*.class
2+
target/
3+
4+
# Mobile Tools for Java (J2ME)
5+
.mtj.tmp/
6+
7+
# Package Files #
8+
*.jar
9+
*.war
10+
*.ear
11+
12+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
13+
hs_err_pid*
14+
15+
#idea files
16+
.idea/
17+
*.iml

components/event-publisher/org.wso2.carbon.event.publisher.ui/src/main/resources/web/eventpublisher/create_event_publisher.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@
470470
<span style="float: left; position: relative; margin-top: 5px;">
471471
<fmt:message key="event.receiver.error.no.stream"/>
472472
</span>
473-
<a onclick="createImportedStreamDefinition()",
473+
<a onclick="createImportedStreamDefinition()"
474474
style="background-image:url(images/add.gif);"
475475
class="icon-link">
476476
Add Event Stream

components/event-publisher/org.wso2.carbon.event.publisher.ui/src/main/resources/web/eventpublisher/js/create_eventPublisher_helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function loadEventAdapterProperties(messageProperty, eventPublisherInputTable, p
101101
function showEventStreamDefinition() {
102102

103103
var selectedIndex = document.getElementById("streamIdFilter").selectedIndex;
104-
var streamNameWithVersion = document.getElementById("streamIdFilter").options[selectedIndex].text
104+
var streamNameWithVersion = document.getElementById("streamIdFilter").options[selectedIndex].text;
105105
jQuery.ajax({
106106
type:"POST",
107107
url:"../eventpublisher/get_streamdefinition_ajaxprocessor.jsp?streamName=" + streamNameWithVersion + "",

components/event-stream/org.wso2.carbon.event.stream.ui/src/main/resources/web/eventstream/js/event_stream.js

Lines changed: 64 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function addEventStream(form, option, eventStreamId) {
7373
},
7474
onSuccess: function (event) {
7575
if ("true" == event.responseText.trim()) {
76-
CARBON.showInfoDialog("Stream definition added successfully!!",function () {
76+
CARBON.showInfoDialog("Stream definition added successfully!!", function () {
7777
form.submit();
7878
});
7979
} else {
@@ -84,8 +84,8 @@ function addEventStream(form, option, eventStreamId) {
8484
} else if (option == "edit") {
8585

8686
CARBON.showConfirmationDialog("If event stream is edited then related configuration files will be also affected! Are you sure want to edit?",
87-
function () {
88-
new Ajax.Request('../eventstream/edit_event_stream_ajaxprocessor.jsp',{
87+
function () {
88+
new Ajax.Request('../eventstream/edit_event_stream_ajaxprocessor.jsp', {
8989
method: 'POST',
9090
asynchronous: false,
9191
parameters: {
@@ -98,15 +98,15 @@ function addEventStream(form, option, eventStreamId) {
9898
indexData: indexData,
9999
eventStreamDescription: eventStreamDescription,
100100
eventStreamNickName: eventStreamNickName
101-
},onSuccess: function (event) {
101+
}, onSuccess: function (event) {
102102
if ("true" == event.responseText.trim()) {
103103
form.submit();
104104
} else {
105105
CARBON.showErrorDialog("Failed to edit event stream, Exception: " + event.responseText.trim());
106106
}
107107
}
108108
})
109-
}, null, null);
109+
}, null, null);
110110

111111
}
112112
}
@@ -155,7 +155,7 @@ function addEventStreamViaPopup(form, callback) {
155155
CARBON.showErrorDialog("Mapping parameters cannot be empty.");
156156
return;
157157
} else {
158-
new Ajax.Request('../eventstream/add_event_stream_ajaxprocessor.jsp',{
158+
new Ajax.Request('../eventstream/add_event_stream_ajaxprocessor.jsp', {
159159
method: 'POST',
160160
asynchronous: false,
161161
parameters: {
@@ -166,23 +166,22 @@ function addEventStreamViaPopup(form, callback) {
166166
payloadData: payloadData,
167167
eventStreamDescription: eventStreamDescription,
168168
eventStreamNickName: eventStreamNickName
169-
},onSuccess: function (event) {
169+
}, onSuccess: function (event) {
170170
if ("true" == event.responseText.trim()) {
171-
CARBON.showInfoDialog("Stream definition added successfully!!");
172-
//CARBON.showInfoDialog("Stream definition added successfully!!",
173-
// function () {
174-
// if (callback == "inflow") {
175-
// onSuccessCreateInflowStreamDefinition(streamId);
176-
// } else if (callback == "outflow") {
177-
// onSuccessCreateOutflowStreamDefinition(streamId);
178-
// }
179-
// },function () {
180-
// if (callback == "inflow") {
181-
// onSuccessCreateInflowStreamDefinition(streamId);
182-
// } else if (callback == "outflow") {
183-
// onSuccessCreateOutflowStreamDefinition(streamId);
184-
// }
185-
// });customCarbonWindowClose();
171+
if (callback == "inflow") {
172+
CARBON.showInfoDialog("Stream definition added successfully!!", function () {
173+
form.submit();
174+
});
175+
176+
} else {
177+
CARBON.showInfoDialog("Stream definition added successfully!!",
178+
function () {
179+
onSuccessCreateOutflowStreamDefinition(streamId);
180+
}, function () {
181+
onSuccessCreateOutflowStreamDefinition(streamId);
182+
});
183+
customCarbonWindowClose();
184+
}
186185
} else {
187186
CARBON.showErrorDialog("Failed to add event stream, Exception: " + event.responseText.trim());
188187
}
@@ -295,38 +294,38 @@ CARBON.customConfirmDialogBox = function (message, option1, option2, callback, c
295294
jQuery("#dcontainer").html(strDialog);
296295

297296
jQuery("#dialog").dialog({ close: function () {
297+
jQuery(this).dialog('destroy').remove();
298+
jQuery("#dcontainer").empty();
299+
if (closeCallback
300+
&& typeof closeCallback == "function") {
301+
closeCallback();
302+
}
303+
return false;
304+
},
305+
306+
buttons: { "OK": function () {
307+
var value = jQuery('input[name=dialogRadio]:checked').val();
308+
jQuery(this).dialog("destroy").remove();
309+
jQuery("#dcontainer").empty();
310+
if (callback && typeof callback == "function") {
311+
callback(value);
312+
}
313+
return false;
314+
}, "Create Later": function () {
298315
jQuery(this).dialog('destroy').remove();
299316
jQuery("#dcontainer").empty();
300-
if (closeCallback
301-
&& typeof closeCallback == "function") {
317+
if (closeCallback && typeof closeCallback == "function") {
302318
closeCallback();
303319
}
304320
return false;
321+
}
305322
},
306323

307-
buttons: { "OK": function () {
308-
var value = jQuery('input[name=dialogRadio]:checked').val();
309-
jQuery(this).dialog("destroy").remove();
310-
jQuery("#dcontainer").empty();
311-
if (callback && typeof callback == "function") {
312-
callback(value);
313-
}
314-
return false;
315-
},"Create Later": function () {
316-
jQuery(this).dialog('destroy').remove();
317-
jQuery("#dcontainer").empty();
318-
if (closeCallback && typeof closeCallback == "function") {
319-
closeCallback();
320-
}
321-
return false;
322-
}
323-
},
324-
325-
height: 200,
326-
width: 500,
327-
minHeight: 200,
328-
minWidth: 330,
329-
modal: true
324+
height: 200,
325+
width: 500,
326+
minHeight: 200,
327+
minWidth: 330,
328+
modal: true
330329
});
331330
};
332331
if (!pageLoaded) {
@@ -367,7 +366,7 @@ function convertEventStreamInfoDtoToString() {
367366
payloadData = getWSO2EventDataValues(payloadDataTable);
368367
}
369368

370-
new Ajax.Request('../eventstream/transform_to_string_ajaxprocessor.jsp',{
369+
new Ajax.Request('../eventstream/transform_to_string_ajaxprocessor.jsp', {
371370
method: 'POST',
372371
asynchronous: false,
373372
dataType: "text",
@@ -379,18 +378,18 @@ function convertEventStreamInfoDtoToString() {
379378
payloadData: payloadData,
380379
eventStreamDescription: eventStreamDescription,
381380
eventStreamNickName: eventStreamNickName
382-
},onSuccess: function (data) {
383-
var eventStreamDefinitionString = JSON.parse(data.responseText.trim());
384-
385-
if (eventStreamDefinitionString.success.localeCompare("fail") == 0) {
386-
CARBON.showErrorDialog(eventStreamDefinitionString.message);
387-
}else {
388-
document.getElementById("streamDefinitionText").value = eventStreamDefinitionString.message;
389-
document.getElementById("designWorkArea").style.display = "none";
390-
document.getElementById("sourceWorkArea").style.display = "inline";
391-
}
381+
}, onSuccess: function (data) {
382+
var eventStreamDefinitionString = JSON.parse(data.responseText.trim());
383+
384+
if (eventStreamDefinitionString.success.localeCompare("fail") == 0) {
385+
CARBON.showErrorDialog(eventStreamDefinitionString.message);
386+
} else {
387+
document.getElementById("streamDefinitionText").value = eventStreamDefinitionString.message;
388+
document.getElementById("designWorkArea").style.display = "none";
389+
document.getElementById("sourceWorkArea").style.display = "inline";
392390
}
393-
});
391+
}
392+
});
394393

395394
}
396395

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

401400

402-
403-
new Ajax.Request('../eventstream/transform_to_dto_ajaxprocessor.jsp',{
401+
new Ajax.Request('../eventstream/transform_to_dto_ajaxprocessor.jsp', {
404402
method: 'POST',
405403
asynchronous: false,
406404
dataType: "text",
@@ -425,7 +423,6 @@ function convertStringToEventStreamInfoDto() {
425423
//var design = document.getElementById("designWorkArea");
426424

427425

428-
429426
if (0 == eventStreamDefinitionDtoJSON.message.metaAttributes.length) {
430427
var streamAttributeTable = document.getElementById("outputMetaDataTable");
431428

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

523520

524-
new Ajax.Request('../eventstream/add_event_stream_by_string_ajaxprocessor.jsp',{
521+
new Ajax.Request('../eventstream/add_event_stream_by_string_ajaxprocessor.jsp', {
525522
method: 'POST',
526523
asynchronous: false,
527524
parameters: {
528525
eventStreamDefinitionString: eventStreamDefinitionString
529-
},onSuccess: function (event) {
526+
}, onSuccess: function (event) {
530527

531528
var addStreamResposeJSON = JSON.parse(event.responseText.trim());
532529
if (addStreamResposeJSON.success.localeCompare("fail") == 0) {
533530
CARBON.showErrorDialog("Failed to add event stream, Exception: " + addStreamResposeJSON.message);
534531
} else {
535-
CARBON.showInfoDialog("Stream definition added successfully!!",function () {
532+
CARBON.showInfoDialog("Stream definition added successfully!!", function () {
536533
form.submit();
537534
});
538535
}
@@ -549,13 +546,13 @@ function editEventStreamByString(form, eventStreamId) {
549546
function () {
550547

551548
var eventStreamDefinitionString = document.getElementById("streamDefinitionText").value.trim();
552-
new Ajax.Request('../eventstream/edit_event_stream_by_string_ajaxprocessor.jsp',{
549+
new Ajax.Request('../eventstream/edit_event_stream_by_string_ajaxprocessor.jsp', {
553550
method: 'POST',
554551
asynchronous: false,
555552
parameters: {
556553
eventStreamDefinitionString: eventStreamDefinitionString,
557554
oldEventStreamId: eventStreamId
558-
},onSuccess: function (event) {
555+
}, onSuccess: function (event) {
559556

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

0 commit comments

Comments
 (0)