Update client to 0.2.54 and fix breaking changes

pull/13020/head
Brandon Farmer 2019-03-29 09:46:08 -07:00
parent cfc9f1e3ab
commit 8f9015c9b2
3 changed files with 8 additions and 19 deletions

6
ui/package-lock.json generated
View File

@ -985,9 +985,9 @@
}
},
"@influxdata/influx": {
"version": "0.2.53",
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.53.tgz",
"integrity": "sha512-xOTUkDMyjT5G1yKLWt2U7FFhlmABStZtdAuMnq49CnsXxPokrWmVFcfZ0vtXTtlQLK6cdjpE/UY/N5MACBjYmQ==",
"version": "0.2.54",
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.54.tgz",
"integrity": "sha512-KDVe8ZYeNA/Ii9P9USWW28n4fES9ydQ2rrrQXzOqfqUQu2wkXDNluIKtMdjqJ0zwhqlc0v3hSSYGxPCHOIATEA==",
"requires": {
"axios": "^0.18.0"
}

View File

@ -137,7 +137,7 @@
},
"dependencies": {
"@influxdata/clockface": "0.0.8",
"@influxdata/influx": "0.2.53",
"@influxdata/influx": "0.2.54",
"@influxdata/react-custom-scrollbars": "4.3.8",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",

View File

@ -117,22 +117,11 @@ export default class Members extends PureComponent<Props, State> {
private async getUsers() {
const {members} = this.props
const apiUsers = await client.users.getAll()
const allUsers = apiUsers.reduce((acc, u) => _.set(acc, u.id, u), {})
const users = _.omit(allUsers, members.map(m => m.id))
const data = await client.users.getAllUsers()
const users = {}
data.users.forEach(key => {
users[key.id] = key
})
members.forEach(m => {
if (users[m.id]) {
delete users[m.id]
}
})
this.setState({users: users})
this.setState({users})
}
private addMember = async (user: AddResourceMemberRequestBody) => {