Skip to content

Commit

Permalink
Worked on first version of detailed view. Worked on first version of …
Browse files Browse the repository at this point in the history
…overview
  • Loading branch information
michelvocks committed Mar 6, 2018
1 parent 40e2156 commit b0c0634
Show file tree
Hide file tree
Showing 11 changed files with 281 additions and 21 deletions.
Binary file added frontend/client/assets/fail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/client/assets/success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/client/assets/time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/client/components/layout/AppMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
.app-main {
padding-top: 0px;
margin-left: 220px;
margin-left: 210px;
@include mobile() {
margin-left: 0;
Expand Down
4 changes: 3 additions & 1 deletion frontend/client/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ function generateRoutesFromMenu (menu = [], routes = []) {
for (let i = 0, l = menu.length; i < l; i++) {
let item = menu[i]
if (item.path && item.subroute) {
routes.push(item.subroute[0])
for (let x = 0, y = item.subroute.length; x < y; x++) {
routes.push(item.subroute[x])
}
} else if (item.path) {
routes.push(item)
}
Expand Down
8 changes: 8 additions & 0 deletions frontend/client/store/modules/menu/pipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ export default {
meta: {
label: 'Create'
}
},
{
name: 'Pipeline Detail',
path: '/pipelines/detail',
component: lazyLoading('pipelines/detail'),
meta: {
label: 'Detail'
}
}
]
}
143 changes: 126 additions & 17 deletions frontend/client/views/overview/index.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,141 @@
<template>
<div class="content has-text-centered">
<p>
<img width="200" src="~assets/logo.png" :alt="description">
</p>
<div class="tile is-ancestor">
<div class="tile is-vertical">
<div class="tile">
<div class="tile is-parent is-3">
<div class="tile notification content-article">
<div class="status-display-success"></div>
<div class="outer-box">
<div class="outer-box-icon">
<i class="fa fa-2x fa-battery-full"></i>
</div>
<div>
<a href="/" class="subtitle">Testpipeline</a>
</div>
<div style="padding-top: 10px;">
this is some text ...
</div>
</div>
</div>
</div>

<h1 class="is-title is-bold">{{ name.replace('-', ' ') }}</h1>
<div class="tile is-parent is-3">
<div class="tile notification content-article">
<div class="status-display-success"></div>
<div class="outer-box">
<div class="outer-box-icon">
<i class="fa fa-2x fa-battery-full"></i>
</div>
<div>
<a href="/" class="subtitle">Testpipeline</a>
</div>
<div style="padding-top: 10px;">
this is some text ...
</div>
</div>
</div>
</div>

<p>
<strong>{{ description }}</strong>,
<a :href="homepage">Live Demo</a>
</p>
<div class="tile is-parent is-3">
<div class="tile notification content-article">
<div class="status-display-folder"></div>
<div class="outer-box">
<div class="outer-box-icon">
<i class="fa fa-2x fa-folder"></i>
</div>
<div>
<a href="/" class="subtitle">Testfolder</a>
</div>
<div style="padding-top: 10px;">
this is some text ...
</div>
</div>
</div>
</div>

<p>Supports Vue 2.0 and Bulma 0.3!</p>
<div class="tile is-parent is-3">
<div class="tile notification content-article">
<div class="status-display-folder"></div>
<div class="outer-box">
<div class="outer-box-icon">
<i class="fa fa-2x fa-folder"></i>
</div>
<div>
<a href="/" class="subtitle">Testfolder</a>
</div>
<div style="padding-top: 10px;">
this is some text ...
</div>
</div>
</div>
</div>
</div>
<div class="tile">
<div class="tile is-parent is-3">
<div class="tile notification content-article">
<div class="status-display-fail"></div>
<div class="outer-box">
<div class="outer-box-icon">
<i class="fa fa-2x fa-battery-full"></i>
</div>
<div>
<a href="/" class="subtitle">Testpipeline</a>
</div>
<div style="padding-top: 10px;">
this is some text ...
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>

<script>
export default {
data () {
return this.$store.state.pkg
}
}
</script>

<style lang="scss" scoped>
.is-title {
text-transform: capitalize;
<style lang="scss">
@mixin status-display {
position: fixed;
min-width: 50px;
height: 100%;
margin-left: -23px;
margin-top: -20px;
margin-bottom: -20px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
margin-right: 10px;
}
.status-display-success {
@include status-display();
background-color: rgb(49, 196, 49);
}
.status-display-folder {
@include status-display();
background-color: #4da2fc;
}
.status-display-fail {
@include status-display();
background-color: #ca280b;
}
.outer-box {
padding-left: 40px;
min-height: 170px;
width: 100%;
}
.outer-box-icon {
width: 50px;
float: left;
}
</style>
4 changes: 2 additions & 2 deletions frontend/client/views/pipelines/create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="tile is-ancestor">
<div class="tile is-vertical">
<div class="tile">
<div class="tile is-vertical is-parent is-5">
<div class="tile is-vertical is-parent is-6">
<article class="tile is-child notification content-article">
<div class="content">
<label class="label">Copy the link of your
Expand Down Expand Up @@ -83,7 +83,7 @@
</div>
</div>

<div class="tile is-parent is-9">
<div class="tile is-parent is-10">
<article class="tile is-child notification content-article box">
<vue-good-table
title="Pipeline history"
Expand Down
105 changes: 105 additions & 0 deletions frontend/client/views/pipelines/detail.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<template>
<div class="tile is-ancestor">
<div class="tile is-vertical">
<div class="tile">
<div class="tile is-vertical is-parent is-12">
<article class="tile is-child notification content-article">
<div id="pipeline-detail"></div>
</article>
</div>
</div>
</div>
</div>
</template>

<script>
import Vis from 'vis'
export default {
data () {
return {
nodes: new Vis.DataSet([
{id: 1, shape: 'circularImage', image: require('assets/success.png'), label: 'Create User'},
{id: 2, shape: 'circularImage', image: require('assets/success.png'), label: 'Insert Dump'},
{id: 3, shape: 'circularImage', image: require('assets/fail.png'), label: 'Create Namespace'},
{id: 4, shape: 'circularImage', image: require('assets/time.png'), label: 'Create Deployment'},
{id: 5, shape: 'circularImage', image: require('assets/time.png'), label: 'Create Service'},
{id: 6, shape: 'circularImage', image: require('assets/time.png'), label: 'Create Ingress'},
{id: 7, shape: 'circularImage', image: require('assets/time.png'), label: 'Clean up'}
]),
edges: new Vis.DataSet([
{from: 1, to: 2},
{from: 2, to: 3},
{from: 3, to: 4},
{from: 3, to: 5},
{from: 3, to: 6},
{from: 4, to: 7},
{from: 5, to: 7},
{from: 6, to: 7}
])
}
},
mounted () {
this.fetchData()
},
methods: {
fetchData () {
// Find container and set data
var container = document.getElementById('pipeline-detail')
var data = {
nodes: this.nodes,
edges: this.edges
}
// Define vis options
var options = {
physics: { stabilization: true },
layout: {
hierarchical: {
enabled: true,
levelSeparation: 200,
direction: 'LR',
sortMethod: 'directed'
}
},
nodes: {
borderWidth: 4,
size: 40,
color: {
border: '#222222'
},
font: { color: '#eeeeee' }
},
edges: {
smooth: {
type: 'cubicBezier',
forceDirection: 'vertical',
roundness: 0.4
},
color: {
color: 'whitesmoke',
highlight: '#4da2fc'
},
arrows: {to: true}
}
}
/* eslint-disable no-unused-vars */
var network = new Vis.Network(container, data, options)
}
}
}
</script>

<style lang="scss">
#pipeline-detail {
width: 100%;
height: 400px;
}
</style>
35 changes: 35 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"mdi": "^1.8.36",
"moment": "^2.20.1",
"plotly.js": "^1.33.1",
"vis": "^4.21.0",
"vue": "^2.5.13",
"vue-bulma-breadcrumb": "^1.0.1",
"vue-bulma-collapse": "1.0.3",
Expand Down

0 comments on commit b0c0634

Please sign in to comment.