Skip to content

Commit

Permalink
Merge pull request #55 from sonatype-nexus-community/feat/add-example…
Browse files Browse the repository at this point in the history
…-components-from-options

feat: Add example component registry links after initial connect.
  • Loading branch information
madpah authored Aug 10, 2023
2 parents 06574e4 + 01aed13 commit 37298a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions public/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,5 +362,9 @@
"DOES_IQ_SUPPORT_FEATURE": {
"message": "Does your Sonatype IQ Server include support for",
"description": "Prompt in Options about what features IQ Licence supports"
},
"EXAMPLE": {
"message": "Example",
"description": "Example links to public repositories"
}
}
17 changes: 14 additions & 3 deletions src/components/Options/IQServer/IQServerOptionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
} from '@sonatype/react-shared-components'
import React, { useEffect, useState, useContext } from 'react'
import './IQServerOptionsPage.css'
import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons'
import { faExternalLink, faQuestionCircle } from '@fortawesome/free-solid-svg-icons'
import { IconDefinition } from '@fortawesome/fontawesome-svg-core'
import { MESSAGE_REQUEST_TYPE, MESSAGE_RESPONSE_STATUS, MessageResponse } from '../../../types/Message'
import { DEFAULT_EXTENSION_SETTINGS, ExtensionConfiguration } from '../../../types/ExtensionConfiguration'
Expand Down Expand Up @@ -342,7 +342,7 @@ export default function IQServerOptionsPage(props: IqServerOptionsPageInterface)
</NxGrid.Row>
<NxDivider></NxDivider>
<NxGrid.Row>
<section className='nx-grid-col nx-grid-col--'>
<section className='nx-grid-col nx-grid-col-100'>
<p className='nx-p'>
<strong>1)</strong> {_browser.i18n.getMessage('OPTIONS_PAGE_SONATYPE_POINT_1')}
</p>
Expand All @@ -368,7 +368,7 @@ export default function IQServerOptionsPage(props: IqServerOptionsPageInterface)
<strong>2)</strong> {_browser.i18n.getMessage('OPTIONS_PAGE_SONATYPE_POINT_2')}
</p>
<div className='nx-form-row'>
<NxFormGroup label={_browser.i18n.getMessage('LABEL_USERNAME')} isRequired>
<NxFormGroup label={_browser.i18n.getMessage('LABEL_USERNAME') } isRequired>
<NxStatefulTextInput
defaultValue={extensionSettings?.user}
validator={nonEmptyValidator}
Expand Down Expand Up @@ -423,6 +423,17 @@ export default function IQServerOptionsPage(props: IqServerOptionsPageInterface)
})}
</NxFormSelect>
</NxFormGroup>
{/* <NxFormGroup
label={_browser.i18n.getMessage('LABEL_SONATYPE_APPLICATION')}> */}

<a href="https://central.sonatype.com/artifact/org.apache.logging.log4j/log4j-core/2.12.1" target='_blank' className="nx-btn">Maven {_browser.i18n.getMessage('EXAMPLE')}
{' '}<NxFontAwesomeIcon icon={faExternalLink as IconDefinition} /></a>
<a href="https://www.npmjs.com/package/handlebars/v/4.7.5" target='_blank' className="nx-btn">npmjs {_browser.i18n.getMessage('EXAMPLE')}
{' '}<NxFontAwesomeIcon icon={faExternalLink as IconDefinition} /></a>
<a href="https://pypi.org/project/feedparser/6.0.10/" target='_blank' className="nx-btn">PyPI {_browser.i18n.getMessage('EXAMPLE')}
{' '}<NxFontAwesomeIcon icon={faExternalLink as IconDefinition} /></a>

{/* </NxFormGroup> */}
</React.Fragment>
)}

Expand Down

0 comments on commit 37298a4

Please sign in to comment.