From dzickus at redhat.com Tue May 16 20:40:29 2017 Content-Type: multipart/mixed; boundary="===============6576269912128094073==" MIME-Version: 1.0 From: Don Zickus To: beaker-devel at lists.fedorahosted.org Subject: [Beaker-devel] Re: front end help? Date: Tue, 16 May 2017 16:40:15 -0400 Message-ID: <20170516204015.4b2ggkec4wy7sviu@redhat.com> In-Reply-To: 20170516201743.jaht53mw7lpolq2l@redhat.com --===============6576269912128094073== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Tue, May 16, 2017 at 04:17:43PM -0400, Don Zickus wrote: > On Tue, May 16, 2017 at 03:26:20PM -0400, Shawn Doherty wrote: > > Hello. > > I'm trying to get my feet wet in adding some features to Beaker and run= ning > > into some hurdles. I was hoping to get some pointers please. > > = > > It would be helpful to have the ability to exclude all distros for a > > system. I have placed 2 buttons on the SystemExclude form but it is VERY > > crudely done. Part of the issue is that I'm not sure that I'm linking t= he > > util.js file correctly, When I debug in a browser I can see the util f= ile > > is available but none of my appends to it are available(setup > > build/install/restart httpd did not correct). I placed my functions in= line > > in the template but am very limited and have not been able to get arch > > variables going correctly. > > = > > Any helpful information on how I can do better with widgets in Beaker? > > Thanks, Shawn > = > = > = > Grr. I stumbled upon a similar problem where my csv_export.js file was > not being found. Turns out we have been installing things wrong and the > /usr/share/bkr/server/assets|static directory are not being updated > correctly. > = > Try this (which is a giant wrapper around 'python setup.py ...'): > = > make clean > DESTDIR=3D/ make install > = > and then check /usr/share/bkr/server/static/utils.js to see if your updat= es > passed through. Grrr Grr... Of course that updates the /usr/share/bkr/server area but neglects to copy over the changes to /usr/lib/python2.6/site-packages/beaker_server... *sigh* python setup.py install covers that case. I tried to debugging the Makefile and it seems the --root option is causing the problem. I just don't know how to read the setup.py well enough to figure out why. Cheers, Don > > = > > = > > index 9246918..3a9b65f 100644 > > --- a/Server/bkr/server/widgets.py > > +++ b/Server/bkr/server/widgets.py > > @@ -41,7 +41,7 @@ class > > AutoCompleteTextField(widgets.AutoCompleteTextField): > > = > > template=3D""" > > > > - > > + > onclick=3D'javascript:uncheckMajor()'>Exclude None > > + > > + > > + > > + > href=3D"javascript:document.${name}.submit();">Save Exclude Changes > > > > """ > > + #not seeing js link in debug > > + javascript =3D [LocalJSLink('bkr', '/static/javascript/util.js')] > > member_widgets =3D ["id", "excluded_families"] > > params =3D ['options', 'readonly'] > > params_doc =3D {} > > = > > = > > --- a/Server/bkr/server/static/javascript/util.js > > +++ b/Server/bkr/server/static/javascript/util.js > > @@ -109,3 +109,19 @@ function system_action_remote_form_request(form, > > options, action) { > > remoteRequest(form, action, null, query, options); > > return true; > > } > > + > > + > > +function checkMajorCheckboxes(){ > > + var majorDistro =3D > > document.getElementsByName("excluded_families.x86_64"); > > + for (var i =3D 0; i < majorDistro.length; i++){ > > + majorDistro[i].checked =3D true; > > + } > > +} > > + > > +function toggleMajorCheckboxes(){ > > + var majorDistro =3D > > document.getElementsByName("excluded_families.x86_64"); > > + for (var i =3D 0; i < majorDistro.length; i++){ > > + majorDistro[i].checked =3D !majorDistro[i].checked; > > + } > > +} > > + > > = > > = > > = > > -- = > > = > > Shawn Doherty > > = > > Software Engineer, Kernel-HW > > = > > Red Hat > > = > > > > = > > 314 Littleton Rd > > = > > Westford, MA 01886 > > = > > sdoherty(a)redhat.com T: 19785891080 INTERNAL:-8131080 IM: sdohe= rty > > > = > > _______________________________________________ > > Beaker-devel mailing list -- beaker-devel(a)lists.fedorahosted.org > > To unsubscribe send an email to beaker-devel-leave(a)lists.fedorahosted= .org >=20 --===============6576269912128094073==--