akiyamaneko opened a new pull request #3271:
URL: https://github.com/apache/ambari/pull/3271


   ## What changes were proposed in this pull request?
   
   After cloning an existing widget, try to  edit the cloned widget name and 
find that even if nothing is modified, the save button cannot be clicked, 
prompting that the widget name is invalid.
   
   as shows belows:
   ```javascript
   isValidWidgetName: function(value) {
    var widgetNameRegex = /^[\s0-9a-z_\-%]+$/i;
    return widgetNameRegex.test(value);
    }
    ```
   
   The automatically generated widget name ends with (Copy), but the regular 
expression of widgetname does not support parentheses, which often confuses 
users, so we  modified the default name of the cloned widget to match js 
verification.
   
   ## How was this patch tested?
   manual test works well.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to