On Mon, Feb 1, 2016 at 9:05 PM, Barros Pena, Belen < [email protected]> wrote:
> > > On 27/01/2016 17:20, "sujith h" <[email protected]> wrote: > > >I have updated my patch set : > > > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/toast > >er-build-cancel13 > >< > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/toas > >ter-build-cancel13> > > Hi Sujith, > > Using this branch, the 'cancel' button does no longer show for the command > line builds. I was also able to cancel the builds I start from Toaster > without issues. So this is almost there. So the only thing left to address > is the UI: > > * When I click the 'cancel' button, the build needs to go into a > 'cancelling' state that tells users their cancelling command has been > received successfully by Toaster and it's being processed. This state has > to show at least for 2 seconds. Otherwise users will not be able to > process what's going on. If the build stops before those 2 seconds, we > need to hold the state anyway for that minimum amount of time. > > * Once the cancelled build stops, the build now shows as successful. It > should show as cancelled instead, and it should not be listed in the > builds table. > > To see the behaviour you can visit > > http://www.yoctoproject.org/toaster/project-configuration.html > > Type 'minimal' in the build form in the top right area of the page. Select > core-image-minimal and click 'build'. Once the build comes up, click the > 'cancel' button. > > Also, you can see the details of the design in this document > > https://bugzilla.yoctoproject.org/attachment.cgi?id=2706 > > * We also need to fix the layout a bit (the % of tasks is too close to the > progress bar, and the 'cancel' button wraps) > > If you have any questions, let me know. > Hi Belen, on the branch http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/toaster-build-cancel13, can you apply the patch which I have attached with this mail. Let me know if my changes match close to the feedback. Thanks, Sujith H > > > > > > >This would help to hide cancel button for builds triggered from command > >line in toaster. > > > >On Tue, Jan 26, 2016 at 7:52 PM, sujith h > ><[email protected]> wrote: > > > > > > > >On Wed, Jan 20, 2016 at 10:26 PM, Brian Avery > ><[email protected]> wrote: > > > >Pointer to xmlrpc test client - > >https://bitbucket.org/srccode/xmlrpc-test-tool > > > > > > > >Today I gave a try with xmlrpc-test-tool. I tried to install php on my > >local machine, followed by apache and then configured it to get it > >working with php. Using this tool, I was getting the error as attached in > >the screenshot. > > > > > > > > > > > >-b > > > >On Mon, Jan 18, 2016 at 8:12 AM, sujith h <[email protected]> wrote: > >> > >> > >> On Mon, Jan 18, 2016 at 1:13 AM, Barros Pena, Belen > >> <[email protected]> wrote: > >>> > >>> > >>> > >>> On 13/01/2016 16:47, "sujith h" <[email protected]> wrote: > >>> > >>> > > >>> >I have updated another patch set with which I have verified with: > >>> > > >>> >a) cancellation of a normal build > >>> > > >>> >b) run again and cancel the build > >>> > > >>> >c) stop toaster + start toaster + run again and cancel the build > >>> > > >>> > >>> > > >>>> > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/to > >>>>ast > >>> >er-build-cancel12 > >>> > >>> Sorry for the delay in looking into this. Cancellation seems to be > >>>working > >>> well for me for any builds I start from Toaster. However, it doesn't > >>>seem > >>> to work for builds I start from the command line and I track through > >>> Toaster. For those builds, a 'cancel' button appears, but when I click > >>>it, > >>> nothing happens: the build proceeds until it completes. > >>> > >>> I am not even sure if the 'cancel' functionality can work for builds > >>> started from the command line, although it would be great if it did. > >>>If it > >>> is not possible to make it work, then the cancel button should not > >>>display > >>> for those builds. We can provide a message instead, as we do in the > >>>case > >>> of the 'run again' button, explaining that builds started from the > >>>command > >>> line can only be cancelled from the command line. > >> > >> > >> Somehow when i try to use the same logic to cancel the build triggered > >>from > >> command line ( with small modification in the code though), I am getting > >> error in the toaster_web.log as: > >> > >> ProtocolError: <ProtocolError for > >0.0.0.0:42952/ <http://0.0.0.0:42952/>: 503 Service Unavailable> > >> > >> Not able to understand why it is not able to connect to the port. > >>Because as > >> per my understanding when a build is triggered from toaster, we connect > >>to > >> the host:port and execute the commands. The runcommand is failing badly > >>with > >> the log: > >> > >> 2016-01-18 16:06:05,608 ERROR Internal Server Error: > >> /toastergui/project/1/builds/ > >> Traceback (most recent call last): > >> File > >> > >>"/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/cor > >>e/handlers/base.py", > >> line 132, in get_response > >> response = wrapped_callback(request, *callback_args, > >>**callback_kwargs) > >> File > >> "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", > >>line > >> 171, in returned_wrapper > >> context = view(request, *args, **kwargs) > >> File > >> "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", > >>line > >> 2896, in projectbuilds > >> bbctrl.forceShutDown() > >> File > >> > >>"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller > >>.py", > >> line 73, in forceShutDown > >> return self._runCommand(["stateForceShutdown"]) > >> File > >> > >>"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller > >>.py", > >> line 50, in _runCommand > >> result, error = self.connection.runCommand(command) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__ > >> return self.__send(self.__name, args) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request > >> verbose=self.__verbose > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request > >> return self.single_request(host, handler, request_body, verbose) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request > >> response.msg, > >> ProtocolError: <ProtocolError for > >0.0.0.0:42952/ <http://0.0.0.0:42952/>: 503 Service Unavailable> > >> Internal Server Error: /toastergui/project/1/builds/ > >> Traceback (most recent call last): > >> File > >> > >>"/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/cor > >>e/handlers/base.py", > >> line 132, in get_response > >> response = wrapped_callback(request, *callback_args, > >>**callback_kwargs) > >> File > >> "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", > >>line > >> 171, in returned_wrapper > >> context = view(request, *args, **kwargs) > >> File > >> "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", > >>line > >> 2896, in projectbuilds > >> bbctrl.forceShutDown() > >> File > >> > >>"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller > >>.py", > >> line 73, in forceShutDown > >> return self._runCommand(["stateForceShutdown"]) > >> File > >> > >>"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller > >>.py", > >> line 50, in _runCommand > >> result, error = self.connection.runCommand(command) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__ > >> return self.__send(self.__name, args) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request > >> verbose=self.__verbose > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request > >> return self.single_request(host, handler, request_body, verbose) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request > >> response.msg, > >> ProtocolError: <ProtocolError for > >0.0.0.0:42952/ <http://0.0.0.0:42952/>: 503 Service Unavailable> > >> [18/Jan/2016 16:06:05] "POST /toastergui/project/1/builds/ HTTP/1.1" 500 > >> 13414 > >> > >> > >> Any helping hand would be appreciated. More over I would also like to > >>know > >> if we can pass commands to builds triggered from command line? > >> > >> Thanks, > >> Sujith H > >> > >> -- > >> സുജിത് ഹരിദാസന് > >> Bangalore > >> <Project>Contributor to KDE project > >> > >http://fci.wikia.com/wiki/Anti-DRM-Campaign > ><http://fci.wikia.com/wiki/Anti-DRM-Campaign> > >> <Blog> http://sujithh.info > >> > > > > > >> -- > >> _______________________________________________ > >> toaster mailing list > >> [email protected] > >> > >https://lists.yoctoproject.org/listinfo/toaster > ><https://lists.yoctoproject.org/listinfo/toaster> > >> > > > > > > > > > > > > > > > > > > > > > >-- > >സുജിത് ഹരിദാസന് > >Bangalore > ><Project>Contributor to KDE project > >http://fci.wikia.com/wiki/Anti-DRM-Campaign > ><Blog> http://sujithh.info > > > > > > > > > > > > > > > > > > > > > > > >-- > >സുജിത് ഹരിദാസന് > >Bangalore > ><Project>Contributor to KDE project > >http://fci.wikia.com/wiki/Anti-DRM-Campaign > ><Blog> http://sujithh.info > > > > > > > > > > > > > > > > -- സുജിത് ഹരിദാസന് Bangalore <Project>Contributor to KDE project http://fci.wikia.com/wiki/Anti-DRM-Campaign <Blog> http://sujithh.info
From 30f588d6d2b9b6d2d81879b66cbe19aa9d7e8170 Mon Sep 17 00:00:00 2001 From: Sujith Haridasan <[email protected]> Date: Wed, 3 Feb 2016 19:04:34 +0530 Subject: [PATCH] Toaster: UI changes as per Belen UI Changes as per Belen Signed-off-by: Sujith Haridasan <[email protected]> --- bitbake/lib/toaster/orm/models.py | 2 ++ bitbake/lib/toaster/toastergui/static/js/libtoaster.js | 5 +++++ bitbake/lib/toaster/toastergui/tables.py | 7 ++++++- bitbake/lib/toaster/toastergui/templates/mrb_section.html | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 2a615a9..4d57c8d 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -351,11 +351,13 @@ class Build(models.Model): SUCCEEDED = 0 FAILED = 1 IN_PROGRESS = 2 + CANCELLED = 3 BUILD_OUTCOME = ( (SUCCEEDED, 'Succeeded'), (FAILED, 'Failed'), (IN_PROGRESS, 'In Progress'), + (CANCELLED, 'Cancelled'), ) search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"] diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index c688f79..39837b7 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js @@ -131,11 +131,16 @@ var libtoaster = (function (){ url: url, data: { 'buildCancel': build_ids }, headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, + beforeSend: function() { + $('#loading-notification').html("Build cancellation is in process. Please wait"); + }, success: function (_data) { /* No proper reponse YOCTO #7995 if (_data.error !== "ok") { console.warn(_data.error); } else {*/ + $('#loading-notification').html("Build cancellation successful"); + setTimeout(function() {}, 2000) if (onsuccess !== undefined) onsuccess(_data); //} }, diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index 48a7c7b..2af4b73 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py @@ -1272,8 +1272,13 @@ class BuildsTable(ToasterTable): bbctrl = bbcontroller.BitbakeController(br.environment) bbctrl.forceShutDown() while True: - if BuildRequest.objects.get(pk = i).build.outcome == 0: + import time + time.sleep(2) + build = BuildRequest.objects.get(pk = i).build + if build.outcome == 0: br.state = BuildRequest.REQ_DELETED + build.outcome = 3 + build.save() br.save() break except BuildRequest.DoesNotExist: diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index 68e18d1..0a389f7 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html @@ -134,6 +134,8 @@ Cancel </button> {%endif%} + {%else%} + <i class="icon-question-sign get-help heading-help pull-right" data-placement="left" title="" data-original-title="Builds in this projects cannot be cancelled from Toaster: they can only be cancelled from the command line"></i> {%endif%} {%endif%} </div> -- 1.9.1
-- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
