[Kimchi-devel] [PATCH v2] UI changes to allow underscore in debug report name.

Christy Perez christy at linux.vnet.ibm.com
Wed Jun 25 15:30:44 UTC 2014


On Wed, 2014-06-25 at 07:52 +0800, Sheldon wrote:
> Just a minor inline comment below
> 
> On 06/25/2014 03:00 AM, Christy Perez wrote:
> > index 43484f5..f64b879 100644
> > --- a/ui/js/src/kimchi.report_add_main.js
> > +++ b/ui/js/src/kimchi.report_add_main.js
> > @@ -41,7 +41,7 @@ kimchi.report_add_main = function() {
> >               return false;
> >           }
> >           var reportName = nameTextbox.val();
> > -        var validator = RegExp("^[A-Za-z0-9-]*$");
> > +        var validator = RegExp("^[_A-Za-z0-9-]*$");
> 
> What about other characters? dose kimchi allow non ascii characters?
> it means do we allow Chinese name "我的报告"?
I just tried running sosreport with 我的报告, and it seemed to work
okay, except that it just omits them from the report name. I answered
"我 的报告 as my name just to get those characters into the name, but
then the report was just
named  /var/tmp/sosreport-default.1234-20140625095653.tar.xz. 
If I tried a mix of non-ascii and ascii, it used the ascii ones, but
dropped the others.

> 
> but a pure word and underscore is OK for me.
> here you can use "w" for RE.
> [-w] means [_A-Za-z0-9-].
Yah, I thought about changing that too, but I was being very
conservative and making the tiniest change that would get me my desired
result. I can resubmit if people think it's important.

> also here you allow the report name is empty, Does that means let kimchi 
> generate a name for the report?
Yes, it does.
> 
> >           if (!validator.test(reportName)) {
> >               kimchi.message.error.code('KCHDR6011M');
> >               return false;
> 
> 

Thanks for the comments!

- Christy




More information about the Kimchi-devel mailing list