eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EAGLE-851) Add validation for policy name
Date Mon, 09 Jan 2017 03:19:58 GMT

    [ https://issues.apache.org/jira/browse/EAGLE-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15810531#comment-15810531
] 

ASF GitHub Bot commented on EAGLE-851:
--------------------------------------

Github user r7raul1984 commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/765#discussion_r95098855
  
    --- Diff: eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js ---
    @@ -304,6 +304,15 @@
     			return false;
     		};
     
    +
    +		$scope.checkPolicyName = function () {
    +			if($scope.policy.name.length > 50) {
    +				return "length should less than 50";
    +			}
    +			return false;
    --- End diff --
    
    Yes,I agree with you.But I see checkPublisherName return false. So I consistent with checkPublisherName
 method. 


> Add validation for policy name
> ------------------------------
>
>                 Key: EAGLE-851
>                 URL: https://issues.apache.org/jira/browse/EAGLE-851
>             Project: Eagle
>          Issue Type: Bug
>          Components: Web UI
>            Reporter: JiJun Tang
>            Assignee: JiJun Tang
>            Priority: Minor
>             Fix For: v0.5.0
>
>
> Long policyId will cause exception like below:
> {noformat}
> ERROR [2017-01-09 01:07:35,547] org.apache.eagle.alert.metadata.impl.JdbcMetadataHandler:
Error to add publishments to policy xxx_topologyHealthCheckApp_nodeManagerStatusNotRunning
> ! com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'policyId'
at row 1
> ! at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3885) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1773)
~[mysql-connector-java-5.1.34.jar:5.1.34]
> {noformat}
> We should check the length of policyId before insert into the table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message