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
7e052b0a
Commit
7e052b0a
authored
Mar 16, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix conflicts in environments code
parent
106e288b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
138 deletions
+12
-138
app/assets/javascripts/environments/components/environment.js
...assets/javascripts/environments/components/environment.js
+0
-42
app/assets/javascripts/environments/components/environment_item.js
...s/javascripts/environments/components/environment_item.js
+2
-22
app/assets/javascripts/environments/components/environments_table.js
...javascripts/environments/components/environments_table.js
+3
-19
app/assets/javascripts/environments/folder/environments_folder_view.js
...vascripts/environments/folder/environments_folder_view.js
+0
-18
app/assets/javascripts/environments/services/environments_service.js
...javascripts/environments/services/environments_service.js
+0
-9
spec/javascripts/environments/environment_item_spec.js
spec/javascripts/environments/environment_item_spec.js
+0
-6
spec/javascripts/environments/environment_table_spec.js
spec/javascripts/environments/environment_table_spec.js
+4
-3
spec/javascripts/environments/environments_store_spec.js
spec/javascripts/environments/environments_store_spec.js
+1
-6
spec/javascripts/environments/mock_data.js
spec/javascripts/environments/mock_data.js
+2
-13
No files found.
app/assets/javascripts/environments/components/environment.js
View file @
7e052b0a
...
...
@@ -7,18 +7,9 @@ import eventHub from '../event_hub';
const
Vue
=
window
.
Vue
=
require
(
'
vue
'
);
window
.
Vue
.
use
(
require
(
'
vue-resource
'
));
<<<<<<<
HEAD
const
EnvironmentsService
=
require
(
'
~/environments/services/environments_service
'
);
const
EnvironmentTable
=
require
(
'
./environments_table
'
);
const
EnvironmentsStore
=
require
(
'
~/environments/stores/environments_store
'
);
require
(
'
~/vue_shared/components/table_pagination
'
);
require
(
'
~/lib/utils/common_utils
'
);
require
(
'
~/vue_shared/vue_resource_interceptor
'
);
=======
require
(
'
../../vue_shared/components/table_pagination
'
);
require
(
'
../../lib/utils/common_utils
'
);
require
(
'
../../vue_shared/vue_resource_interceptor
'
);
>>>>>>>
ce
/
master
export
default
Vue
.
component
(
'
environment-component
'
,
{
...
...
@@ -87,35 +78,6 @@ export default Vue.component('environment-component', {
* Toggles loading property.
*/
created
()
{
<<<<<<<
HEAD
const
scope
=
gl
.
utils
.
getParameterByName
(
'
scope
'
)
||
this
.
visibility
;
const
pageNumber
=
gl
.
utils
.
getParameterByName
(
'
page
'
)
||
this
.
pageNumber
;
const
endpoint
=
`
${
this
.
endpoint
}
?scope=
${
scope
}
&page=
${
pageNumber
}
`
;
this
.
service
=
new
EnvironmentsService
(
endpoint
);
this
.
isLoading
=
true
;
return
this
.
service
.
get
()
.
then
(
resp
=>
({
headers
:
resp
.
headers
,
body
:
resp
.
json
(),
}))
.
then
((
response
)
=>
{
this
.
store
.
storeAvailableCount
(
response
.
body
.
available_count
);
this
.
store
.
storeStoppedCount
(
response
.
body
.
stopped_count
);
this
.
store
.
storeEnvironments
(
response
.
body
.
environments
);
this
.
store
.
setPagination
(
response
.
headers
);
})
.
then
(()
=>
{
this
.
isLoading
=
false
;
})
.
catch
(()
=>
{
this
.
isLoading
=
false
;
new
Flash
(
'
An error occurred while fetching the environments.
'
,
'
alert
'
);
});
=======
this
.
service
=
new
EnvironmentsService
(
this
.
endpoint
);
this
.
fetchEnvironments
();
...
...
@@ -125,7 +87,6 @@ export default Vue.component('environment-component', {
beforeDestroyed
()
{
eventHub
.
$off
(
'
refreshEnvironments
'
);
>>>>>>>
ce
/
master
},
methods
:
{
...
...
@@ -240,11 +201,8 @@ export default Vue.component('environment-component', {
:environments="state.environments"
:can-create-deployment="canCreateDeploymentParsed"
:can-read-environment="canReadEnvironmentParsed"
<<<<<<< HEAD
:toggleDeployBoard="toggleDeployBoard"
:store="store"
=======
>>>>>>> ce/master
:service="service"/>
</div>
...
...
app/assets/javascripts/environments/components/environment_item.js
View file @
7e052b0a
<<<<<<<
HEAD
/**
* Environment Item Component
*
* Renders a table row for each environment.
*/
const
Vue
=
require
(
'
vue
'
);
const
Timeago
=
require
(
'
timeago.js
'
);
require
(
'
../../lib/utils/text_utility
'
);
require
(
'
../../vue_shared/components/commit
'
);
const
ActionsComponent
=
require
(
'
./environment_actions
'
);
const
ExternalUrlComponent
=
require
(
'
./environment_external_url
'
);
const
StopComponent
=
require
(
'
./environment_stop
'
);
const
RollbackComponent
=
require
(
'
./environment_rollback
'
);
const
TerminalButtonComponent
=
require
(
'
./environment_terminal_button
'
);
=======
import
Timeago
from
'
timeago.js
'
;
import
ActionsComponent
from
'
./environment_actions
'
;
import
ExternalUrlComponent
from
'
./environment_external_url
'
;
...
...
@@ -24,7 +6,6 @@ import RollbackComponent from './environment_rollback';
import
TerminalButtonComponent
from
'
./environment_terminal_button
'
;
import
'
../../lib/utils/text_utility
'
;
import
'
../../vue_shared/components/commit
'
;
>>>>>>>
ce
/
master
const
timeagoInstance
=
new
Timeago
();
...
...
@@ -58,15 +39,14 @@ export default {
default
:
false
,
},
<<<<<<<
HEAD
toggleDeployBoard
:
{
type
:
Function
,
required
:
false
,
=======
},
service
:
{
type
:
Object
,
required
:
true
,
>>>>>>>
ce
/
master
},
},
...
...
app/assets/javascripts/environments/components/environments_table.js
View file @
7e052b0a
...
...
@@ -4,15 +4,9 @@
* Dumb component used to render top level environments and
* the folder view.
*/
<<<<<<<
HEAD
const
Vue
=
require
(
'
vue
'
);
const
EnvironmentItem
=
require
(
'
./environment_item
'
);
const
DeployBoard
=
require
(
'
./deploy_board_component
'
).
default
;
module
.
exports
=
Vue
.
component
(
'
environment-table-component
'
,
{
=======
import
EnvironmentItem
from
'
./environment_item
'
;
>>>>>>>
ce
/
master
import
DeployBoard
from
'
./deploy_board_component
'
;
export
default
{
components
:
{
...
...
@@ -39,7 +33,6 @@ export default {
default
:
false
,
},
<<<<<<<
HEAD
toggleDeployBoard
:
{
type
:
Function
,
required
:
false
,
...
...
@@ -52,15 +45,9 @@ export default {
default
:
()
=>
({}),
},
service
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
({}),
=======
service
:
{
type
:
Object
,
required
:
true
,
>>>>>>>
ce
/
master
},
},
...
...
@@ -84,8 +71,8 @@ export default {
:model="model"
:can-create-deployment="canCreateDeployment"
:can-read-environment="canReadEnvironment"
<<<<<<< HEAD
:
toggleDeployBoard="toggleDeployBoard
"></tr>
:toggleDeployBoard="toggleDeployBoard"
:
service="service
"></tr>
<tr v-if="model.hasDeployBoard && model.isDeployBoardVisible" class="js-deploy-board-row">
<td colspan="6" class="deploy-board-container">
...
...
@@ -98,9 +85,6 @@ export default {
</deploy-board>
</td>
</tr>
=======
:service="service"></tr>
>>>>>>> ce/master
</template>
</tbody>
</table>
...
...
app/assets/javascripts/environments/folder/environments_folder_view.js
View file @
7e052b0a
<<<<<<<
HEAD
/* eslint-disable no-new */
const
Vue
=
window
.
Vue
=
require
(
'
vue
'
);
window
.
Vue
.
use
(
require
(
'
vue-resource
'
));
const
EnvironmentsService
=
require
(
'
~/environments//services/environments_service
'
);
const
EnvironmentTable
=
require
(
'
~/environments/components/environments_table
'
);
const
EnvironmentsStore
=
require
(
'
~/environments//stores/environments_store
'
);
const
Flash
=
require
(
'
~/flash
'
);
require
(
'
~/vue_shared/components/table_pagination
'
);
require
(
'
~/lib/utils/common_utils
'
);
require
(
'
~/vue_shared/vue_resource_interceptor
'
);
=======
/* eslint-disable no-param-reassign, no-new */
/* global Flash */
import
EnvironmentsService
from
'
../services/environments_service
'
;
...
...
@@ -22,7 +9,6 @@ window.Vue.use(require('vue-resource'));
require
(
'
../../vue_shared/components/table_pagination
'
);
require
(
'
../../lib/utils/common_utils
'
);
require
(
'
../../vue_shared/vue_resource_interceptor
'
);
>>>>>>>
ce
/
master
export
default
Vue
.
component
(
'
environment-folder-view
'
,
{
...
...
@@ -195,14 +181,10 @@ export default Vue.component('environment-folder-view', {
:play-icon-svg="playIconSvg"
:terminal-icon-svg="terminalIconSvg"
:commit-icon-svg="commitIconSvg"
<<<<<<< HEAD
:toggleDeployBoard="toggleDeployBoard"
:store="store"
:service="service">
</environment-table>
=======
:service="service"/>
>>>>>>> ce/master
<table-pagination v-if="state.paginationInformation && state.paginationInformation.totalPages > 1"
:change="changePage"
...
...
app/assets/javascripts/environments/services/environments_service.js
View file @
7e052b0a
<<<<<<<
HEAD
/* eslint-disable class-methods-use-this*/
const
Vue
=
require
(
'
vue
'
);
=======
/* eslint-disable class-methods-use-this */
import
Vue
from
'
vue
'
;
>>>>>>>
ce
/
master
export
default
class
EnvironmentsService
{
constructor
(
endpoint
)
{
...
...
@@ -14,14 +9,10 @@ export default class EnvironmentsService {
get
(
scope
,
page
)
{
return
this
.
environments
.
get
({
scope
,
page
});
}
<<<<<<<
HEAD
getDeployBoard
(
endpoint
)
{
return
Vue
.
http
.
get
(
endpoint
);
}
}
=======
>>>>>>>
ce
/
master
postAction
(
endpoint
)
{
return
Vue
.
http
.
post
(
endpoint
,
{},
{
emulateJSON
:
true
});
...
...
spec/javascripts/environments/environment_item_spec.js
View file @
7e052b0a
...
...
@@ -27,11 +27,8 @@ describe('Environment item', () => {
model
:
mockItem
,
canCreateDeployment
:
false
,
canReadEnvironment
:
true
,
<<<<<<<
HEAD
toggleDeployBoard
:
()
=>
{},
store
:
{},
=======
>>>>>>>
ce
/
master
service
:
{},
},
}).
$mount
();
...
...
@@ -120,11 +117,8 @@ describe('Environment item', () => {
model
:
environment
,
canCreateDeployment
:
true
,
canReadEnvironment
:
true
,
<<<<<<<
HEAD
toggleDeployBoard
:
()
=>
{},
store
:
{},
=======
>>>>>>>
ce
/
master
service
:
{},
},
}).
$mount
();
...
...
spec/javascripts/environments/environment_table_spec.js
View file @
7e052b0a
...
...
@@ -24,11 +24,8 @@ describe('Environment item', () => {
environments
:
[
mockItem
],
canCreateDeployment
:
false
,
canReadEnvironment
:
true
,
<<<<<<<
HEAD
toggleDeployBoard
:
()
=>
{},
store
:
{},
=======
>>>>>>>
ce
/
master
service
:
{},
},
}).
$mount
();
...
...
@@ -56,6 +53,8 @@ describe('Environment item', () => {
isDeployBoardVisible
:
true
,
};
const
EnvironmentTable
=
Vue
.
extend
(
environmentTableComp
);
const
component
=
new
EnvironmentTable
({
el
:
document
.
querySelector
(
'
.test-dom-element
'
),
propsData
:
{
...
...
@@ -96,6 +95,8 @@ describe('Environment item', () => {
const
spy
=
jasmine
.
createSpy
(
'
spy
'
);
const
EnvironmentTable
=
Vue
.
extend
(
environmentTableComp
);
const
component
=
new
EnvironmentTable
({
el
:
document
.
querySelector
(
'
.test-dom-element
'
),
propsData
:
{
...
...
spec/javascripts/environments/environments_store_spec.js
View file @
7e052b0a
<<<<<<<
HEAD
const
Store
=
require
(
'
~/environments/stores/environments_store
'
);
const
{
serverData
,
deployBoardMockData
}
=
require
(
'
./mock_data
'
);
=======
import
Store
from
'
~/environments/stores/environments_store
'
;
import
{
environmentsList
,
serverData
}
from
'
./mock_data
'
;
>>>>>>>
ce
/
master
import
{
deployBoardMockData
,
serverData
}
from
'
./mock_data
'
;
(()
=>
{
describe
(
'
Environments Store
'
,
()
=>
{
...
...
spec/javascripts/environments/mock_data.js
View file @
7e052b0a
...
...
@@ -86,9 +86,8 @@ export const environment = {
rollout_status_path
:
'
/path
'
,
},
};
<<<<<<<
HEAD
const
deployBoardMockData
=
{
export
const
deployBoardMockData
=
{
instances
:
[
{
status
:
'
finished
'
,
tooltip
:
'
tanuki-2334 Finished
'
},
{
status
:
'
finished
'
,
tooltip
:
'
tanuki-2335 Finished
'
},
...
...
@@ -124,20 +123,10 @@ const deployBoardMockData = {
valid
:
true
,
};
const
invalidDeployBoardMockData
=
{
export
const
invalidDeployBoardMockData
=
{
instances
:
[],
abort_url
:
'
url
'
,
rollback_url
:
'
url
'
,
completion
:
100
,
valid
:
false
,
};
module
.
exports
=
{
environmentsList
,
environment
,
serverData
,
deployBoardMockData
,
invalidDeployBoardMockData
,
};
=======
>>>>>>>
ce
/
master
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