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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
e5037529
Commit
e5037529
authored
Feb 24, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loads SVGs into JS for environments
parent
af5093ca
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
60 deletions
+17
-60
app/assets/javascripts/environments/components/environment.js.es6
...ts/javascripts/environments/components/environment.js.es6
+1
-7
app/assets/javascripts/environments/components/environment_actions.js.es6
...cripts/environments/components/environment_actions.js.es6
+4
-4
app/assets/javascripts/environments/components/environment_item.js.es6
...vascripts/environments/components/environment_item.js.es6
+0
-17
app/assets/javascripts/environments/components/environment_terminal_button.js.es6
...nvironments/components/environment_terminal_button.js.es6
+5
-4
app/assets/javascripts/environments/components/environments_table.js.es6
...scripts/environments/components/environments_table.js.es6
+1
-19
app/assets/javascripts/vue_shared/components/commit.js.es6
app/assets/javascripts/vue_shared/components/commit.js.es6
+5
-5
app/views/projects/environments/index.html.haml
app/views/projects/environments/index.html.haml
+1
-4
No files found.
app/assets/javascripts/environments/components/environment.js.es6
View file @
e5037529
...
...
@@ -35,9 +35,6 @@ module.exports = Vue.component('environment-component', {
projectStoppedEnvironmentsPath: environmentsData.projectStoppedEnvironmentsPath,
newEnvironmentPath: environmentsData.newEnvironmentPath,
helpPagePath: environmentsData.helpPagePath,
commitIconSvg: environmentsData.commitIconSvg,
playIconSvg: environmentsData.playIconSvg,
terminalIconSvg: environmentsData.terminalIconSvg,
// Pagination Properties,
paginationInformation: {},
...
...
@@ -176,10 +173,7 @@ module.exports = Vue.component('environment-component', {
<environment-table
:environments="state.environments"
:can-create-deployment="canCreateDeploymentParsed"
:can-read-environment="canReadEnvironmentParsed"
:play-icon-svg="playIconSvg"
:terminal-icon-svg="terminalIconSvg"
:commit-icon-svg="commitIconSvg">
:can-read-environment="canReadEnvironmentParsed">
</environment-table>
<table-pagination v-if="state.paginationInformation && state.paginationInformation.totalPages > 1"
...
...
app/assets/javascripts/environments/components/environment_actions.js.es6
View file @
e5037529
const Vue = require('vue');
const playIconSvg = require('../../../../views/shared/icons/_icon_play.svg');
module.exports = Vue.component('actions-component', {
props: {
...
...
@@ -7,11 +8,10 @@ module.exports = Vue.component('actions-component', {
required: false,
default: () => [],
},
},
playIconSvg: {
type: String,
required: false,
},
data() {
return { playIconSvg };
},
template: `
...
...
app/assets/javascripts/environments/components/environment_item.js.es6
View file @
e5037529
...
...
@@ -46,21 +46,6 @@ module.exports = Vue.component('environment-item', {
required: false,
default: false,
},
commitIconSvg: {
type: String,
required: false,
},
playIconSvg: {
type: String,
required: false,
},
terminalIconSvg: {
type: String,
required: false,
},
},
computed: {
...
...
@@ -507,7 +492,6 @@ module.exports = Vue.component('environment-item', {
<div v-if="!model.isFolder">
<div class="btn-group" role="group">
<actions-component v-if="hasManualActions && canCreateDeployment"
:play-icon-svg="playIconSvg"
:actions="manualActions">
</actions-component>
...
...
@@ -520,7 +504,6 @@ module.exports = Vue.component('environment-item', {
</stop-component>
<terminal-button-component v-if="model && model.terminal_path"
:terminal-icon-svg="terminalIconSvg"
:terminal-path="model.terminal_path">
</terminal-button-component>
...
...
app/assets/javascripts/environments/components/environment_terminal_button.js.es6
View file @
e5037529
...
...
@@ -3,6 +3,7 @@
* Used in environments table.
*/
const Vue = require('vue');
const terminalIconSvg = require('../../../../views/shared/icons/_icon_terminal.svg');
module.exports = Vue.component('terminal-button-component', {
props: {
...
...
@@ -10,10 +11,10 @@ module.exports = Vue.component('terminal-button-component', {
type: String,
default: '',
},
terminalIconSvg: {
type: String,
default: '',
},
},
data() {
return { terminalIconSvg };
},
template: `
...
...
app/assets/javascripts/environments/components/environments_table.js.es6
View file @
e5037529
...
...
@@ -28,21 +28,6 @@ module.exports = Vue.component('environment-table-component', {
required: false,
default: false,
},
commitIconSvg: {
type: String,
required: false,
},
playIconSvg: {
type: String,
required: false,
},
terminalIconSvg: {
type: String,
required: false,
},
},
template: `
...
...
@@ -63,10 +48,7 @@ module.exports = Vue.component('environment-table-component', {
<tr is="environment-item"
:model="model"
:can-create-deployment="canCreateDeployment"
:can-read-environment="canReadEnvironment"
:play-icon-svg="playIconSvg"
:terminal-icon-svg="terminalIconSvg"
:commit-icon-svg="commitIconSvg"></tr>
:can-read-environment="canReadEnvironment"></tr>
</template>
</tbody>
</table>
...
...
app/assets/javascripts/vue_shared/components/commit.js.es6
View file @
e5037529
/* global Vue */
window.Vue = require('vue');
const commitIconSvg = require('../../../../views/shared/icons/_icon_commit.svg');
(() => {
window.gl = window.gl || {};
...
...
@@ -69,11 +70,6 @@ window.Vue = require('vue');
required: false,
default: () => ({}),
},
commitIconSvg: {
type: String,
required: false,
},
},
computed: {
...
...
@@ -116,6 +112,10 @@ window.Vue = require('vue');
},
},
data() {
return { commitIconSvg };
},
template: `
<div class="branch-commit">
...
...
app/views/projects/environments/index.html.haml
View file @
e5037529
...
...
@@ -13,7 +13,4 @@
"project-stopped-environments-path"
=>
project_environments_path
(
@project
,
scope: :stopped
),
"new-environment-path"
=>
new_namespace_project_environment_path
(
@project
.
namespace
,
@project
),
"help-page-path"
=>
help_page_path
(
"ci/environments"
),
"css-class"
=>
container_class
,
"commit-icon-svg"
=>
custom_icon
(
"icon_commit"
),
"terminal-icon-svg"
=>
custom_icon
(
"icon_terminal"
),
"play-icon-svg"
=>
custom_icon
(
"icon_play"
)
}
}
"css-class"
=>
container_class
}
}
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