Giter Site home page Giter Site logo

ikkira / vue-pipeline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jinfang134/vue-pipeline

0.0 1.0 0.0 4.44 MB

A pipeline component like jenkins blue ocean plugin.

Home Page: https://jinfang134.github.io/vue-pipeline/

License: MIT License

JavaScript 61.86% Vue 36.38% HTML 1.76%

vue-pipeline's Introduction

vue-pipeline

npm npm GitHub stars GitHub forks license Build Status

One easy-to-use component to show beautiful responsive timeline like jenkins blue ocean plugin.

δΈ­ζ–‡

sample

To get started, check out:

LICENSE

NOTE: Vue Pipeline is licensed under The MIT License. Completely free, you can arbitrarily use and modify this plugin. If this plugin is useful to you, you can Star this repo, your support is my biggest motive force, thanks.

Features

  • Created Graph according your data dynamiclly
  • Responsive web design
  • svg component
  • Fully configurable
  • Via data attributes
  • Show/Hide arrow
  • 3 kinds of lines
  • support graph and tree view
  • Single node selection
  • Different status for each node
  • Different weight for each edge
  • Different color for each node and edge

Install

npm install vue-pipeline
import Vue from 'vue'
import VuePipeline from 'vue-pipeline'

Vue.use(VuePipeline)

Props

Props of Pipeline

Name Type Default Description
x number 50 The x coordinate of the starting point of the graph
y number 55 The y coordinate of the starting point of the graph
xstep number 120 The position horizontally from a previous node.
ystep number 50 The position vertically from a previous node.
data Array [] data
lineStyle string default There are 3 types of line: ' default',' bessel','line'
showArrow boolean false whether show arrow for each line.

Props for each node

Name Type Default Description
name string null The title of each node
hint string null The hint of each node
status string null Status of each node, There are 6 type of status: start,succeed,running,failure,paused,unstable,end
next Array [] The edge connected with this node
next: index number null The index of another node of this edge
next: weight number null The weight of this edge

Sample Data:

let data = [
  {
    name: "Start",
    hint: "1m23s",
    status: "start",
    next: [{ index: 1, weight: 2 }]
  },
  {
    name: "Ammouncement Import",
    hint: "1m23s",
    status: "success",
    next: [
      { index: 2, weight: 0 },
      { index: 4, weight: 2 }
    ]
  },
  {
    name: "Employee ID to Onboarding",
    hint: "2m23s",
    status: "failure",
    next: [{ index: 3, weight: 0 }]
  },
  {
    name: "Personal Basic Info",
    hint: "2m23s",
    status: "paused",
    next: [{ index: 4, weight: 0 }]
  },
  { name: "End ", hint: "2m23s", status: "end", next: [] }
];

Events

Name Params Description
@click node Occurs when node is clicked

Function

Name params Description
render Node render the whole graph again

Contributing

If you find any bugs and/or want to contribute, feel free to create issues or submit pull requests.

Thanks!

Local Development

yarn install
// Compiles and hot-reloads for development
yarn run serve

publish a new version

npm version patch
npm version minor
npm version major

Lints and fixes files

yarn run lint

vue-pipeline's People

Contributors

jinfang134 avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.