Move data

This commit is contained in:
Oliver Davies 2018-12-21 23:58:35 +00:00
parent 3135d95f5d
commit 56475926de
3 changed files with 43 additions and 30 deletions

View file

@ -1,16 +1,44 @@
<template> <template>
<div id="app"> <div id="app">
<environments></environments> <environments :project="projects[0]"></environments>
</div> </div>
</template> </template>
<script> <script>
import Environments from './components/Environments.vue' import Environments from './components/Environments'
export default { export default {
name: 'app',
components: { components: {
Environments Environments
},
data() {
return {
projects: [
{
name: 'Rebuilding Acquia',
type: 'Drupal',
level: 'Enterprise',
environments: {
dev: {
name: 'Dev',
url: 'dev.rebuilding-acquia.com',
label: 'develop'
},
stage: {
name: 'Stage',
url: 'stg.rebuilding-acquia.com',
label: 'master'
},
prod: {
name: 'Prod',
url: 'rebuilding-acquia.com',
label: 'tags/2018-12-21'
},
},
},
],
}
} }
} }
</script> </script>

View file

@ -40,26 +40,8 @@
<script> <script>
export default { export default {
data() { props: {
return { environments: Array,
environments: [
{
name: 'Dev',
url: 'dev.rebuilding-acquia.com',
label: 'develop'
}, },
{
name: 'Stage',
url: 'stg.rebuilding-acquia.com',
label: 'master'
},
{
name: 'Prod',
url: 'rebuilding-acquia.com',
label: 'tags/2018-12-21'
},
],
}
}
} }
</script> </script>

View file

@ -35,12 +35,12 @@
<div class="text-xs mb-3"> <div class="text-xs mb-3">
<ol class="list-reset flex"> <ol class="list-reset flex">
<li class="mr-6"><a href="#0" class="text-blue-dark no-underline hover:underline">Applications</a></li> <li class="mr-6"><a href="#0" class="text-blue-dark no-underline hover:underline">Applications</a></li>
<li>{{ name }}</li> <li>{{ project.name }}</li>
</ol> </ol>
</div> </div>
<div class="flex flex-1 items-center justify-between md:justify-start"> <div class="flex flex-1 items-center justify-between md:justify-start">
<div class="text-2xl font-hairline mr-2">{{ name }}</div> <div class="text-2xl font-hairline mr-2">{{ project.name }}</div>
<svg class="h-6 w-6 text-blue-dark fill-current" role="presentation"><use xlink:href="icons.symbol.svg#actions__down-arrow"></use></svg> <svg class="h-6 w-6 text-blue-dark fill-current" role="presentation"><use xlink:href="icons.symbol.svg#actions__down-arrow"></use></svg>
</div> </div>
</div> </div>
@ -94,14 +94,14 @@
<div> <div>
<ul class="list-reset flex -mr-2"> <ul class="list-reset flex -mr-2">
<li class="text-2xs uppercase py-1 px-2 rounded border border-transparent bg-blue-light text-white mr-2">Drupal</li> <li class="text-2xs uppercase py-1 px-2 rounded border border-transparent bg-blue-light text-white mr-2">{{ project.type }}</li>
<li class="text-2xs uppercase py-1 px-2 rounded border border-grey bg-white mr-2">Enterprise</li> <li class="text-2xs uppercase py-1 px-2 rounded border border-grey bg-white mr-2">{{ project.level }}</li>
</ul> </ul>
</div> </div>
</div> </div>
<quick-help :hidden="help.hidden"></quick-help> <quick-help :hidden="help.hidden"></quick-help>
<environment-cards></environment-cards> <environment-cards :environments="project.environments"></environment-cards>
<task-log></task-log> <task-log></task-log>
</div> </div>
@ -152,9 +152,12 @@ export default {
ToggleHelp, ToggleHelp,
}, },
props: {
project: Object,
},
data() { data() {
return { return {
name: 'Rebuilding Acquia',
help: { help: {
hidden: false, hidden: false,
} }