Skip to content

Commit

Permalink
Merge pull request #7307 from TheThingsNetwork/fix/field-name
Browse files Browse the repository at this point in the history
Fix gateway owner token field name - backport
  • Loading branch information
ryaplots authored Sep 16, 2024
2 parents 41e609a + 5e10b33 commit 4efe7ca
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/console/gateways/create.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('Gateway create', () => {
cy.findByLabelText('Gateway EUI').type(gateway.eui)
cy.findByRole('button', { name: 'Confirm' }).click()
cy.findByTestId('notification').should('not.exist')
cy.findByLabelText('Claim authentication code').type('12345')
cy.findByLabelText('Owner token').type('12345')
cy.findByLabelText('Gateway ID').type(`eui-${gateway.eui}`)
cy.findByText('Frequency plan')
.parents('div[data-test-id="form-field"]')
Expand Down Expand Up @@ -163,7 +163,7 @@ describe('Gateway create', () => {
cy.findByTestId('notification').should('not.exist')
cy.findByLabelText('Frequency plan').selectOption(gateway.frequency_plan)
cy.findByLabelText('Gateway ID').type(`eui-${gateway.eui}`)
cy.findByLabelText('Claim authentication code').type('12345')
cy.findByLabelText('Owner token').type('12345')
cy.findByRole('button', { name: 'Claim gateway' }).click()
cy.wait('@claim-request').its('request.body').should('deep.equal', expectedRequest)
cy.findByTestId('error-notification').should('not.exist')
Expand All @@ -190,7 +190,7 @@ describe('Gateway create', () => {
cy.findByLabelText('Gateway EUI').type(gateway.eui)
cy.findByRole('button', { name: 'Confirm' }).click()
cy.findByTestId('notification').should('be.visible')
cy.findByLabelText('Claim authentication code').type('12345')
cy.findByLabelText('Owner token').type('12345')
cy.findByLabelText('Gateway ID').type(`eui-${gateway.eui}`)
cy.findByText('Frequency plan')
.parents('div[data-test-id="form-field"]')
Expand Down Expand Up @@ -239,7 +239,7 @@ describe('Gateway create', () => {
cy.findByTestId('notification').should('be.visible')
cy.findByLabelText('Frequency plan').selectOption(gateway.frequency_plan)
cy.findByLabelText('Gateway ID').type(`eui-${gateway.eui}`)
cy.findByLabelText('Claim authentication code').type('12345')
cy.findByLabelText('Owner token').type('12345')
cy.findByRole('button', { name: 'Claim gateway' }).click()
cy.wait('@claim-request').its('request.body').should('deep.equal', expectedRequest)
cy.findByTestId('error-notification').should('not.exist')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const { enabled: gsEnabled, base_url: gsBaseURL } = selectGsConfig()

const m = defineMessages({
claimWarning:
'We detected that your gateway is a <strong>Managed Gateway</strong>. To claim this gateway, please use the claim authentication code printed on the inside of the mounting lid or scan the QR code to claim instantly.',
'We detected that your gateway is a <strong>Managed Gateway</strong>. To claim this gateway, please use the owner token printed on the inside of the mounting lid or scan the QR code to claim instantly.',
})

const initialValues = {
Expand Down Expand Up @@ -78,7 +78,7 @@ const GatewayClaimFormSection = () => {
)}
<Form.Field
required
title={sharedMessages.claimAuthCode}
title={sharedMessages.ownerToken}
name="authenticated_identifiers.authentication_code"
tooltipId={tooltipIds.CLAIM_AUTH_CODE}
component={Input}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const GatewayQRScanSection = () => {
header: sharedMessages.qrCodeData,
items: [
{
key: sharedMessages.claimAuthCode,
key: sharedMessages.ownerToken,
value: gateway.owner_token,
type: 'code',
sensitive: true,
Expand Down
5 changes: 2 additions & 3 deletions pkg/webui/lib/field-description-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,9 @@ const m = defineMessages({
'Adjust the time that the Network Server schedules class C messages in advance. This is useful for gateways that have a known high latency backhaul, like 3G and satellite.',
updateGtwLocationFromStatusDescription:
'Instead of setting the location manually, you can alternatively choose to update the location of this gateway from status messages. This only works for gateways that send their locations within status messages while using an authenticated connection; gateways connected over UDP are not supported. Please refer to the manual of your gateway model to see whether sending location data is supported.',
claimAuthenticationCodeDescription:
'The claim authentication code is the proof of ownership of the gateway.',
claimAuthenticationCodeDescription: 'The owner token is the proof of ownership of the gateway.',
claimAuthenticationCodeLocation:
'It is typically printed on the box or on the device. For example, for The Things Indoor Gateway, the claim authentication code is the WiFi password printed on the device.',
'It is typically printed on the box or on the gateway. For example, for The Things Indoor Gateway, the owner token is the WiFi password printed on the gateway.',
disablePacketBrokerForwardingDescription:
'When checked, uplink messages received from this gateway will not be forwarded to Packet Broker. This option takes effect only after the gateway reconnects.',
rx1DelayDescription:
Expand Down
1 change: 1 addition & 0 deletions pkg/webui/lib/shared-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ export default defineMessages({
otherOption: 'Other...',
overview: 'Overview',
ownedByMe: 'Owned by me',
ownerToken: 'Owner token',
packetBroker: 'Packet Broker',
packetsPerDataRate: 'Packets per data rate',
packetsPerChannel: 'Packets per channel (24 days)',
Expand Down
7 changes: 4 additions & 3 deletions pkg/webui/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
"console.containers.gateway-managed-gateway.wifi-profiles.overview.deleteSuccess": "WiFi profile deleted",
"console.containers.gateway-managed-gateway.wifi-profiles.overview.deleteFail": "There was an error and the WiFi profile could not be deleted",
"console.containers.gateway-managed-gateway.wifi-profiles.overview.deleteModalMessage": "The profile will not be applicable to gateways anymore and gateways using this profile might lose connectivity. Please make sure to update the gateway settings before deleting this profile.",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-claim-form-section.index.claimWarning": "We detected that your gateway is a <strong>Managed Gateway</strong>. To claim this gateway, please use the claim authentication code printed on the inside of the mounting lid or scan the QR code to claim instantly.",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-claim-form-section.index.claimWarning": "We detected that your gateway is a <strong>Managed Gateway</strong>. To claim this gateway, please use the owner token printed on the inside of the mounting lid or scan the QR code to claim instantly.",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-registration-form-section.index.requireAuthenticatedConnectionDescription": "Select which information can be seen by other network participants, including {packetBrokerURL}",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-registration-form-section.index.shareGatewayInfoDescription": "Choose this option eg. if your gateway is powered by {loraBasicStationURL}",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-registration-form-section.validation-schema.validateEntry": "There must be at least one selected frequency plan ID.",
Expand Down Expand Up @@ -1121,8 +1121,8 @@
"lib.field-description-messages.enforceDutyCycleDescription": "When checked, the Network Server will only schedule messages respecting the duty cycle limitations of the selected frequency plan. Note that you are required by law to respect duty cycle regulations applicable to the physical location of your end device.",
"lib.field-description-messages.scheduleAnytimeDelayDescription": "Adjust the time that the Network Server schedules class C messages in advance. This is useful for gateways that have a known high latency backhaul, like 3G and satellite.",
"lib.field-description-messages.updateGtwLocationFromStatusDescription": "Instead of setting the location manually, you can alternatively choose to update the location of this gateway from status messages. This only works for gateways that send their locations within status messages while using an authenticated connection; gateways connected over UDP are not supported. Please refer to the manual of your gateway model to see whether sending location data is supported.",
"lib.field-description-messages.claimAuthenticationCodeDescription": "The claim authentication code is the proof of ownership of the gateway.",
"lib.field-description-messages.claimAuthenticationCodeLocation": "It is typically printed on the box or on the device. For example, for The Things Indoor Gateway, the claim authentication code is the WiFi password printed on the device.",
"lib.field-description-messages.claimAuthenticationCodeDescription": "The owner token is the proof of ownership of the gateway.",
"lib.field-description-messages.claimAuthenticationCodeLocation": "It is typically printed on the box or on the gateway. For example, for The Things Indoor Gateway, the owner token is the WiFi password printed on the gateway.",
"lib.field-description-messages.disablePacketBrokerForwardingDescription": "When checked, uplink messages received from this gateway will not be forwarded to Packet Broker. This option takes effect only after the gateway reconnects.",
"lib.field-description-messages.rx1DelayDescription": "The amount of time in seconds after an uplink that the downlink window opens.",
"lib.field-description-messages.rx1DelayAbsence": "The default value of 5 seconds will be set by The Things Stack to accommodate for high-latency backhauls and/or Packet Broker.",
Expand Down Expand Up @@ -1574,6 +1574,7 @@
"lib.shared-messages.otherOption": "Other...",
"lib.shared-messages.overview": "Overview",
"lib.shared-messages.ownedByMe": "Owned by me",
"lib.shared-messages.ownerToken": "Owner token",
"lib.shared-messages.packetBroker": "Packet Broker",
"lib.shared-messages.packetsPerDataRate": "Packets per data rate",
"lib.shared-messages.packetsPerChannel": "Packets per channel (24 days)",
Expand Down
1 change: 1 addition & 0 deletions pkg/webui/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,7 @@
"lib.shared-messages.otherOption": "その他…",
"lib.shared-messages.overview": "概要",
"lib.shared-messages.ownedByMe": "",
"lib.shared-messages.ownerToken": "",
"lib.shared-messages.packetBroker": "Packet Broker",
"lib.shared-messages.packetsPerDataRate": "",
"lib.shared-messages.packetsPerChannel": "",
Expand Down

0 comments on commit 4efe7ca

Please sign in to comment.