{"version":3,"sources":["webpack://buildbot-grid-view/webpack/universalModuleDefinition","webpack://buildbot-grid-view/webpack/bootstrap","webpack://buildbot-grid-view/./src/module/main.module.js","webpack://buildbot-grid-view/external \"angular-animate\"","webpack://buildbot-grid-view/external \"guanlecoja-ui\"","webpack://buildbot-grid-view/external \"buildbot-data-js\"","webpack://buildbot-grid-view/./src/module/grid.tpl.jade","webpack://buildbot-grid-view/./src/module/grid.controller.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__2__","__WEBPACK_EXTERNAL_MODULE__3__","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","__webpack_exports__","angular","config","GridState","constructor","$stateProvider","glMenuServiceProvider","bbSettingsServiceProvider","addGroup","caption","icon","order","state","controller","controllerAs","template","url","reloadOnSearch","data","group","addSettingsGroup","items","type","defaultValue","default_value","window","T","Grid","$scope","$stateParams","$state","resultsService","dataService","bbSettingsService","onChange","changeResult","toggleTag","resetTags","refresh","isBuilderDisplayed","isTagToggled","_","mixin","open","closeOnDestroy","branch","all_tags","tags","tag","isArray","result","results","resultsTexts","push","code","text","settings","getSettingsGroup","revisionLimit","changeFetchLimit","buildFetchLimit","fullChanges","leftToRight","changes","getChanges","limit","builders","getBuilders","dataReady","_i","_arr","length","collection","$resolved","dataFetched","_i2","_arr2","change","builder","branches","_i3","_Array$from","Array","from","builds","changeid","_i4","_Object$keys","keys","cid","sort","a","b","slice","result1","br","_i5","_Array$from2","buildersById","_i6","_Array$from3","_i8","_Array$from4","build","builderid","isNaN","parseInt","result2","_i7","_Object$keys2","changeBranch","indexOf","splice","_i9","_Array$from5"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,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jE,EAAGkE,EAAAD,GAER,GAAY,SAARjE,GAAkB8B,EAAQ/B,KAAKgE,QAAQ/D,GAAO,EAC9C,OAAO,EAIf,OAAO,EAGXR,aAAaQ,GACT,OAAOvF,KAAKsF,KAAKgE,QAAQ/D,IAAQ","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(\"guanlecoja-ui\"), require(\"buildbot-data-js\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"buildbot-grid-view\", [\"angular-animate\", \"guanlecoja-ui\", \"buildbot-data-js\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"buildbot-grid-view\"] = factory(require(\"angular-animate\"), require(\"guanlecoja-ui\"), require(\"buildbot-data-js\"));\n\telse\n\t\troot[\"buildbot-grid-view\"] = factory(root[\"angular-animate\"], 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__) {\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","// This file is part of Buildbot. Buildbot is free software: you can\n// redistribute it and/or modify it under the terms of the GNU General Public\n// License as published by the Free Software Foundation, version 2.\n//\n// This program is distributed in the hope that it will be useful, but WITHOUT\n// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n// details.\n//\n// You should have received a copy of the GNU General Public License along with\n// this program; if not, write to the Free Software Foundation, Inc., 51\n// Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n//\n// Copyright Buildbot Team Members\n\nimport 'angular-animate';\nimport 'guanlecoja-ui';\nimport 'buildbot-data-js';\n\nclass GridState {\n constructor($stateProvider, glMenuServiceProvider, bbSettingsServiceProvider) {\n // Menu configuration\n glMenuServiceProvider.addGroup({\n name: 'grid',\n caption: 'Grid View',\n icon: 'cubes',\n order: 4\n });\n\n // Register URL routing\n $stateProvider\n .state({\n name: 'grid',\n controller: 'gridController',\n controllerAs: 'C',\n template: require('./grid.tpl.jade'),\n url: '/grid?branch&tag&result',\n reloadOnSearch: true,\n data: {\n group: 'grid',\n caption: 'Grid View'\n }\n });\n\n bbSettingsServiceProvider.addSettingsGroup({\n name: 'Grid',\n caption: 'Grid related settings',\n items: [{\n type: 'bool',\n name: 'fullChanges',\n caption: 'Show avatar and time ago in change details',\n defaultValue: false\n }\n , {\n type: 'bool',\n name: 'leftToRight',\n caption: 'Show most recent changes on the right',\n defaultValue: false\n }\n , {\n type: 'integer',\n name: 'revisionLimit',\n caption: 'Maximum number of revisions to display',\n default_value: 5\n }\n , {\n type: 'integer',\n name: 'changeFetchLimit',\n caption: 'Maximum number of changes to fetch',\n default_value: 100\n }\n , {\n type: 'integer',\n name: 'buildFetchLimit',\n caption: 'Maximum number of builds to fetch',\n default_value: 1000\n }\n ]\n });\n }\n}\n\n\nangular.module('grid_view', [\n 'ui.router', 'ui.bootstrap', 'ngAnimate', 'guanlecoja.ui', 'bbData'])\n.config(['$stateProvider', 'glMenuServiceProvider', 'bbSettingsServiceProvider', GridState]);\n\nrequire('./grid.controller.js');\n","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","module.exports = window.T['grid_view/views/grid.html'] || \"

loading

No changes. Grid View needs a changesource to be setup, and changes to be in the system.

BuilderTags{{ tag }}{{ C.tags.length }} tagsx
{{ b.name }}{{ tag }}{{ build.number }}
\";","/*\n * decaffeinate suggestions:\n * DS101: Remove unnecessary use of Array.from\n * DS102: Remove unnecessary code created because of implicit returns\n * DS203: Remove `|| {}` from converted for-own loops\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// This file is part of Buildbot. Buildbot is free software: you can\n// redistribute it and/or modify it under the terms of the GNU General Public\n// License as published by the Free Software Foundation, version 2.\n//\n// This program is distributed in the hope that it will be useful, but WITHOUT\n// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n// details.\n//\n// You should have received a copy of the GNU General Public License along with\n// this program; if not, write to the Free Software Foundation, Inc., 51\n// Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n//\n// Copyright Buildbot Team Members\n\nclass Grid {\n constructor($scope, $stateParams, $state, resultsService, dataService, bbSettingsService) {\n this.onChange = this.onChange.bind(this);\n\tthis.changeResult = this.changeResult.bind(this);\n\tthis.toggleTag = this.toggleTag.bind(this);\n\tthis.resetTags = this.resetTags.bind(this);\n this.refresh = this.refresh.bind(this);\n this.isBuilderDisplayed = this.isBuilderDisplayed.bind(this);\n this.isTagToggled = this.isTagToggled.bind(this);\n this.$scope = $scope;\n this.$stateParams = $stateParams;\n this.$state = $state;\n _.mixin(this.$scope, resultsService);\n this.data = dataService.open().closeOnDestroy(this.$scope);\n\n this.branch = this.$stateParams.branch;\n\tif (typeof this.branch == 'undefined') {\n\t this.branch = 'all';\n\t}\n this.all_tags = [\"protected\", \"autobake\", \"install\", \"upgrade\", \"main\", \"experimental\"]\n\tthis.tags = this.$stateParams.tag != null ? this.$stateParams.tag : [];\n if (!angular.isArray(this.tags)) {\n this.tags = [this.tags];\n }\n this.result = this.$stateParams.result;\n // XXX: Angular ngOptions tag only works with string values. Force\n // convert the result code to string.\n this.results = ((() => {\n const result = [];\n for (let c in resultsService.resultsTexts) {\n const t = resultsService.resultsTexts[c];\n result.push({code: c + '', text: t});\n }\n return result;\n })());\n\n const settings = bbSettingsService.getSettingsGroup('Grid');\n this.revisionLimit = settings.revisionLimit.value;\n this.changeFetchLimit = settings.changeFetchLimit.value;\n this.buildFetchLimit = settings.buildFetchLimit.value;\n this.fullChanges = settings.fullChanges.value;\n this.leftToRight = settings.leftToRight.value;\n\n this.changes = this.data.getChanges({\n limit: this.changeFetchLimit,\n order: '-changeid',\n branch: this.branch\n });\n this.builders = this.data.getBuilders();\n\n this.builders.onChange = this.onChange;\n this.changes.onChange = this.onChange;\n }\n\n dataReady() {\n for (let collection of [this.builders, this.changes]) {\n\t if (!(collection.$resolved && (collection.length > 0))) {\n\t return false;\n }\n }\n return true;\n }\n\n dataFetched() {\n for (let collection of [this.changes, this.builders]) {\n if (!collection.$resolved) {\n return false;\n }\n }\n return true;\n }\n\n onChange() {\n let bset, c, req;\n let change, i, builder;\n if (!this.dataReady()) {\n return;\n }\n let changes = {};\n const branches = {};\n\n for (c of Array.from(this.changes)) {\n\t if (c.builds.length ==0) {\n\t \tcontinue;\n\t }\n changes[c.changeid] = c;\n\t branches[c.branch] = true;\n }\n\n\t// only keep the @revisionLimit most recent changes for display\n\tchanges = ((() => {\n\tconst result = [];\n\t for (let cid of Object.keys(changes || {})) {\n\t change = changes[cid];\n\t result.push(change);\n\t }\n\t return result;\n\t})());\n if (this.leftToRight) {\n changes.sort((a, b) => a.changeid - b.changeid);\n if (changes.length > this.revisionLimit) {\n changes = changes.slice(changes.length - this.revisionLimit);\n }\n } else {\n changes.sort((a, b) => b.changeid - a.changeid);\n if (changes.length > this.revisionLimit) {\n changes = changes.slice(0, this.revisionLimit);\n }\n }\n this.$scope.changes = changes;\n\n this.$scope.branches = ((() => {\n const result1 = [];\n for (let br in branches) {\n result1.push(br);\n }\n return result1;\n })());\n\n for (builder of Array.from(this.builders)) {\n builder.builds = {};\n }\n\n const buildersById = {};\n for (c of Array.from(this.$scope.changes)) {\n \t\tconst builds = c.builds;\n\t\tfor (let build of Array.from(c.builds)) {\n\t\t\tbuilder = this.builders.get(build.builderid);\n\t\t\tif (!this.isBuilderDisplayed(builder)) {\n\t \tcontinue;\n \t}\n\t\t\tif ((this.result != null) && (this.result !== '') && !isNaN(this.result)) {\n \tif (parseInt(build.results) !== parseInt(this.result)) {\n \tcontinue;\n \t}\n \t}\n\t\t\tbuildersById[builder.builderid] = builder;\n\t\t\tif (!(c.changeid in builder.builds)) {\n\t\t\t\tbuilder.builds[c.changeid] = []\n\t\t\t}\n\t\t\tbuilder.builds[c.changeid].push(build);\n\t\t}\n\t}\n\n return this.$scope.builders = ((() => {\n const result2 = [];\n for (i of Object.keys(buildersById || {})) {\n builder = buildersById[i];\n result2.push(builder);\n }\n return result2;\n })());\n }\n changeBranch(branch) {\n this.branch = branch;\n return this.refresh();\n }\n\n changeResult(result) {\n this.result = result;\n return this.refresh();\n }\n\n toggleTag(tag) {\n const i = this.tags.indexOf(tag);\n if (i < 0) {\n this.tags.push(tag);\n } else {\n this.tags.splice(i, 1);\n }\n return this.refresh();\n }\n resetTags() {\n this.tags = [];\n return this.refresh();\n }\n isTagToggled(tag) {\n return this.tags.indexOf(tag) >= 0;\n }\n\n refresh() {\n const params = {\n branch: this.branch,\n tag: this.tags.length === 0 ? undefined : this.tags,\n result: this.result\n };\n\n this.onChange();\n }\n\n isBuilderDisplayed(builder) {\n // Check if the \"main\" tag is selected\n const hasMainTag = this.tags.indexOf('main') >= 0;\n \n // Special case: If the \"main\" tag is selected, exclude builders with the \"experimental\" tag\n if (hasMainTag && (builder.tags.indexOf('experimental') >= 0 || builder.tags.indexOf('bleeding-edge') >= 0)) {\n return false;\n }\n \n // For other tags, ensure all selected tags are present in the builder's tags\n for (let tag of Array.from(this.tags)) {\n // Skip the \"main\" tag check as it's handled separately\n if (tag !== 'main' && builder.tags.indexOf(tag) < 0) {\n return false; // Exclude the builder if it does not have a selected tag\n }\n }\n \n return true; // Include the builder if it has all selected tags and special conditions are met\n }\n\n isTagToggled(tag) {\n return this.tags.indexOf(tag) >= 0;\n }\n\n}\n\n\nangular.module('grid_view')\n.controller('gridController', ['$scope', '$stateParams', '$state', 'resultsService', 'dataService', 'bbSettingsService', Grid]);\n"],"sourceRoot":""}