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
32784d21
Commit
32784d21
authored
Nov 09, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds external url component for environment
parent
8068d977
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
app/assets/javascripts/environments/components/environment_external_url.js.es6
...s/environments/components/environment_external_url.js.es6
+22
-0
app/assets/javascripts/environments/components/environment_item.js.es6
...vascripts/environments/components/environment_item.js.es6
+10
-6
app/assets/javascripts/vue_common_component/commit.js.es6
app/assets/javascripts/vue_common_component/commit.js.es6
+1
-1
No files found.
app/assets/javascripts/environments/components/environment_external_url.js.es6
0 → 100644
View file @
32784d21
/*= require vue
/* global Vue */
(() => {
window.gl = window.gl || {};
window.gl.environmentsList = window.gl.environmentsList || {};
window.gl.environmentsList.ExternalUrlComponent = Vue.component('external-url-component', {
props: {
external_url: {
type: String,
default: '',
},
},
template: `
<a class="btn external_url":href="external_url" :target="_blank">
<i class="fa fa-external-link"></i>
</a>
`,
});
})();
app/assets/javascripts/environments/components/environment_item.js.es6
View file @
32784d21
/*= require vue_common_component/commit
/*= require ./environment_actions
/*= require ./environment_external_url
/* globals Vue, timeago */
(() => {
...
...
@@ -22,6 +23,7 @@
components: {
'commit-component': window.gl.CommitComponent,
'actions-component': window.gl.environmentsList.ActionsComponent,
'external-url-component': window.gl.environmentsList.ExternalUrlComponent,
},
props: ['model', 'can-create-deployment', 'can-create-deployment', 'can-read-environment'],
...
...
@@ -247,11 +249,11 @@
},
canReadEnvironmentParsed() {
return
convert
ToBoolean(this.canReadEnvironment);
return
this.$options.convertPermission
ToBoolean(this.canReadEnvironment);
},
canCreateDeploymentParsed() {
return
convert
ToBoolean(this.canCreateDeployment);
return
this.$options.convertPermission
ToBoolean(this.canCreateDeployment);
},
},
...
...
@@ -291,10 +293,6 @@
},
},
ready() {
debugger;
},
template: `
<tr>
<td v-bind:class="rowClass">
...
...
@@ -366,6 +364,12 @@
<div v-if="hasManualActions && canCreateDeploymentParsed">
<actions-component :actions="manualActions"></actions-component>
</div>
<div v-if="model.external_url && canReadEnvironmentParsed">
<external-url-component
:external_url="model.external_url">
</external_url-component>
</div>
</div>
</td>
</tr>
...
...
app/assets/javascripts/vue_common_component/commit.js.es6
View file @
32784d21
...
...
@@ -111,7 +111,7 @@
},
/**
* In order to reuse the svg instead of copy and paste in this template
the html_safe
* In order to reuse the svg instead of copy and paste in this template
* we need to render it outside this component using =custom_icon partial.
* Make sure it has this structure:
* .commit-icon-svg.hidden
...
...
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