{"version":3,"sources":["webpack:///./commit/pipelines/pipelines_table.vue?79f0","webpack:///commit/pipelines/pipelines_table.vue","webpack:///./commit/pipelines/pipelines_table.vue","webpack:///./commit/pipelines/pipelines_table.vue?fbde","webpack:///./commit/pipelines/pipelines_bundle.js","webpack:///./mini_pipeline_graph_dropdown.js","webpack:///./pages/projects/commit/pipelines/index.js"],"names":["pipelines_pipelines_tablevue_type_script_lang_js","mixins","props","endpoint","type","String","required","helpPagePath","autoDevopsHelpPath","errorStateSvgPath","viewType","default","data","store","pipelines_store","state","computed","shouldRenderTable","this","isLoading","pipelines","length","hasError","shouldRenderErrorState","created","service","pipelines_service","methods","successCallback","resp","setCommonData","updatePipelinesEvent","CustomEvent","detail","$el","parentElement","dispatchEvent","pipelines_table","Object","componentNormalizer","_vm","_h","$createElement","_c","_self","staticClass","attrs","label","s__","size","svg-path","message","update-graph-dropdown","updateGraphDropdown","auto-devops-help-path","view-type","_e","CommitPipelinesTable","vue_esm","extend","window","gl","__webpack_exports__","pipelineTableViewEl","document","querySelector","addEventListener","event","count","all","textContent","undefined","dataset","disableInitialization","table","propsData","emptyStateSvgPath","helpAutoDevopsPath","$mount","appendChild","MiniPipelineGraph","opts","arguments","_classCallCheck","container","dropdownListSelector","getBuildsList","bind","jquery__WEBPACK_IMPORTED_MODULE_0___default","off","on","e","stopPropagation","stageContainer","innerHTML","_this","button","relatedTarget","stageEndpoint","renderBuildsList","toggleLoading","_lib_utils_axios_utils__WEBPACK_IMPORTED_MODULE_2__","get","then","_ref","html","stopDropdownClickPropagation","catch","parent","hasClass","dropdown","_flash__WEBPACK_IMPORTED_MODULE_1__","classList","toggle","_mini_pipeline_graph_dropdown__WEBPACK_IMPORTED_MODULE_1__","bindEvents","load","commitPath","_commit_pipelines_pipelines_bundle__WEBPACK_IMPORTED_MODULE_2__"],"mappings":"sHAAwMA,GCMxMC,eACA,GAEAC,OACAC,UACAC,KAAAC,OACAC,UAAA,GAEAC,cACAH,KAAAC,OACAC,UAAA,GA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iBH,EAAQ,IAC9B9E,KAAKkF,cAAcJ,GAEnBK,EAAA,EAAMC,IAAInG,GACPoG,KAAK,SAAAC,GAAc,IAAX5F,EAAW4F,EAAX5F,KACPmF,EAAKK,cAAcJ,GACnBD,EAAKI,iBAAiBH,EAAQpF,EAAK6F,MACnCV,EAAKW,iCAENC,MAAM,WACLZ,EAAKK,cAAcJ,GACfR,IAAEQ,GAAQY,SAASC,SAAS,SAC9BrB,IAAEQ,GAAQc,SAAS,UAErBxE,OAAAyE,EAAA,EAAAzE,CAAM,+CAAgD,iDAU9CuD,GACZA,EAAe1D,cAAc8B,cACxB/C,KAAKmE,qBADV,gCAEE2B,UAAUC,OAAO,wGCxGvBjD,SAASE,iBAAiB,mBAAoB,WAC5C,IAAIgD,EAAA,GACF9B,UAAW,8BACV+B,aACH3B,IAAE,yBAAyB4B,KAAKpD,SAASC,cAAc,kBAAkBO,QAAQ6C,YACjF/E,OAAAgF,EAAA,EAAAhF","file":"pages.projects.commit.pipelines.97785ab7.chunk.js","sourcesContent":["import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./pipelines_table.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./pipelines_table.vue?vue&type=script&lang=js\"","\n\n","import { render, staticRenderFns } from \"./pipelines_table.vue?vue&type=template&id=0bb9d9b2\"\nimport script from \"./pipelines_table.vue?vue&type=script&lang=js\"\nexport * from \"./pipelines_table.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"content-list pipelines\"},[(_vm.isLoading)?_c('loading-icon',{staticClass:\"prepend-top-20\",attrs:{\"label\":_vm.s__('Pipelines|Loading Pipelines'),\"size\":\"3\"}}):(_vm.shouldRenderErrorState)?_c('svg-blank-state',{attrs:{\"svg-path\":_vm.errorStateSvgPath,\"message\":_vm.s__(\"Pipelines|There was an error fetching the pipelines.\\n Try again in a few moments or contact your support team.\")}}):(_vm.shouldRenderTable)?_c('div',{staticClass:\"table-holder\"},[_c('pipelines-table-component',{attrs:{\"pipelines\":_vm.state.pipelines,\"update-graph-dropdown\":_vm.updateGraphDropdown,\"auto-devops-help-path\":_vm.autoDevopsHelpPath,\"view-type\":_vm.viewType}})],1):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Vue from 'vue';\nimport commitPipelinesTable from './pipelines_table.vue';\n\n/**\n * Used in:\n * - Commit details View > Pipelines Tab > Pipelines Table.\n * - Merge Request details View > Pipelines Tab > Pipelines Table.\n * - New Merge Request View > Pipelines Tab > Pipelines Table.\n */\n\nconst CommitPipelinesTable = Vue.extend(commitPipelinesTable);\n\n// export for use in merge_request_tabs.js (TODO: remove this hack when we understand how to load\n// vue.js in merge_request_tabs.js)\nwindow.gl = window.gl || {};\nwindow.gl.CommitPipelinesTable = CommitPipelinesTable;\n\nexport default () => {\n const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view');\n\n if (pipelineTableViewEl) {\n // Update MR and Commits tabs\n pipelineTableViewEl.addEventListener('update-pipelines-count', (event) => {\n if (event.detail.pipelines &&\n event.detail.pipelines.count &&\n event.detail.pipelines.count.all) {\n const badge = document.querySelector('.js-pipelines-mr-count');\n\n badge.textContent = event.detail.pipelines.count.all;\n }\n });\n\n if (pipelineTableViewEl.dataset.disableInitialization === undefined) {\n const table = new CommitPipelinesTable({\n propsData: {\n endpoint: pipelineTableViewEl.dataset.endpoint,\n helpPagePath: pipelineTableViewEl.dataset.helpPagePath,\n emptyStateSvgPath: pipelineTableViewEl.dataset.emptyStateSvgPath,\n errorStateSvgPath: pipelineTableViewEl.dataset.errorStateSvgPath,\n autoDevopsHelpPath: pipelineTableViewEl.dataset.helpAutoDevopsPath,\n },\n }).$mount();\n pipelineTableViewEl.appendChild(table.$el);\n }\n }\n};\n","import $ from 'jquery';\nimport flash from './flash';\nimport axios from './lib/utils/axios_utils';\n\n/**\n * In each pipelines table we have a mini pipeline graph for each pipeline.\n *\n * When we click in a pipeline stage, we need to make an API call to get the\n * builds list to render in a dropdown.\n *\n * The container should be the table element.\n *\n * The stage icon clicked needs to have the following HTML structure:\n *
\n * \n *
\n *
\n */\n\nexport default class MiniPipelineGraph {\n constructor(opts = {}) {\n this.container = opts.container || '';\n this.dropdownListSelector = '.js-builds-dropdown-container';\n this.getBuildsList = this.getBuildsList.bind(this);\n }\n\n /**\n * Adds the event listener when the dropdown is opened.\n * All dropdown events are fired at the .dropdown-menu's parent element.\n */\n bindEvents() {\n $(document)\n .off('shown.bs.dropdown', this.container)\n .on('shown.bs.dropdown', this.container, this.getBuildsList);\n }\n\n /**\n * When the user right clicks or cmd/ctrl + click in the job name\n * the dropdown should not be closed and the link should open in another tab,\n * so we stop propagation of the click event inside the dropdown.\n *\n * Since this component is rendered multiple times per page we need to guarantee we only\n * target the click event of this component.\n */\n stopDropdownClickPropagation() {\n $(document).on(\n 'click',\n `${this.container} .js-builds-dropdown-list a.mini-pipeline-graph-dropdown-item`,\n (e) => {\n e.stopPropagation();\n },\n );\n }\n\n /**\n * For the clicked stage, renders the given data in the dropdown list.\n *\n * @param {HTMLElement} stageContainer\n * @param {Object} data\n */\n renderBuildsList(stageContainer, data) {\n const dropdownContainer = stageContainer.parentElement.querySelector(\n `${this.dropdownListSelector} .js-builds-dropdown-list ul`,\n );\n\n dropdownContainer.innerHTML = data;\n }\n\n /**\n * For the clicked stage, gets the list of builds.\n *\n * All dropdown events have a relatedTarget property,\n * whose value is the toggling anchor element.\n *\n * @param {Object} e bootstrap dropdown event\n * @return {Promise}\n */\n getBuildsList(e) {\n const button = e.relatedTarget;\n const endpoint = button.dataset.stageEndpoint;\n\n this.renderBuildsList(button, '');\n this.toggleLoading(button);\n\n axios.get(endpoint)\n .then(({ data }) => {\n this.toggleLoading(button);\n this.renderBuildsList(button, data.html);\n this.stopDropdownClickPropagation();\n })\n .catch(() => {\n this.toggleLoading(button);\n if ($(button).parent().hasClass('open')) {\n $(button).dropdown('toggle');\n }\n flash('An error occurred while fetching the builds.', 'alert');\n });\n }\n\n /**\n * Toggles the visibility of the loading icon.\n *\n * @param {HTMLElement} stageContainer\n * @return {type}\n */\n toggleLoading(stageContainer) {\n stageContainer.parentElement.querySelector(\n `${this.dropdownListSelector} .js-builds-dropdown-loading`,\n ).classList.toggle('hidden');\n }\n}\n","import $ from 'jquery';\nimport MiniPipelineGraph from '~/mini_pipeline_graph_dropdown';\nimport initPipelines from '~/commit/pipelines/pipelines_bundle';\n\ndocument.addEventListener('DOMContentLoaded', () => {\n new MiniPipelineGraph({\n container: '.js-commit-pipeline-graph',\n }).bindEvents();\n $('.commit-info.branches').load(document.querySelector('.js-commit-box').dataset.commitPath);\n initPipelines();\n});\n"],"sourceRoot":""}