1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-13 06:40:06 +02:00
This commit is contained in:
JUDIT GRESKOVITS 2017-01-25 12:21:41 +00:00
commit f1cf0c4011
4 changed files with 35 additions and 8 deletions

View File

@ -83,3 +83,17 @@ nginx:
labels:
- triton.cns.services=nginx
- com.docker.swarm.affinities=["container!=~*nginx*"]
#############################################################################
# Prometheus is an open source performance monitoring tool
# it is included here for demo purposes and is not required
#############################################################################
prometheus:
image: autopilotpattern/prometheus:latest
restart: always
mem_limit: 1g
env_file: .env
ports:
- 9090
labels:
- triton.cns.services=prometheus
- com.docker.swarm.affinities=["container!=~*prometheus*"]

View File

@ -60,9 +60,12 @@ const PersonRole = (props) => {
const toggled = toggledID;
const handleClick = () => handleRoleTooltip(person.uuid);
const handleOptionSelect = (updatedMember) => handleRoleUpdate(updatedMember);
const _person = {
...person,
personIndex
// Only send relevent info as props
const _person = {
uuid: person.uuid,
status: person.status,
role: person.role
};
return (
@ -76,6 +79,7 @@ const PersonRole = (props) => {
handleSelect={handleOptionSelect}
options={membersRolesOptions}
person={_person}
personIndex={personIndex}
/>
: null }
</StyledWrapper>

View File

@ -16,15 +16,22 @@ const arrowPosition = {
module.exports = ({
handleSelect,
person = {},
personIndex,
options = [],
}) => {
const _options = options.map( (option, i) => {
const _onClick = () => handleSelect({
...person,
role: option
});
const payload = {
person: {
uuid: person.uuid,
status: person.status,
role: option
},
personIndex
};
const _onClick = () => handleSelect(payload);
return (
<li
@ -53,4 +60,5 @@ module.exports.propTypes = {
handleSelect: React.PropTypes.func,
options: React.PropTypes.array,
person: React.PropTypes.object,
personIndex: React.PropTypes.number,
};

View File

@ -51,6 +51,7 @@ module.exports = handleActions({
// TODO:
// Change "1" to org index. At the moment only updates
// "biz-tech"
return {
...state,
ui: {
@ -64,7 +65,7 @@ module.exports = handleActions({
members: [
...state.data[1].members.slice(0, action.payload.personIndex),
{
...action.payload
...action.payload.person
},
...state.data[1].members.slice(action.payload.personIndex + 1)
]