Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25600

The default widget name generated by the clone-widget is incorrect

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.7.3
    • Fix Version/s: None
    • Component/s: ambari-web
    • Labels:
      None

      Description

      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:

      //代码占位符
      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.

        Attachments

        1. cloned widget.png
          46 kB
          akiyamaneko

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              echohlne akiyamaneko

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m

                  Issue deployment