[
https://issues.apache.org/jira/browse/KYLIN-3061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
peng.jianhua updated KYLIN-3061:
--------------------------------
Description:
There are two bugs in this issue.
First
1. Choose one streaming table, choose the 'Streaming Cluster' tab, then click
'Edit' button, refer to [^edit_streaming_table.png]
2. The edit page will be opened, then you can edit the value of topic of 'Kafka
Setting'. As long as you modify the ID, Host, Port value, the original value
tag will follow changes, refer to [^edit_kafka_setting.png];
3. When you click 'cancel' button, you will find the old values have been
changed to the new values, and if you click the 'submit' button, you will also
find the values to be canceled will be submitted, refer to
[^cancel_is_not_right.png]
But I think the correct way should be that 'cancel' button will not change any
value.
Second
The follow code in streamingConfig.js has a bug, even if "cluster.newBroker"
object matchs the one element of "cluster.brokers" array, this "if" decision
will return false. Because even though the "cluster.newBroker" object has the
same attribute values as an element in the array, their storage addresses may
be different. The result is that you can add several same record, like
[^can_add_the_same_record.png].
{code:java}
$scope.saveNewBroker = function(cluster) {
if (cluster.brokers.indexOf(cluster.newBroker) === -1) {
......
}
}
{code}
So I have repaired these two bugs, please check the patch, thanks!
was:
There are two bugs in this issue.
First
1. Choose one streaming table, choose the 'Streaming Cluster' tab, then click
'Edit' button, refer to [^edit_streaming_table.png]
2. The edit page will be opened, then you can edit the value of topic of 'Kafka
Setting'. As long as you modify the ID, Host, Port value, the original value
tag will follow changes, refer to [^edit_kafka_setting.png];
3. When you click 'cancel' button, you will find the old values have been
changed to the new values, and if you click the 'submit' button, you will also
find the values to be canceled will be submitted, refer to
[^cancel_is_not_right.png]
But I think the correct way should be that 'cancel' button will not change any
value.
Second
The follow code in streamingConfig.js has a bug, even if "cluster.newBroker"
object matchs the one element of "cluster.brokers" array, this "if" decision
will return false. Because even though the "cluster.newBroker" object has the
same attribute values as an element in the array, their storage addresses are
different. The result is that you can add several same record, like
[^can_add_the_same_record.png].
{code:java}
$scope.saveNewBroker = function(cluster) {
if (cluster.brokers.indexOf(cluster.newBroker) === -1) {
......
}
}
{code}
So I have repaired these two bugs, please check the patch, thanks!
> When we cancel the Topic modification for 'Kafka Setting' of streaming table,
> the 'Cancel' operation will make a mistake.
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: KYLIN-3061
> URL: https://issues.apache.org/jira/browse/KYLIN-3061
> Project: Kylin
> Issue Type: Bug
> Components: Web
> Reporter: peng.jianhua
> Assignee: peng.jianhua
> Labels: patch
> Attachments: can_add_the_same_record.png, cancel_is_not_right.png,
> edit_kafka_setting.png, edit_streaming_table.png
>
>
> There are two bugs in this issue.
> First
> 1. Choose one streaming table, choose the 'Streaming Cluster' tab, then click
> 'Edit' button, refer to [^edit_streaming_table.png]
> 2. The edit page will be opened, then you can edit the value of topic of
> 'Kafka Setting'. As long as you modify the ID, Host, Port value, the original
> value tag will follow changes, refer to [^edit_kafka_setting.png];
> 3. When you click 'cancel' button, you will find the old values have been
> changed to the new values, and if you click the 'submit' button, you will
> also find the values to be canceled will be submitted, refer to
> [^cancel_is_not_right.png]
> But I think the correct way should be that 'cancel' button will not change
> any value.
> Second
> The follow code in streamingConfig.js has a bug, even if "cluster.newBroker"
> object matchs the one element of "cluster.brokers" array, this "if" decision
> will return false. Because even though the "cluster.newBroker" object has the
> same attribute values as an element in the array, their storage addresses may
> be different. The result is that you can add several same record, like
> [^can_add_the_same_record.png].
> {code:java}
> $scope.saveNewBroker = function(cluster) {
> if (cluster.brokers.indexOf(cluster.newBroker) === -1) {
> ......
> }
> }
> {code}
> So I have repaired these two bugs, please check the patch, thanks!
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)