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
Boxiang Sun
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
Show 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', {
...
@@ -35,9 +35,6 @@ module.exports = Vue.component('environment-component', {
projectStoppedEnvironmentsPath: environmentsData.projectStoppedEnvironmentsPath,
projectStoppedEnvironmentsPath: environmentsData.projectStoppedEnvironmentsPath,
newEnvironmentPath: environmentsData.newEnvironmentPath,
newEnvironmentPath: environmentsData.newEnvironmentPath,
helpPagePath: environmentsData.helpPagePath,
helpPagePath: environmentsData.helpPagePath,
commitIconSvg: environmentsData.commitIconSvg,
playIconSvg: environmentsData.playIconSvg,
terminalIconSvg: environmentsData.terminalIconSvg,
// Pagination Properties,
// Pagination Properties,
paginationInformation: {},
paginationInformation: {},
...
@@ -176,10 +173,7 @@ module.exports = Vue.component('environment-component', {
...
@@ -176,10 +173,7 @@ module.exports = Vue.component('environment-component', {
<environment-table
<environment-table
:environments="state.environments"
:environments="state.environments"
:can-create-deployment="canCreateDeploymentParsed"
:can-create-deployment="canCreateDeploymentParsed"
:can-read-environment="canReadEnvironmentParsed"
:can-read-environment="canReadEnvironmentParsed">
:play-icon-svg="playIconSvg"
:terminal-icon-svg="terminalIconSvg"
:commit-icon-svg="commitIconSvg">
</environment-table>
</environment-table>
<table-pagination v-if="state.paginationInformation && state.paginationInformation.totalPages > 1"
<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 Vue = require('vue');
const playIconSvg = require('../../../../views/shared/icons/_icon_play.svg');
module.exports = Vue.component('actions-component', {
module.exports = Vue.component('actions-component', {
props: {
props: {
...
@@ -7,11 +8,10 @@ module.exports = Vue.component('actions-component', {
...
@@ -7,11 +8,10 @@ module.exports = Vue.component('actions-component', {
required: false,
required: false,
default: () => [],
default: () => [],
},
},
playIconSvg: {
type: String,
required: false,
},
},
data() {
return { playIconSvg };
},
},
template: `
template: `
...
...
app/assets/javascripts/environments/components/environment_item.js.es6
View file @
e5037529
...
@@ -46,21 +46,6 @@ module.exports = Vue.component('environment-item', {
...
@@ -46,21 +46,6 @@ module.exports = Vue.component('environment-item', {
required: false,
required: false,
default: false,
default: false,
},
},
commitIconSvg: {
type: String,
required: false,
},
playIconSvg: {
type: String,
required: false,
},
terminalIconSvg: {
type: String,
required: false,
},
},
},
computed: {
computed: {
...
@@ -507,7 +492,6 @@ module.exports = Vue.component('environment-item', {
...
@@ -507,7 +492,6 @@ module.exports = Vue.component('environment-item', {
<div v-if="!model.isFolder">
<div v-if="!model.isFolder">
<div class="btn-group" role="group">
<div class="btn-group" role="group">
<actions-component v-if="hasManualActions && canCreateDeployment"
<actions-component v-if="hasManualActions && canCreateDeployment"
:play-icon-svg="playIconSvg"
:actions="manualActions">
:actions="manualActions">
</actions-component>
</actions-component>
...
@@ -520,7 +504,6 @@ module.exports = Vue.component('environment-item', {
...
@@ -520,7 +504,6 @@ module.exports = Vue.component('environment-item', {
</stop-component>
</stop-component>
<terminal-button-component v-if="model && model.terminal_path"
<terminal-button-component v-if="model && model.terminal_path"
:terminal-icon-svg="terminalIconSvg"
:terminal-path="model.terminal_path">
:terminal-path="model.terminal_path">
</terminal-button-component>
</terminal-button-component>
...
...
app/assets/javascripts/environments/components/environment_terminal_button.js.es6
View file @
e5037529
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
* Used in environments table.
* Used in environments table.
*/
*/
const Vue = require('vue');
const Vue = require('vue');
const terminalIconSvg = require('../../../../views/shared/icons/_icon_terminal.svg');
module.exports = Vue.component('terminal-button-component', {
module.exports = Vue.component('terminal-button-component', {
props: {
props: {
...
@@ -10,10 +11,10 @@ module.exports = Vue.component('terminal-button-component', {
...
@@ -10,10 +11,10 @@ module.exports = Vue.component('terminal-button-component', {
type: String,
type: String,
default: '',
default: '',
},
},
terminalIconSvg: {
type: String,
default: '',
},
},
data() {
return { terminalIconSvg };
},
},
template: `
template: `
...
...
app/assets/javascripts/environments/components/environments_table.js.es6
View file @
e5037529
...
@@ -28,21 +28,6 @@ module.exports = Vue.component('environment-table-component', {
...
@@ -28,21 +28,6 @@ module.exports = Vue.component('environment-table-component', {
required: false,
required: false,
default: false,
default: false,
},
},
commitIconSvg: {
type: String,
required: false,
},
playIconSvg: {
type: String,
required: false,
},
terminalIconSvg: {
type: String,
required: false,
},
},
},
template: `
template: `
...
@@ -63,10 +48,7 @@ module.exports = Vue.component('environment-table-component', {
...
@@ -63,10 +48,7 @@ module.exports = Vue.component('environment-table-component', {
<tr is="environment-item"
<tr is="environment-item"
:model="model"
:model="model"
:can-create-deployment="canCreateDeployment"
:can-create-deployment="canCreateDeployment"
:can-read-environment="canReadEnvironment"
:can-read-environment="canReadEnvironment"></tr>
:play-icon-svg="playIconSvg"
:terminal-icon-svg="terminalIconSvg"
:commit-icon-svg="commitIconSvg"></tr>
</template>
</template>
</tbody>
</tbody>
</table>
</table>
...
...
app/assets/javascripts/vue_shared/components/commit.js.es6
View file @
e5037529
/* global Vue */
/* global Vue */
window.Vue = require('vue');
window.Vue = require('vue');
const commitIconSvg = require('../../../../views/shared/icons/_icon_commit.svg');
(() => {
(() => {
window.gl = window.gl || {};
window.gl = window.gl || {};
...
@@ -69,11 +70,6 @@ window.Vue = require('vue');
...
@@ -69,11 +70,6 @@ window.Vue = require('vue');
required: false,
required: false,
default: () => ({}),
default: () => ({}),
},
},
commitIconSvg: {
type: String,
required: false,
},
},
},
computed: {
computed: {
...
@@ -116,6 +112,10 @@ window.Vue = require('vue');
...
@@ -116,6 +112,10 @@ window.Vue = require('vue');
},
},
},
},
data() {
return { commitIconSvg };
},
template: `
template: `
<div class="branch-commit">
<div class="branch-commit">
...
...
app/views/projects/environments/index.html.haml
View file @
e5037529
...
@@ -13,7 +13,4 @@
...
@@ -13,7 +13,4 @@
"project-stopped-environments-path"
=>
project_environments_path
(
@project
,
scope: :stopped
),
"project-stopped-environments-path"
=>
project_environments_path
(
@project
,
scope: :stopped
),
"new-environment-path"
=>
new_namespace_project_environment_path
(
@project
.
namespace
,
@project
),
"new-environment-path"
=>
new_namespace_project_environment_path
(
@project
.
namespace
,
@project
),
"help-page-path"
=>
help_page_path
(
"ci/environments"
),
"help-page-path"
=>
help_page_path
(
"ci/environments"
),
"css-class"
=>
container_class
,
"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"
)
}
}
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