feat(labels/ui): update label name (#12702)
parent
77cf726a52
commit
2d97cd9b69
|
@ -985,9 +985,9 @@
|
|||
}
|
||||
},
|
||||
"@influxdata/influx": {
|
||||
"version": "0.2.42",
|
||||
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.42.tgz",
|
||||
"integrity": "sha512-xHywcFLfIM+MhdCjmK6T9c+mXIYgEvGENA13PDK2+G6j7YSmJZTutdYT4k472aa2uq3ziCBlYxvS5oG6P5Pd1g==",
|
||||
"version": "0.2.43",
|
||||
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.43.tgz",
|
||||
"integrity": "sha512-sAffeCoIBnpauaa7tATBI2P4wIloJSJC5wwPTu9xwKGQ5GjwRFAC34JXU8zuBlqg4ksYW9NvNBbLOGZSbz+iZw==",
|
||||
"requires": {
|
||||
"axios": "^0.18.0"
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@influxdata/clockface": "0.0.5",
|
||||
"@influxdata/influx": "0.2.42",
|
||||
"@influxdata/influx": "0.2.43",
|
||||
"@influxdata/react-custom-scrollbars": "4.3.8",
|
||||
"axios": "^0.18.0",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
|
|
|
@ -62,15 +62,15 @@ class CreateLabelOverlay extends Component<Props, State> {
|
|||
<LabelOverlayForm
|
||||
id={label.id}
|
||||
name={label.name}
|
||||
description={label.properties.description}
|
||||
color={label.properties.color}
|
||||
onColorChange={this.handleColorChange}
|
||||
onSubmit={this.handleSubmit}
|
||||
onCloseModal={onDismiss}
|
||||
onInputChange={this.handleInputChange}
|
||||
buttonText="Create Label"
|
||||
onSubmit={this.handleSubmit}
|
||||
isFormValid={this.isFormValid}
|
||||
color={label.properties.color}
|
||||
onNameValidation={onNameValidation}
|
||||
onInputChange={this.handleInputChange}
|
||||
onColorChange={this.handleColorChange}
|
||||
description={label.properties.description}
|
||||
/>
|
||||
</Overlay.Body>
|
||||
</Overlay.Container>
|
||||
|
|
|
@ -126,7 +126,7 @@ class Labels extends PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
private handleUpdateLabel = (label: ILabel) => {
|
||||
this.props.updateLabel(label.id, label.properties)
|
||||
this.props.updateLabel(label.id, label)
|
||||
}
|
||||
|
||||
private handleDelete = async (id: string) => {
|
||||
|
|
|
@ -94,11 +94,11 @@ export const createLabel = (
|
|||
}
|
||||
}
|
||||
|
||||
export const updateLabel = (id: string, properties: LabelProperties) => async (
|
||||
export const updateLabel = (id: string, l: ILabel) => async (
|
||||
dispatch: Dispatch<Action>
|
||||
) => {
|
||||
try {
|
||||
const label = await client.labels.update(id, properties)
|
||||
const label = await client.labels.update(id, l)
|
||||
|
||||
dispatch(editLabel(label))
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue