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: labels:
- triton.cns.services=nginx - triton.cns.services=nginx
- com.docker.swarm.affinities=["container!=~*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 toggled = toggledID;
const handleClick = () => handleRoleTooltip(person.uuid); const handleClick = () => handleRoleTooltip(person.uuid);
const handleOptionSelect = (updatedMember) => handleRoleUpdate(updatedMember); const handleOptionSelect = (updatedMember) => handleRoleUpdate(updatedMember);
const _person = {
...person, // Only send relevent info as props
personIndex const _person = {
uuid: person.uuid,
status: person.status,
role: person.role
}; };
return ( return (
@ -76,6 +79,7 @@ const PersonRole = (props) => {
handleSelect={handleOptionSelect} handleSelect={handleOptionSelect}
options={membersRolesOptions} options={membersRolesOptions}
person={_person} person={_person}
personIndex={personIndex}
/> />
: null } : null }
</StyledWrapper> </StyledWrapper>

View File

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

View File

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