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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.7.3
    • None
    • ambari-web
    • 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
          huangkunlun

        Issue Links

          Activity

            People

              Unassigned Unassigned
              echohlne huangkunlun
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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