Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show notification when create pipeline process is successfully triggered #83

Merged
merged 1 commit into from
Aug 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions frontend/client/views/pipeline/create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,26 @@ import ProgressBar from 'vue-bulma-progress-bar'
import VueTippy from 'vue-tippy'
import VueGoodTable from 'vue-good-table'
import moment from 'moment'
import Notification from 'vue-bulma-notification-fixed'
import Message from 'vue-bulma-message-html'

const NotificationComponent = Vue.extend(Notification)
const openNotification = (
propsData = {
title: '',
message: '',
type: '',
direction: '',
duration: 4500,
container: '.notifications'
}
) => {
return new NotificationComponent({
el: document.createElement('div'),
propsData
})
}

Vue.use(VueGoodTable)
Vue.use(VueTippy)

Expand Down Expand Up @@ -447,6 +465,11 @@ export default {
this.$http
.post('/api/v1/pipeline', this.createPipeline)
.then(response => {
openNotification({
title: 'Pipeline created',
message: `Pipeline "${this.createPipeline.pipeline.name}" has been created successfully.`,
type: 'success'
})
// Run fetchData to see the pipeline in our history table
this.fetchData()
})
Expand Down