Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b545542c
Commit
b545542c
authored
Feb 14, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Components strucutre
parent
9ba46172
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
0 deletions
+86
-0
app/assets/javascripts/environments/components/deploy_board_component.js.es6
...pts/environments/components/deploy_board_component.js.es6
+36
-0
app/assets/javascripts/environments/components/deploy_board_instance_component.js.es6
...onments/components/deploy_board_instance_component.js.es6
+50
-0
No files found.
app/assets/javascripts/environments/components/deploy_board_component.js.es6
0 → 100644
View file @
b545542c
/**
* Renders the deploy boads.
*
* A deploy board is composed by several components:
* - Information area with percentage of completition.
* - Instances with status.
* - Button Actions.
* Mockup: https://gitlab.com/gitlab-org/gitlab-ce/uploads/2f655655c0eadf655d0ae7467b53002a/environments__deploy-graphic.png
*
* The data of each deploy board needs to be fetched when we render the component.
* Endpoint is /group/project/environments/{id}/status.json
*/
const Vue = require('vue');
const instanceComponent = require('./deploy_board_instance_component');
module.exports = Vue.component('deploy_boards_components', {
components: {
instanceComponent,
},
created() {
// Fetch data
},
template: `
<div class="js-deploy-board deploy-board">
<section class="deploy-board-information"></section>
<section class="deploy-board-instances"></section>
<section class="deploy-board-actions"></section>
</div>
`,
});
app/assets/javascripts/environments/components/deploy_board_instance_component.js.es6
0 → 100644
View file @
b545542c
/**
* An instance in deploy boards is represented by a square in this mockup:
* https://gitlab.com/gitlab-org/gitlab-ce/uploads/2f655655c0eadf655d0ae7467b53002a/environments__deploy-graphic.png
*
* Each instance has a state an a tooltip.
* The state needs to be represented in different colors,
* see more information about this in https://gitlab.com/gitlab-org/gitlab-ee/uploads/5fff049fd88336d9ee0c6ef77b1ba7e3/monitoring__deployboard--key.png
*
*/
const Vue = require('vue');
module.exports = Vue.component('deploy_board_instance_component', {
props: {
/**
* Represents the state of the pod. Each state is represented with a different
* color.
* It should be one of the following:
* finished || deploying || failed || ready || preparing || waiting
*/
state: {
type: String,
required: true,
default: 'finished',
},
tooltipText: {
type: String,
required: false,
default: '',
},
computed: {
cssClass() {
return `js-deploy-board-instance deploy-board-instance deploy-board-instance-${this.state} has-tooltip`;
},
},
template: `
<div
class="cssClass"
data-title="tooltipText"
data-toggle="tooltip"
data-placement="top">
</div>
`,
},
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment