@spinnaker/docker
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -1,1 +0,1 @@ | ||
{"remainingRequest":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js??ref--4-1!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/stages/bake/dockerBakeStage.js","dependencies":[{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/stages/bake/dockerBakeStage.js","mtime":1524545088827},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/.babelrc","mtime":1516228648625},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js","mtime":1520329890000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js","mtime":1398445883000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js","mtime":1519638534000}],"contextDependencies":[],"result":["'use strict';\n\nvar _lodash = require('lodash');\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _core = require('@spinnaker/core');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar angular = require('angular');\n\n\n/*\n This stage is just here so that we can experiment with baking Docker containers within pipelines.\n Without this stage, programmatically-created pipelines with Docker bake stages would not render\n execution details.\n */\nmodule.exports = angular.module('spinnaker.docker.pipeline.stage.bakeStage', [_core.PIPELINE_CONFIG_PROVIDER, require('./bakeExecutionDetails.controller.js').name, _core.BAKERY_SERVICE]).config(['pipelineConfigProvider', function (pipelineConfigProvider) {\n pipelineConfigProvider.registerStage({\n provides: 'bake',\n cloudProvider: 'docker',\n label: 'Bake',\n description: 'Bakes an image in the specified region',\n templateUrl: require('./bakeStage.html'),\n executionDetailsUrl: require('./bakeExecutionDetails.html'),\n executionLabelComponent: _core.BakeExecutionLabel,\n extraLabelLines: function extraLabelLines(stage) {\n return stage.masterStage.context.allPreviouslyBaked || stage.masterStage.context.somePreviouslyBaked ? 1 : 0;\n },\n defaultTimeoutMs: 60 * 60 * 1000, // 60 minutes\n validators: [{ type: 'requiredField', fieldName: 'package' }],\n restartable: true\n });\n}]).controller('dockerBakeStageCtrl', ['$scope', 'bakeryService', '$q', function ($scope, bakeryService, $q) {\n var stage = $scope.stage;\n\n stage.region = 'global';\n\n if (!$scope.stage.user) {\n $scope.stage.user = _core.AuthenticationService.getAuthenticatedUser().name;\n }\n\n $scope.viewState = {\n loading: true\n };\n\n function initialize() {\n $scope.viewState.providerSelected = true;\n $q.all({\n baseOsOptions: bakeryService.getBaseOsOptions('docker'),\n baseLabelOptions: bakeryService.getBaseLabelOptions()\n }).then(function (results) {\n $scope.baseOsOptions = results.baseOsOptions.baseImages;\n $scope.baseLabelOptions = results.baseLabelOptions;\n\n if (!$scope.stage.baseOs && $scope.baseOsOptions && $scope.baseOsOptions.length) {\n $scope.stage.baseOs = $scope.baseOsOptions[0].id;\n }\n if (!$scope.stage.baseLabel && $scope.baseLabelOptions && $scope.baseLabelOptions.length) {\n $scope.stage.baseLabel = $scope.baseLabelOptions[0];\n }\n $scope.viewState.loading = false;\n });\n }\n\n function deleteEmptyProperties() {\n _lodash2.default.forOwn($scope.stage, function (val, key) {\n if (val === '') {\n delete $scope.stage[key];\n }\n });\n }\n\n $scope.$watch('stage', deleteEmptyProperties, true);\n\n initialize();\n}]);",{"version":3,"sources":["src/pipeline/stages/bake/dockerBakeStage.js"],"names":["angular","require","module","exports","name","config","pipelineConfigProvider","registerStage","provides","cloudProvider","label","description","templateUrl","executionDetailsUrl","executionLabelComponent","extraLabelLines","stage","masterStage","context","allPreviouslyBaked","somePreviouslyBaked","defaultTimeoutMs","validators","type","fieldName","restartable","controller","$scope","bakeryService","$q","region","user","getAuthenticatedUser","viewState","loading","initialize","providerSelected","all","baseOsOptions","getBaseOsOptions","baseLabelOptions","getBaseLabelOptions","then","results","baseImages","baseOs","length","id","baseLabel","deleteEmptyProperties","forOwn","val","key","$watch"],"mappings":"AAAA;;AAGA;;;;AAEA;;;;AAHA,IAAMA,UAAUC,QAAQ,SAAR,CAAhB;;;AAKA;;;;;AAKAC,OAAOC,OAAP,GAAiBH,QACdE,MADc,CACP,2CADO,EACsC,iCAEnDD,QAAQ,sCAAR,EAAgDG,IAFG,uBADtC,EAMdC,MANc,4BAMP,UAASC,sBAAT,EAAiC;AACvCA,yBAAuBC,aAAvB,CAAqC;AACnCC,cAAU,MADyB;AAEnCC,mBAAe,QAFoB;AAGnCC,WAAO,MAH4B;AAInCC,iBAAa,wCAJsB;AAKnCC,iBAAaX,QAAQ,kBAAR,CALsB;AAMnCY,yBAAqBZ,QAAQ,6BAAR,CANc;AAOnCa,qDAPmC;AAQnCC,qBAAiB,gCAAS;AACxB,aAAOC,MAAMC,WAAN,CAAkBC,OAAlB,CAA0BC,kBAA1B,IAAgDH,MAAMC,WAAN,CAAkBC,OAAlB,CAA0BE,mBAA1E,GAAgG,CAAhG,GAAoG,CAA3G;AACD,KAVkC;AAWnCC,sBAAkB,KAAK,EAAL,GAAU,IAXO,EAWD;AAClCC,gBAAY,CAAC,EAAEC,MAAM,eAAR,EAAyBC,WAAW,SAApC,EAAD,CAZuB;AAanCC,iBAAa;AAbsB,GAArC;AAeD,CAtBc,GAuBdC,UAvBc,CAuBH,qBAvBG,oCAuBoB,UAASC,MAAT,EAAiBC,aAAjB,EAAgCC,EAAhC,EAAoC;AACrE,MAAIb,QAAQW,OAAOX,KAAnB;;AAEAA,QAAMc,MAAN,GAAe,QAAf;;AAEA,MAAI,CAACH,OAAOX,KAAP,CAAae,IAAlB,EAAwB;AACtBJ,WAAOX,KAAP,CAAae,IAAb,GAAoB,4BAAsBC,oBAAtB,GAA6C5B,IAAjE;AACD;;AAEDuB,SAAOM,SAAP,GAAmB;AACjBC,aAAS;AADQ,GAAnB;;AAIA,WAASC,UAAT,GAAsB;AACpBR,WAAOM,SAAP,CAAiBG,gBAAjB,GAAoC,IAApC;AACAP,OACGQ,GADH,CACO;AACHC,qBAAeV,cAAcW,gBAAd,CAA+B,QAA/B,CADZ;AAEHC,wBAAkBZ,cAAca,mBAAd;AAFf,KADP,EAKGC,IALH,CAKQ,UAASC,OAAT,EAAkB;AACtBhB,aAAOW,aAAP,GAAuBK,QAAQL,aAAR,CAAsBM,UAA7C;AACAjB,aAAOa,gBAAP,GAA0BG,QAAQH,gBAAlC;;AAEA,UAAI,CAACb,OAAOX,KAAP,CAAa6B,MAAd,IAAwBlB,OAAOW,aAA/B,IAAgDX,OAAOW,aAAP,CAAqBQ,MAAzE,EAAiF;AAC/EnB,eAAOX,KAAP,CAAa6B,MAAb,GAAsBlB,OAAOW,aAAP,CAAqB,CAArB,EAAwBS,EAA9C;AACD;AACD,UAAI,CAACpB,OAAOX,KAAP,CAAagC,SAAd,IAA2BrB,OAAOa,gBAAlC,IAAsDb,OAAOa,gBAAP,CAAwBM,MAAlF,EAA0F;AACxFnB,eAAOX,KAAP,CAAagC,SAAb,GAAyBrB,OAAOa,gBAAP,CAAwB,CAAxB,CAAzB;AACD;AACDb,aAAOM,SAAP,CAAiBC,OAAjB,GAA2B,KAA3B;AACD,KAhBH;AAiBD;;AAED,WAASe,qBAAT,GAAiC;AAC/B,qBAAEC,MAAF,CAASvB,OAAOX,KAAhB,EAAuB,UAASmC,GAAT,EAAcC,GAAd,EAAmB;AACxC,UAAID,QAAQ,EAAZ,EAAgB;AACd,eAAOxB,OAAOX,KAAP,CAAaoC,GAAb,CAAP;AACD;AACF,KAJD;AAKD;;AAEDzB,SAAO0B,MAAP,CAAc,OAAd,EAAuBJ,qBAAvB,EAA8C,IAA9C;;AAEAd;AACD,CApEc,EAAjB","file":"dockerBakeStage.js","sourceRoot":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker","sourcesContent":["'use strict';\n\nconst angular = require('angular');\nimport _ from 'lodash';\n\nimport { AuthenticationService, BakeExecutionLabel, BAKERY_SERVICE, PIPELINE_CONFIG_PROVIDER } from '@spinnaker/core';\n\n/*\n This stage is just here so that we can experiment with baking Docker containers within pipelines.\n Without this stage, programmatically-created pipelines with Docker bake stages would not render\n execution details.\n */\nmodule.exports = angular\n .module('spinnaker.docker.pipeline.stage.bakeStage', [\n PIPELINE_CONFIG_PROVIDER,\n require('./bakeExecutionDetails.controller.js').name,\n BAKERY_SERVICE,\n ])\n .config(function(pipelineConfigProvider) {\n pipelineConfigProvider.registerStage({\n provides: 'bake',\n cloudProvider: 'docker',\n label: 'Bake',\n description: 'Bakes an image in the specified region',\n templateUrl: require('./bakeStage.html'),\n executionDetailsUrl: require('./bakeExecutionDetails.html'),\n executionLabelComponent: BakeExecutionLabel,\n extraLabelLines: stage => {\n return stage.masterStage.context.allPreviouslyBaked || stage.masterStage.context.somePreviouslyBaked ? 1 : 0;\n },\n defaultTimeoutMs: 60 * 60 * 1000, // 60 minutes\n validators: [{ type: 'requiredField', fieldName: 'package' }],\n restartable: true,\n });\n })\n .controller('dockerBakeStageCtrl', function($scope, bakeryService, $q) {\n var stage = $scope.stage;\n\n stage.region = 'global';\n\n if (!$scope.stage.user) {\n $scope.stage.user = AuthenticationService.getAuthenticatedUser().name;\n }\n\n $scope.viewState = {\n loading: true,\n };\n\n function initialize() {\n $scope.viewState.providerSelected = true;\n $q\n .all({\n baseOsOptions: bakeryService.getBaseOsOptions('docker'),\n baseLabelOptions: bakeryService.getBaseLabelOptions(),\n })\n .then(function(results) {\n $scope.baseOsOptions = results.baseOsOptions.baseImages;\n $scope.baseLabelOptions = results.baseLabelOptions;\n\n if (!$scope.stage.baseOs && $scope.baseOsOptions && $scope.baseOsOptions.length) {\n $scope.stage.baseOs = $scope.baseOsOptions[0].id;\n }\n if (!$scope.stage.baseLabel && $scope.baseLabelOptions && $scope.baseLabelOptions.length) {\n $scope.stage.baseLabel = $scope.baseLabelOptions[0];\n }\n $scope.viewState.loading = false;\n });\n }\n\n function deleteEmptyProperties() {\n _.forOwn($scope.stage, function(val, key) {\n if (val === '') {\n delete $scope.stage[key];\n }\n });\n }\n\n $scope.$watch('stage', deleteEmptyProperties, true);\n\n initialize();\n });\n"]}]} | ||
{"remainingRequest":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js??ref--4-1!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/stages/bake/dockerBakeStage.js","dependencies":[{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/stages/bake/dockerBakeStage.js","mtime":1524545088827},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/.babelrc","mtime":1525706565698},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js","mtime":1520329890000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js","mtime":1398445883000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js","mtime":1519638534000}],"contextDependencies":[],"result":["'use strict';\n\nvar _lodash = require('lodash');\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _core = require('@spinnaker/core');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst angular = require('angular');\n\n\n/*\n This stage is just here so that we can experiment with baking Docker containers within pipelines.\n Without this stage, programmatically-created pipelines with Docker bake stages would not render\n execution details.\n */\nmodule.exports = angular.module('spinnaker.docker.pipeline.stage.bakeStage', [_core.PIPELINE_CONFIG_PROVIDER, require('./bakeExecutionDetails.controller.js').name, _core.BAKERY_SERVICE]).config(['pipelineConfigProvider', function (pipelineConfigProvider) {\n pipelineConfigProvider.registerStage({\n provides: 'bake',\n cloudProvider: 'docker',\n label: 'Bake',\n description: 'Bakes an image in the specified region',\n templateUrl: require('./bakeStage.html'),\n executionDetailsUrl: require('./bakeExecutionDetails.html'),\n executionLabelComponent: _core.BakeExecutionLabel,\n extraLabelLines: stage => {\n return stage.masterStage.context.allPreviouslyBaked || stage.masterStage.context.somePreviouslyBaked ? 1 : 0;\n },\n defaultTimeoutMs: 60 * 60 * 1000, // 60 minutes\n validators: [{ type: 'requiredField', fieldName: 'package' }],\n restartable: true\n });\n}]).controller('dockerBakeStageCtrl', ['$scope', 'bakeryService', '$q', function ($scope, bakeryService, $q) {\n var stage = $scope.stage;\n\n stage.region = 'global';\n\n if (!$scope.stage.user) {\n $scope.stage.user = _core.AuthenticationService.getAuthenticatedUser().name;\n }\n\n $scope.viewState = {\n loading: true\n };\n\n function initialize() {\n $scope.viewState.providerSelected = true;\n $q.all({\n baseOsOptions: bakeryService.getBaseOsOptions('docker'),\n baseLabelOptions: bakeryService.getBaseLabelOptions()\n }).then(function (results) {\n $scope.baseOsOptions = results.baseOsOptions.baseImages;\n $scope.baseLabelOptions = results.baseLabelOptions;\n\n if (!$scope.stage.baseOs && $scope.baseOsOptions && $scope.baseOsOptions.length) {\n $scope.stage.baseOs = $scope.baseOsOptions[0].id;\n }\n if (!$scope.stage.baseLabel && $scope.baseLabelOptions && $scope.baseLabelOptions.length) {\n $scope.stage.baseLabel = $scope.baseLabelOptions[0];\n }\n $scope.viewState.loading = false;\n });\n }\n\n function deleteEmptyProperties() {\n _lodash2.default.forOwn($scope.stage, function (val, key) {\n if (val === '') {\n delete $scope.stage[key];\n }\n });\n }\n\n $scope.$watch('stage', deleteEmptyProperties, true);\n\n initialize();\n}]);",{"version":3,"sources":["src/pipeline/stages/bake/dockerBakeStage.js"],"names":["angular","require","module","exports","name","config","pipelineConfigProvider","registerStage","provides","cloudProvider","label","description","templateUrl","executionDetailsUrl","executionLabelComponent","extraLabelLines","stage","masterStage","context","allPreviouslyBaked","somePreviouslyBaked","defaultTimeoutMs","validators","type","fieldName","restartable","controller","$scope","bakeryService","$q","region","user","getAuthenticatedUser","viewState","loading","initialize","providerSelected","all","baseOsOptions","getBaseOsOptions","baseLabelOptions","getBaseLabelOptions","then","results","baseImages","baseOs","length","id","baseLabel","deleteEmptyProperties","forOwn","val","key","$watch"],"mappings":"AAAA;;AAGA;;;;AAEA;;;;AAHA,MAAMA,UAAUC,QAAQ,SAAR,CAAhB;;;AAKA;;;;;AAKAC,OAAOC,OAAP,GAAiBH,QACdE,MADc,CACP,2CADO,EACsC,iCAEnDD,QAAQ,sCAAR,EAAgDG,IAFG,uBADtC,EAMdC,MANc,4BAMP,UAASC,sBAAT,EAAiC;AACvCA,yBAAuBC,aAAvB,CAAqC;AACnCC,cAAU,MADyB;AAEnCC,mBAAe,QAFoB;AAGnCC,WAAO,MAH4B;AAInCC,iBAAa,wCAJsB;AAKnCC,iBAAaX,QAAQ,kBAAR,CALsB;AAMnCY,yBAAqBZ,QAAQ,6BAAR,CANc;AAOnCa,qDAPmC;AAQnCC,qBAAiBC,SAAS;AACxB,aAAOA,MAAMC,WAAN,CAAkBC,OAAlB,CAA0BC,kBAA1B,IAAgDH,MAAMC,WAAN,CAAkBC,OAAlB,CAA0BE,mBAA1E,GAAgG,CAAhG,GAAoG,CAA3G;AACD,KAVkC;AAWnCC,sBAAkB,KAAK,EAAL,GAAU,IAXO,EAWD;AAClCC,gBAAY,CAAC,EAAEC,MAAM,eAAR,EAAyBC,WAAW,SAApC,EAAD,CAZuB;AAanCC,iBAAa;AAbsB,GAArC;AAeD,CAtBc,GAuBdC,UAvBc,CAuBH,qBAvBG,oCAuBoB,UAASC,MAAT,EAAiBC,aAAjB,EAAgCC,EAAhC,EAAoC;AACrE,MAAIb,QAAQW,OAAOX,KAAnB;;AAEAA,QAAMc,MAAN,GAAe,QAAf;;AAEA,MAAI,CAACH,OAAOX,KAAP,CAAae,IAAlB,EAAwB;AACtBJ,WAAOX,KAAP,CAAae,IAAb,GAAoB,4BAAsBC,oBAAtB,GAA6C5B,IAAjE;AACD;;AAEDuB,SAAOM,SAAP,GAAmB;AACjBC,aAAS;AADQ,GAAnB;;AAIA,WAASC,UAAT,GAAsB;AACpBR,WAAOM,SAAP,CAAiBG,gBAAjB,GAAoC,IAApC;AACAP,OACGQ,GADH,CACO;AACHC,qBAAeV,cAAcW,gBAAd,CAA+B,QAA/B,CADZ;AAEHC,wBAAkBZ,cAAca,mBAAd;AAFf,KADP,EAKGC,IALH,CAKQ,UAASC,OAAT,EAAkB;AACtBhB,aAAOW,aAAP,GAAuBK,QAAQL,aAAR,CAAsBM,UAA7C;AACAjB,aAAOa,gBAAP,GAA0BG,QAAQH,gBAAlC;;AAEA,UAAI,CAACb,OAAOX,KAAP,CAAa6B,MAAd,IAAwBlB,OAAOW,aAA/B,IAAgDX,OAAOW,aAAP,CAAqBQ,MAAzE,EAAiF;AAC/EnB,eAAOX,KAAP,CAAa6B,MAAb,GAAsBlB,OAAOW,aAAP,CAAqB,CAArB,EAAwBS,EAA9C;AACD;AACD,UAAI,CAACpB,OAAOX,KAAP,CAAagC,SAAd,IAA2BrB,OAAOa,gBAAlC,IAAsDb,OAAOa,gBAAP,CAAwBM,MAAlF,EAA0F;AACxFnB,eAAOX,KAAP,CAAagC,SAAb,GAAyBrB,OAAOa,gBAAP,CAAwB,CAAxB,CAAzB;AACD;AACDb,aAAOM,SAAP,CAAiBC,OAAjB,GAA2B,KAA3B;AACD,KAhBH;AAiBD;;AAED,WAASe,qBAAT,GAAiC;AAC/B,qBAAEC,MAAF,CAASvB,OAAOX,KAAhB,EAAuB,UAASmC,GAAT,EAAcC,GAAd,EAAmB;AACxC,UAAID,QAAQ,EAAZ,EAAgB;AACd,eAAOxB,OAAOX,KAAP,CAAaoC,GAAb,CAAP;AACD;AACF,KAJD;AAKD;;AAEDzB,SAAO0B,MAAP,CAAc,OAAd,EAAuBJ,qBAAvB,EAA8C,IAA9C;;AAEAd;AACD,CApEc,EAAjB","file":"dockerBakeStage.js","sourceRoot":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker","sourcesContent":["'use strict';\n\nconst angular = require('angular');\nimport _ from 'lodash';\n\nimport { AuthenticationService, BakeExecutionLabel, BAKERY_SERVICE, PIPELINE_CONFIG_PROVIDER } from '@spinnaker/core';\n\n/*\n This stage is just here so that we can experiment with baking Docker containers within pipelines.\n Without this stage, programmatically-created pipelines with Docker bake stages would not render\n execution details.\n */\nmodule.exports = angular\n .module('spinnaker.docker.pipeline.stage.bakeStage', [\n PIPELINE_CONFIG_PROVIDER,\n require('./bakeExecutionDetails.controller.js').name,\n BAKERY_SERVICE,\n ])\n .config(function(pipelineConfigProvider) {\n pipelineConfigProvider.registerStage({\n provides: 'bake',\n cloudProvider: 'docker',\n label: 'Bake',\n description: 'Bakes an image in the specified region',\n templateUrl: require('./bakeStage.html'),\n executionDetailsUrl: require('./bakeExecutionDetails.html'),\n executionLabelComponent: BakeExecutionLabel,\n extraLabelLines: stage => {\n return stage.masterStage.context.allPreviouslyBaked || stage.masterStage.context.somePreviouslyBaked ? 1 : 0;\n },\n defaultTimeoutMs: 60 * 60 * 1000, // 60 minutes\n validators: [{ type: 'requiredField', fieldName: 'package' }],\n restartable: true,\n });\n })\n .controller('dockerBakeStageCtrl', function($scope, bakeryService, $q) {\n var stage = $scope.stage;\n\n stage.region = 'global';\n\n if (!$scope.stage.user) {\n $scope.stage.user = AuthenticationService.getAuthenticatedUser().name;\n }\n\n $scope.viewState = {\n loading: true,\n };\n\n function initialize() {\n $scope.viewState.providerSelected = true;\n $q\n .all({\n baseOsOptions: bakeryService.getBaseOsOptions('docker'),\n baseLabelOptions: bakeryService.getBaseLabelOptions(),\n })\n .then(function(results) {\n $scope.baseOsOptions = results.baseOsOptions.baseImages;\n $scope.baseLabelOptions = results.baseLabelOptions;\n\n if (!$scope.stage.baseOs && $scope.baseOsOptions && $scope.baseOsOptions.length) {\n $scope.stage.baseOs = $scope.baseOsOptions[0].id;\n }\n if (!$scope.stage.baseLabel && $scope.baseLabelOptions && $scope.baseLabelOptions.length) {\n $scope.stage.baseLabel = $scope.baseLabelOptions[0];\n }\n $scope.viewState.loading = false;\n });\n }\n\n function deleteEmptyProperties() {\n _.forOwn($scope.stage, function(val, key) {\n if (val === '') {\n delete $scope.stage[key];\n }\n });\n }\n\n $scope.$watch('stage', deleteEmptyProperties, true);\n\n initialize();\n });\n"]}]} |
@@ -1,1 +0,1 @@ | ||
{"remainingRequest":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js??ref--4-1!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/trigger/dockerTrigger.module.js","dependencies":[{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/trigger/dockerTrigger.module.js","mtime":1523390358846},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/.babelrc","mtime":1516228648625},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js","mtime":1520329890000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js","mtime":1398445883000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js","mtime":1519638534000}],"contextDependencies":[],"result":["'use strict';\n\nvar _core = require('@spinnaker/core');\n\nvar _dockerImageReader = require('docker/image/docker.image.reader.service');\n\nvar _dockerImageAndTagSelector = require('docker/image/dockerImageAndTagSelector.component');\n\nvar angular = require('angular');\n\nmodule.exports = angular.module('spinnaker.docker.pipeline.trigger', [_core.SERVICE_ACCOUNT_SERVICE, _dockerImageReader.DOCKER_IMAGE_READER, require('./dockerTriggerOptions.directive.js').name, _dockerImageAndTagSelector.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT]).config(['pipelineConfigProvider', function (pipelineConfigProvider) {\n pipelineConfigProvider.registerTrigger({\n label: 'Docker Registry',\n description: 'Executes the pipeline on an image update',\n key: 'docker',\n controller: 'DockerTriggerCtrl as ctrl',\n controllerAs: 'vm',\n templateUrl: require('./dockerTrigger.html'),\n manualExecutionHandler: 'dockerTriggerExecutionHandler',\n validators: [{\n type: 'requiredField',\n fieldName: 'account',\n message: '<strong>Registry</strong> is a required field for Docker Registry triggers.'\n }, {\n type: 'requiredField',\n fieldName: 'repository',\n message: '<strong>Image</strong> is a required field for Docker Registry triggers.'\n }, {\n type: 'serviceAccountAccess',\n preventSave: true,\n message: 'You do not have access to the service account configured in this pipeline\\'s Docker Registry trigger.\\n You will not be able to save your edits to this pipeline.'\n }]\n });\n}]).factory('dockerTriggerExecutionHandler', ['$q', function ($q) {\n return {\n formatLabel: function formatLabel(trigger) {\n return $q.when('(Docker Registry) ' + (trigger.account ? trigger.account + ':' : '') + ' ' + (trigger.repository || ''));\n },\n selectorTemplate: require('./selectorTemplate.html')\n };\n}]).controller('DockerTriggerCtrl', ['trigger', 'serviceAccountService', function (trigger, serviceAccountService) {\n var _this = this;\n\n this.trigger = trigger;\n this.fiatEnabled = _core.SETTINGS.feature.fiatEnabled;\n\n serviceAccountService.getServiceAccounts().then(function (accounts) {\n _this.serviceAccounts = accounts || [];\n });\n\n this.onChange = function (changes) {\n _this.trigger.registry = changes.registry;\n };\n}]);",{"version":3,"sources":["src/pipeline/trigger/dockerTrigger.module.js"],"names":["angular","require","module","exports","name","config","pipelineConfigProvider","registerTrigger","label","description","key","controller","controllerAs","templateUrl","manualExecutionHandler","validators","type","fieldName","message","preventSave","factory","$q","formatLabel","when","trigger","account","repository","selectorTemplate","serviceAccountService","fiatEnabled","feature","getServiceAccounts","then","serviceAccounts","accounts","onChange","registry","changes"],"mappings":"AAAA;;AAIA;;AAEA;;AACA;;AALA,IAAMA,UAAUC,QAAQ,SAAR,CAAhB;;AAOAC,OAAOC,OAAP,GAAiBH,QACdE,MADc,CACP,mCADO,EAC8B,wEAG3CD,QAAQ,qCAAR,EAA+CG,IAHJ,qEAD9B,EAOdC,MAPc,4BAOP,UAASC,sBAAT,EAAiC;AACvCA,yBAAuBC,eAAvB,CAAuC;AACrCC,WAAO,iBAD8B;AAErCC,iBAAa,0CAFwB;AAGrCC,SAAK,QAHgC;AAIrCC,gBAAY,2BAJyB;AAKrCC,kBAAc,IALuB;AAMrCC,iBAAaZ,QAAQ,sBAAR,CANwB;AAOrCa,4BAAwB,+BAPa;AAQrCC,gBAAY,CACV;AACEC,YAAM,eADR;AAEEC,iBAAW,SAFb;AAGEC,eAAS;AAHX,KADU,EAMV;AACEF,YAAM,eADR;AAEEC,iBAAW,YAFb;AAGEC,eAAS;AAHX,KANU,EAWV;AACEF,YAAM,sBADR;AAEEG,mBAAa,IAFf;AAGED;AAHF,KAXU;AARyB,GAAvC;AA2BD,CAnCc,GAoCdE,OApCc,CAoCN,+BApCM,SAoC2B,UAASC,EAAT,EAAa;AACrD,SAAO;AACLC,iBAAa,8BAAW;AACtB,aAAOD,GAAGE,IAAH,yBAA6BC,QAAQC,OAAR,GAAkBD,QAAQC,OAAR,GAAkB,GAApC,GAA0C,EAAvE,WAA6ED,QAAQE,UAAR,IAAsB,EAAnG,EAAP;AACD,KAHI;AAILC,sBAAkB1B,QAAQ,yBAAR;AAJb,GAAP;AAMD,CA3Cc,GA4CdU,UA5Cc,CA4CH,mBA5CG,uCA4CkB,UAASa,OAAT,EAAkBI,qBAAlB,EAAyC;AAAA;;AACxE,OAAKJ,OAAL,GAAeA,OAAf;AACA,OAAKK,WAAL,GAAmB,eAASC,OAAT,CAAiBD,WAApC;;AAEAD,wBAAsBG,kBAAtB,GAA2CC,IAA3C,CAAgD,oBAAY;AAC1D,UAAKC,eAAL,GAAuBC,YAAY,EAAnC;AACD,GAFD;;AAIA,OAAKC,QAAL,GAAgB,mBAAW;AACzB,UAAKX,OAAL,CAAaY,QAAb,GAAwBC,QAAQD,QAAhC;AACD,GAFD;AAGD,CAvDc,EAAjB","file":"dockerTrigger.module.js","sourceRoot":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker","sourcesContent":["'use strict';\n\nconst angular = require('angular');\n\nimport { SERVICE_ACCOUNT_SERVICE, SETTINGS } from '@spinnaker/core';\n\nimport { DOCKER_IMAGE_READER } from 'docker/image/docker.image.reader.service';\nimport { DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT } from 'docker/image/dockerImageAndTagSelector.component';\n\nmodule.exports = angular\n .module('spinnaker.docker.pipeline.trigger', [\n SERVICE_ACCOUNT_SERVICE,\n DOCKER_IMAGE_READER,\n require('./dockerTriggerOptions.directive.js').name,\n DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT,\n ])\n .config(function(pipelineConfigProvider) {\n pipelineConfigProvider.registerTrigger({\n label: 'Docker Registry',\n description: 'Executes the pipeline on an image update',\n key: 'docker',\n controller: 'DockerTriggerCtrl as ctrl',\n controllerAs: 'vm',\n templateUrl: require('./dockerTrigger.html'),\n manualExecutionHandler: 'dockerTriggerExecutionHandler',\n validators: [\n {\n type: 'requiredField',\n fieldName: 'account',\n message: '<strong>Registry</strong> is a required field for Docker Registry triggers.',\n },\n {\n type: 'requiredField',\n fieldName: 'repository',\n message: '<strong>Image</strong> is a required field for Docker Registry triggers.',\n },\n {\n type: 'serviceAccountAccess',\n preventSave: true,\n message: `You do not have access to the service account configured in this pipeline's Docker Registry trigger.\n You will not be able to save your edits to this pipeline.`,\n },\n ],\n });\n })\n .factory('dockerTriggerExecutionHandler', function($q) {\n return {\n formatLabel: trigger => {\n return $q.when(`(Docker Registry) ${trigger.account ? trigger.account + ':' : ''} ${trigger.repository || ''}`);\n },\n selectorTemplate: require('./selectorTemplate.html'),\n };\n })\n .controller('DockerTriggerCtrl', function(trigger, serviceAccountService) {\n this.trigger = trigger;\n this.fiatEnabled = SETTINGS.feature.fiatEnabled;\n\n serviceAccountService.getServiceAccounts().then(accounts => {\n this.serviceAccounts = accounts || [];\n });\n\n this.onChange = changes => {\n this.trigger.registry = changes.registry;\n };\n });\n"]}]} | ||
{"remainingRequest":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js??ref--4-1!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/trigger/dockerTrigger.module.js","dependencies":[{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/trigger/dockerTrigger.module.js","mtime":1526425908091},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/.babelrc","mtime":1525706565698},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js","mtime":1520329890000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js","mtime":1398445883000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js","mtime":1519638534000}],"contextDependencies":[],"result":["'use strict';\n\nvar _core = require('@spinnaker/core');\n\nvar _dockerImageAndTagSelector = require('docker/image/dockerImageAndTagSelector.component');\n\nvar _DockerTriggerTemplate = require('./DockerTriggerTemplate');\n\nconst angular = require('angular');\n\nmodule.exports = angular.module('spinnaker.docker.pipeline.trigger', [_core.SERVICE_ACCOUNT_SERVICE, _dockerImageAndTagSelector.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT]).config(['pipelineConfigProvider', function (pipelineConfigProvider) {\n pipelineConfigProvider.registerTrigger({\n label: 'Docker Registry',\n description: 'Executes the pipeline on an image update',\n key: 'docker',\n controller: 'DockerTriggerCtrl as ctrl',\n controllerAs: 'vm',\n templateUrl: require('./dockerTrigger.html'),\n manualExecutionComponent: _DockerTriggerTemplate.DockerTriggerTemplate,\n validators: [{\n type: 'requiredField',\n fieldName: 'account',\n message: '<strong>Registry</strong> is a required field for Docker Registry triggers.'\n }, {\n type: 'requiredField',\n fieldName: 'repository',\n message: '<strong>Image</strong> is a required field for Docker Registry triggers.'\n }, {\n type: 'serviceAccountAccess',\n preventSave: true,\n message: `You do not have access to the service account configured in this pipeline's Docker Registry trigger.\n You will not be able to save your edits to this pipeline.`\n }]\n });\n}]).controller('DockerTriggerCtrl', ['trigger', 'serviceAccountService', function (trigger, serviceAccountService) {\n this.trigger = trigger;\n this.fiatEnabled = _core.SETTINGS.feature.fiatEnabled;\n\n serviceAccountService.getServiceAccounts().then(accounts => {\n this.serviceAccounts = accounts || [];\n });\n\n this.onChange = changes => {\n this.trigger.registry = changes.registry;\n };\n}]);",{"version":3,"sources":["src/pipeline/trigger/dockerTrigger.module.js"],"names":["angular","require","module","exports","config","pipelineConfigProvider","registerTrigger","label","description","key","controller","controllerAs","templateUrl","manualExecutionComponent","validators","type","fieldName","message","preventSave","trigger","serviceAccountService","fiatEnabled","feature","getServiceAccounts","then","accounts","serviceAccounts","onChange","changes","registry"],"mappings":"AAAA;;AAIA;;AAEA;;AACA;;AALA,MAAMA,UAAUC,QAAQ,SAAR,CAAhB;;AAOAC,OAAOC,OAAP,GAAiBH,QACdE,MADc,CACP,mCADO,EAC8B,mGAD9B,EAEdE,MAFc,4BAEP,UAASC,sBAAT,EAAiC;AACvCA,yBAAuBC,eAAvB,CAAuC;AACrCC,WAAO,iBAD8B;AAErCC,iBAAa,0CAFwB;AAGrCC,SAAK,QAHgC;AAIrCC,gBAAY,2BAJyB;AAKrCC,kBAAc,IALuB;AAMrCC,iBAAaX,QAAQ,sBAAR,CANwB;AAOrCY,0EAPqC;AAQrCC,gBAAY,CACV;AACEC,YAAM,eADR;AAEEC,iBAAW,SAFb;AAGEC,eAAS;AAHX,KADU,EAMV;AACEF,YAAM,eADR;AAEEC,iBAAW,YAFb;AAGEC,eAAS;AAHX,KANU,EAWV;AACEF,YAAM,sBADR;AAEEG,mBAAa,IAFf;AAGED,eAAU;;AAHZ,KAXU;AARyB,GAAvC;AA2BD,CA9Bc,GA+BdP,UA/Bc,CA+BH,mBA/BG,uCA+BkB,UAASS,OAAT,EAAkBC,qBAAlB,EAAyC;AACxE,OAAKD,OAAL,GAAeA,OAAf;AACA,OAAKE,WAAL,GAAmB,eAASC,OAAT,CAAiBD,WAApC;;AAEAD,wBAAsBG,kBAAtB,GAA2CC,IAA3C,CAAgDC,YAAY;AAC1D,SAAKC,eAAL,GAAuBD,YAAY,EAAnC;AACD,GAFD;;AAIA,OAAKE,QAAL,GAAgBC,WAAW;AACzB,SAAKT,OAAL,CAAaU,QAAb,GAAwBD,QAAQC,QAAhC;AACD,GAFD;AAGD,CA1Cc,EAAjB","file":"dockerTrigger.module.js","sourceRoot":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker","sourcesContent":["'use strict';\n\nconst angular = require('angular');\n\nimport { SERVICE_ACCOUNT_SERVICE, SETTINGS } from '@spinnaker/core';\n\nimport { DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT } from 'docker/image/dockerImageAndTagSelector.component';\nimport { DockerTriggerTemplate } from './DockerTriggerTemplate';\n\nmodule.exports = angular\n .module('spinnaker.docker.pipeline.trigger', [SERVICE_ACCOUNT_SERVICE, DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT])\n .config(function(pipelineConfigProvider) {\n pipelineConfigProvider.registerTrigger({\n label: 'Docker Registry',\n description: 'Executes the pipeline on an image update',\n key: 'docker',\n controller: 'DockerTriggerCtrl as ctrl',\n controllerAs: 'vm',\n templateUrl: require('./dockerTrigger.html'),\n manualExecutionComponent: DockerTriggerTemplate,\n validators: [\n {\n type: 'requiredField',\n fieldName: 'account',\n message: '<strong>Registry</strong> is a required field for Docker Registry triggers.',\n },\n {\n type: 'requiredField',\n fieldName: 'repository',\n message: '<strong>Image</strong> is a required field for Docker Registry triggers.',\n },\n {\n type: 'serviceAccountAccess',\n preventSave: true,\n message: `You do not have access to the service account configured in this pipeline's Docker Registry trigger.\n You will not be able to save your edits to this pipeline.`,\n },\n ],\n });\n })\n .controller('DockerTriggerCtrl', function(trigger, serviceAccountService) {\n this.trigger = trigger;\n this.fiatEnabled = SETTINGS.feature.fiatEnabled;\n\n serviceAccountService.getServiceAccounts().then(accounts => {\n this.serviceAccounts = accounts || [];\n });\n\n this.onChange = changes => {\n this.trigger.registry = changes.registry;\n };\n });\n"]}]} |
@@ -1,1 +0,1 @@ | ||
{"remainingRequest":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js??ref--4-1!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/stages/bake/bakeExecutionDetails.controller.js","dependencies":[{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/stages/bake/bakeExecutionDetails.controller.js","mtime":1523390358846},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/.babelrc","mtime":1516228648625},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js","mtime":1520329890000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js","mtime":1398445883000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js","mtime":1519638534000}],"contextDependencies":[],"result":["'use strict';\n\nvar _core = require('@spinnaker/core');\n\nvar angular = require('angular');\n\nmodule.exports = angular.module('spinnaker.docker.pipeline.stage.bake.executionDetails.controller', [require('@uirouter/angularjs').default]).controller('dockerBakeExecutionDetailsCtrl', ['$scope', '$stateParams', 'executionDetailsSectionService', '$interpolate', function ($scope, $stateParams, executionDetailsSectionService, $interpolate) {\n $scope.configSections = ['bakeConfig', 'taskStatus'];\n\n var initialized = function initialized() {\n $scope.detailsSection = $stateParams.details;\n $scope.provider = $scope.stage.context.cloudProviderType || 'docker';\n $scope.bakeryDetailUrl = $interpolate(_core.SETTINGS.bakeryDetailUrl);\n };\n\n var initialize = function initialize() {\n return executionDetailsSectionService.synchronizeSection($scope.configSections, initialized);\n };\n\n initialize();\n\n $scope.$on('$stateChangeSuccess', initialize);\n}]);",{"version":3,"sources":["src/pipeline/stages/bake/bakeExecutionDetails.controller.js"],"names":["angular","require","module","exports","default","controller","$scope","$stateParams","executionDetailsSectionService","$interpolate","configSections","initialized","detailsSection","details","provider","stage","context","cloudProviderType","bakeryDetailUrl","initialize","synchronizeSection","$on"],"mappings":"AAAA;;AAIA;;AAFA,IAAMA,UAAUC,QAAQ,SAAR,CAAhB;;AAIAC,OAAOC,OAAP,GAAiBH,QACdE,MADc,CACP,kEADO,EAC6D,CAACD,QAAQ,qBAAR,EAA+BG,OAAhC,CAD7D,EAEdC,UAFc,CAEH,gCAFG,+EAE+B,UAC5CC,MAD4C,EAE5CC,YAF4C,EAG5CC,8BAH4C,EAI5CC,YAJ4C,EAK5C;AACAH,SAAOI,cAAP,GAAwB,CAAC,YAAD,EAAe,YAAf,CAAxB;;AAEA,MAAIC,cAAc,SAAdA,WAAc,GAAM;AACtBL,WAAOM,cAAP,GAAwBL,aAAaM,OAArC;AACAP,WAAOQ,QAAP,GAAkBR,OAAOS,KAAP,CAAaC,OAAb,CAAqBC,iBAArB,IAA0C,QAA5D;AACAX,WAAOY,eAAP,GAAyBT,aAAa,eAASS,eAAtB,CAAzB;AACD,GAJD;;AAMA,MAAIC,aAAa,SAAbA,UAAa;AAAA,WAAMX,+BAA+BY,kBAA/B,CAAkDd,OAAOI,cAAzD,EAAyEC,WAAzE,CAAN;AAAA,GAAjB;;AAEAQ;;AAEAb,SAAOe,GAAP,CAAW,qBAAX,EAAkCF,UAAlC;AACD,CArBc,EAAjB","file":"bakeExecutionDetails.controller.js","sourceRoot":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker","sourcesContent":["'use strict';\n\nconst angular = require('angular');\n\nimport { SETTINGS } from '@spinnaker/core';\n\nmodule.exports = angular\n .module('spinnaker.docker.pipeline.stage.bake.executionDetails.controller', [require('@uirouter/angularjs').default])\n .controller('dockerBakeExecutionDetailsCtrl', function(\n $scope,\n $stateParams,\n executionDetailsSectionService,\n $interpolate,\n ) {\n $scope.configSections = ['bakeConfig', 'taskStatus'];\n\n let initialized = () => {\n $scope.detailsSection = $stateParams.details;\n $scope.provider = $scope.stage.context.cloudProviderType || 'docker';\n $scope.bakeryDetailUrl = $interpolate(SETTINGS.bakeryDetailUrl);\n };\n\n let initialize = () => executionDetailsSectionService.synchronizeSection($scope.configSections, initialized);\n\n initialize();\n\n $scope.$on('$stateChangeSuccess', initialize);\n });\n"]}]} | ||
{"remainingRequest":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js??ref--4-1!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js!/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/stages/bake/bakeExecutionDetails.controller.js","dependencies":[{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker/src/pipeline/stages/bake/bakeExecutionDetails.controller.js","mtime":1523390358846},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/.babelrc","mtime":1525706565698},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/babel-loader/lib/index.js","mtime":1520329890000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/envify-loader/index.js","mtime":1398445883000},{"path":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/node_modules/eslint-loader/index.js","mtime":1519638534000}],"contextDependencies":[],"result":["'use strict';\n\nvar _core = require('@spinnaker/core');\n\nconst angular = require('angular');\n\nmodule.exports = angular.module('spinnaker.docker.pipeline.stage.bake.executionDetails.controller', [require('@uirouter/angularjs').default]).controller('dockerBakeExecutionDetailsCtrl', ['$scope', '$stateParams', 'executionDetailsSectionService', '$interpolate', function ($scope, $stateParams, executionDetailsSectionService, $interpolate) {\n $scope.configSections = ['bakeConfig', 'taskStatus'];\n\n let initialized = () => {\n $scope.detailsSection = $stateParams.details;\n $scope.provider = $scope.stage.context.cloudProviderType || 'docker';\n $scope.bakeryDetailUrl = $interpolate(_core.SETTINGS.bakeryDetailUrl);\n };\n\n let initialize = () => executionDetailsSectionService.synchronizeSection($scope.configSections, initialized);\n\n initialize();\n\n $scope.$on('$stateChangeSuccess', initialize);\n}]);",{"version":3,"sources":["src/pipeline/stages/bake/bakeExecutionDetails.controller.js"],"names":["angular","require","module","exports","default","controller","$scope","$stateParams","executionDetailsSectionService","$interpolate","configSections","initialized","detailsSection","details","provider","stage","context","cloudProviderType","bakeryDetailUrl","initialize","synchronizeSection","$on"],"mappings":"AAAA;;AAIA;;AAFA,MAAMA,UAAUC,QAAQ,SAAR,CAAhB;;AAIAC,OAAOC,OAAP,GAAiBH,QACdE,MADc,CACP,kEADO,EAC6D,CAACD,QAAQ,qBAAR,EAA+BG,OAAhC,CAD7D,EAEdC,UAFc,CAEH,gCAFG,+EAE+B,UAC5CC,MAD4C,EAE5CC,YAF4C,EAG5CC,8BAH4C,EAI5CC,YAJ4C,EAK5C;AACAH,SAAOI,cAAP,GAAwB,CAAC,YAAD,EAAe,YAAf,CAAxB;;AAEA,MAAIC,cAAc,MAAM;AACtBL,WAAOM,cAAP,GAAwBL,aAAaM,OAArC;AACAP,WAAOQ,QAAP,GAAkBR,OAAOS,KAAP,CAAaC,OAAb,CAAqBC,iBAArB,IAA0C,QAA5D;AACAX,WAAOY,eAAP,GAAyBT,aAAa,eAASS,eAAtB,CAAzB;AACD,GAJD;;AAMA,MAAIC,aAAa,MAAMX,+BAA+BY,kBAA/B,CAAkDd,OAAOI,cAAzD,EAAyEC,WAAzE,CAAvB;;AAEAQ;;AAEAb,SAAOe,GAAP,CAAW,qBAAX,EAAkCF,UAAlC;AACD,CArBc,EAAjB","file":"bakeExecutionDetails.controller.js","sourceRoot":"/Users/jreynolds/Development/Netflix/git/spinnaker/deck/app/scripts/modules/docker","sourcesContent":["'use strict';\n\nconst angular = require('angular');\n\nimport { SETTINGS } from '@spinnaker/core';\n\nmodule.exports = angular\n .module('spinnaker.docker.pipeline.stage.bake.executionDetails.controller', [require('@uirouter/angularjs').default])\n .controller('dockerBakeExecutionDetailsCtrl', function(\n $scope,\n $stateParams,\n executionDetailsSectionService,\n $interpolate,\n ) {\n $scope.configSections = ['bakeConfig', 'taskStatus'];\n\n let initialized = () => {\n $scope.detailsSection = $stateParams.details;\n $scope.provider = $scope.stage.context.cloudProviderType || 'docker';\n $scope.bakeryDetailUrl = $interpolate(SETTINGS.bakeryDetailUrl);\n };\n\n let initialize = () => executionDetailsSectionService.synchronizeSection($scope.configSections, initialized);\n\n initialize();\n\n $scope.$on('$stateChangeSuccess', initialize);\n });\n"]}]} |
/// <reference types="angular" /> | ||
import { IChangesObject, IController, IOnChangesObject } from 'angular'; | ||
import { DockerImageReaderService } from './docker.image.reader.service'; | ||
export interface IOnDockerBindingsChanges extends IOnChangesObject { | ||
@@ -8,3 +7,2 @@ registry: IChangesObject<string>; | ||
export declare class DockerImageAndTagSelectorController implements IController { | ||
private dockerImageReader; | ||
private viewState; | ||
@@ -31,3 +29,2 @@ private accountMap; | ||
deferInitialization: boolean; | ||
constructor(dockerImageReader: DockerImageReaderService); | ||
private updateOrganizationsList(); | ||
@@ -34,0 +31,0 @@ private updateRepositoryList(); |
@@ -6,7 +6,5 @@ "use strict"; | ||
const core_1 = require("@spinnaker/core"); | ||
const docker_image_reader_service_1 = require("./docker.image.reader.service"); | ||
const DockerImageReader_1 = require("./DockerImageReader"); | ||
class DockerImageAndTagSelectorController { | ||
constructor(dockerImageReader) { | ||
'ngInject'; | ||
this.dockerImageReader = dockerImageReader; | ||
constructor() { | ||
this.viewState = { | ||
@@ -133,4 +131,3 @@ imagesLoading: false, | ||
this.viewState.imagesLoading = true; | ||
const imageLoader = this.dockerImageReader | ||
.findImages(imageConfig) | ||
const imageLoader = DockerImageReader_1.DockerImageReader.findImages(imageConfig) | ||
.then((images) => { | ||
@@ -206,3 +203,3 @@ if (this.imageLoader !== imageLoader) { | ||
exports.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT = 'spinnaker.docker.imageAndTagSelector.component'; | ||
angular_1.module(exports.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT, [docker_image_reader_service_1.DOCKER_IMAGE_READER]).component('dockerImageAndTagSelector', new DockerImageAndTagSelectorComponent()); | ||
angular_1.module(exports.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT, []).component('dockerImageAndTagSelector', new DockerImageAndTagSelectorComponent()); | ||
//# sourceMappingURL=dockerImageAndTagSelector.component.js.map |
@@ -1,1 +0,1 @@ | ||
export * from './docker.image.reader.service'; | ||
export * from './DockerImageReader'; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./docker.image.reader.service")); | ||
__export(require("./DockerImageReader")); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory(require("@spinnaker/core")):"function"==typeof define&&define.amd?define("@spinnaker/docker",["@spinnaker/core"],factory):"object"==typeof exports?exports["@spinnaker/docker"]=factory(require("@spinnaker/core")):root["@spinnaker/docker"]=factory(root["@spinnaker/core"])}(window,function(__WEBPACK_EXTERNAL_MODULE__1__){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.r=function(exports){Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=11)}([function(module,exports){module.exports=require("angular")},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE__1__},function(module,exports,__webpack_require__){"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();Object.defineProperty(exports,"__esModule",{value:!0});var angular_1=__webpack_require__(0),core_1=__webpack_require__(1),DockerImageReaderService=function(){function DockerImageReaderService(retryService){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,DockerImageReaderService),this.retryService=retryService}return _createClass(DockerImageReaderService,[{key:"getImage",value:function(imageName,region,credentials){return core_1.API.all("images").one(credentials).one(region).one(imageName).withParams({provider:"docker"}).get().then(function(results){return results&&results.length?results[0]:null}).catch(function(){return null})}},{key:"findImages",value:function(params){return this.retryService.buildRetrySequence(function(){return core_1.API.all("images/find").getList(params)},function(results){return results.length>0},10,1e3).then(function(results){return results}).catch(function(){return[]})}},{key:"findTags",value:function(params){return this.retryService.buildRetrySequence(function(){return core_1.API.all("images/tags").getList(params)},function(results){return results.length>0},10,1e3).then(function(results){return results}).catch(function(){return[]})}}]),DockerImageReaderService}();exports.DockerImageReaderService=DockerImageReaderService,exports.DOCKER_IMAGE_READER="spinnaker.docker.image.reader",angular_1.module(exports.DOCKER_IMAGE_READER,[core_1.RETRY_SERVICE]).service("dockerImageReader",DockerImageReaderService)},function(module,exports){var path="docker/src/pipeline/trigger/selectorTemplate.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<docker-trigger-options command="vm.command"></docker-trigger-options>\n')}]),module.exports=path},function(module,exports){var path="docker/src/pipeline/trigger/dockerTriggerOptions.directive.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<div class="form-group">\n <label class="col-md-4 sm-label-right">Tag</label>\n <div class="col-md-6" ng-if="vm.viewState.tagsLoading">\n <p class="form-control-static text-center">\n <loading-spinner size="\'small\'"></loading-spinner>\n </p>\n </div>\n \x3c!-- prevent form submission while tags are loading --\x3e\n <input type="hidden" ng-required="vm.viewState.tagsLoading" ng-model="vm.viewState.selectedTag" />\n <div class="col-md-6" ng-if="vm.viewState.loadError">Error loading tags!</div>\n <div class="col-md-6" ng-if="!vm.viewState.tagsLoading">\n <div ng-if="!vm.tags.length"><p class="form-control-static">No tags found</p></div>\n <ui-select class="form-control input-sm"\n ng-model="vm.viewState.selectedTag"\n on-select="vm.updateSelectedTag($item)"\n reset-search-input="false">\n <ui-select-match placeholder="Select...">\n <span>\n <strong>{{$select.selected}}</strong>\n </span>\n </ui-select-match>\n <ui-select-choices repeat="tag in vm.tags | filter: $select.search"\n refresh-delay="0"\n >\n <span ng-bind-html="tag | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n')}]),module.exports=path},function(module,exports){var path="docker/src/pipeline/trigger/dockerTrigger.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<ng-form name="dockerForm">\n <docker-image-and-tag-selector\n specify-tag-by-regex="true"\n account="trigger.account"\n organization="trigger.organization"\n registry="trigger.registry"\n repository="trigger.repository"\n tag="trigger.tag"\n show-registry="true"\n on-change="ctrl.onChange"></docker-image-and-tag-selector>\n\n <div class="form-group" ng-if="vm.fiatEnabled">\n <run-as-user-selector service-accounts="vm.serviceAccounts"\n component="vm.trigger"\n field="runAsUser">\n </run-as-user-selector>\n </div>\n</ng-form>\n')}]),module.exports=path},function(module,exports){var path="docker/src/pipeline/stages/bake/bakeStage.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<div ng-controller="dockerBakeStageCtrl as bakeStageCtrl">\n <stage-config-field label="Package" help-key="pipeline.config.bake.package">\n <input type="text" class="form-control input-sm"\n ng-model="stage.package"/>\n </stage-config-field>\n <stage-config-field label="Organization" help-key="pipeline.config.docker.bake.organization">\n <input type="text" class="form-control input-sm"\n ng-model="stage.organization"/>\n </stage-config-field>\n <stage-config-field label="Image Name" help-key="pipeline.config.docker.bake.targetImage">\n <input type="text" class="form-control input-sm"\n ng-model="stage.ami_name"/>\n </stage-config-field>\n <stage-config-field label="Image tag" help-key="pipeline.config.docker.bake.targetImageTag">\n <input type="text" class="form-control input-sm"\n ng-model="stage.extendedAttributes[\'docker_target_image_tag\']"/>\n </stage-config-field>\n <stage-config-field label="Base OS">\n <bake-stage-choose-os model="stage.baseOs" base-os-options="baseOsOptions"></bake-stage-choose-os>\n </stage-config-field>\n\n <stage-config-field label="Base Label">\n <label class="radio-inline" ng-repeat="baseLabel in baseLabelOptions">\n <input type="radio"\n ng-model="stage.baseLabel"\n ng-value="baseLabel"/>\n {{baseLabel}}\n </label>\n </stage-config-field>\n <stage-config-field label="Rebake">\n <div class="checkbox" style="margin-bottom: 0">\n <label>\n <input type="checkbox"\n ng-model="stage.rebake">\n </input>\n Rebake image without regard to the status of any existing bake\n </label>\n </div>\n </stage-config-field>\n</div>\n')}]),module.exports=path},function(module,exports){var path="docker/src/pipeline/stages/bake/bakeExecutionDetails.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<div ng-controller="dockerBakeExecutionDetailsCtrl">\n <execution-details-section-nav sections="configSections"></execution-details-section-nav>\n <div class="step-section-details" ng-if="detailsSection === \'bakeConfig\'">\n <div class="row">\n <div class="col-md-6">\n <dl class="dl-narrow dl-horizontal">\n <dt if-multiple-providers>Provider</dt>\n <dd if-multiple-providers>Docker</dd>\n <dt>Organization</dt>\n <dd>{{stage.context.organization}}</dd>\n <dt>Image Name</dt>\n <dd>{{stage.context.ami_name}}</dd>\n <dt>Image Tag</dt>\n <dd>{{stage.context.extendedAttributes[\'docker_target_image_tag\']}}</dd>\n <dt>Image</dt>\n <dd>{{stage.context.ami}}</dd>\n </dl>\n </div>\n <div class="col-md-6">\n <dl class="dl-narrow dl-horizontal">\n <dt>Base OS</dt>\n <dd>{{stage.context.baseOs}}</dd>\n <dt>Region</dt>\n <dd>{{stage.context.region}}</dd>\n <dt>Package</dt>\n <dd>{{stage.context.package}}</dd>\n <dt>Label</dt>\n <dd>{{stage.context.baseLabel}}</dd>\n </dl>\n </div>\n </div>\n <stage-failure-message stage="stage" message="stage.failureMessage"></stage-failure-message>\n\n <div class="row" ng-if="stage.context.region && stage.context.status.resourceId">\n <div class="col-md-12">\n <div class="alert alert-{{stage.isFailed ? \'danger\' : \'info\'}}">\n <a target="_blank" href="{{ bakeryDetailUrl(stage) }}">\n View Bakery Details\n </a>\n </div>\n </div>\n </div>\n\n </div>\n <div class="step-section-details" ng-if="detailsSection === \'taskStatus\'">\n <div class="row">\n <execution-step-details item="stage"></execution-step-details>\n </div>\n </div>\n</div>\n')}]),module.exports=path},function(module,exports){var path="docker/src/image/dockerImageAndTagSelector.component.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<div class="form-group" ng-if="$ctrl.showRegistry">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Registry Name\n </div>\n <div ng-class="$ctrl.fieldClass">\n <ui-select ng-model="$ctrl.account"\n ng-disabled="$ctrl.viewState.imagesRefreshing"\n ng-change="$ctrl.changeAccount()"\n class="form-control input-sm">\n <ui-select-match>{{$ctrl.account}}</ui-select-match>\n <ui-select-choices repeat="account in $ctrl.accounts | filter: $select.search | orderBy">\n <span ng-bind-html="account | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n <div class="col-md-1 text-center">\n <a href\n ng-click="$ctrl.refreshImages()"\n tooltip-placement="right"\n uib-tooltip="{{$ctrl.viewState.imagesRefreshing ? \'Images refreshing.\' : \'Refresh images list\' }}">\n <span ng-class="{\'fa-spin\':$ctrl.viewState.imagesRefreshing}"\n class="fa fa-sync-alt"></span>\n </a>\n </div>\n</div>\n<div class="form-group">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Organization\n </div>\n <div ng-class="$ctrl.fieldClass">\n <input class="form-control input-sm"\n ng-if="$ctrl.organization.includes(\'${\')"\n ng-model="$ctrl.organization"/>\n <ui-select ng-model="$ctrl.organization"\n ng-if="!$ctrl.organization.includes(\'${\')"\n ng-disabled="$ctrl.viewState.imagesRefreshing"\n ng-change="$ctrl.updateRepositoryList()" class="form-control input-sm">\n <ui-select-match placeholder="No organization">{{$ctrl.organization}}</ui-select-match>\n <ui-select-choices repeat="organization in $ctrl.organizations | filter: $select.search | orderBy">\n <span ng-bind-html="organization || \'No organization\' | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n<div class="form-group">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Image\n </div>\n <div ng-class="$ctrl.fieldClass">\n <input class="form-control input-sm"\n ng-if="$ctrl.repository.includes(\'${\')"\n ng-model="$ctrl.repository"/>\n <ui-select ng-model="$ctrl.repository"\n ng-if="!$ctrl.repository.includes(\'${\')"\n ng-disabled="$ctrl.viewState.imagesRefreshing"\n ng-change="$ctrl.updateTag()"\n class="form-control input-sm"\n required>\n <ui-select-match>{{$ctrl.repository}}</ui-select-match>\n <ui-select-choices repeat="repository in $ctrl.repositories | filter: $select.search | orderBy">\n <span ng-bind-html="repository | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n<div class="form-group" ng-if="$ctrl.specifyTagByRegex">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Tag\n <help-field key="pipeline.config.docker.trigger.tag"></help-field>\n </div>\n <div ng-class="$ctrl.fieldClass">\n <input type="text"\n class="form-control input-sm"\n ng-model="$ctrl.tag"\n ng-disabled="$ctrl.viewState.imagesRefreshing || !$ctrl.repository"\n ng-change="$ctrl.updateTag()"/>\n </div>\n</div>\n<div class="form-group" ng-if="!$ctrl.specifyTagByRegex">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Tag\n </div>\n <div ng-class="$ctrl.fieldClass">\n <input class="form-control input-sm"\n ng-if="$ctrl.tag.includes(\'${\')"\n ng-model="$ctrl.tag"/>\n <ui-select ng-model="$ctrl.tag"\n ng-if="!$ctrl.tag.includes(\'${\')"\n ng-disabled="$ctrl.viewState.imagesRefreshing || !$ctrl.repository"\n ng-change="$ctrl.updateTag()"\n class="form-control input-sm"\n required>\n <ui-select-match placeholder="No tag">{{$ctrl.tag}}</ui-select-match>\n <ui-select-choices repeat="tag in $ctrl.tags | filter: $select.search | orderBy">\n <span ng-bind-html="tag || \'No tag\' | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n')}]),module.exports=path},function(module,exports){module.exports=require("lodash")},function(module,exports,__webpack_require__){"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var angular_1=__webpack_require__(0),lodash_1=__webpack_require__(9),core_1=__webpack_require__(1),docker_image_reader_service_1=__webpack_require__(2),DockerImageAndTagSelectorController=function(){function DockerImageAndTagSelectorController(dockerImageReader){"ngInject";_classCallCheck(this,DockerImageAndTagSelectorController),this.dockerImageReader=dockerImageReader,this.viewState={imagesLoading:!1,imagesLoaded:!1,imagesRefreshing:!1},this.organizations=[]}return DockerImageAndTagSelectorController.$inject=["dockerImageReader"],_createClass(DockerImageAndTagSelectorController,[{key:"updateOrganizationsList",value:function(){this.accountMap&&(this.showRegistry&&(this.registry=this.registryMap[this.account],this.onChange&&this.onChange({registry:this.registry})),this.organizations=this.accountMap[this.showRegistry?this.account:this.registry]||[],this.organizations.includes(this.organization)||!this.organization||this.organization.includes("${")||(this.organization=null),this.updateRepositoryList())}},{key:"updateRepositoryList",value:function(){if(this.organizationMap){var key=(this.showRegistry?this.account:this.registry)+"/"+(this.organization||"");this.repositories=this.organizationMap[key]||[],this.repositories.includes(this.repository)||!this.repository||this.repository.includes("${")||(this.repository=null),this.updateTag()}}},{key:"updateTag",value:function(){if(this.specifyTagByRegex)""===lodash_1.trim(this.tag)&&this.tag&&(this.tag=null);else if(this.repositoryMap){var key=this.repository;this.tags=this.repositoryMap[key]||[],this.tags.includes(this.tag)||!this.tag||this.tag.includes("${")||(this.tag=null)}}},{key:"updateRegistryMap",value:function(images){this.registryMap=images.reduce(function(map,image){return map[image.account]=image.registry,map},{})}},{key:"updateAccountMap",value:function(images){var results=images.reduce(function(map,image){var key=image.account;if(!key)return map;var parts=image.repository.split("/");parts.pop();var org=parts.join("/");return map[key]||(map[key]=[]),map[key].push(org),map},{});this.uniqMapEntries(results),this.accountMap=results}},{key:"updateOrganizationMap",value:function(images){var results=images.reduce(function(map,image){if(!image.repository)return map;var parts=image.repository.split("/");parts.pop();var key=image.account+"/"+parts.join("/");return map[key]||(map[key]=[]),map[key].push(image.repository),map},{});this.uniqMapEntries(results),this.organizationMap=results}},{key:"updateRepositoryMap",value:function(images){var results=images.reduce(function(map,image){if(!image.repository)return map;var key=image.repository;return map[key]||(map[key]=[]),map[key].push(image.tag),map},{});this.uniqMapEntries(results),this.repositoryMap=results}},{key:"initializeAccounts",value:function(){var _this=this;core_1.AccountService.listAccounts("dockerRegistry").then(function(accounts){_this.accounts=accounts.map(function(account){return account.name}),_this.showRegistry&&!_this.account&&(_this.account=_this.accounts[0]),_this.refreshImages()})}},{key:"initializeImages",value:function(){var _this2=this,imageConfig={provider:"dockerRegistry",account:this.showRegistry?this.account:this.registry};this.viewState.imagesLoading=!0;var imageLoader=this.dockerImageReader.findImages(imageConfig).then(function(images){var _organizations;_this2.imageLoader===imageLoader&&(_this2.updateRegistryMap(images),_this2.updateAccountMap(images),_this2.accounts=_this2.accounts||Object.keys(_this2.accountMap),_this2.updateOrganizationMap(images),(_organizations=_this2.organizations).push.apply(_organizations,function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}(Object.keys(_this2.organizationMap))),_this2.updateRepositoryMap(images),_this2.updateOrganizationsList(),_this2.viewState.imagesLoaded=!0)}).finally(function(){_this2.viewState.imagesLoading=!1,_this2.viewState.imagesRefreshing=!1});this.imageLoader=imageLoader}},{key:"uniqMapEntries",value:function(map){Object.keys(map).forEach(function(k){map[k]=lodash_1.uniq(map[k])})}},{key:"isNew",value:function(){return!(this.account||this.organization||this.registry||this.repository||this.tag)}},{key:"refreshImages",value:function(){this.viewState.imagesRefreshing=!0,this.initializeImages()}},{key:"changeAccount",value:function(){this.organization=this.repository=this.tag=null,this.initializeImages()}},{key:"$onInit",value:function(){this.labelClass=this.labelClass||"col-md-3",this.fieldClass=this.fieldClass||"col-md-8",this.deferInitialization||!this.registry&&!this.isNew()||this.initializeAccounts()}},{key:"$onChanges",value:function(changes){this.deferInitialization&&changes.registry&&lodash_1.isString(changes.registry.currentValue)&&this.initializeAccounts()}}]),DockerImageAndTagSelectorController}();exports.DockerImageAndTagSelectorController=DockerImageAndTagSelectorController;exports.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT="spinnaker.docker.imageAndTagSelector.component",angular_1.module(exports.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT,[docker_image_reader_service_1.DOCKER_IMAGE_READER]).component("dockerImageAndTagSelector",new function DockerImageAndTagSelectorComponent(){_classCallCheck(this,DockerImageAndTagSelectorComponent),this.bindings={specifyTagByRegex:"=",organization:"=",registry:"<",repository:"=",tag:"=",account:"=",showRegistry:"<?",labelClass:"@?",fieldClass:"@?",onChange:"=?",deferInitialization:"=?"},this.controller=DockerImageAndTagSelectorController,this.templateUrl=__webpack_require__(8)})},function(module,exports,__webpack_require__){"use strict";function __export(m){for(var p in m)exports.hasOwnProperty(p)||(exports[p]=m[p])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(__webpack_require__(21)),__export(__webpack_require__(20))},function(module,exports){module.exports=require("rxjs")},function(module,exports,__webpack_require__){"use strict";var _rxjs=__webpack_require__(12),_docker=__webpack_require__(11),angular=__webpack_require__(0);module.exports=angular.module("spinnaker.docker.pipeline.config.triggers.options.directive",[_docker.DOCKER_IMAGE_READER]).directive("dockerTriggerOptions",function(){return{restrict:"E",templateUrl:__webpack_require__(4),bindToController:{command:"="},controller:"dockerTriggerOptionsCtrl",controllerAs:"vm",scope:{}}}).controller("dockerTriggerOptionsCtrl",["$scope","dockerImageReader",function($scope,dockerImageReader){var _this=this;this.command.extraFields={},this.viewState={tagsLoading:!0,loadError:!1,selectedTag:null};this.updateSelectedTag=function(tag){if(_this.command.extraFields.tag=tag,_this.command.trigger&&_this.command.trigger.repository){var imageName="";_this.command.trigger.registry&&(imageName+=_this.command.trigger.registry+"/"),imageName+=_this.command.trigger.repository,_this.command.extraFields.artifacts=[{type:"docker/image",name:imageName,version:tag,reference:imageName+":"+tag}]}};var queryStream=new _rxjs.Subject,subscription=queryStream.debounceTime(250).switchMap(function(){return _rxjs.Observable.fromPromise(dockerImageReader.findTags({provider:"dockerRegistry",account:_this.command.trigger.account,repository:_this.command.trigger.repository}))}).subscribe(function(tags){if(_this.tags=tags,_this.tags.length){var defaultSelection=_this.tags.find(function(t){return t===_this.command.trigger.tag})||_this.tags[0];_this.viewState.selectedTag=defaultSelection,_this.updateSelectedTag(defaultSelection)}_this.viewState.tagsLoading=!1},function(){_this.viewState.tagsLoading=!1,_this.viewState.loadError=!0});this.searchTags=function(){var query=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_this.tags=["<span>Finding tags"+(query&&" matching "+query)+"...</span>"],queryStream.next()},$scope.$watch(function(){return _this.command.trigger},function(){"docker"===_this.command.trigger.type?_this.searchTags():subscription.unsubscribe()})}])},function(module,exports,__webpack_require__){"use strict";var _core=__webpack_require__(1),_dockerImageReader=__webpack_require__(2),_dockerImageAndTagSelector=__webpack_require__(10),angular=__webpack_require__(0);module.exports=angular.module("spinnaker.docker.pipeline.trigger",[_core.SERVICE_ACCOUNT_SERVICE,_dockerImageReader.DOCKER_IMAGE_READER,__webpack_require__(13).name,_dockerImageAndTagSelector.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT]).config(["pipelineConfigProvider",function(pipelineConfigProvider){pipelineConfigProvider.registerTrigger({label:"Docker Registry",description:"Executes the pipeline on an image update",key:"docker",controller:"DockerTriggerCtrl as ctrl",controllerAs:"vm",templateUrl:__webpack_require__(5),manualExecutionHandler:"dockerTriggerExecutionHandler",validators:[{type:"requiredField",fieldName:"account",message:"<strong>Registry</strong> is a required field for Docker Registry triggers."},{type:"requiredField",fieldName:"repository",message:"<strong>Image</strong> is a required field for Docker Registry triggers."},{type:"serviceAccountAccess",preventSave:!0,message:"You do not have access to the service account configured in this pipeline's Docker Registry trigger.\n You will not be able to save your edits to this pipeline."}]})}]).factory("dockerTriggerExecutionHandler",["$q",function($q){return{formatLabel:function(trigger){return $q.when("(Docker Registry) "+(trigger.account?trigger.account+":":"")+" "+(trigger.repository||""))},selectorTemplate:__webpack_require__(3)}}]).controller("DockerTriggerCtrl",["trigger","serviceAccountService",function(trigger,serviceAccountService){var _this=this;this.trigger=trigger,this.fiatEnabled=_core.SETTINGS.feature.fiatEnabled,serviceAccountService.getServiceAccounts().then(function(accounts){_this.serviceAccounts=accounts||[]}),this.onChange=function(changes){_this.trigger.registry=changes.registry}}])},function(module,exports){module.exports=require("@uirouter/angularjs")},function(module,exports,__webpack_require__){"use strict";var _core=__webpack_require__(1),angular=__webpack_require__(0);module.exports=angular.module("spinnaker.docker.pipeline.stage.bake.executionDetails.controller",[__webpack_require__(15).default]).controller("dockerBakeExecutionDetailsCtrl",["$scope","$stateParams","executionDetailsSectionService","$interpolate",function($scope,$stateParams,executionDetailsSectionService,$interpolate){$scope.configSections=["bakeConfig","taskStatus"];var initialized=function(){$scope.detailsSection=$stateParams.details,$scope.provider=$scope.stage.context.cloudProviderType||"docker",$scope.bakeryDetailUrl=$interpolate(_core.SETTINGS.bakeryDetailUrl)},initialize=function(){return executionDetailsSectionService.synchronizeSection($scope.configSections,initialized)};initialize(),$scope.$on("$stateChangeSuccess",initialize)}])},function(module,exports,__webpack_require__){"use strict";var obj,_lodash=__webpack_require__(9),_lodash2=(obj=_lodash)&&obj.__esModule?obj:{default:obj},_core=__webpack_require__(1);var angular=__webpack_require__(0);module.exports=angular.module("spinnaker.docker.pipeline.stage.bakeStage",[_core.PIPELINE_CONFIG_PROVIDER,__webpack_require__(16).name,_core.BAKERY_SERVICE]).config(["pipelineConfigProvider",function(pipelineConfigProvider){pipelineConfigProvider.registerStage({provides:"bake",cloudProvider:"docker",label:"Bake",description:"Bakes an image in the specified region",templateUrl:__webpack_require__(6),executionDetailsUrl:__webpack_require__(7),executionLabelComponent:_core.BakeExecutionLabel,extraLabelLines:function(stage){return stage.masterStage.context.allPreviouslyBaked||stage.masterStage.context.somePreviouslyBaked?1:0},defaultTimeoutMs:36e5,validators:[{type:"requiredField",fieldName:"package"}],restartable:!0})}]).controller("dockerBakeStageCtrl",["$scope","bakeryService","$q",function($scope,bakeryService,$q){$scope.stage.region="global",$scope.stage.user||($scope.stage.user=_core.AuthenticationService.getAuthenticatedUser().name),$scope.viewState={loading:!0},$scope.$watch("stage",function(){_lodash2.default.forOwn($scope.stage,function(val,key){""===val&&delete $scope.stage[key]})},!0),$scope.viewState.providerSelected=!0,$q.all({baseOsOptions:bakeryService.getBaseOsOptions("docker"),baseLabelOptions:bakeryService.getBaseLabelOptions()}).then(function(results){$scope.baseOsOptions=results.baseOsOptions.baseImages,$scope.baseLabelOptions=results.baseLabelOptions,!$scope.stage.baseOs&&$scope.baseOsOptions&&$scope.baseOsOptions.length&&($scope.stage.baseOs=$scope.baseOsOptions[0].id),!$scope.stage.baseLabel&&$scope.baseLabelOptions&&$scope.baseLabelOptions.length&&($scope.stage.baseLabel=$scope.baseLabelOptions[0]),$scope.viewState.loading=!1})}])},function(module,exports,__webpack_require__){var map={"./image/dockerImageAndTagSelector.component.html":8,"./pipeline/stages/bake/bakeExecutionDetails.html":7,"./pipeline/stages/bake/bakeStage.html":6,"./pipeline/trigger/dockerTrigger.html":5,"./pipeline/trigger/dockerTriggerOptions.directive.html":4,"./pipeline/trigger/selectorTemplate.html":3};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){var id=map[req];if(!(id+1)){var e=new Error('Cannot find module "'+req+'".');throw e.code="MODULE_NOT_FOUND",e}return id}webpackContext.keys=function(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=18},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var angular_1=__webpack_require__(0),dockerImageAndTagSelector_component_1=__webpack_require__(10);exports.IMAGE_MODULE="spinnaker.docker.image",angular_1.module(exports.IMAGE_MODULE,[dockerImageAndTagSelector_component_1.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT])},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var angular_1=__webpack_require__(0),image_module_1=__webpack_require__(19),templates=__webpack_require__(18);templates.keys().forEach(function(key){templates(key)}),exports.DOCKER_MODULE="spinnaker.docker",angular_1.module(exports.DOCKER_MODULE,[__webpack_require__(17).name,__webpack_require__(14).name,image_module_1.IMAGE_MODULE])},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),function(m){for(var p in m)exports.hasOwnProperty(p)||(exports[p]=m[p])}(__webpack_require__(2))}])}); | ||
!function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory(require("@spinnaker/core")):"function"==typeof define&&define.amd?define("@spinnaker/docker",["@spinnaker/core"],factory):"object"==typeof exports?exports["@spinnaker/docker"]=factory(require("@spinnaker/core")):root["@spinnaker/docker"]=factory(root["@spinnaker/core"])}(window,function(__WEBPACK_EXTERNAL_MODULE__1__){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.r=function(exports){Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=21)}([function(module,exports){module.exports=require("angular")},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE__1__},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const core_1=__webpack_require__(1);exports.DockerImageReader=class{static getImage(imageName,region,credentials){return core_1.API.all("images").one(credentials).one(region).one(imageName).withParams({provider:"docker"}).get().then(results=>results&&results.length?results[0]:null).catch(()=>null)}static findImages(params){return core_1.RetryService.buildRetrySequence(()=>core_1.API.all("images/find").getList(params),results=>results.length>0,10,1e3).then(results=>results).catch(()=>[])}static findTags(params){return core_1.RetryService.buildRetrySequence(()=>core_1.API.all("images/tags").getList(params),results=>results.length>0,10,1e3).then(results=>results).catch(()=>[])}}},function(module,exports){var path="docker/src/pipeline/trigger/dockerTrigger.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<ng-form name="dockerForm">\n <docker-image-and-tag-selector\n specify-tag-by-regex="true"\n account="trigger.account"\n organization="trigger.organization"\n registry="trigger.registry"\n repository="trigger.repository"\n tag="trigger.tag"\n show-registry="true"\n on-change="ctrl.onChange"></docker-image-and-tag-selector>\n\n <div class="form-group" ng-if="vm.fiatEnabled">\n <run-as-user-selector service-accounts="vm.serviceAccounts"\n component="vm.trigger"\n field="runAsUser">\n </run-as-user-selector>\n </div>\n</ng-form>\n')}]),module.exports=path},function(module,exports){var path="docker/src/pipeline/stages/bake/bakeStage.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<div ng-controller="dockerBakeStageCtrl as bakeStageCtrl">\n <stage-config-field label="Package" help-key="pipeline.config.bake.package">\n <input type="text" class="form-control input-sm"\n ng-model="stage.package"/>\n </stage-config-field>\n <stage-config-field label="Organization" help-key="pipeline.config.docker.bake.organization">\n <input type="text" class="form-control input-sm"\n ng-model="stage.organization"/>\n </stage-config-field>\n <stage-config-field label="Image Name" help-key="pipeline.config.docker.bake.targetImage">\n <input type="text" class="form-control input-sm"\n ng-model="stage.ami_name"/>\n </stage-config-field>\n <stage-config-field label="Image tag" help-key="pipeline.config.docker.bake.targetImageTag">\n <input type="text" class="form-control input-sm"\n ng-model="stage.extendedAttributes[\'docker_target_image_tag\']"/>\n </stage-config-field>\n <stage-config-field label="Base OS">\n <bake-stage-choose-os model="stage.baseOs" base-os-options="baseOsOptions"></bake-stage-choose-os>\n </stage-config-field>\n\n <stage-config-field label="Base Label">\n <label class="radio-inline" ng-repeat="baseLabel in baseLabelOptions">\n <input type="radio"\n ng-model="stage.baseLabel"\n ng-value="baseLabel"/>\n {{baseLabel}}\n </label>\n </stage-config-field>\n <stage-config-field label="Rebake">\n <div class="checkbox" style="margin-bottom: 0">\n <label>\n <input type="checkbox"\n ng-model="stage.rebake">\n </input>\n Rebake image without regard to the status of any existing bake\n </label>\n </div>\n </stage-config-field>\n</div>\n')}]),module.exports=path},function(module,exports){var path="docker/src/pipeline/stages/bake/bakeExecutionDetails.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<div ng-controller="dockerBakeExecutionDetailsCtrl">\n <execution-details-section-nav sections="configSections"></execution-details-section-nav>\n <div class="step-section-details" ng-if="detailsSection === \'bakeConfig\'">\n <div class="row">\n <div class="col-md-6">\n <dl class="dl-narrow dl-horizontal">\n <dt if-multiple-providers>Provider</dt>\n <dd if-multiple-providers>Docker</dd>\n <dt>Organization</dt>\n <dd>{{stage.context.organization}}</dd>\n <dt>Image Name</dt>\n <dd>{{stage.context.ami_name}}</dd>\n <dt>Image Tag</dt>\n <dd>{{stage.context.extendedAttributes[\'docker_target_image_tag\']}}</dd>\n <dt>Image</dt>\n <dd>{{stage.context.ami}}</dd>\n </dl>\n </div>\n <div class="col-md-6">\n <dl class="dl-narrow dl-horizontal">\n <dt>Base OS</dt>\n <dd>{{stage.context.baseOs}}</dd>\n <dt>Region</dt>\n <dd>{{stage.context.region}}</dd>\n <dt>Package</dt>\n <dd>{{stage.context.package}}</dd>\n <dt>Label</dt>\n <dd>{{stage.context.baseLabel}}</dd>\n </dl>\n </div>\n </div>\n <stage-failure-message stage="stage" message="stage.failureMessage"></stage-failure-message>\n\n <div class="row" ng-if="stage.context.region && stage.context.status.resourceId">\n <div class="col-md-12">\n <div class="alert alert-{{stage.isFailed ? \'danger\' : \'info\'}}">\n <a target="_blank" href="{{ bakeryDetailUrl(stage) }}">\n View Bakery Details\n </a>\n </div>\n </div>\n </div>\n\n </div>\n <div class="step-section-details" ng-if="detailsSection === \'taskStatus\'">\n <div class="row">\n <execution-step-details item="stage"></execution-step-details>\n </div>\n </div>\n</div>\n')}]),module.exports=path},function(module,exports){var path="docker/src/image/dockerImageAndTagSelector.component.html";window.angular.module("ng").run(["$templateCache",function(c){c.put(path,'<div class="form-group" ng-if="$ctrl.showRegistry">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Registry Name\n </div>\n <div ng-class="$ctrl.fieldClass">\n <ui-select ng-model="$ctrl.account"\n ng-disabled="$ctrl.viewState.imagesRefreshing"\n ng-change="$ctrl.changeAccount()"\n class="form-control input-sm">\n <ui-select-match>{{$ctrl.account}}</ui-select-match>\n <ui-select-choices repeat="account in $ctrl.accounts | filter: $select.search | orderBy">\n <span ng-bind-html="account | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n <div class="col-md-1 text-center">\n <a href\n ng-click="$ctrl.refreshImages()"\n tooltip-placement="right"\n uib-tooltip="{{$ctrl.viewState.imagesRefreshing ? \'Images refreshing.\' : \'Refresh images list\' }}">\n <span ng-class="{\'fa-spin\':$ctrl.viewState.imagesRefreshing}"\n class="fa fa-sync-alt"></span>\n </a>\n </div>\n</div>\n<div class="form-group">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Organization\n </div>\n <div ng-class="$ctrl.fieldClass">\n <input class="form-control input-sm"\n ng-if="$ctrl.organization.includes(\'${\')"\n ng-model="$ctrl.organization"/>\n <ui-select ng-model="$ctrl.organization"\n ng-if="!$ctrl.organization.includes(\'${\')"\n ng-disabled="$ctrl.viewState.imagesRefreshing"\n ng-change="$ctrl.updateRepositoryList()" class="form-control input-sm">\n <ui-select-match placeholder="No organization">{{$ctrl.organization}}</ui-select-match>\n <ui-select-choices repeat="organization in $ctrl.organizations | filter: $select.search | orderBy">\n <span ng-bind-html="organization || \'No organization\' | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n<div class="form-group">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Image\n </div>\n <div ng-class="$ctrl.fieldClass">\n <input class="form-control input-sm"\n ng-if="$ctrl.repository.includes(\'${\')"\n ng-model="$ctrl.repository"/>\n <ui-select ng-model="$ctrl.repository"\n ng-if="!$ctrl.repository.includes(\'${\')"\n ng-disabled="$ctrl.viewState.imagesRefreshing"\n ng-change="$ctrl.updateTag()"\n class="form-control input-sm"\n required>\n <ui-select-match>{{$ctrl.repository}}</ui-select-match>\n <ui-select-choices repeat="repository in $ctrl.repositories | filter: $select.search | orderBy">\n <span ng-bind-html="repository | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n<div class="form-group" ng-if="$ctrl.specifyTagByRegex">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Tag\n <help-field key="pipeline.config.docker.trigger.tag"></help-field>\n </div>\n <div ng-class="$ctrl.fieldClass">\n <input type="text"\n class="form-control input-sm"\n ng-model="$ctrl.tag"\n ng-disabled="$ctrl.viewState.imagesRefreshing || !$ctrl.repository"\n ng-change="$ctrl.updateTag()"/>\n </div>\n</div>\n<div class="form-group" ng-if="!$ctrl.specifyTagByRegex">\n <div ng-class="$ctrl.labelClass" class="sm-label-right">\n Tag\n </div>\n <div ng-class="$ctrl.fieldClass">\n <input class="form-control input-sm"\n ng-if="$ctrl.tag.includes(\'${\')"\n ng-model="$ctrl.tag"/>\n <ui-select ng-model="$ctrl.tag"\n ng-if="!$ctrl.tag.includes(\'${\')"\n ng-disabled="$ctrl.viewState.imagesRefreshing || !$ctrl.repository"\n ng-change="$ctrl.updateTag()"\n class="form-control input-sm"\n required>\n <ui-select-match placeholder="No tag">{{$ctrl.tag}}</ui-select-match>\n <ui-select-choices repeat="tag in $ctrl.tags | filter: $select.search | orderBy">\n <span ng-bind-html="tag || \'No tag\' | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n')}]),module.exports=path},function(module,exports){module.exports=require("lodash")},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const angular_1=__webpack_require__(0),lodash_1=__webpack_require__(7),core_1=__webpack_require__(1),DockerImageReader_1=__webpack_require__(2);class DockerImageAndTagSelectorController{constructor(){this.viewState={imagesLoading:!1,imagesLoaded:!1,imagesRefreshing:!1},this.organizations=[]}updateOrganizationsList(){this.accountMap&&(this.showRegistry&&(this.registry=this.registryMap[this.account],this.onChange&&this.onChange({registry:this.registry})),this.organizations=this.accountMap[this.showRegistry?this.account:this.registry]||[],this.organizations.includes(this.organization)||!this.organization||this.organization.includes("${")||(this.organization=null),this.updateRepositoryList())}updateRepositoryList(){if(this.organizationMap){const key=`${this.showRegistry?this.account:this.registry}/${this.organization||""}`;this.repositories=this.organizationMap[key]||[],this.repositories.includes(this.repository)||!this.repository||this.repository.includes("${")||(this.repository=null),this.updateTag()}}updateTag(){if(this.specifyTagByRegex)""===lodash_1.trim(this.tag)&&this.tag&&(this.tag=null);else if(this.repositoryMap){const key=this.repository;this.tags=this.repositoryMap[key]||[],this.tags.includes(this.tag)||!this.tag||this.tag.includes("${")||(this.tag=null)}}updateRegistryMap(images){this.registryMap=images.reduce((map,image)=>(map[image.account]=image.registry,map),{})}updateAccountMap(images){const results=images.reduce((map,image)=>{const key=image.account;if(!key)return map;const parts=image.repository.split("/");parts.pop();const org=parts.join("/");return map[key]||(map[key]=[]),map[key].push(org),map},{});this.uniqMapEntries(results),this.accountMap=results}updateOrganizationMap(images){const results=images.reduce((map,image)=>{if(!image.repository)return map;const parts=image.repository.split("/");parts.pop();const key=`${image.account}/${parts.join("/")}`;return map[key]||(map[key]=[]),map[key].push(image.repository),map},{});this.uniqMapEntries(results),this.organizationMap=results}updateRepositoryMap(images){const results=images.reduce((map,image)=>{if(!image.repository)return map;const key=image.repository;return map[key]||(map[key]=[]),map[key].push(image.tag),map},{});this.uniqMapEntries(results),this.repositoryMap=results}initializeAccounts(){core_1.AccountService.listAccounts("dockerRegistry").then(accounts=>{this.accounts=accounts.map(account=>account.name),this.showRegistry&&!this.account&&(this.account=this.accounts[0]),this.refreshImages()})}initializeImages(){const imageConfig={provider:"dockerRegistry",account:this.showRegistry?this.account:this.registry};this.viewState.imagesLoading=!0;const imageLoader=DockerImageReader_1.DockerImageReader.findImages(imageConfig).then(images=>{this.imageLoader===imageLoader&&(this.updateRegistryMap(images),this.updateAccountMap(images),this.accounts=this.accounts||Object.keys(this.accountMap),this.updateOrganizationMap(images),this.organizations.push(...Object.keys(this.organizationMap)),this.updateRepositoryMap(images),this.updateOrganizationsList(),this.viewState.imagesLoaded=!0)}).finally(()=>{this.viewState.imagesLoading=!1,this.viewState.imagesRefreshing=!1});this.imageLoader=imageLoader}uniqMapEntries(map){Object.keys(map).forEach(k=>{map[k]=lodash_1.uniq(map[k])})}isNew(){return!(this.account||this.organization||this.registry||this.repository||this.tag)}refreshImages(){this.viewState.imagesRefreshing=!0,this.initializeImages()}changeAccount(){this.organization=this.repository=this.tag=null,this.initializeImages()}$onInit(){this.labelClass=this.labelClass||"col-md-3",this.fieldClass=this.fieldClass||"col-md-8",this.deferInitialization||!this.registry&&!this.isNew()||this.initializeAccounts()}$onChanges(changes){this.deferInitialization&&changes.registry&&lodash_1.isString(changes.registry.currentValue)&&this.initializeAccounts()}}exports.DockerImageAndTagSelectorController=DockerImageAndTagSelectorController;exports.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT="spinnaker.docker.imageAndTagSelector.component",angular_1.module(exports.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT,[]).component("dockerImageAndTagSelector",new class{constructor(){this.bindings={specifyTagByRegex:"=",organization:"=",registry:"<",repository:"=",tag:"=",account:"=",showRegistry:"<?",labelClass:"@?",fieldClass:"@?",onChange:"=?",deferInitialization:"=?"},this.controller=DockerImageAndTagSelectorController,this.templateUrl=__webpack_require__(6)}})},function(module,exports){module.exports=require("rxjs")},function(module,exports){module.exports=require("ngimport")},function(module,exports){module.exports=require("react")},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const React=__webpack_require__(11),ngimport_1=__webpack_require__(10),rxjs_1=__webpack_require__(9),core_1=__webpack_require__(1),DockerImageReader_1=__webpack_require__(2);exports.DockerTriggerTemplate=class extends React.Component{constructor(props){super(props),this.queryStream=new rxjs_1.Subject,this.handleQuery=(()=>{const trigger=this.props.command.trigger;return rxjs_1.Observable.fromPromise(DockerImageReader_1.DockerImageReader.findTags({provider:"dockerRegistry",account:trigger.account,repository:trigger.repository}))}),this.updateSelectedTag=(tag=>{const{command:command}=this.props,trigger=command.trigger;if(command.extraFields.tag=tag,trigger&&trigger.repository){let imageName="";trigger.registry&&(imageName+=trigger.registry+"/"),imageName+=trigger.repository,command.extraFields.artifacts=[{type:"docker/image",name:imageName,version:tag,reference:imageName+":"+tag}]}}),this.tagLoadSuccess=(tags=>{const{command:command}=this.props,trigger=command.trigger,newState={};if(newState.tags=tags,newState.tags.length){const defaultSelection=newState.tags.find(t=>t===trigger.tag)||newState.tags[0];newState.selectedTag=defaultSelection,this.updateSelectedTag(defaultSelection)}newState.tagsLoading=!1,this.setState(newState)}),this.tagLoadFailure=(()=>{this.setState({tagsLoading:!1,loadError:!0})}),this.searchTags=((query="")=>{this.setState({tags:[`<span>Finding tags${query&&` matching ${query}`}...</span>`]}),this.queryStream.next()}),this.state={tags:[],tagsLoading:!0,loadError:!1,selectedTag:""}}static formatLabel(trigger){return ngimport_1.$q.when(`(Docker Registry) ${trigger.account?trigger.account+":":""} ${trigger.repository||""}`)}componentDidMount(){const{command:command}=this.props;this.subscription=this.queryStream.debounceTime(250).switchMap(this.handleQuery).subscribe(this.tagLoadSuccess,this.tagLoadFailure),command.extraFields={},"docker"===command.trigger.type?this.searchTags():this.subscription.unsubscribe()}render(){const{tags:tags,tagsLoading:tagsLoading,loadError:loadError,selectedTag:selectedTag}=this.state,options=tags.map(tag=>({value:tag}));return React.createElement("div",{className:"form-group"},React.createElement("label",{className:"col-md-4 sm-label-right"},"Tag"),tagsLoading&&React.createElement("div",{className:"col-md-6"},React.createElement("div",{className:"form-control-static text-center"},React.createElement(core_1.Spinner,{size:"small"}))),React.createElement("input",{type:"hidden",required:tagsLoading,value:selectedTag}),loadError&&React.createElement("div",{className:"col-md-6"},"Error loading tags!"),!tagsLoading&&React.createElement("div",{className:"col-md-6"},0===tags.length&&React.createElement("div",null,React.createElement("p",{className:"form-control-static"},"No tags found")),tags.length>0&&React.createElement(core_1.TetheredSelect,{options:options,optionRenderer:o=>React.createElement("span",null,o.value),clearable:!1,value:selectedTag,valueRenderer:o=>React.createElement("span",null,React.createElement("strong",null,o.value)),onChange:o=>this.updateSelectedTag(o.value)})))}}},function(module,exports,__webpack_require__){"use strict";var _core=__webpack_require__(1),_dockerImageAndTagSelector=__webpack_require__(8),_DockerTriggerTemplate=__webpack_require__(12);const angular=__webpack_require__(0);module.exports=angular.module("spinnaker.docker.pipeline.trigger",[_core.SERVICE_ACCOUNT_SERVICE,_dockerImageAndTagSelector.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT]).config(["pipelineConfigProvider",function(pipelineConfigProvider){pipelineConfigProvider.registerTrigger({label:"Docker Registry",description:"Executes the pipeline on an image update",key:"docker",controller:"DockerTriggerCtrl as ctrl",controllerAs:"vm",templateUrl:__webpack_require__(3),manualExecutionComponent:_DockerTriggerTemplate.DockerTriggerTemplate,validators:[{type:"requiredField",fieldName:"account",message:"<strong>Registry</strong> is a required field for Docker Registry triggers."},{type:"requiredField",fieldName:"repository",message:"<strong>Image</strong> is a required field for Docker Registry triggers."},{type:"serviceAccountAccess",preventSave:!0,message:"You do not have access to the service account configured in this pipeline's Docker Registry trigger.\n You will not be able to save your edits to this pipeline."}]})}]).controller("DockerTriggerCtrl",["trigger","serviceAccountService",function(trigger,serviceAccountService){this.trigger=trigger,this.fiatEnabled=_core.SETTINGS.feature.fiatEnabled,serviceAccountService.getServiceAccounts().then(accounts=>{this.serviceAccounts=accounts||[]}),this.onChange=(changes=>{this.trigger.registry=changes.registry})}])},function(module,exports){module.exports=require("@uirouter/angularjs")},function(module,exports,__webpack_require__){"use strict";var _core=__webpack_require__(1);const angular=__webpack_require__(0);module.exports=angular.module("spinnaker.docker.pipeline.stage.bake.executionDetails.controller",[__webpack_require__(14).default]).controller("dockerBakeExecutionDetailsCtrl",["$scope","$stateParams","executionDetailsSectionService","$interpolate",function($scope,$stateParams,executionDetailsSectionService,$interpolate){$scope.configSections=["bakeConfig","taskStatus"];let initialized=()=>{$scope.detailsSection=$stateParams.details,$scope.provider=$scope.stage.context.cloudProviderType||"docker",$scope.bakeryDetailUrl=$interpolate(_core.SETTINGS.bakeryDetailUrl)},initialize=()=>executionDetailsSectionService.synchronizeSection($scope.configSections,initialized);initialize(),$scope.$on("$stateChangeSuccess",initialize)}])},function(module,exports,__webpack_require__){"use strict";var obj,_lodash=__webpack_require__(7),_lodash2=(obj=_lodash)&&obj.__esModule?obj:{default:obj},_core=__webpack_require__(1);const angular=__webpack_require__(0);module.exports=angular.module("spinnaker.docker.pipeline.stage.bakeStage",[_core.PIPELINE_CONFIG_PROVIDER,__webpack_require__(15).name,_core.BAKERY_SERVICE]).config(["pipelineConfigProvider",function(pipelineConfigProvider){pipelineConfigProvider.registerStage({provides:"bake",cloudProvider:"docker",label:"Bake",description:"Bakes an image in the specified region",templateUrl:__webpack_require__(4),executionDetailsUrl:__webpack_require__(5),executionLabelComponent:_core.BakeExecutionLabel,extraLabelLines:stage=>stage.masterStage.context.allPreviouslyBaked||stage.masterStage.context.somePreviouslyBaked?1:0,defaultTimeoutMs:36e5,validators:[{type:"requiredField",fieldName:"package"}],restartable:!0})}]).controller("dockerBakeStageCtrl",["$scope","bakeryService","$q",function($scope,bakeryService,$q){$scope.stage.region="global",$scope.stage.user||($scope.stage.user=_core.AuthenticationService.getAuthenticatedUser().name),$scope.viewState={loading:!0},$scope.$watch("stage",function(){_lodash2.default.forOwn($scope.stage,function(val,key){""===val&&delete $scope.stage[key]})},!0),$scope.viewState.providerSelected=!0,$q.all({baseOsOptions:bakeryService.getBaseOsOptions("docker"),baseLabelOptions:bakeryService.getBaseLabelOptions()}).then(function(results){$scope.baseOsOptions=results.baseOsOptions.baseImages,$scope.baseLabelOptions=results.baseLabelOptions,!$scope.stage.baseOs&&$scope.baseOsOptions&&$scope.baseOsOptions.length&&($scope.stage.baseOs=$scope.baseOsOptions[0].id),!$scope.stage.baseLabel&&$scope.baseLabelOptions&&$scope.baseLabelOptions.length&&($scope.stage.baseLabel=$scope.baseLabelOptions[0]),$scope.viewState.loading=!1})}])},function(module,exports,__webpack_require__){var map={"./image/dockerImageAndTagSelector.component.html":6,"./pipeline/stages/bake/bakeExecutionDetails.html":5,"./pipeline/stages/bake/bakeStage.html":4,"./pipeline/trigger/dockerTrigger.html":3};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){var id=map[req];if(!(id+1)){var e=new Error('Cannot find module "'+req+'".');throw e.code="MODULE_NOT_FOUND",e}return id}webpackContext.keys=function(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=17},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const angular_1=__webpack_require__(0),dockerImageAndTagSelector_component_1=__webpack_require__(8);exports.IMAGE_MODULE="spinnaker.docker.image",angular_1.module(exports.IMAGE_MODULE,[dockerImageAndTagSelector_component_1.DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT])},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const angular_1=__webpack_require__(0),image_module_1=__webpack_require__(18),templates=__webpack_require__(17);templates.keys().forEach(function(key){templates(key)}),exports.DOCKER_MODULE="spinnaker.docker",angular_1.module(exports.DOCKER_MODULE,[__webpack_require__(16).name,__webpack_require__(13).name,image_module_1.IMAGE_MODULE])},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),function(m){for(var p in m)exports.hasOwnProperty(p)||(exports[p]=m[p])}(__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function __export(m){for(var p in m)exports.hasOwnProperty(p)||(exports[p]=m[p])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(__webpack_require__(20)),__export(__webpack_require__(19))}])}); | ||
//# sourceMappingURL=lib.js.map |
{ | ||
"name": "@spinnaker/docker", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"main": "lib/lib.js", | ||
@@ -5,0 +5,0 @@ "typings": "lib/index.d.ts", |
@@ -1,6 +0,7 @@ | ||
import { mock } from 'angular'; | ||
import { IComponentControllerService, mock } from 'angular'; | ||
import { $q } from 'ngimport'; | ||
import { AccountService, IAccount } from '@spinnaker/core'; | ||
import { DockerImageReaderService, IDockerImage } from './docker.image.reader.service'; | ||
import { DockerImageReader, IDockerImage } from './DockerImageReader'; | ||
import { | ||
@@ -12,7 +13,3 @@ DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT, | ||
describe('dockerImageAndTagSelector controller', () => { | ||
let $ctrl: DockerImageAndTagSelectorController, | ||
dockerImageReader: DockerImageReaderService, | ||
$componentController: ng.IComponentControllerService, | ||
$q: ng.IQService, | ||
$scope: ng.IScope; | ||
let $ctrl: DockerImageAndTagSelectorController, $componentController: IComponentControllerService, $scope: ng.IScope; | ||
@@ -27,15 +24,6 @@ let organization: string, registry: string, repository: string, showRegistry: boolean; | ||
beforeEach( | ||
mock.inject( | ||
( | ||
_dockerImageReader_: DockerImageReaderService, | ||
_$componentController_: ng.IComponentControllerService, | ||
_$q_: ng.IQService, | ||
$rootScope: ng.IRootScopeService, | ||
) => { | ||
dockerImageReader = _dockerImageReader_; | ||
$componentController = _$componentController_; | ||
$q = _$q_; | ||
$scope = $rootScope.$new(); | ||
}, | ||
), | ||
mock.inject((_$componentController_: IComponentControllerService, $rootScope: ng.IRootScopeService) => { | ||
$componentController = _$componentController_; | ||
$scope = $rootScope.$new(); | ||
}), | ||
); | ||
@@ -45,6 +33,6 @@ | ||
spyOn(AccountService, 'listAccounts').and.returnValue($q.when(accounts)); | ||
spyOn(dockerImageReader, 'findImages').and.returnValue($q.when(images)); | ||
spyOn(DockerImageReader, 'findImages').and.returnValue($q.when(images)); | ||
$ctrl = $componentController( | ||
'dockerImageAndTagSelector', | ||
{ dockerImageReader }, | ||
{ DockerImageReader }, | ||
{ organization, registry, repository, tag, account, showRegistry }, | ||
@@ -51,0 +39,0 @@ ) as DockerImageAndTagSelectorController; |
@@ -6,3 +6,3 @@ import { IChangesObject, IController, IOnChangesObject, module } from 'angular'; | ||
import { DOCKER_IMAGE_READER, DockerImageReaderService, IDockerImage } from './docker.image.reader.service'; | ||
import { DockerImageReader, IDockerImage } from './DockerImageReader'; | ||
@@ -48,6 +48,2 @@ interface IViewState { | ||
constructor(private dockerImageReader: DockerImageReaderService) { | ||
'ngInject'; | ||
} | ||
private updateOrganizationsList(): void { | ||
@@ -192,4 +188,3 @@ if (this.accountMap) { | ||
this.viewState.imagesLoading = true; | ||
const imageLoader = this.dockerImageReader | ||
.findImages(imageConfig) | ||
const imageLoader = DockerImageReader.findImages(imageConfig) | ||
.then((images: IDockerImage[]) => { | ||
@@ -272,5 +267,5 @@ if (this.imageLoader !== imageLoader) { | ||
export const DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT = 'spinnaker.docker.imageAndTagSelector.component'; | ||
module(DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT, [DOCKER_IMAGE_READER]).component( | ||
module(DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT, []).component( | ||
'dockerImageAndTagSelector', | ||
new DockerImageAndTagSelectorComponent(), | ||
); |
@@ -1,1 +0,1 @@ | ||
export * from './docker.image.reader.service'; | ||
export * from './DockerImageReader'; |
@@ -7,12 +7,7 @@ 'use strict'; | ||
import { DOCKER_IMAGE_READER } from 'docker/image/docker.image.reader.service'; | ||
import { DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT } from 'docker/image/dockerImageAndTagSelector.component'; | ||
import { DockerTriggerTemplate } from './DockerTriggerTemplate'; | ||
module.exports = angular | ||
.module('spinnaker.docker.pipeline.trigger', [ | ||
SERVICE_ACCOUNT_SERVICE, | ||
DOCKER_IMAGE_READER, | ||
require('./dockerTriggerOptions.directive.js').name, | ||
DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT, | ||
]) | ||
.module('spinnaker.docker.pipeline.trigger', [SERVICE_ACCOUNT_SERVICE, DOCKER_IMAGE_AND_TAG_SELECTOR_COMPONENT]) | ||
.config(function(pipelineConfigProvider) { | ||
@@ -26,3 +21,3 @@ pipelineConfigProvider.registerTrigger({ | ||
templateUrl: require('./dockerTrigger.html'), | ||
manualExecutionHandler: 'dockerTriggerExecutionHandler', | ||
manualExecutionComponent: DockerTriggerTemplate, | ||
validators: [ | ||
@@ -48,10 +43,2 @@ { | ||
}) | ||
.factory('dockerTriggerExecutionHandler', function($q) { | ||
return { | ||
formatLabel: trigger => { | ||
return $q.when(`(Docker Registry) ${trigger.account ? trigger.account + ':' : ''} ${trigger.repository || ''}`); | ||
}, | ||
selectorTemplate: require('./selectorTemplate.html'), | ||
}; | ||
}) | ||
.controller('DockerTriggerCtrl', function(trigger, serviceAccountService) { | ||
@@ -58,0 +45,0 @@ this.trigger = trigger; |
@@ -70,3 +70,2 @@ 'use strict'; | ||
{ loader: 'thread-loader', options: { workers: WEBPACK_THREADS } }, | ||
{ loader: 'babel-loader' }, | ||
{ loader: 'ts-loader', options: { happyPackMode: true } }, | ||
@@ -73,0 +72,0 @@ { loader: 'tslint-loader' }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
278320
55
5
0
1214