| Summary: | Start/Stop/Restart functionality for HIPP instances | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Community | Reporter: | Denis Roy <denis.roy> | ||||
| Component: | CI-Jenkins | Assignee: | Eclipse Webmaster <webmaster> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | chris.guindon, dennis.huebner, mknauer, nathan, stepper, wayne.beaton, webmaster | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 420317, 421847, 421867, 421990 | ||||||
| Bug Blocks: | 403843 | ||||||
| Attachments: |
|
||||||
|
Description
Denis Roy
Created attachment 237247 [details]
Screenshot
Basic UI of what I'm working on. It's not pretty, but it will work.
Thanh, the current "services" text file will be moved to a database table on the Foundation database. I'll also add some UI to manipulate it, but you can also access it via SQL for automation.
First pass at what I'm working on. https://git.eclipse.org/r/#/c/18311/ Anyone want to review it? (In reply to Denis Roy from comment #3) > Chris, please see comment 2. Hi Denis, we've discussed that I am unable to replicate this on my local environment (for now) but I will do my best to review your patch with what I can see. 1. site_login/sitelogin.css You can remove the <style></style> within the css file 2. committers/bugs/bugz_manager.php, eclipse.org-common/classes/projects/hipp.class.php & eclipse.org-common/classes/projects/projectList.class.php Not critical but when using MySQL versions 4.1.3 or later it is recommended that we use the mysqli extension. The mysql extension is deprecated as of PHP 5.5.0, and will be removed in the future. http://php.net/manual/en/function.mysql-query.php http://us1.php.net/mysql_fetch_array 3. site_login/content/en_committer.php 3.1 I would move the inline css in a css style sheet. It will make your life easier if you need to fix the UI in the future. 3.2 Links with the fnToggle() needs a mouse pointer when doing a mouse over, similar to what you are doing with the .control_icon css class. 3.3 I believe you are writing a .click() function for each project and for each state. You should be able to do all of this with 1 single function. If you do that, you could add your JavaScript in a js file and make your code re-usable. For example, instead of: $("#' . $_project_short_name . '_' . $_cntl . '").click(function() You could use the same class for all of your buttons instead of an id. The project information could be stored in a html5 data- attributes. http://api.jquery.com/data/#data-html5 For example: <img id="project_xqy_stop" class="control_icon" src="//dev.eclipse.org/small_icons/actions/process-stop.png" alt="Stop" title="Stop" data-project-short-name="projectname" data-button-state="stop" data-project-id="theid_3242023" /> You could then do this with jQuery: <script> $(".control_icon").click(function() { alert($( this ).data('project-id')); alert($( this ).data('button-state')); }); </script> 4. site_login/content/en_welcomeback2.php You could use $app to add the css in <head> $App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="sitelogin.css" media="screen" />'); I hope I was not too picky. Please let me know if you have any questions.
> I hope I was not too picky. Please let me know if you have any questions.
I am definitely picky, especially regarding mysql/mysqli but wanted to do my best to help you by giving you as much feedback as I could.
Thanks, Chris. Some comments below: (In reply to Christopher Guindon from comment #4) > 1. site_login/sitelogin.css > You can remove the <style></style> within the css file Done. > > 2. committers/bugs/bugz_manager.php, > eclipse.org-common/classes/projects/hipp.class.php & > eclipse.org-common/classes/projects/projectList.class.php > > Not critical but when using MySQL versions 4.1.3 or later it is recommended > that we use the mysqli extension. > > The mysql extension is deprecated as of PHP 5.5.0, and will be removed in > the future. This is a much bigger problem. I suggest we open a bug against Community/Website since we'll have to update all of eclipse.org-common. > 3. site_login/content/en_committer.php > 3.1 I would move the inline css in a css style sheet. It will make your life > easier if you need to fix the UI in the future. Yes, absolutely. > 3.2 Links with the fnToggle() needs a mouse pointer when doing a mouse over, > similar to what you are doing with the .control_icon css class. Great catch, thanks. I've also added this to my CSS: body { overflow-y:scroll; } It eliminated the page jitter when a section is expanded and collapsed. > 3.3 I believe you are writing a .click() function for each project and for > each state. Yeah, I know there's a better way, but this is my first venture with jQuery, so please be gentle with me :) . That page will contain zero to, at most, six states for some committers, so I don't see this as being a problem now for the foreseeable future. > 4. site_login/content/en_welcomeback2.php > You could use $app to add the css in <head> > $App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" > href="sitelogin.css" media="screen" />'); Indeed. I've added the call to _projectCommon.php so that CSS will be included on all pages. > I hope I was not too picky. Please let me know if you have any questions. Picky is good. I've amended my previous commit. https://git.eclipse.org/r/#/c/18342/ At this time, Start/Stop/Restart is functional, but needs some testing to ensure the Hudson environment is sane when a HIPP instance is started & restarted this way. The tool is available from Site Login: https://dev.eclipse.org/site_login/myaccount.php Some notes: - Only Committers will see the Committer Tools (obviously) - We'll have to change/rename those Hudson instances that do not match a project name. MEXX comes to mind. - All committers on a project will see the Start/Stop/Restart functionality. I'll assume that projects will work out the usage conventions amongst themselves. - To avoid potential denial-of-service, the number of start/stop/restart requests is limited in a specific period of time. > This is a much bigger problem. I suggest we open a bug against > Community/Website since we'll have to update all of eclipse.org-common. I've opened bug 421727 for that. This is rolled out: http://dev.eclipse.org/site_login/myaccount.php That's awesome Denis. Thank you! |