Skip to contentSkip to conversation

Fixes for buildbot 4.2

PATCH New Mathieu Dubois-Briand 1 participant 5 messages Feb 5, 2025

lore
Share & tools
lore
#0 lore raw

cover Fixes for buildbot 4.2

This series add various fixes for buildbot 4.2, both in buildbot configuration and in the console view plugin.

Most of the modifications are in this plugin: buildbot switched from angular JS to react JS, so this plugin has to be rewritten almost from scratch.

As I am not really a JS developer, I would be happy to get any feedback on these modifications, especially on release selector where my changes do look a bit overcomplicated.

---
Mathieu Dubois-Briand (4):
builders: Fix configuration for buildbot 4
yocto_console_view: import console_view plugin from buildbot
yocto_console_view: create our own console
yocto_console_view: Add release selector

 builders.py                                        |    2 +-
 steps/writelayerinfo.py                            |    2 +-
 yocto_console_view/README.txt                      |   17 -
 yocto_console_view/package.json                    |   78 +-
 yocto_console_view/setup.py                        |   16 +-
 yocto_console_view/src/index.ts                    |   19 +
 .../src/module/builders.fixture.json               |    1 -
 yocto_console_view/src/module/console.tpl.jade     |   39 -
 yocto_console_view/src/module/main.module.js       |  496 ------
 yocto_console_view/src/module/main.module.spec.js  |  228 ---
 .../src/module/releaseselectorfield.directive.js   |   68 -
 .../src/module/releaseselectorfield.tpl.jade       |    5 -
 .../src/module/view/modal/modal.controller.js      |   22 -
 .../src/module/view/modal/modal.style.less         |    9 -
 .../src/module/view/modal/modal.tpl.jade           |    6 -
 .../src/module/yoctochangedetails.directive.js     |   21 -
 .../src/module/yoctochangedetails.tpl.jade         |   42 -
 yocto_console_view/src/releaseselectorfield.ts     |  152 ++
 yocto_console_view/src/styles/styles.less          |   89 -
 .../src/views/ConsoleView/ConsoleView.scss         |   49 +
 .../src/views/ConsoleView/ConsoleView.test.ts      |   97 ++
 .../src/views/ConsoleView/ConsoleView.tsx          |  498 ++++++
 .../src/views/ConsoleView/YoctoChangeDetails.scss  |   18 +
 .../src/views/ConsoleView/YoctoChangeDetails.tsx   |  149 ++
 yocto_console_view/test/main.coffee                |    2 -
 yocto_console_view/tsconfig.json                   |   27 +
 yocto_console_view/vite.config.ts                  |   64 +
 yocto_console_view/webpack.config.js               |   26 -
 yocto_console_view/yarn.lock                       | 1755 ++++++++++++++++++++
 yocto_console_view/yocto_console_view/VERSION      |    1 -
 yocto_console_view/yocto_console_view/__init__.py  |   16 +-
 .../yocto_console_view/static/scripts.js           |    2 -
 .../yocto_console_view/static/scripts.js.map       |    1 -
 .../yocto_console_view/static/styles.css           |   79 -
 .../yocto_console_view/static/styles.css.map       |    1 -
 35 files changed, 2908 insertions(+), 1189 deletions(-)

---
base-commit: 8f6709cf0fad448ea87d80b50cd2ae375e5066b2
change-id: 20250205-mathieu-console_view_upgrade-d65f3186c231

Best regards,

Signature · 1 line
Mathieu Dubois-Briand <[email protected]>
#1 lore raw

PATCH 1/4 builders: Fix configuration for buildbot 4

---
 builders.py             | 2 +-
 steps/writelayerinfo.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
builders.py +1 -1
index 4f2bf00e5387..14ea1df1192e 100644
@@ -231,7 +231,7 @@ def prioritizeBuilders(master, builders):
                 time = time - builder_bonuses[bldr.name]
                 #log.msg("Adding %s so %s" % (str(builder_bonuses[bldr.name]), str(time)))
 
-        defer.returnValue((time, bldr))
+        return (time, bldr)
 
     transformed = yield defer.gatherResults(
         [transform(bldr) for bldr in builders])
steps/writelayerinfo.py +1 -1
index d2c196f2174a..a0669bd10df4 100644
@@ -41,7 +41,7 @@ class WriteLayerInfo(buildstep.ShellMixin, buildstep.BuildStep):
         cmd = yield self.makeRemoteShellCommand(
             command=writerepos)
         yield self.runCommand(cmd)
-        defer.returnValue(cmd.results())
+        return cmd.results()
 
 
 @defer.inlineCallbacks
Signature · 1 line
2.39.5
#2 lore raw

PATCH 2/4 yocto_console_view: import console_view plugin from buildbot

In reply to Mathieu Dubois-Briand

Plugin changed a lot with the buildbot transition from angularjs to
reactjs: start our own plugin customisation from scratch.

This commit only copies sources from buildboot git, without any modification.

---
 yocto_console_view/README.txt                      |   17 -
 .../__init__.py                                    |    9 +-
 yocto_console_view/package.json                    |   78 +-
 yocto_console_view/setup.py                        |   26 +-
 yocto_console_view/src/index.ts                    |   18 +
 .../src/module/builders.fixture.json               |    1 -
 yocto_console_view/src/module/console.tpl.jade     |   39 -
 yocto_console_view/src/module/main.module.js       |  496 ------
 yocto_console_view/src/module/main.module.spec.js  |  228 ---
 .../src/module/releaseselectorfield.directive.js   |   68 -
 .../src/module/releaseselectorfield.tpl.jade       |    5 -
 .../src/module/view/modal/modal.controller.js      |   22 -
 .../src/module/view/modal/modal.style.less         |    9 -
 .../src/module/view/modal/modal.tpl.jade           |    6 -
 .../src/module/yoctochangedetails.directive.js     |   21 -
 .../src/module/yoctochangedetails.tpl.jade         |   42 -
 yocto_console_view/src/styles/styles.less          |   89 -
 .../src/views/ConsoleView/ConsoleView.scss         |   38 +
 .../src/views/ConsoleView/ConsoleView.test.ts      |   97 ++
 .../src/views/ConsoleView/ConsoleView.tsx          |  541 ++++++
 yocto_console_view/test/main.coffee                |    2 -
 yocto_console_view/tsconfig.json                   |   27 +
 yocto_console_view/vite.config.ts                  |   64 +
 yocto_console_view/webpack.config.js               |   26 -
 yocto_console_view/yarn.lock                       | 1755 ++++++++++++++++++++
 yocto_console_view/yocto_console_view/VERSION      |    1 -
 .../yocto_console_view/static/scripts.js           |    2 -
 .../yocto_console_view/static/scripts.js.map       |    1 -
 .../yocto_console_view/static/styles.css           |   79 -
 .../yocto_console_view/static/styles.css.map       |    1 -
 30 files changed, 2611 insertions(+), 1197 deletions(-)
yocto_console_view/README.txt deleted +0 -17
deleted file mode 100644
index 9edac1fd595f..000000000000
@@ -1,17 +0,0 @@
-This custom buildbot plugin does three things:
-
-* Replaces the "Console View" with our own "Yocto Console View"
-* Adds a yoctochangedetails element to customise the information we display about a build
-  (link to the code repository, link to error reporting for the build)
-* Add a custom field element, ReleaseSelector to the force build scheduler allowing 
-  us to customise the form input fields to allow auto population of fields for 
-  specific release branch combinations
-
-The plugin ships in compiled form along with its source code. The generated files are:
-
-yocto_console_view/static/*
-yocto_console_view/VERSION
-
-In order to build this plugin you need a buildbot development environment setup along
-with its dependencies. FIXME, add more info on building.
-
yocto_console_view/buildbot_console_view/__init__.py renamed from yocto_console_view/yocto_console_view/__init__.py +1 -8
similarity index 76%
rename from yocto_console_view/yocto_console_view/__init__.py
rename to yocto_console_view/buildbot_console_view/__init__.py
index 5b1412e4cbfc..b776b9b2ae02 100644
@@ -14,13 +14,6 @@
 # Copyright Buildbot Team Members
 
 from buildbot.www.plugin import Application
-from buildbot.schedulers.forcesched import ChoiceStringParameter
 
 # create the interface for the setuptools entry point
-ep = Application(__name__, "Buildbot Console View UI")
-
-class ReleaseSelector(ChoiceStringParameter):
-
-    spec_attributes = ["selectors"]
-    type = "releaseselector"
-    selectors = None
\ No newline at end of file
+ep = Application(__package__, "Buildbot Console View plugin")
yocto_console_view/package.json +55 -23

80 lines not on this page · raw message

yocto_console_view/setup.py +15 -11
index 363469f9fa55..02e44dc41216 100644
@@ -19,27 +19,31 @@ try:
     from buildbot_pkg import setup_www_plugin
 except ImportError:
     import sys
-    print("Please install buildbot_pkg module in order to install that package, or use the pre-build .whl modules available on pypi", file=sys.stderr)
+
+    print(
+        'Please install buildbot_pkg module in order to install that '
+        'package, or use the pre-build .whl modules available on pypi',
+        file=sys.stderr,
+    )
     sys.exit(1)
 
 setup_www_plugin(
-    name='yocto-console-view',
-    description='Yocto Project Console View plugin.',
-    author=u'Richard Purdie',
-    author_email=u'[email protected]',
-    url='http://autobuilder.yoctoproject.org/',
-    packages=['yocto_console_view'],
+    name='buildbot-console-view',
+    description='Buildbot Console View plugin',
+    author='Pierre Tardy',
+    author_email='[email protected]',
+    url='http://buildbot.net/',
+    packages=['buildbot_console_view'],
     package_data={
         '': [
             'VERSION',
-            'static/*'
+            'static/*',
+            'static/assets/*',
         ]
     },
     entry_points="""
         [buildbot.www]
         console_view = yocto_console_view:ep
     """,
-    classifiers=[
-        'License :: OSI Approved :: GNU General Public License v2 (GPLv2)'
-    ],
+    classifiers=['License :: OSI Approved :: GNU General Public License v2 (GPLv2)'],
 )
yocto_console_view/src/index.ts new file +18 -0
new file mode 100644
index 000000000000..fa0781c88e9a
@@ -0,0 +1,18 @@
+/*
+  This file is part of Buildbot.  Buildbot is free software: you can
+  redistribute it and/or modify it under the terms of the GNU General Public
+  License as published by the Free Software Foundation, version 2.
+
+  This program is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+  details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc., 51
+  Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+  Copyright Buildbot Team Members
+*/
+
+import './views/ConsoleView/ConsoleView';
yocto_console_view/src/module/builders.fixture.json deleted +0 -1
deleted file mode 100644
index c5a7c6270c35..000000000000
@@ -1 +0,0 @@
-{"builders":[{"builderid":1,"description":null,"masterids":[1],"name":"buildbot-job","tags":["job","buildbot"]},{"builderid":2,"description":null,"masterids":[1],"name":"buildbot","tags":["buildbot","trunk"]},{"builderid":3,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:pylint TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TESTS:pylint","TWISTED:latest","python:2.7"]},{"builderid":4,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:flake8 TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","python:2.7","TESTS:flake8"]},{"builderid":5,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:isort TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","python:2.7","TESTS:isort"]},{"builderid":6,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:docs TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest"

,"TWISTED:latest","python:2.7","TESTS:docs"]},{"builderid":7,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:coverage TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","python:2.7","TESTS:coverage"]},{"builderid":8,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:js TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","python:2.7","TESTS:js"]},{"builderid":9,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:smokes TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","python:2.7","TESTS:smokes"]},{"builderid":10,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial TWISTED:14.0.2 python:2.7","tags":["buildbot","SQLALCHEMY:latest","python:2.7","TESTS:trial","TWISTED:14.0.2"]},{"builderid":11,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial TWISTED:15.4.0 pyth on:2.7","tags":["buildbot","SQLALCHEMY:latest","python:2.7","TESTS:trial","TWISTED:15.4.0"]},{"builderid":12,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","python:2.7","TESTS:trial"]},{"builderid":13,"description":null,"masterids":[],"name":"buildbot DB_TYPE:sqlite SQLALCHEMY:latest TESTS:trial TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","python:2.7","TESTS:trial","DB_TYPE:sqlite"]},{"builderid":14,"description":null,"masterids":[],"name":"buildbot DB_TYPE:mysql SQLALCHEMY:latest TESTS:trial TWISTED:latest python:2.7","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","python:2.7","TESTS:trial","DB_TYPE:mysql"]},{"builderid":15,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:0.8.0 TESTS:trial TWISTED:15.5.0 python:2.7","tags":["buildbot","python:2.7","TESTS:trial","SQLALCHEMY:0.8.0","TWISTED:15.5.0"]},{"builde rid":16,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial TWISTED:15.5.0 python:2.7","tags":["buildbot","SQLALCHEMY:latest","python:2.7","TESTS:trial","TWISTED:15.5.0"]},{"builderid":17,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial_worker TWISTED:10.2.0 python:2.7","tags":["buildbot","SQLALCHEMY:latest","python:2.7","TESTS:trial_worker","TWISTED:10.2.0"]},{"builderid":18,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial_worker TWISTED:11.1.0 python:2.7","tags":["buildbot","SQLALCHEMY:latest","python:2.7","TESTS:trial_worker","TWISTED:11.1.0"]},{"builderid":19,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial_worker TWISTED:12.2.0 python:2.7","tags":["buildbot","SQLALCHEMY:latest","python:2.7","TESTS:trial_worker","TWISTED:12.2.0"]},{"builderid":20,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial_worker TWISTED:13.2.0 python:2 .7","tags":["buildbot","SQLALCHEMY:latest","python:2.7","TESTS:trial_worker","TWISTED:13.2.0"]},{"builderid":21,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial_worker TWISTED:14.0.2 python:2.6","tags":["buildbot","SQLALCHEMY:latest","TWISTED:14.0.2","TESTS:trial_worker","python:2.6"]},{"builderid":22,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial_worker TWISTED:15.4.0 python:2.6","tags":["buildbot","SQLALCHEMY:latest","TWISTED:15.4.0","TESTS:trial_worker","python:2.6"]},{"builderid":23,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:coverage TWISTED:trunk python:3.5","tags":["buildbot","SQLALCHEMY:latest","TESTS:coverage","TWISTED:trunk","python:3.5"]},{"builderid":24,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:flake8 TWISTED:trunk python:3.5","tags":["buildbot","SQLALCHEMY:latest","TESTS:flake8","TWISTED:trunk","python:3.5"]},{"builderid":25,"description":nul l,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:smokes TWISTED:latest python:3.5","tags":["buildbot","SQLALCHEMY:latest","TWISTED:latest","TESTS:smokes","python:3.5"]},{"builderid":26,"description":null,"masterids":[],"name":"buildbot SQLALCHEMY:latest TESTS:trial TWISTED:trunk python:3.6","tags":["buildbot","SQLALCHEMY:latest","TESTS:trial","TWISTED:trunk","python:3.6"]}],"meta":{"total":26}}

yocto_console_view/src/module/console.tpl.jade deleted +0 -39
deleted file mode 100644
index a38f10e9faf6..000000000000
@@ -1,39 +0,0 @@
-.console.no-select
-    .load-indicator(ng-hide='c.builds.$resolved && c.changes.$resolved && c.buildrequests.$resolved && c.buildsets.$resolved')
-        .spinner
-            i.fa.fa-circle-o-notch.fa-spin.fa-2x
-            p loading
-    div(ng-show="c.changes.$resolved && c.filtered_changes.length==0")
-        p No changes. Console view needs changesource to be setup, and
-            a(href="#changes") changes
-            | to be in the system.
-
-    table.table.table-striped.table-bordered(ng-hide="c.filtered_changes.length==0" ng-class="{'table-fixedwidth': c.isBigTable()}")
-        tr.first-row
-            th.row-header(ng-style="{'width': c.getRowHeaderWidth()}")
-                i.fa.fa-plus-circle.pull-left(ng-click='c.openAll()' uib-tooltip='Open information for all changes' uib-tooltip-placement='right')
-                i.fa.fa-minus-circle.pull-left(ng-click='c.closeAll()' uib-tooltip='Close information for all changes' uib-tooltip-placement='right')
-            th.column(ng-repeat="builder in c.builders")
-                span.builder(ng-style="{'margin-top': c.getColHeaderHeight()}")
-                    a(ng-href='#/builders/{{ builder.builderid }}'
-                      ng-bind='builder.name')
-        tr.tag_row
-            td.row-header
-            td(ng-repeat="buildergroup in c.buildergroups" colspan="{{buildergroup.colspan}}" ng-style="{'text-align': 'center'}")
-                | {{buildergroup.tag}}
-        tr(ng-repeat="change in c.filtered_changes | orderBy: ['-when_timestamp'] track by change.changeid")
-            td
-                yoctochangedetails(change="change")
-            td.column(ng-repeat="builder in change.builders" colspan="{{builder.colspan}}")
-                span(ng-repeat="build in builder.builds | orderBy: ['number']")
-                    script(type="text/ng-template" id="buildsummarytooltip")
-                        buildsummary(buildid="build.buildid" type="tooltip")
-                    span.badge-status(ng-if='build.buildid'
-                                      uib-tooltip-template="'buildsummarytooltip'"
-                                      tooltip-class="buildsummarytooltipstyle"
-                                      tooltip-placement="auto left-bottom"
-                                      tooltip-popup-delay="400"
-                                      tooltip-popup-close-delay="400"
-                                      ng-class="c.results2class(build, 'pulse')"
-                                      ng-click='c.selectBuild(build)')
-                        | {{ build.number }}
yocto_console_view/src/module/main.module.js deleted +0 -496

496 lines not on this page · raw message

yocto_console_view/src/module/main.module.spec.js deleted +0 -228

228 lines not on this page · raw message

yocto_console_view/src/module/releaseselectorfield.directive.js deleted +0 -68

68 lines not on this page · raw message

yocto_console_view/src/module/releaseselectorfield.tpl.jade deleted +0 -5
deleted file mode 100644
index 8284d1d38b5f..000000000000
@@ -1,5 +0,0 @@
-basefield
-    label.control-label.col-sm-2(for="{{field.name}}")
-        | {{field.label}}
-    .col-sm-10
-        select.form-control(ng-model="field.value", ng-options="v for v in field.choices")
yocto_console_view/src/module/view/modal/modal.controller.js deleted +0 -22
deleted file mode 100644
index b2cea0d97648..000000000000
@@ -1,22 +0,0 @@
-/*
- * decaffeinate suggestions:
- * DS102: Remove unnecessary code created because of implicit returns
- * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
- */
-class ConsoleModal {
-    constructor($scope, $uibModalInstance, selectedBuild) {
-        this.$uibModalInstance = $uibModalInstance;
-        this.selectedBuild = selectedBuild;
-        $scope.$on('$stateChangeStart', () => {
-            return this.close();
-        });
-    }
-
-    close() {
-        return this.$uibModalInstance.close();
-    }
-}
-
-
-angular.module('yocto_console_view')
-.controller('consoleModalController', ['$scope', '$uibModalInstance', 'selectedBuild', ConsoleModal]);
yocto_console_view/src/module/view/modal/modal.style.less deleted +0 -9
deleted file mode 100644
index a11aa3b1ec82..000000000000
@@ -1,9 +0,0 @@
-.modal-big {
-  .modal-dialog {
-    width: 80%;
-  }
-
-  .fa {
-    cursor: pointer;
-  }
-}
yocto_console_view/src/module/view/modal/modal.tpl.jade deleted +0 -6
deleted file mode 100644
index 532d68ea3ffc..000000000000
@@ -1,6 +0,0 @@
-// Show build summary for the selected build in a modal window
-.modal-header
-    i.fa.fa-times.pull-right(ng-click='modal.close()')
-    h4.modal-title Build summary
-.modal-body
-    buildsummary(ng-if='modal.selectedBuild' buildid='modal.selectedBuild.buildid')
\ No newline at end of file
yocto_console_view/src/module/yoctochangedetails.directive.js deleted +0 -21
deleted file mode 100644
index 8161ff453b95..000000000000
@@ -1,21 +0,0 @@
-/*
- * decaffeinate suggestions:
- * DS002: Fix invalid constructor
- * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
- */
-class Yoctochangedetails {
-    constructor() {
-        return {
-            replace: true,
-            restrict: 'E',
-            scope: {
-                change: '=',
-                compact: '=?'
-            },
-            template: require('./yoctochangedetails.tpl.jade')
-        };
-    }
-}
-
-angular.module('yocto_console_view')
-.directive('yoctochangedetails', [Yoctochangedetails])
yocto_console_view/src/module/yoctochangedetails.tpl.jade deleted +0 -42

42 lines not on this page · raw message

yocto_console_view/src/styles/styles.less deleted +0 -89

89 lines not on this page · raw message

yocto_console_view/src/views/ConsoleView/ConsoleView.scss new file +38 -0
new file mode 100644
index 000000000000..dabd8a48b608
@@ -0,0 +1,38 @@
+
+tr.bb-console-table-first-row {
+  background-color: #fff !important;
+  th {
+    border: none;
+  }
+}
+
+.bb-console-table-builder {
+  position: relative;
+  float: left;
+  font-size: 1em;
+  width: 1.5em;
+  text-align: center;
+  transform: rotate(-25deg) ;
+  transform-origin: 0% 100%;
+  text-decoration: none;
+  white-space: nowrap;
+}
+
+.bb-console-tag-row {
+  td {
+    margin: 0;
+    padding: 0;
+  }
+  span {
+    position: relative;
+    float: left;
+    font-size: 10px;
+    overflow: hidden;
+    text-decoration: none;
+    white-space: nowrap;
+  }
+}
+
+.bb-console-changes-expand-icon {
+  float: left;
+}
yocto_console_view/src/views/ConsoleView/ConsoleView.test.ts new file +97 -0

97 lines not on this page · raw message

yocto_console_view/src/views/ConsoleView/ConsoleView.tsx new file +541 -0

541 lines not on this page · raw message

yocto_console_view/test/main.coffee deleted +0 -2
deleted file mode 100644
index 58acb546c7dd..000000000000
@@ -1,2 +0,0 @@
-# app module is necessary for plugins, but only in the test environment
-angular.module("app", []).constant("config", {"url": "foourl"})
yocto_console_view/tsconfig.json new file +27 -0
new file mode 100644
index 000000000000..5416ca47bbf4
@@ -0,0 +1,27 @@
+{
+  "compilerOptions": {
+    "experimentalDecorators": true,
+    "target": "es2020",
+    "lib": [
+      "dom",
+      "dom.iterable",
+      "esnext"
+    ],
+    "allowJs": true,
+    "skipLibCheck": true,
+    "esModuleInterop": true,
+    "allowSyntheticDefaultImports": true,
+    "strict": true,
+    "forceConsistentCasingInFileNames": true,
+    "noFallthroughCasesInSwitch": true,
+    "module": "esnext",
+    "moduleResolution": "node",
+    "resolveJsonModule": true,
+    "isolatedModules": true,
+    "noEmit": true,
+    "jsx": "react-jsx"
+  },
+  "include": [
+    "src"
+  ]
+}
yocto_console_view/vite.config.ts new file +64 -0

64 lines not on this page · raw message

yocto_console_view/webpack.config.js deleted +0 -26
deleted file mode 100644
index 74c7430a001f..000000000000
@@ -1,26 +0,0 @@
-'use strict';
-
-const common = require('buildbot-build-common');
-const env = require('yargs').argv.env;
-const pkg = require('./package.json');
-
-var event = process.env.npm_lifecycle_event;
-
-var isTest = event === 'test' || event === 'test-watch';
-var isProd = env === 'prod';
-
-module.exports = function() {
-    return common.createTemplateWebpackConfig({
-        entry: {
-            scripts: './src/module/main.module.js',
-            styles: './src/styles/styles.less',
-        },
-        libraryName: pkg.name,
-        pluginName: pkg.plugin_name,
-        dirname: __dirname,
-        isTest: isTest,
-        isProd: isProd,
-        outputPath: __dirname + '/yocto_console_view/static',
-        extractStyles: true,
-    });
-}();
yocto_console_view/yarn.lock new file +1755 -0

1,006 lines not on this page · raw message

yocto_console_view/yocto_console_view/VERSION deleted +0 -1
deleted file mode 100644
index 66389d771dcb..000000000000

Lines of this file are not shown. View the raw message.

yocto_console_view/yocto_console_view/static/scripts.js deleted +0 -1
deleted file mode 100644
index 238241daf2d1..000000000000

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

gTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)i.d(s,l,function(t){return e[t]}.bind(null,l));return s},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){"use strict";i.r(t);i(1),i(2),i(3),i(4);angular.module("yocto_console_view",["ui.router","ui.bootstrap","ngAnimate","guanlecoja.ui","bbData"]).config(["$stateProvider","glMenuServiceProvider","bbSettingsServiceProvider",class ConsoleState{constructor(e,t,s){var l="console";t.addGroup({name:l,caption:"Yocto Console View",icon:"exclamation-circle",order:5});var n={group:l,ca ption:"Yocto Console View"},r={controller:"".concat(l,"Controller"),controllerAs:"c",template:i(5),name:l,url:"/".concat(l),data:n};e.state(r),s.addSettingsGroup({name:"Console",caption:"Console related settings",items:[{type:"integer",name:"buildLimit",caption:"Number of builds to fetch",default_value:200},{type:"integer",name:"changeLimit",caption:"Number of changes to fetch",default_value:30}]})}}]).controller("consoleController",["$scope","$q","$window","dataService","bbSettingsService","resultsService","$uibModal","$timeout",class Console{constructor(e,t,i,s,l,n,r,a){this.onChange=this.onChange.bind(this),this._onChange=this._onChange.bind(this),this.matchBuildWithChange=this.matchBuildWithChange.bind(this),this.makeFakeChange=this.makeFakeChange.bind(this),this.$scope=e,this.$window=i,this.$uibModal=r,this.$timeout=a,angular.extend(this,n);var o=l.getSettingsGroup("Console");if(this.buildLimit=o.buildLimit.value,this.changeLimit=o.changeLimit.value,this.dataAccessor=s.open().c loseOnDestroy(this.$scope),this._infoIsExpanded={},this.$scope.all_builders=this.all_builders=this.dataAccessor.getBuilders(),this.$scope.builders=this.builders=[],this.$scope.buildergroups=this.buildergroups=[],"undefined"!=typeof Intl&&null!==Intl){var d=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});this.strcompare=d.compare}else this.strcompare=function(e,t){return e<t?-1:e===t?0:1};this.$scope.revmapping=this.revmapping={},this.$scope.branchmapping=this.branchmapping={},this.$scope.builds=this.builds=this.dataAccessor.getBuilds({property:["yp_build_revision","yp_build_branch","reason","publish_destination"],limit:this.buildLimit,order:"-started_at"}),this.changes=this.dataAccessor.getChanges({limit:this.changeLimit,order:"-changeid"}),this.$scope.fakechanges=this.fakechanges=[],this.buildrequests=this.dataAccessor.getBuildrequests({limit:this.buildLimit,order:"-submitted_at"}),this.buildsets=this.dataAccessor.getBuildsets({limit:this.buildLimit,order:"-submitted_at"} ),this.builds.onChange=this.onChange,this.changes.onChange=this.onChange,this.buildrequests.onChange=this.onChange,this.buildsets.onChange=this.onChange,this.builds.onNew=e=>{var t=!1,i=e.buildid;null!=(null!=e.properties?e.properties.yp_build_revision:void 0)&&(this.revmapping[e.buildid]=e.properties.yp_build_revision[0],t=!0),null!=(null!=e.properties?e.properties.yp_build_branch:void 0)&&(this.branchmapping[e.buildid]=e.properties.yp_build_branch[0],t=!0),this.revmapping[i]&&this.branchmapping[i]||e.complete_at||(e.getProperties().onChange=e=>{if(t=!1,i=e.endpoint.split("/")[1],!this.revmapping[i]){var s=this.getBuildProperty(e[0],"yp_build_revision");null!=s&&(this.revmapping[i]=s,t=!0)}if(!this.branchmapping[i]){var l=this.getBuildProperty(e[0],"yp_build_branch");null!=l&&(this.branchmapping[i]=l,t=!0)}t&&null==this.onchange_debounce&&(this.onchange_debounce=this.$timeout(this._onChange,100))}),t&&null==this.onchange_debounce&&(this.onchange_debounce=this.$timeout(this._onChang e,100))}}getBuildProperty(e,t){return e&&e.hasOwnProperty(t)?e[t][0]:null}onChange(e){0!==this.builds.length&&0!==this.all_builders.length&&this.changes.$resolved&&0!==this.buildsets.length&&0!==this.buildrequests&&null==this.onchange_debounce&&(this.onchange_debounce=this.$timeout(this._onChange,100))}_onChange(){var e,t;this.onchange_debounce=void 0;for(var i=0,s=Array.from(this.builds);i<s.length;i++)e=s[i],this.all_builders.get(e.builderid).hasBuild=!0;this.sortBuildersByTags(this.all_builders),null==this.changesBySSID&&(this.changesBySSID={}),null==this.changesByRevision&&(this.changesByRevision={});for(var l=0,n=Array.from(this.changes);l<n.length;l++)t=n[l],this.changesBySSID[t.sourcestamp.ssid]=t,this.changesByRevision[t.revision]=t,this.populateChange(t);for(var r=0,a=Array.from(this.fakechanges);r<a.length;r++)t=a[r],this.populateChange(t);for(var o=0,d=Array.from(this.builds);o<d.length;o++)e=d[o],this.matchBuildWithChange(e);for(var u in this.filtered_changes=[],this.cha ngesBySSID){(t=this.changesBySSID[u]).comments&&(t.subject=t.comments.split("\n")[0]);for(var c=0,h=Array.from(t.builders);c<h.length;c++){if(h[c].builds.length>0){this.filtered_changes.push(t);break}}}}sortBuildersByTags(e){for(var t,i,s=[],l="",n=0,r=Array.from(e);n<r.length;n++){var a=r[n];a.hasBuild&&"indexing"!=a.name&&(s.push(a),l+=".".concat(a.builderid))}if(l!==this.last_builderids_with_builds){for(var o={},d=0,u=Array.from(s);d<u.length;d++)if(null!=(t=u[d]).tags&&t.tags.length)for(var c=0,h=Array.from(t.tags);c<h.length;c++)null==o[i=h[c]]&&(o[i]=[]),o[i].push(t);else null==o[""]&&(o[""]=[]),o[""].push(t);var p=this;for(i in o)o[i].sort((e,t)=>p.strcompare(e.name,t.name));var g=[];for(i in o)""!=i&&g.push({name:o[i][0].name,tag:i,builders:o[i],colspan:o[i].length});for(t in o[""])g.push({name:o[""][t].name,tag:"",builders:[o[""][t]],colspan:1});g.sort((e,t)=>p.strcompare(e.name,t.name));var b=[];for(var m in g)for(t in g[m].builders)b.push(g[m].builders[t]);return this.bui lders=b,this.buildergroups=g,this.tag_lines=[],this.last_builderids_with_builds=l}}populateChange(e){e.builders=[],e.buildersById={};for(var t=0,i=Array.from(this.buildergroups);t<i.length;t++){for(var s=i[t],l={name:s.name,builds:[],builders:[],colspan:s.builders.length},n=0,r=Array.from(s.builders);n<r.length;n++){var a=r[n];l.builders.push(a),e.buildersById[a.builderid]=l}e.builders.push(l)}}matchBuildWithChange(e){var t,i,s=this.buildrequests.get(e.buildrequestid);if(null!=s){var l=this.buildsets.get(s.buildsetid);if(null!=l){if(null!=(null!=e.properties?e.properties.yp_build_revision:void 0)||this.revmapping[e.buildid]){i=null!=(null!=e.properties?e.properties.yp_build_revision:void 0)?e.properties.yp_build_revision[0]:this.revmapping[e.buildid],null==(t=this.changesByRevision[i])&&(t=this.changesBySSID[i]),null==t&&(t=this.makeFakeChange(i,e.started_at,i),this.fakechanges.push(t)),t.caption="Commit",null!=(null!=e.properties?e.properties.yp_build_branch:void 0)&&(t.caption=e.p roperties.yp_build_branch[0]),this.branchmapping[e.buildid]&&(t.caption=this.branchmapping[e.buildid]),t.revlink="http://git.yoctoproject.org/cgit.cgi/poky/commit/?id="+i,t.errorlink="http://errors.yoctoproject.org/Errors/Latest/?filter="+i+"&type=commit&limit=150";e.buildid;null!=l&&null!=l.parent_buildid&&l.parent_buildid,null!=(null!=e.properties?e.properties.reason:void 0)&&(t.reason=e.properties.reason[0]),null!=(null!=e.properties?e.properties.publish_destination:void 0)&&(t.publishurl=e.properties.publish_destination[0].replace("/srv/autobuilder/autobuilder.yoctoproject.org/","https://autobuilder.yocto.io/"),t.publishurl=t.publishurl.replace("/srv/autobuilder/autobuilder.yocto.io/","https://autobuilder.yocto.io/"))}else i="Unresolved Revision",null==t&&(t=this.changesBySSID[i]),null==t&&((t=this.makeFakeChange(i,e.started_at,i)).caption=i,this.fakechanges.push(t));e.builderid in t.buildersById&&t.buildersById[e.builderid].builds.push(e)}}}makeFakeChange(e,t,i){var s={revision :e,changeid:e,when_timestamp:t,comments:i};return this.changesBySSID[e]=s,this.populateChange(s),s}openAll(){return Array.from(this.filtered_changes).map(e=>e.show_details=!0)}closeAll(){return Array.from(this.filtered_changes).map(e=>e.show_details=!1)}getRowHeaderWidth(){return this.hasExpanded()?400:200}getColHeaderHeight(){for(var e=0,t=0,i=Array.from(this.builders);t<i.length;t++){var s=i[t];e=Math.max(s.name.length,e)}return Math.max(100,3*e)}isBigTable(){var e=this.getRowHeaderWidth();return(this.$window.innerWidth-e)/this.builders.length<40}hasExpanded(){for(var e=0,t=Array.from(this.changes);e<t.length;e++){var i=t[e];if(this.infoIsExpanded(i))return!0}return!1}selectBuild(e){return this.$uibModal.open({template:i(6),controller:"consoleModalController as modal",windowClass:"modal-big",resolve:{selectedBuild:()=>e}})}toggleInfo(e){return e.show_details=!e.show_details}infoIsExpanded(e){return e.show_details}}]),i(7),i(8),i(10)},function(t,i){t.exports=e},function(e,i){e.expo rts=t},function(e,t){e.exports=i},function(e,t){e.exports=s},function(e,t){e.exports=window.T["console_view/views/console.html"]||'<div class="console no-select"><div class="load-indicator" ng-hide="c.builds.$resolved &amp;&amp; c.changes.$resolved &amp;&amp; c.buildrequests.$resolved &amp;&amp; c.buildsets.$resolved"><div class="spinner"><i class="fa fa-circle-o-notch fa-spin fa-2x"></i><p>loading</p></div></div><div ng-show="c.changes.$resolved &amp;&amp; c.filtered_changes.length==0"><p>No changes. Console view needs changesource to be setup, and<a href="#changes">changes</a>to be in the system.</p></div><table class="table table-striped table-bordered" ng-hide="c.filtered_changes.length==0" ng-class="{\'table-fixedwidth\': c.isBigTable()}"><tr class="first-row"><th class="row-header" ng-style="{\'width\': c.getRowHeaderWidth()}"><i class="fa fa-plus-circle pull-left" ng-click="c.openAll()" uib-tooltip="Open information for all changes" uib-tooltip-placement="right"></i><i class= "fa fa-minus-circle pull-left" ng-click="c.closeAll()" uib-tooltip="Close information for all changes" uib-tooltip-placement="right"></i></th><th class="column" ng-repeat="builder in c.builders"><span class="builder" ng-style="{\'margin-top\': c.getColHeaderHeight()}"><a ng-href="#/builders/{{ builder.builderid }}" ng-bind="builder.name"></a></span></th></tr><tr class="tag_row"><td class="row-header"></td><td ng-repeat="buildergroup in c.buildergroups" colspan="{{buildergroup.colspan}}" ng-style="{\'text-align\': \'center\'}">{{buildergroup.tag}}</td></tr><tr ng-repeat="change in c.filtered_changes | orderBy: [\'-when_timestamp\'] track by change.changeid"><td><yoctochangedetails change="change"></yoctochangedetails></td><td class="column" ng-repeat="builder in change.builders" colspan="{{builder.colspan}}"><span ng-repeat="build in builder.builds | orderBy: [\'number\']"><script type="text/ng-template" id="buildsummarytooltip"><buildsummary buildid="build.buildid" type="tooltip"></ buildsummary><\/script><span class="badge-status" ng-if="build.buildid" uib-tooltip-template="\'buildsummarytooltip\'" tooltip-class="buildsummarytooltipstyle" tooltip-placement="auto left-bottom" tooltip-popup-delay="400" tooltip-popup-close-delay="400" ng-class="c.results2class(build, \'pulse\')" ng-click="c.selectBuild(build)">{{ build.number }}</span></span></td></tr></table></div>'},function(e,t){e.exports=window.T["console_view/views/modal.html"]||'\x3c!-- Show build summary for the selected build in a modal window--\x3e<div class="modal-header"><i class="fa fa-times pull-right" ng-click="modal.close()"></i><h4 class="modal-title">Build summary</h4></div><div class="modal-body"><buildsummary ng-if="modal.selectedBuild" buildid="modal.selectedBuild.buildid"></buildsummary></div>'},function(e,t){angular.module("yocto_console_view").controller("consoleModalController",["$scope","$uibModalInstance","selectedBuild",class ConsoleModal{constructor(e,t,i){this.$uibModalInstance=t,this .selectedBuild=i,e.$on("$stateChangeStart",()=>this.close())}close(){return this.$uibModalInstance.close()}}])},function(e,t,i){angular.module("yocto_console_view").directive("releaseselectorfield",[class Releaseselectorfield{constructor(){return{replace:!1,restrict:"E",scope:!1,template:i(9),controller:"_ReleaseselectorfieldController"}}}]).controller("_ReleaseselectorfieldController",["$scope","$http",class _releaseselectorfield{constructor(e,t){for(var i=e;null!=i&&null==i.rootfield;)i=i.$parent;if(null!=i){var s={},l=e=>Array.from(e).map(e=>null!=e.fields?l(e.fields):s[e.fullName]=e);l(i.rootfield.fields),e.$watch("field.value",(function(t,i){var l=e.field.selectors[t];if(null!=l)return(()=>{var e=[];for(var t in l){var i=l[t];t in s&&e.push(s[t].value=i)}return e})()}))}else console.log("rootfield not found!?!?")}}])},function(e,t){e.exports=window.T["console_view/views/releaseselectorfield.html"]||'<basefield><label class="control-label col-sm-2" for="{{field.name}}">{{field.l abel}}</label><div class="col-sm-10"><select class="form-control" ng-model="field.value" ng-options="v for v in field.choices"></select></div></basefield>'},function(e,t,i){angular.module("yocto_console_view").directive("yoctochangedetails",[class Yoctochangedetails{constructor(){return{replace:!0,restrict:"E",scope:{change:"=",compact:"=?"},template:i(11)}}}])},function(e,t){e.exports=window.T["console_view/views/yoctochangedetails.html"]||'<div class="yoctochangedetails" style="width:100%;"><div style="width:100%;" ng-click="change.show_details = !change.show_details"><a ng-if="change.revlink" ng-href="{{change.revlink}}" uib-tooltip="{{change.comments}}">{{ change.caption }} &nbsp;</a><a ng-if="change.errorlink" ng-href="{{change.errorlink}}">{{ "Errors" }} &nbsp;</a><a ng-if="change.publishurl" ng-href="{{change.publishurl}}">{{ "Output" }} &nbsp;</a><span ng-if="!change.revlink" uib-tooltip="{{change.comments}}">{{ change.caption }} &nbsp;</span><span ng-if="!compact" uib-toolt ip="{{change.when_timestamp | dateformat:\'LLL\'}}">({{ change.when_timestamp | timeago }}) &nbsp;</span><i class="fa fa-chevron-circle-right rotate clickable" ng-class="{\'fa-rotate-90\':change.show_details}"></i></div><div class="anim-changedetails" ng-show="change.show_details"><table class="table table-striped table-condensed" ng-show="change.show_details"><tr ng-show="change.reason"><td>Reason</td><td>{{ change.reason }}</td></tr><tr ng-show="change.author"><td>Author</td><td>{{ change.author }}</td></tr><tr><td>Date</td><td>{{ change.when_timestamp | dateformat:\'LLL\'}} ({{ change.when_timestamp | timeago }})</td></tr><tr ng-show="change.repository"><td>Repository</td><td>{{ change.repository }}</td></tr><tr ng-show="change.branch"><td>Branch</td><td>{{ change.branch }}</td></tr><tr><td>Revision</td><td> <a ng-if="change.revlink" ng-href="{{change.revlink}}"> {{ change.revision }}</a></td></tr></table><h5>Comment</h5><pre>{{ change.comments }}</pre><h5>Changed files</h5><ul>< li ng-repeat="file in change.files">{{file}}</li></ul><p ng-hide="change.files.length">No files</p></div></div>'}])}));
-//# sourceMappingURL=scripts.js.map
\ No newline at end of file

yocto_console_view/yocto_console_view/static/scripts.js.map deleted +0 -1
deleted file mode 100644
index 79b388a85659..000000000000

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

ire","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__2__","__WEBPACK_EXTERNAL_MODULE__3__","__WEBPACK_EXTERNAL_MODULE__4__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","angular","config","ConsoleState","constructor","$stateProvider","glMenuServiceProvider","bbSettingsServiceProvider","addGroup","caption","icon","order","cfg","group","state","controller","concat","controllerAs","template","url","data","addSettingsGroup","items","type","default_value","Console","$scope","$q","$window","dataService","bbSettingsService","resultsService","$uibModal","$timeout","onChange","_onChange","matchBuildWithChange","makeFakeChange","extend","settings","getSettingsGroup","buildLimit","changeLimit","dataAc cessor","open","closeOnDestroy","_infoIsExpanded","all_builders","getBuilders","builders","buildergroups","Intl","collator","Collator","undefined","numeric","sensitivity","strcompare","compare","a","b","revmapping","branchmapping","builds","getBuilds","limit","changes","getChanges","fakechanges","buildrequests","getBuildrequests","buildsets","getBuildsets","onNew","build","change","buildid","properties","yp_build_revision","yp_build_branch","complete_at","getProperties","endpoint","split","rev","getBuildProperty","branch","onchange_debounce","length","$resolved","_i","_Array$from","Array","from","builderid","hasBuild","sortBuildersByTags","changesBySSID","changesByRevision","_i2","_Array$from2","sourcestamp","ssid","revision","populateChange","_i3","_Array$from3","_i4","_Array$from4","filtered_changes","comments","subject","_i5","_Array$from5","push","builder","tag","builders_with_builds","builderids_with_builds","_i6","_Array$from6","last_builderids_with_builds","builders_by_tags", "_i7","_Array$from7","tags","_i8","_Array$from8","sort","colspan","sorted_builders","tag_lines","buildersById","_i9","_Array$from9","buildergroup","builderg","_i10","_Array$from10","buildrequest","buildrequestid","buildset","buildsetid","started_at","revlink","errorlink","parent_buildid","reason","publish_destination","publishurl","replace","when_timestamp","changeid","openAll","map","show_details","closeAll","getRowHeaderWidth","hasExpanded","getColHeaderHeight","max_buildername","_i11","_Array$from11","Math","max","isBigTable","padding","innerWidth","_i12","_Array$from12","infoIsExpanded","selectBuild","windowClass","resolve","selectedBuild","toggleInfo","window","T","ConsoleModal","$uibModalInstance","$on","close","directive","Releaseselectorfield","restrict","scope","_releaseselectorfield","$http","rootfield","$parent","fields_ref","gatherFields","fields","field","fullName","$watch","selector","selectors","result","k","v","console","log","Yoctochangedetails","compact"],"mappings ":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,mBAAoBA,QAAQ,uBAAwBA,QAAQ,iBAAkBA,QAAQ,qBAC9F,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,qBAAsB,CAAC,kBAAmB,sBAAuB,gBAAiB,oBAAqBJ,GACpF,iBAAZC,QACdA,QAAQ,sBAAwBD,EAAQG,QAAQ,mBAAoBA,QAAQ,uBAAwBA,QAAQ,iBAAkBA,QAAQ,qBAEtIJ,EAAK,sBAAwBC,EAAQD,EAAK,mBAAoBA,EAAK,uBAAwBA,EAAK,iBAAkBA,EAA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ChC,MAAhBA,EAAMD,OACHD,EAAaE,EAAMD,QAElBF,EAAWG,EAAMC,UAAYD,GAEtCF,EAAaH,EAAUA,UAAUI,QAGjCtK,EAAOyK,OAAO,eAAe,SA ASzM,EAAGhB,GAErC,IAAM0N,EAAW1K,EAAOuK,MAAMI,UAAU3M,GACxC,GAAgB,MAAZ0M,EACA,MAAO,MACH,IAAME,EAAS,GACf,IAAK,IAAIC,KAAKH,EAAU,CACpB,IAAMI,EAAIJ,EAASG,GACfA,KAAKT,GACLQ,EAAOpF,KAAK4E,EAAWS,GAAGrN,MAAQsN,GAG1C,OAAOF,GARJ,WAnBXG,QAAQC,IAAI,gC,cC/BxBtP,EAAOD,QAAU6N,OAAOC,EAAE,iDAAmD,6O,gBCmB7EhL,QAAQ7C,OAAO,sBACdkO,UAAU,qBAAsB,CAfjC,MAAMqB,mBACFvM,cACI,MAAO,CACHkJ,SAAS,EACTkC,SAAU,IACVC,MAAO,CACH9G,OAAQ,IACRiI,QAAS,MAEb1L,SAAU7D,EAAQ,U,cCd9BD,EAAOD,QAAU6N,OAAOC,EAAE,+CAAiD","file":"scripts.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"angular-animate\"), require(\"@uirouter/angularjs\"), require(\"guanlecoja-ui\"), require(\"buildbot-data-js\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"yocto-console-view\", [\"angular-animate\", \"@uirouter/angularjs\", \"guanlecoja-ui\", \"buildbot-data-js\"], factory);\n\telse if(typeo f exports === 'object')\n\t\texports[\"yocto-console-view\"] = factory(require(\"angular-animate\"), require(\"@uirouter/angularjs\"), require(\"guanlecoja-ui\"), require(\"buildbot-data-js\"));\n\telse\n\t\troot[\"yocto-console-view\"] = factory(root[\"angular-animate\"], root[\"@uirouter/angularjs\"], root[\"guanlecoja-ui\"], root[\"buildbot-data-js\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__4__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t} ;\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', {
value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/*\n * decaffeinate suggestions:\n * DS101: Remove unnecessary use of Array.from\n * DS102: Remove unnecessary code created because of implicit returns\n * DS205: Consider reworking code to avoid use of IIFEs\n * DS207: Consider shorter variations of null checks\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\n\nimport 'angular-animate';\nimport '@uirouter/angularjs';\nimport 'guanlecoja-ui';\nimpor
t 'buildbot-data-js';\n\nclass ConsoleState {\n constructor($stateProvider, glMenuServiceProvider, bbSettingsServiceProvider) {\n\n // Name of the state\n const name = 'console';\n\n // Menu configuration\n glMenuServiceProvider.addGroup({\n name,\n caption: 'Yocto Console View',\n icon: 'exclamation-circle',\n order: 5\n });\n\n // Configuration\n const cfg = {\n group: name,\n caption: 'Yocto Console View'\n };\n\n // Register new state\n const state = {\n controller: ${name}Controller,\n controllerAs: \"c\",\n template: require('./console.tpl.jade'),\n name,\n url: /${name},\n data: cfg\n };\n\n $stateProvider.state(state);\n\n bbSettingsServiceProvider.addSettingsGroup({\n name: 'Console',\n caption: 'Console related settings',\n
items: [{\n type: 'integer',\n name: 'buildLimit',\n caption: 'Number of builds to fetch',\n default_value: 200\n }\n , {\n type: 'integer',\n name: 'changeLimit',\n caption: 'Number of changes to fetch',\n default_value: 30\n }\n ]});\n }\n}\n\nclass Console {\n constructor($scope, $q, $window, dataService, bbSettingsService, resultsService,\n $uibModal, $timeout) {\n this.onChange = this.onChange.bind(this);\n this._onChange = this._onChange.bind(this);\n this.matchBuildWithChange = this.matchBuildWithChange.bind(this);\n this.makeFakeChange = this.makeFakeChange.bind(this);\n this.$scope = $scope;\n this.$window = $window;\n this.$uibModal = $uibModal;\n this.$timeout = $timeout;\n angular.extend(this, resultsService);\n const
settings = bbSettingsService.getSettingsGroup('Console');\n this.buildLimit = settings.buildLimit.value;\n this.changeLimit = settings.changeLimit.value;\n this.dataAccessor = dataService.open().closeOnDestroy(this.$scope);\n this._infoIsExpanded = {};\n this.$scope.all_builders = (this.all_builders = this.dataAccessor.getBuilders());\n this.$scope.builders = (this.builders = []);\n this.$scope.buildergroups = (this.buildergroups = []);\n if (typeof Intl !== 'undefined' && Intl !== null) {\n const collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});\n this.strcompare = collator.compare;\n } else {\n this.strcompare = function(a, b) {\n if (a < b) {\n return -1;\n }\n if (a === b) {\n return 0;\n }\n return 1;\n };\n }\n\n this.
$scope.revmapping = (this.revmapping = {});\n this.$scope.branchmapping = (this.branchmapping = {});\n\n this.$scope.builds = (this.builds = this.dataAccessor.getBuilds({\n property: [\"yp_build_revision\", \"yp_build_branch\", \"reason\", \"publish_destination\"],\n limit: this.buildLimit,\n order: '-started_at'\n }));\n this.changes = this.dataAccessor.getChanges({limit: this.changeLimit, order: '-changeid'});\n this.$scope.fakechanges = (this.fakechanges = []);\n this.buildrequests = this.dataAccessor.getBuildrequests({limit: this.buildLimit, order: '-submitted_at'});\n this.buildsets = this.dataAccessor.getBuildsets({limit: this.buildLimit, order: '-submitted_at'});\n\n this.builds.onChange = this.onChange;\n this.changes.onChange = this.onChange;\n this.buildrequests.onChange = this.onChange;\n this.buildsets.onChange = this.onChange;\n\n this.builds.onNew = buil
d => {\n let change = false;\n let {\n buildid\n } = build;\n if ((build.properties != null ? build.properties.yp_build_revision : undefined) != null) {\n this.revmapping[build.buildid] = build.properties.yp_build_revision[0];\n change = true;\n }\n if ((build.properties != null ? build.properties.yp_build_branch : undefined) != null) {\n this.branchmapping[build.buildid] = build.properties.yp_build_branch[0];\n change = true;\n }\n if ((!this.revmapping[buildid] || !this.branchmapping[buildid]) && !build.complete_at) {\n build.getProperties().onChange = properties => {\n change = false;\n buildid = properties.endpoint.split('/')[1];\n if (!this.revmapping[buildid]) {\n const rev = this.getBuildProperty(properties[0], 'yp_build_r
evision');\n if (rev != null) {\n this.revmapping[buildid] = rev;\n change = true;\n }\n }\n if (!this.branchmapping[buildid]) {\n const branch = this.getBuildProperty(properties[0], 'yp_build_branch');\n if (branch != null) {\n this.branchmapping[buildid] = branch;\n change = true;\n }\n }\n if (change && (this.onchange_debounce == null)) {\n this.onchange_debounce = this.$timeout(this._onChange, 100);\n }\n };\n }\n if (change && (this.onchange_debounce == null)) {\n this.onchange_debounce = this.$timeout(this._onChange, 100);\n }\n };\n }\n\n getBuildProperty(properties,
property) {\n const hasProperty = properties && properties.hasOwnProperty(property);\n if (hasProperty) { return properties[property][0]; } else { return null; }\n }\n\n onChange(s) {\n // if there is no data, no need to try and build something.\n if ((this.builds.length === 0) || (this.all_builders.length === 0) || !this.changes.$resolved ||\n (this.buildsets.length === 0) || (this.buildrequests === 0)) {\n return;\n }\n if ((this.onchange_debounce == null)) {\n this.onchange_debounce = this.$timeout(this._onChange, 100);\n }\n }\n\n _onChange() {\n let build, change;\n this.onchange_debounce = undefined;\n // we only display builders who actually have builds\n for (build of Array.from(this.builds)) {\n this.all_builders.get(build.builderid).hasBuild = true;\n }\n\n this.sortBuildersByTags(this.all_builders);\n\n if (this.cha

 ngesBySSID == null) { this.changesBySSID = {}; }\n        if (this.changesByRevision == null) { this.changesByRevision = {}; }\n        for (change of Array.from(this.changes)) {\n            this.changesBySSID[change.sourcestamp.ssid] = change;\n            this.changesByRevision[change.revision] = change;\n            this.populateChange(change);\n        }\n        for (change of Array.from(this.fakechanges)) {\n            this.populateChange(change);\n        }\n\n        for (build of Array.from(this.builds)) {\n            this.matchBuildWithChange(build);\n        }\n\n        this.filtered_changes = [];\n\n        for (let ssid in this.changesBySSID) {\n            change = this.changesBySSID[ssid];\n            if (change.comments) {\n                change.subject = change.comments.split(\"\\n\")[0];\n            }\n            for (let builder of Array.from(change.builders)) {\n                if (builder.builds.length > 0) {\n                    this.filtered_changes.pu
 sh(change);\n                    break;\n                }\n            }\n        }\n    }\n    /*\n     * Sort builders by tags\n     * Buildbot eight has the category option, but it was only limited to one category per builder,\n     * which make it easy to sort by category\n     * Here, we have multiple tags per builder, we need to try to group builders with same tags together\n     * The algorithm is rather twisted. It is a first try at the concept of grouping builders by tags..\n     */\n\n    sortBuildersByTags(all_builders) {\n        // first we only want builders with builds\n        let builder, builders, tag;\n        const builders_with_builds = [];\n        let builderids_with_builds = \"\";\n        for (let builder of Array.from(all_builders)) {\n            if (builder.hasBuild && builder.name != 'indexing') {\n                builders_with_builds.push(builder);\n                builderids_with_builds += `.${builder.builderid}`;\n            }\n        }\n\n        
 if (builderids_with_builds === this.last_builderids_with_builds) {\n            // don't recalculate if it hasn't changed!\n            return;\n        }\n\n        const builders_by_tags = {};\n        for (builder of Array.from(builders_with_builds)) {\n            if (builder.tags != null && builder.tags.length) {\n                for (tag of Array.from(builder.tags)) {\n                    if ((builders_by_tags[tag] == null)) {\n                        builders_by_tags[tag] = [];\n                    }\n                    builders_by_tags[tag].push(builder);\n                }\n            } else {\n                if ((builders_by_tags[''] == null)) {\n                    builders_by_tags[''] = [];\n                }\n                builders_by_tags[''].push(builder);\n            }\n        }\n\n        const self = this;\n        for (tag in builders_by_tags) {\n            builders_by_tags[tag].sort((a, b) => self.strcompare(a.name, b.name));\n        }\n        let build
 ergroups = [];\n        for (tag in builders_by_tags) {\n            if (tag != '') {\n                buildergroups.push({\n                    name: builders_by_tags[tag][0].name,\n                    tag: tag,\n                    builders: builders_by_tags[tag],\n                    colspan: builders_by_tags[tag].length\n                });\n            }\n        }\n        for (builder in builders_by_tags['']) {\n            buildergroups.push({\n                name: builders_by_tags[''][builder].name,\n                tag: '',\n                builders: [builders_by_tags[''][builder]],\n                colspan: 1\n            });\n        }\n\n        buildergroups.sort((a, b) => self.strcompare(a.name, b.name));\n\n        let sorted_builders = [];\n        for (let group in buildergroups) {\n            for (builder in buildergroups[group].builders) {\n                sorted_builders.push(buildergroups[group].builders[builder])\n            }\n        }\n\n        this.bui
 lders = sorted_builders;\n        this.buildergroups = buildergroups;\n        this.tag_lines = [];\n        return this.last_builderids_with_builds = builderids_with_builds;\n    }\n\n    /*\n     * fill a change with a list of builders\n     */\n    populateChange(change) {\n        change.builders = [];\n        change.buildersById = {};\n        for (let buildergroup of Array.from(this.buildergroups)) {\n            let builderg = {name: buildergroup.name, builds: [], builders: [], colspan: buildergroup.builders.length};\n            for (let builder of Array.from(buildergroup.builders)) {\n                builderg.builders.push(builder);\n                change.buildersById[builder.builderid] = builderg;\n            }\n            change.builders.push(builderg);\n        }\n    }\n    /*\n     * Match builds with a change\n     */\n    matchBuildWithChange(build) {\n        let change, oldrev, rev;\n        const buildrequest = this.buildrequests.get(build.buildrequestid);\n  
       if ((buildrequest == null)) {\n            return;\n        }\n        const buildset = this.buildsets.get(buildrequest.buildsetid);\n        if ((buildset == null)) {\n            return;\n        }\n\n        if (((build.properties != null ? build.properties.yp_build_revision : undefined) != null) || this.revmapping[build.buildid]) {\n            if ((build.properties != null ? build.properties.yp_build_revision : undefined) != null) {\n                rev = build.properties.yp_build_revision[0];\n            } else {\n                rev = this.revmapping[build.buildid];\n            }\n            change = this.changesByRevision[rev];\n            if ((change == null)) {\n                change = this.changesBySSID[rev];\n            }\n            if ((change == null)) {\n                change = this.makeFakeChange(rev, build.started_at, rev);\n                this.fakechanges.push(change)\n            }\n\n            change.caption = \"Commit\";\n            if ((build
 .properties != null ? build.properties.yp_build_branch : undefined) != null) {\n                change.caption = build.properties.yp_build_branch[0];\n            }\n            if (this.branchmapping[build.buildid]) {\n                change.caption = this.branchmapping[build.buildid];\n            }\n            change.revlink = \"http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=\" + rev;\n            change.errorlink = \"http://errors.yoctoproject.org/Errors/Latest/?filter=\" + rev + \"&type=commit&limit=150\";\n            let bid = build.buildid;\n            if ((buildset != null) && (buildset.parent_buildid != null)) {\n                bid = buildset.parent_buildid;\n            }\n            if ((build.properties != null ? build.properties.reason : undefined) != null) {\n                change.reason = build.properties.reason[0];\n            }\n            if ((build.properties != null ? build.properties.publish_destination : undefined) != null) {\n                chan
 ge.publishurl = build.properties.publish_destination[0].replace(\"/srv/autobuilder/autobuilder.yoctoproject.org/\", \"https://autobuilder.yocto.io/\");\n                change.publishurl = change.publishurl.replace(\"/srv/autobuilder/autobuilder.yocto.io/\", \"https://autobuilder.yocto.io/\");\n            }\n\n        } else {\n            rev = `Unresolved Revision`;\n            if ((change == null)) {\n                change = this.changesBySSID[rev];\n            }\n            if ((change == null)) {\n                change = this.makeFakeChange(rev, build.started_at, rev);\n                change.caption = rev;\n               this.fakechanges.push(change)\n            }\n\n        }\n\n        if (build.builderid in change.buildersById) {\n            change.buildersById[build.builderid].builds.push(build);\n        }\n    }\n\n    makeFakeChange(revision, when_timestamp, comments) {\n        const change = {\n            revision,\n            changeid: revision,\n         
    when_timestamp,\n            comments\n        };\n        this.changesBySSID[revision] = change;\n        this.populateChange(change);\n        return change;\n    }\n    /*\n     * Open all change row information\n     */\n    openAll() {\n        return Array.from(this.filtered_changes).map((change) =>\n            (change.show_details = true));\n    }\n\n    /*\n     * Close all change row information\n     */\n    closeAll() {\n        return Array.from(this.filtered_changes).map((change) =>\n            (change.show_details = false));\n    }\n\n    /*\n     * Calculate row header (aka first column) width\n     * depending if we display commit comment, we reserve more space\n     */\n    getRowHeaderWidth() {\n        if (this.hasExpanded()) {\n            return 400;  // magic value enough to hold 78 characters lines\n        } else {\n            return 200;\n        }\n    }\n    /*\n     * Calculate col header (aka first row) height\n     * It depends on the length of th
 e longest builder\n     */\n    getColHeaderHeight() {\n        let max_buildername = 0;\n        for (let builder of Array.from(this.builders)) {\n            max_buildername = Math.max(builder.name.length, max_buildername);\n        }\n        return Math.max(100, max_buildername * 3);\n    }\n\n    /*\n     *\n     * Determine if we use a 100% width table or if we allow horizontal scrollbar\n     * depending on number of builders, and size of window, we need a fixed column size or a 100% width table\n     *\n     */\n    isBigTable() {\n        const padding = this.getRowHeaderWidth();\n        if (((this.$window.innerWidth - padding) / this.builders.length) < 40) {\n            return true;\n        }\n        return false;\n    }\n    /*\n     *\n     * do we have at least one change expanded?\n     *\n     */\n    hasExpanded() {\n        for (let change of Array.from(this.changes)) {\n            if (this.infoIsExpanded(change)) {\n                return true;\n            }\
 n        }\n        return false;\n    }\n\n    /*\n     *\n     * display build details\n     *\n     */\n    selectBuild(build) {\n        let modal;\n        return modal = this.$uibModal.open({\n            template: require('./view/modal/modal.tpl.jade'),\n            controller: 'consoleModalController as modal',\n            windowClass: 'modal-big',\n            resolve: {\n                selectedBuild() { return build; }\n            }\n        });\n    }\n\n    /*\n     *\n     * toggle display of additional info for that change\n     *\n     */\n    toggleInfo(change) {\n        return change.show_details = !change.show_details;\n    }\n    infoIsExpanded(change) {\n        return change.show_details;\n    }\n}\n\n\nangular.module('yocto_console_view', [\n    'ui.router', 'ui.bootstrap', 'ngAnimate', 'guanlecoja.ui', 'bbData'])\n.config(['$stateProvider', 'glMenuServiceProvider', 'bbSettingsServiceProvider', ConsoleState])\n.controller('consoleController', ['$scope', '$q
 ', '$window', 'dataService', 'bbSettingsService', 'resultsService', '$uibModal', '$timeout', Console]);\n\nrequire('./view/modal/modal.controller.js');\nrequire('./releaseselectorfield.directive.js');\nrequire('./yoctochangedetails.directive.js');\n","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","module.exports = __WEBPACK_EXTERNAL_MODULE__4__;","module.exports = window.T['console_view/views/console.html'] || \"<div class=\\\"console no-select\\\"><div class=\\\"load-indicator\\\" ng-hide=\\\"c.builds.$resolved &amp;&amp; c.changes.$resolved &amp;&amp; c.buildrequests.$resolved &amp;&amp; c.buildsets.$resolved\\\"><div class=\\\"spinner\\\"><i class=\\\"fa fa-circle-o-notch fa-spin fa-2x\\\"></i><p>loading</p></div></div><div ng-show=\\\"c.changes.$resolved &amp;&amp; c.filtered_changes.length==0\\\"><p>No changes. Console view needs changesource to be setup, and<a href=\\\"#ch
 anges\\\">changes</a>to be in the system.</p></div><table class=\\\"table table-striped table-bordered\\\" ng-hide=\\\"c.filtered_changes.length==0\\\" ng-class=\\\"{'table-fixedwidth': c.isBigTable()}\\\"><tr class=\\\"first-row\\\"><th class=\\\"row-header\\\" ng-style=\\\"{'width': c.getRowHeaderWidth()}\\\"><i class=\\\"fa fa-plus-circle pull-left\\\" ng-click=\\\"c.openAll()\\\" uib-tooltip=\\\"Open information for all changes\\\" uib-tooltip-placement=\\\"right\\\"></i><i class=\\\"fa fa-minus-circle pull-left\\\" ng-click=\\\"c.closeAll()\\\" uib-tooltip=\\\"Close information for all changes\\\" uib-tooltip-placement=\\\"right\\\"></i></th><th class=\\\"column\\\" ng-repeat=\\\"builder in c.builders\\\"><span class=\\\"builder\\\" ng-style=\\\"{'margin-top': c.getColHeaderHeight()}\\\"><a ng-href=\\\"#/builders/{{ builder.builderid }}\\\" ng-bind=\\\"builder.name\\\"></a></span></th></tr><tr class=\\\"tag_row\\\"><td class=\\\"row-header\\\"></td><td ng-repeat=\\\"buildergrou
 p in c.buildergroups\\\" colspan=\\\"{{buildergroup.colspan}}\\\" ng-style=\\\"{'text-align': 'center'}\\\">{{buildergroup.tag}}</td></tr><tr ng-repeat=\\\"change in c.filtered_changes | orderBy: ['-when_timestamp'] track by change.changeid\\\"><td><yoctochangedetails change=\\\"change\\\"></yoctochangedetails></td><td class=\\\"column\\\" ng-repeat=\\\"builder in change.builders\\\" colspan=\\\"{{builder.colspan}}\\\"><span ng-repeat=\\\"build in builder.builds | orderBy: ['number']\\\"><script type=\\\"text/ng-template\\\" id=\\\"buildsummarytooltip\\\"><buildsummary buildid=\\\"build.buildid\\\" type=\\\"tooltip\\\"></buildsummary></script><span class=\\\"badge-status\\\" ng-if=\\\"build.buildid\\\" uib-tooltip-template=\\\"'buildsummarytooltip'\\\" tooltip-class=\\\"buildsummarytooltipstyle\\\" tooltip-placement=\\\"auto left-bottom\\\" tooltip-popup-delay=\\\"400\\\" tooltip-popup-close-delay=\\\"400\\\" ng-class=\\\"c.results2class(build, 'pulse')\\\" ng-click=\\\"c.selectBuil
 d(build)\\\">{{ build.number }}</span></span></td></tr></table></div>\";","module.exports = window.T['console_view/views/modal.html'] || \"<!-- Show build summary for the selected build in a modal window--><div class=\\\"modal-header\\\"><i class=\\\"fa fa-times pull-right\\\" ng-click=\\\"modal.close()\\\"></i><h4 class=\\\"modal-title\\\">Build summary</h4></div><div class=\\\"modal-body\\\"><buildsummary ng-if=\\\"modal.selectedBuild\\\" buildid=\\\"modal.selectedBuild.buildid\\\"></buildsummary></div>\";","/*\n * decaffeinate suggestions:\n * DS102: Remove unnecessary code created because of implicit returns\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\nclass ConsoleModal {\n    constructor($scope, $uibModalInstance, selectedBuild) {\n        this.$uibModalInstance = $uibModalInstance;\n        this.selectedBuild = selectedBuild;\n        $scope.$on('$stateChangeStart', () => {\n            return this.close();\n        });\n  
   }\n\n    close() {\n        return this.$uibModalInstance.close();\n    }\n}\n\n\nangular.module('yocto_console_view')\n.controller('consoleModalController', ['$scope', '$uibModalInstance', 'selectedBuild', ConsoleModal]);\n","/*\n * decaffeinate suggestions:\n * DS002: Fix invalid constructor\n * DS101: Remove unnecessary use of Array.from\n * DS102: Remove unnecessary code created because of implicit returns\n * DS205: Consider reworking code to avoid use of IIFEs\n * DS207: Consider shorter variations of null checks\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\n\nclass Releaseselectorfield {\n    constructor() {\n        return {\n            replace: false,\n            restrict: 'E',\n            scope: false,\n            template: require('./releaseselectorfield.tpl.jade'),\n            controller: '_ReleaseselectorfieldController'\n        };\n    }\n}\n\nclass _releaseselectorfield {\n    constructor($scope, $http) {\n  
       // HACK: we find the rootfield by doing $scope.$parent.$parent\n        let rootfield = $scope;\n        while ((rootfield != null) && (rootfield.rootfield == null)) {\n            rootfield = rootfield.$parent;\n        }\n\n        if ((rootfield == null)) {\n            console.log(\"rootfield not found!?!?\");\n            return;\n        }\n\n        // copy paste of code in forcedialog, which flatten the fields to be able to find easily\n        const fields_ref = {};\n        var gatherFields = fields => Array.from(fields).map((field) =>\n            (field.fields != null) ?\n                gatherFields(field.fields)\n            :\n                (fields_ref[field.fullName] = field));\n\n        gatherFields(rootfield.rootfield.fields);\n\n        // when our field change, we update the fields that we are suppose to\n        $scope.$watch(\"field.value\", function(n, o) {\n\n            const selector = $scope.field.selectors[n];\n            if (selector != null) {

\n return (() => {\n const result = [];\n for (let k in selector) {\n const v = selector[k];\n if (k in fields_ref) {\n result.push(fields_ref[k].value = v);\n }\n }\n return result;\n })();\n }\n });\n }\n}\n\nangular.module('yocto_console_view')\n.directive('releaseselectorfield', [Releaseselectorfield])\n.controller('_ReleaseselectorfieldController', ['$scope', '$http', _releaseselectorfield])\n","module.exports = window.T['console_view/views/releaseselectorfield.html'] || \"<basefield><label class=\\\"control-label col-sm-2\\\" for=\\\"{{field.name}}\\\">{{field.label}}</label><div class=\\\"col-sm-10\\\"><select class=\\\"form-control\\\" ng-model=\\\"field.value\\\" ng-options=\\\"v for v in field.choices\\\"></select></div></basefield>\";","/*\n * decaffein
ate suggestions:\n * DS002: Fix invalid constructor\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\nclass Yoctochangedetails {\n constructor() {\n return {\n replace: true,\n restrict: 'E',\n scope: {\n change: '=',\n compact: '=?'\n },\n template: require('./yoctochangedetails.tpl.jade')\n };\n }\n}\n\nangular.module('yocto_console_view')\n.directive('yoctochangedetails', [Yoctochangedetails])\n","module.exports = window.T['console_view/views/yoctochangedetails.html'] || \"<div class=\\\"yoctochangedetails\\\" style=\\\"width:100%;\\\"><div style=\\\"width:100%;\\\" ng-click=\\\"change.show_details = !change.show_details\\\"><a ng-if=\\\"change.revlink\\\" ng-href=\\\"{{change.revlink}}\\\" uib-tooltip=\\\"{{change.comments}}\\\">{{ change.caption }} &nbsp;</a><a ng-if=\\\"change.errorlink\\\" ng-href=\\\"{{change.errorlink}}\\\"

Quoted 1 line

{{ \\\"Errors\\\" }} &nbsp;</a><a ng-if=\\\"change.publishurl\\\" ng-href=\\\"{{change.publishurl}}\\\">{{ \\\"Output\\\" }} &nbsp;</a><span ng-if=\\\"!change.revlink\\\" uib-tooltip=\\\"{{change.comments}}\\\">{{ change.caption }} &nbsp;</span><span ng-if=\\\"!compact\\\" uib-tooltip=\\\"{{change.when_timestamp | dateformat:'LLL'}}\\\">({{ change.when_timestamp | timeago }}) &nbsp;</span><i class=\\\"fa fa-chevron-circle-right rotate clickable\\\" ng-class=\\\"{'fa-rotate-90':change.show_details}\\\"></i></div><div class=\\\"anim-changedetails\\\" ng-show=\\\"change.show_details\\\"><table class=\\\"table table-striped table-condensed\\\" ng-show=\\\"change.show_details\\\"><tr ng-show=\\\"change.reason\\\"><td>Reason</td><td>{{ change.reason }}</td></tr><tr ng-show=\\\"change.author\\\"><td>Author</td><td>{{ change.author }}</td></tr><tr><td>Date</td><td>{{ change.when_timestamp | dateformat:'LLL'}} ({{ change.when_timestamp | timeago }})</td></tr><tr ng-show=\\\"change.repositor

y\\\"><td>Repository</td><td>{{ change.repository }}</td></tr><tr ng-show=\\\"change.branch\\\"><td>Branch</td><td>{{ change.branch }}</td></tr><tr><td>Revision</td><td> <a ng-if=\\\"change.revlink\\\" ng-href=\\\"{{change.revlink}}\\\"> {{ change.revision }}</a></td></tr></table><h5>Comment</h5><pre>{{ change.comments }}</pre><h5>Changed files</h5><ul><li ng-repeat=\\\"file in change.files\\\">{{file}}</li></ul><p ng-hide=\\\"change.files.length\\\">No files</p></div></div>\";"],"sourceRoot":""}
\ No newline at end of file

yocto_console_view/yocto_console_view/static/styles.css deleted +0 -79

79 lines not on this page · raw message

yocto_console_view/yocto_console_view/static/styles.css.map deleted +0 -1
deleted file mode 100644
index c43d1b8c1faa..000000000000

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

{\n border: none;\n}\n.console .tag_row td {\n margin: 0px;\n padding: 0px;\n}\n.console .tag_row span {\n position: relative;\n float: left;\n font-size: 10px;\n overflow: hidden;\n text-decoration: none;\n white-space: nowrap;\n}\n.console tr.first-row {\n background-color: #fff !important;\n}\n.console tr.first-row th {\n border: none;\n background-color: #fff !important;\n}\n.console tr.first-row .builder {\n position: relative;\n float: left;\n font-size: 12px;\n text-align: center;\n transform: rotate(-45deg);\n transform-origin: 0% 100%;\n text-decoration: none;\n white-space: nowrap;\n}\n.console tr.first-row .column {\n width: 20px;\n min-width: 20px;\n max-width: 20px;\n}\n.yoctochangedetails > .no-select > * {\n margin-left: 0.3em;\n margin-right: 0.3em;\n}\n.select-editable {\n position: absolute;\n top: 0;\n border: none;\n margin: 2px;\n width: 90%;\n height: 29px;\n}\n.select-editable input:focus {\n outline: none;\n}\n"],"sourceRoot":
""}
\ No newline at end of file

Signature · 1 line
2.39.5

Part of the diff is not shown here. View the raw message.

#3 lore raw

PATCH 3/4 yocto_console_view: create our own console

In reply to Mathieu Dubois-Briand

Modify existing console view plugin to recreate our own console view.

---
 .../buildbot_console_view/__init__.py              |  19 --
 yocto_console_view/package.json                    |   6 +-
 yocto_console_view/setup.py                        |  14 +-
 .../src/views/ConsoleView/ConsoleView.scss         |  17 +-
 .../src/views/ConsoleView/ConsoleView.tsx          | 363 +++++++++------------
 .../src/views/ConsoleView/YoctoChangeDetails.scss  |  18 +
 .../src/views/ConsoleView/YoctoChangeDetails.tsx   | 149 +++++++++
 yocto_console_view/vite.config.ts                  |   2 +-
 8 files changed, 352 insertions(+), 236 deletions(-)
yocto_console_view/buildbot_console_view/__init__.py deleted +0 -19
deleted file mode 100644
index b776b9b2ae02..000000000000
@@ -1,19 +0,0 @@
-# This file is part of Buildbot.  Buildbot is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation, version 2.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright Buildbot Team Members
-
-from buildbot.www.plugin import Application
-
-# create the interface for the setuptools entry point
-ep = Application(__package__, "Buildbot Console View plugin")
yocto_console_view/package.json +3 -3
index 5e05343c809e..7db4c6b76eb7 100644
@@ -1,9 +1,9 @@
 {
-  "name": "buildbot-console-view",
+  "name": "yocto-console-view",
   "private": true,
   "type": "module",
-  "module": "buildbot_console_view/static/scripts.js",
-  "style": "buildbot_console_view/static/styles.css",
+  "module": "yocto_console_view/static/scripts.js",
+  "style": "yocto_console_view/static/styles.css",
   "scripts": {
     "start": "vite",
     "build": "vite build",
yocto_console_view/setup.py +7 -7
index 02e44dc41216..604f4a50da30 100644
@@ -28,12 +28,12 @@ except ImportError:
     sys.exit(1)
 
 setup_www_plugin(
-    name='buildbot-console-view',
-    description='Buildbot Console View plugin',
-    author='Pierre Tardy',
-    author_email='[email protected]',
-    url='http://buildbot.net/',
-    packages=['buildbot_console_view'],
+    name='yocto-console-view',
+    description='Yocto Project Console View plugin.',
+    author=u'Richard Purdie',
+    author_email=u'[email protected]',
+    url='http://autobuilder.yoctoproject.org/',
+    packages=['yocto_console_view'],
     package_data={
         '': [
             'VERSION',
@@ -43,7 +43,7 @@ setup_www_plugin(
     },
     entry_points="""
         [buildbot.www]
-        console_view = yocto_console_view:ep
+        yocto_console_view = yocto_console_view:ep
     """,
     classifiers=['License :: OSI Approved :: GNU General Public License v2 (GPLv2)'],
 )
yocto_console_view/src/views/ConsoleView/ConsoleView.scss +14 -3
index dabd8a48b608..a3421d9742f0 100644
@@ -1,6 +1,11 @@
+$headcol-width: 20px;
 
 tr.bb-console-table-first-row {
-  background-color: #fff !important;
+  .column {
+    width: $headcol-width;
+    min-width: $headcol-width;
+    max-width: $headcol-width;
+  }
   th {
     border: none;
   }
@@ -12,8 +17,8 @@ tr.bb-console-table-first-row {
   font-size: 1em;
   width: 1.5em;
   text-align: center;
-  transform: rotate(-25deg) ;
-  transform-origin: 0% 100%;
+  transform: rotate(-45deg) translate(.5em, 1em);
+  transform-origin: bottom left;
   text-decoration: none;
   white-space: nowrap;
 }
@@ -36,3 +41,9 @@ tr.bb-console-table-first-row {
 .bb-console-changes-expand-icon {
   float: left;
 }
+
+.bb-console {
+  td.column {
+    padding: .2em;
+  }
+}
yocto_console_view/src/views/ConsoleView/ConsoleView.tsx +160 -203

489 lines not on this page · raw message

yocto_console_view/src/views/ConsoleView/YoctoChangeDetails.scss new file +18 -0
new file mode 100644
index 000000000000..1496dffb00bb
@@ -0,0 +1,18 @@
+.yoctochangedetails {
+  width: 100%;
+}
+
+.yoctochangedetails-heading {
+  width: 100%;
+}
+
+.yoctochangedetails-heading > * {
+  margin-right: 0.5em;
+}
+
+.changedetails-properties {
+  padding: unset;
+  margin: unset;
+  border: unset;
+  background-color: unset
+}
yocto_console_view/src/views/ConsoleView/YoctoChangeDetails.tsx new file +149 -0

149 lines not on this page · raw message

yocto_console_view/vite.config.ts +1 -1
index 168b120f19db..f30b4dab2a37 100644
@@ -2,7 +2,7 @@ import {resolve} from "path";
 import {defineConfig} from "vite";
 import react from "@vitejs/plugin-react";
 
-const outDir = 'buildbot_console_view/static';
+const outDir = 'yocto_console_view/static';
 
 export default defineConfig({
   plugins: [
Signature · 1 line
2.39.5
#4 lore raw

PATCH 4/4 yocto_console_view: Add release selector

In reply to Mathieu Dubois-Briand
---
 yocto_console_view/src/index.ts                   |   1 +
 yocto_console_view/src/releaseselectorfield.ts    | 152 ++++++++++++++++++++++
 yocto_console_view/yocto_console_view/__init__.py |  36 +++++
 3 files changed, 189 insertions(+)
yocto_console_view/src/index.ts +1 -0
index fa0781c88e9a..de773540f6d7 100644
@@ -16,3 +16,4 @@
 */
 
 import './views/ConsoleView/ConsoleView';
+import './releaseselectorfield';
yocto_console_view/src/releaseselectorfield.ts new file +152 -0

152 lines not on this page · raw message

yocto_console_view/yocto_console_view/__init__.py new file +36 -0
new file mode 100644
index 000000000000..6118ac29409b
@@ -0,0 +1,36 @@
+# This file is part of Buildbot.  Buildbot is free software: you can
+# redistribute it and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation, version 2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright Buildbot Team Members
+
+from buildbot.www.plugin import Application
+from buildbot.schedulers.forcesched import ChoiceStringParameter
+
+import json
+
+# create the interface for the setuptools entry point
+ep = Application(__package__, "Yocto Buildbot Console View plugin")
+
+class ReleaseSelector(ChoiceStringParameter):
+
+    spec_attributes = ["selectors"]
+    selectors = None
+
+    def __init__(self, name, selectors, **kw):
+        def format_choice(choice):
+            return choice + ': ' + json.dumps(selectors.get(choice, {}))
+
+        super().__init__(name, **kw)
+        self.choices = [format_choice(choice)
+                        for choice in kw.get('choices', {})]
+        self.__dict__['default'] = format_choice(self.__dict__['default'])
Signature · 1 line
2.39.5