[BeatsCM] fix incorrect beat name in enroll command, remove translation of command (#27036)

This commit is contained in:
Matt Apperson 2018-12-13 09:29:54 -05:00 committed by GitHub
parent 8ad6949269
commit c039cd80d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ export class EnrollBeat extends React.Component<ComponentProps, ComponentState>
this.state = { this.state = {
enrolledBeat: null, enrolledBeat: null,
hasPolledForBeat: false, hasPolledForBeat: false,
command: 'sudo filebeat', command: 'sudo {{beatType}}',
beatType: 'filebeat', beatType: 'filebeat',
}; };
} }
@ -144,17 +144,15 @@ export class EnrollBeat extends React.Component<ComponentProps, ComponentState>
value={this.state.command} value={this.state.command}
options={[ options={[
{ {
value: `sudo ${this.state.beatType}`, value: `sudo {{beatType}}`,
text: 'DEB / RPM', text: 'DEB / RPM',
}, },
{ {
value: `PS C:\\Program Files\\${capitalize(this.state.beatType)}> ${ value: `PS C:\\Program Files\\{{beatTypeInCaps}}> {{beatType}}.exe`,
this.state.beatType
}.exe`,
text: 'Windows', text: 'Windows',
}, },
{ {
value: `./${this.state.beatType}`, value: `./{{beatType}}`,
text: 'MacOS', text: 'MacOS',
}, },
]} ]}
@ -188,17 +186,13 @@ export class EnrollBeat extends React.Component<ComponentProps, ComponentState>
className="euiFieldText euiFieldText--fullWidth" className="euiFieldText euiFieldText--fullWidth"
style={{ textAlign: 'left' }} style={{ textAlign: 'left' }}
> >
<FormattedMessage {`$ ${this.state.command
id="xpack.beatsManagement.enrollBeat.stateCommandEnrollLocationProtocolTitle" .replace('{{beatType}}', this.state.beatType)
defaultMessage="$ {stateCommand} enroll {locationProtocol}" .replace('{{beatTypeInCaps}}', capitalize(this.state.beatType))} enroll ${
values={{ window.location.protocol
stateCommand: this.state.command, }://${window.location.host} ${this.props.frameworkBasePath} ${
locationProtocol: window.location.protocol, this.props.enrollmentToken
}} }`}
/>
{`//`}
{window.location.host}
{this.props.frameworkBasePath} {this.props.enrollmentToken}
</div> </div>
</div> </div>
<br /> <br />