Commit d5147ac8 authored by Sarah GP's avatar Sarah GP

Add DAG scaffolding

Add component to pipeline bundle
Fetch data fn and error handling
Include basic specs
parent 5903c0f4
......@@ -3,7 +3,10 @@ import { GlAlert } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils';
export default {
<<<<<<< HEAD
// eslint-disable-next-line @gitlab/require-i18n-strings
=======
>>>>>>> Add DAG scaffolding
name: 'Dag',
components: {
GlAlert,
......@@ -20,6 +23,7 @@ export default {
showFailureAlert: false,
};
},
<<<<<<< HEAD
computed: {
shouldDisplayGraph() {
return !this.showFailureAlert;
......@@ -27,6 +31,11 @@ export default {
},
mounted() {
const { drawGraph, reportFailure } = this;
=======
mounted() {
const drawGraph = this.drawGraph;
const reportFailure = this.reportFailure;
>>>>>>> Add DAG scaffolding
if (!this.graphUrl) {
reportFailure();
......@@ -40,6 +49,14 @@ export default {
})
.catch(reportFailure);
},
<<<<<<< HEAD
=======
computed: {
shouldDisplayGraph() {
return !this.showFailureAlert;
},
},
>>>>>>> Add DAG scaffolding
methods: {
drawGraph(data) {
return data;
......
......@@ -16,7 +16,11 @@ describe('Pipeline DAG graph', () => {
const createComponent = (propsData = {}, method = mount) => {
axiosMock = new MockAdapter(axios);
<<<<<<< HEAD
if (wrapper?.destroy) {
=======
if (wrapper && wrapper.destroy) {
>>>>>>> Add DAG scaffolding
wrapper.destroy();
}
......
......@@ -983,10 +983,10 @@
consola "^2.10.1"
node-fetch "^2.6.0"
"@rails/actioncable@^6.0.3":
version "6.0.3"
resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.0.3.tgz#722b4b639936129307ddbab3a390f6bcacf3e7bc"
integrity sha512-I01hgqxxnOgOtJTGlq0ZsGJYiTEEiSGVEGQn3vimZSqEP1HqzyFNbzGTq14Xdyeow2yGJjygjoFF1pmtE+SQaw==
"@rails/actioncable@^6.0.2-2":
version "6.0.2-2"
resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.0.2-2.tgz#237907f8111707950381387c273b19ac25958408"
integrity sha512-0sKStf8hnberH1TKup10PJ92JT2dVqf3gf+OT4lJ7DiYSBEuDcvICHxWsyML2oWTpjUhC4kLvUJ3pXL2JJrJuQ==
"@sentry/browser@^5.10.2":
version "5.10.2"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment