All of lore.kernel.org
 help / color / mirror / Atom feed
* [review-request][PATCH] bitbake: toaster: Add machine selection notification
@ 2015-02-23 14:28 Michael Wood
  2015-02-23 16:33 ` [PATCH V2] " Michael Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Wood @ 2015-02-23 14:28 UTC (permalink / raw)
  To: toaster

This adds a notification to the project page to notify users of the
change in project configuration.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
---
 bitbake/lib/toaster/toastergui/static/css/default.css    |  6 ++++++
 bitbake/lib/toaster/toastergui/static/js/layerdetails.js |  2 +-
 bitbake/lib/toaster/toastergui/static/js/machines.js     |  3 +--
 bitbake/lib/toaster/toastergui/static/js/projectapp.js   | 11 ++++++++++-
 4 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css
index 86cf67a..2c9b1aa 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -236,4 +236,10 @@ div.add-deps { margin-top: 15px; }
 .animate-repeat.ng-enter.ng-enter-active {
   opacity:1;
 }
+
+@keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% { background-color: #D9EDF7; } 100% { background-color: white; } }
+@-webkit-keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% { background-color: #D9EDF7; } 100% { background-color: white; } }
+
+.machines-highlight { -webkit-animation: machines-fade 7s 1; -moz-animation: machines-fade 7s 1; animation: machines-fade 7s 1; }
+
 .tab-pane table { margin-top: 10px; }
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index 2e713d5..22c40d9 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -133,7 +133,7 @@ function layerDetailsPageInit (ctx) {
     var data =  { machineName : $(this).data('machine-name') };
     libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
       function (){
-        window.location.replace(ctx.projectPageUrl);
+        window.location.replace(ctx.projectPageUrl+"#/machineselected");
     }, null);
   });
 
diff --git a/bitbake/lib/toaster/toastergui/static/js/machines.js b/bitbake/lib/toaster/toastergui/static/js/machines.js
index ee8c980..973a037 100644
--- a/bitbake/lib/toaster/toastergui/static/js/machines.js
+++ b/bitbake/lib/toaster/toastergui/static/js/machines.js
@@ -77,7 +77,6 @@ function machinesPageInit (ctx) {
           show_layer_deps_modal(ctx.projectId, layer, data.list, null, null, true, function () {
             /* Success add deps and layer */
             setLayerInCurrentPrj(btn, data.list);
-            console.log ("TODO SUCCESS");
           });
         }
       }, null);
@@ -87,7 +86,7 @@ function machinesPageInit (ctx) {
     var data =  { machineName : $(this).data('machine-name') };
     libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
       function (){
-        window.location.replace(ctx.projectPageUrl);
+        window.location.replace(ctx.projectPageUrl+"#/machineselected");
     }, null);
   });
 
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
index 4d00f40..7f75c57 100644
--- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js
+++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
@@ -566,7 +566,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
 
         switch(elementid) {
             case '#select-machine':
-                alertText = "You have changed the machine to: <strong>" + $scope.machineName + "</strong>";
+                alertText = "You have changed the machine to: <strong>" + $scope.machine + "</strong>";
                 alertZone = $scope.zone2alerts;
                 data['machineName'] = $scope.machineName;
                 break;
@@ -665,6 +665,15 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
                     "\">select targets</a> you want to build.", "alert-success");
         });
 
+        _cmdExecuteWithParam("/machineselected", function () {
+            $scope.displayAlert($scope.zone2alerts, "You have changed the machine to: <strong>" + $scope.machine.name + "</strong>", "alert-info");
+            var machineDistro = angular.element("#machine-distro");
+
+            angular.element("html, body").animate({ scrollTop: machineDistro.position().top }, 700).promise().done(function() {
+              $animate.addClass(machineDistro, "machines-highlight");
+            });
+        });
+
         _cmdExecuteWithParam("/layerimported", function (layer) {
           var imported = $cookieStore.get("layer-imported-alert");
           var text;
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH V2] bitbake: toaster: Add machine selection notification
  2015-02-23 14:28 [review-request][PATCH] bitbake: toaster: Add machine selection notification Michael Wood
@ 2015-02-23 16:33 ` Michael Wood
  2015-02-23 18:21   ` Barros Pena, Belen
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Wood @ 2015-02-23 16:33 UTC (permalink / raw)
  To: toaster

This adds a notification to the project page to notify users of the
change in project configuration.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
---
 bitbake/lib/toaster/toastergui/static/css/default.css    | 6 ++++++
 bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 2 +-
 bitbake/lib/toaster/toastergui/static/js/machines.js     | 3 +--
 bitbake/lib/toaster/toastergui/static/js/projectapp.js   | 9 +++++++++
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css
index 86cf67a..2c9b1aa 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -236,4 +236,10 @@ div.add-deps { margin-top: 15px; }
 .animate-repeat.ng-enter.ng-enter-active {
   opacity:1;
 }
+
+@keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% { background-color: #D9EDF7; } 100% { background-color: white; } }
+@-webkit-keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% { background-color: #D9EDF7; } 100% { background-color: white; } }
+
+.machines-highlight { -webkit-animation: machines-fade 7s 1; -moz-animation: machines-fade 7s 1; animation: machines-fade 7s 1; }
+
 .tab-pane table { margin-top: 10px; }
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index 2e713d5..22c40d9 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -133,7 +133,7 @@ function layerDetailsPageInit (ctx) {
     var data =  { machineName : $(this).data('machine-name') };
     libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
       function (){
-        window.location.replace(ctx.projectPageUrl);
+        window.location.replace(ctx.projectPageUrl+"#/machineselected");
     }, null);
   });
 
diff --git a/bitbake/lib/toaster/toastergui/static/js/machines.js b/bitbake/lib/toaster/toastergui/static/js/machines.js
index ee8c980..973a037 100644
--- a/bitbake/lib/toaster/toastergui/static/js/machines.js
+++ b/bitbake/lib/toaster/toastergui/static/js/machines.js
@@ -77,7 +77,6 @@ function machinesPageInit (ctx) {
           show_layer_deps_modal(ctx.projectId, layer, data.list, null, null, true, function () {
             /* Success add deps and layer */
             setLayerInCurrentPrj(btn, data.list);
-            console.log ("TODO SUCCESS");
           });
         }
       }, null);
@@ -87,7 +86,7 @@ function machinesPageInit (ctx) {
     var data =  { machineName : $(this).data('machine-name') };
     libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
       function (){
-        window.location.replace(ctx.projectPageUrl);
+        window.location.replace(ctx.projectPageUrl+"#/machineselected");
     }, null);
   });
 
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
index 4d00f40..df811fb 100644
--- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js
+++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
@@ -665,6 +665,15 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
                     "\">select targets</a> you want to build.", "alert-success");
         });
 
+        _cmdExecuteWithParam("/machineselected", function () {
+            $scope.displayAlert($scope.zone2alerts, "You have changed the machine to: <strong>" + $scope.machine.name + "</strong>", "alert-info");
+            var machineDistro = angular.element("#machine-distro");
+
+            angular.element("html, body").animate({ scrollTop: machineDistro.position().top }, 700).promise().done(function() {
+              $animate.addClass(machineDistro, "machines-highlight");
+            });
+        });
+
         _cmdExecuteWithParam("/layerimported", function (layer) {
           var imported = $cookieStore.get("layer-imported-alert");
           var text;
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] bitbake: toaster: Add machine selection notification
  2015-02-23 16:33 ` [PATCH V2] " Michael Wood
@ 2015-02-23 18:21   ` Barros Pena, Belen
  2015-02-24 16:39     ` Damian, Alexandru
  0 siblings, 1 reply; 4+ messages in thread
From: Barros Pena, Belen @ 2015-02-23 18:21 UTC (permalink / raw)
  To: Wood, Michael G, toaster

Looks good to me now.

Thanks!

Belén

On 23/02/2015 16:33, "Michael Wood" <michael.g.wood@intel.com> wrote:

>This adds a notification to the project page to notify users of the
>change in project configuration.
>
>Signed-off-by: Michael Wood <michael.g.wood@intel.com>
>---
> bitbake/lib/toaster/toastergui/static/css/default.css    | 6 ++++++
> bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 2 +-
> bitbake/lib/toaster/toastergui/static/js/machines.js     | 3 +--
> bitbake/lib/toaster/toastergui/static/js/projectapp.js   | 9 +++++++++
> 4 files changed, 17 insertions(+), 3 deletions(-)
>
>diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css
>b/bitbake/lib/toaster/toastergui/static/css/default.css
>index 86cf67a..2c9b1aa 100644
>--- a/bitbake/lib/toaster/toastergui/static/css/default.css
>+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
>@@ -236,4 +236,10 @@ div.add-deps { margin-top: 15px; }
> .animate-repeat.ng-enter.ng-enter-active {
>   opacity:1;
> }
>+
>+@keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% {
>background-color: #D9EDF7; } 100% { background-color: white; } }
>+@-webkit-keyframes machines-fade { 0% { background-color: #D9EDF7; } 25%
>{ background-color: #D9EDF7; } 100% { background-color: white; } }
>+
>+.machines-highlight { -webkit-animation: machines-fade 7s 1;
>-moz-animation: machines-fade 7s 1; animation: machines-fade 7s 1; }
>+
> .tab-pane table { margin-top: 10px; }
>diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
>b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
>index 2e713d5..22c40d9 100644
>--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
>+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
>@@ -133,7 +133,7 @@ function layerDetailsPageInit (ctx) {
>     var data =  { machineName : $(this).data('machine-name') };
>     libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
>       function (){
>-        window.location.replace(ctx.projectPageUrl);
>+        window.location.replace(ctx.projectPageUrl+"#/machineselected");
>     }, null);
>   });
> 
>diff --git a/bitbake/lib/toaster/toastergui/static/js/machines.js
>b/bitbake/lib/toaster/toastergui/static/js/machines.js
>index ee8c980..973a037 100644
>--- a/bitbake/lib/toaster/toastergui/static/js/machines.js
>+++ b/bitbake/lib/toaster/toastergui/static/js/machines.js
>@@ -77,7 +77,6 @@ function machinesPageInit (ctx) {
>           show_layer_deps_modal(ctx.projectId, layer, data.list, null,
>null, true, function () {
>             /* Success add deps and layer */
>             setLayerInCurrentPrj(btn, data.list);
>-            console.log ("TODO SUCCESS");
>           });
>         }
>       }, null);
>@@ -87,7 +86,7 @@ function machinesPageInit (ctx) {
>     var data =  { machineName : $(this).data('machine-name') };
>     libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
>       function (){
>-        window.location.replace(ctx.projectPageUrl);
>+        window.location.replace(ctx.projectPageUrl+"#/machineselected");
>     }, null);
>   });
> 
>diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js
>b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
>index 4d00f40..df811fb 100644
>--- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js
>+++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
>@@ -665,6 +665,15 @@ projectApp.controller('prjCtrl', function($scope,
>$modal, $http, $interval, $loc
>                     "\">select targets</a> you want to build.",
>"alert-success");
>         });
> 
>+        _cmdExecuteWithParam("/machineselected", function () {
>+            $scope.displayAlert($scope.zone2alerts, "You have changed
>the machine to: <strong>" + $scope.machine.name + "</strong>",
>"alert-info");
>+            var machineDistro = angular.element("#machine-distro");
>+
>+            angular.element("html, body").animate({ scrollTop:
>machineDistro.position().top }, 700).promise().done(function() {
>+              $animate.addClass(machineDistro, "machines-highlight");
>+            });
>+        });
>+
>         _cmdExecuteWithParam("/layerimported", function (layer) {
>           var imported = $cookieStore.get("layer-imported-alert");
>           var text;
>-- 
>2.1.0
>
>-- 
>_______________________________________________
>toaster mailing list
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] bitbake: toaster: Add machine selection notification
  2015-02-23 18:21   ` Barros Pena, Belen
@ 2015-02-24 16:39     ` Damian, Alexandru
  0 siblings, 0 replies; 4+ messages in thread
From: Damian, Alexandru @ 2015-02-24 16:39 UTC (permalink / raw)
  To: Barros Pena, Belen; +Cc: toaster

[-- Attachment #1: Type: text/plain, Size: 5131 bytes --]

Taken for submission,

Thank you,
Alex

On Mon, Feb 23, 2015 at 6:21 PM, Barros Pena, Belen <
belen.barros.pena@intel.com> wrote:

> Looks good to me now.
>
> Thanks!
>
> Belén
>
> On 23/02/2015 16:33, "Michael Wood" <michael.g.wood@intel.com> wrote:
>
> >This adds a notification to the project page to notify users of the
> >change in project configuration.
> >
> >Signed-off-by: Michael Wood <michael.g.wood@intel.com>
> >---
> > bitbake/lib/toaster/toastergui/static/css/default.css    | 6 ++++++
> > bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 2 +-
> > bitbake/lib/toaster/toastergui/static/js/machines.js     | 3 +--
> > bitbake/lib/toaster/toastergui/static/js/projectapp.js   | 9 +++++++++
> > 4 files changed, 17 insertions(+), 3 deletions(-)
> >
> >diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css
> >b/bitbake/lib/toaster/toastergui/static/css/default.css
> >index 86cf67a..2c9b1aa 100644
> >--- a/bitbake/lib/toaster/toastergui/static/css/default.css
> >+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
> >@@ -236,4 +236,10 @@ div.add-deps { margin-top: 15px; }
> > .animate-repeat.ng-enter.ng-enter-active {
> >   opacity:1;
> > }
> >+
> >+@keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% {
> >background-color: #D9EDF7; } 100% { background-color: white; } }
> >+@-webkit-keyframes machines-fade { 0% { background-color: #D9EDF7; } 25%
> >{ background-color: #D9EDF7; } 100% { background-color: white; } }
> >+
> >+.machines-highlight { -webkit-animation: machines-fade 7s 1;
> >-moz-animation: machines-fade 7s 1; animation: machines-fade 7s 1; }
> >+
> > .tab-pane table { margin-top: 10px; }
> >diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
> >b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
> >index 2e713d5..22c40d9 100644
> >--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
> >+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
> >@@ -133,7 +133,7 @@ function layerDetailsPageInit (ctx) {
> >     var data =  { machineName : $(this).data('machine-name') };
> >     libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
> >       function (){
> >-        window.location.replace(ctx.projectPageUrl);
> >+        window.location.replace(ctx.projectPageUrl+"#/machineselected");
> >     }, null);
> >   });
> >
> >diff --git a/bitbake/lib/toaster/toastergui/static/js/machines.js
> >b/bitbake/lib/toaster/toastergui/static/js/machines.js
> >index ee8c980..973a037 100644
> >--- a/bitbake/lib/toaster/toastergui/static/js/machines.js
> >+++ b/bitbake/lib/toaster/toastergui/static/js/machines.js
> >@@ -77,7 +77,6 @@ function machinesPageInit (ctx) {
> >           show_layer_deps_modal(ctx.projectId, layer, data.list, null,
> >null, true, function () {
> >             /* Success add deps and layer */
> >             setLayerInCurrentPrj(btn, data.list);
> >-            console.log ("TODO SUCCESS");
> >           });
> >         }
> >       }, null);
> >@@ -87,7 +86,7 @@ function machinesPageInit (ctx) {
> >     var data =  { machineName : $(this).data('machine-name') };
> >     libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
> >       function (){
> >-        window.location.replace(ctx.projectPageUrl);
> >+        window.location.replace(ctx.projectPageUrl+"#/machineselected");
> >     }, null);
> >   });
> >
> >diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js
> >b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
> >index 4d00f40..df811fb 100644
> >--- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js
> >+++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
> >@@ -665,6 +665,15 @@ projectApp.controller('prjCtrl', function($scope,
> >$modal, $http, $interval, $loc
> >                     "\">select targets</a> you want to build.",
> >"alert-success");
> >         });
> >
> >+        _cmdExecuteWithParam("/machineselected", function () {
> >+            $scope.displayAlert($scope.zone2alerts, "You have changed
> >the machine to: <strong>" + $scope.machine.name + "</strong>",
> >"alert-info");
> >+            var machineDistro = angular.element("#machine-distro");
> >+
> >+            angular.element("html, body").animate({ scrollTop:
> >machineDistro.position().top }, 700).promise().done(function() {
> >+              $animate.addClass(machineDistro, "machines-highlight");
> >+            });
> >+        });
> >+
> >         _cmdExecuteWithParam("/layerimported", function (layer) {
> >           var imported = $cookieStore.get("layer-imported-alert");
> >           var text;
> >--
> >2.1.0
> >
> >--
> >_______________________________________________
> >toaster mailing list
> >toaster@yoctoproject.org
> >https://lists.yoctoproject.org/listinfo/toaster
>
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>



-- 
Alex Damian
Yocto Project
SSG / OTC

[-- Attachment #2: Type: text/html, Size: 7107 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-24 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 14:28 [review-request][PATCH] bitbake: toaster: Add machine selection notification Michael Wood
2015-02-23 16:33 ` [PATCH V2] " Michael Wood
2015-02-23 18:21   ` Barros Pena, Belen
2015-02-24 16:39     ` Damian, Alexandru

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.