Project

General

Profile

« Previous | Next » 

Revision 6b9dbc3b

Added by Leos Stejskal almost 3 years ago

Fixes #33215 - Registration - link to documentation (#8704)

Link to documentation should not be hardcoded
in the React component but should go through LinksController

View differences:

webpack/assets/javascripts/react_app/routes/RegistrationCommands/RegistrationCommandsPage/index.js
import {
useForemanOrganization,
useForemanLocation,
useForemanVersion,
} from '../../../Root/Context/ForemanContext';
import { STATUS } from '../../../constants';
import Head from '../../../components/Head';
......
selectPluginData,
} from './RegistrationCommandsPageSelectors';
import { dataAction, commandAction } from './RegistrationCommandsPageActions';
import { docUrl } from './RegistrationCommandsPageConstants';
import General from './components/General';
import Advanced from './components/Advanced';
......
// Context
const currentOrganization = useForemanOrganization();
const currentLocation = useForemanLocation();
const foremanVersion = useForemanVersion();
// Form tabs
const [activeTab, setActiveTab] = useState(0);
......
</GridItem>
<GridItem span={6}>
<a
href="https://docs.theforeman.org/nightly/Managing_Hosts/index-foreman-el.html#registering-a-host-to-project-using-the-global-registration-template_managing-hosts"
href={docUrl(foremanVersion)}
target="_blank"
rel="noreferrer"
className="pf-c-button pf-m-secondary pf-m-small pull-right"

Also available in: Unified diff