mirror of
https://github.com/ansible/awx.git
synced 2026-07-08 23:08:04 -02:30
Merge pull request #198 from jlmitch5/translationUpdate
utilize i18n correctly
This commit is contained in:
@@ -20,6 +20,7 @@ Have questions about this document or anything not covered here? Feel free to re
|
|||||||
* [Typechecking with PropTypes](#typechecking-with-proptypes)
|
* [Typechecking with PropTypes](#typechecking-with-proptypes)
|
||||||
* [Naming Functions](#naming-functions)
|
* [Naming Functions](#naming-functions)
|
||||||
* [Default State Initialization](#default-state-initialization)
|
* [Default State Initialization](#default-state-initialization)
|
||||||
|
* [Internationalization](#internationalization)
|
||||||
|
|
||||||
|
|
||||||
## Things to know prior to submitting code
|
## Things to know prior to submitting code
|
||||||
@@ -214,3 +215,30 @@ mountWithContexts(<Organization />< {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Internationalization
|
||||||
|
|
||||||
|
Internationalization leans on the [lingui](https://github.com/lingui/js-lingui) project. [Official documentation here](https://lingui.js.org/). We use this libary to mark our strings for translation. If you want to see this in action you'll need to take the following steps:
|
||||||
|
|
||||||
|
### Marking strings for translation and replacement in the UI
|
||||||
|
|
||||||
|
The lingui library provides various React helpers for dealing with both marking strings for translation, and replacing strings that have been traslated. For consistency and ease of use, we have consolidated on one pattern for the codebase. To set strings to be translated in the UI:
|
||||||
|
|
||||||
|
- import the withI18n function and wrap the export of your component in it (i.e. `export default withI18n()(Foo)`)
|
||||||
|
- doing the above gives you access to the i18n object on props. Make sure to put it in the scope of the function that contains strings needed to be translated (i.e. `const { i18n } = this.props;`)
|
||||||
|
- import the t template tag function from the @lingui/macro package.
|
||||||
|
- wrap your string using the following format: ```i18n._(t`String to be translated`)```
|
||||||
|
|
||||||
|
**Note:** Variables that are put inside the t-marked template tag will not be translated. If you have a variable string with text that needs translating, you must wrap it in ```i18n._(t``)``` where it is defined.
|
||||||
|
|
||||||
|
**Note:** We do not use the `I18n` consumer, `i18nMark` function, or `<Trans>` component lingui gives us access to in this repo. i18nMark does not actually replace the string in the UI (leading to the potential for untranslated bugs), and the other helpers are redundant. Settling on a consistent, single pattern helps us ease the mental overhead of the need to understand the ins and outs of the lingui API.
|
||||||
|
|
||||||
|
You can learn more about the ways lingui and its React helpers at [this link](https://lingui.js.org/tutorials/react-patterns.html).
|
||||||
|
|
||||||
|
### Setting up .po files to give to translation team
|
||||||
|
|
||||||
|
1) `npm run add-locale` to add the language that you want to translate to (we should only have to do this once and the commit to repo afaik). Example: `npm run add-locale en es fr` # Add English, Spanish and French locale
|
||||||
|
2) `npm run extract-strings` to create .po files for each language specified. The .po files will be placed in src/locales but this is configurable.
|
||||||
|
3) Open up the .po file for the language you want to test and add some translations. In production we would pass this .po file off to the translation team.
|
||||||
|
4) Once you've edited your .po file (or we've gotten a .po file back from the translation team) run `npm run compile-strings`. This command takes the .po files and turns them into a minified JSON object and can be seen in the `messages.js` file in each locale directory. These files get loaded at the App root level (see: App.jsx).
|
||||||
|
5) Change the language in your browser and reload the page. You should see your specified translations in place of English strings.
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -27,13 +27,3 @@ To run a single test (in this case the login page test):
|
|||||||
* `npm test -- __tests__/pages/Login.jsx`
|
* `npm test -- __tests__/pages/Login.jsx`
|
||||||
|
|
||||||
**note:** Once the test watcher is up and running you can hit `a` to run all the tests
|
**note:** Once the test watcher is up and running you can hit `a` to run all the tests
|
||||||
|
|
||||||
## Internationalization
|
|
||||||
|
|
||||||
Internationalization leans on the [lingui](https://github.com/lingui/js-lingui) project. [Official documentation here](https://lingui.js.org/). We use this libary to mark our strings for translation. For common React use cases see [this link](https://lingui.js.org/tutorials/react-patterns.html). If you want to see this in action you'll need to take the following steps:
|
|
||||||
|
|
||||||
1) `npm run add-locale` to add the language that you want to translate to (we should only have to do this once and the commit to repo afaik). Example: `npm run add-locale en es fr` # Add English, Spanish and French locale
|
|
||||||
2) `npm run extract-strings` to create .po files for each language specified. The .po files will be placed in src/locales but this is configurable.
|
|
||||||
3) Open up the .po file for the language you want to test and add some translations. In production we would pass this .po file off to the translation team.
|
|
||||||
4) Once you've edited your .po file (or we've gotten a .po file back from the translation team) run `npm run compile-strings`. This command takes the .po files and turns them into a minified JSON object and can be seen in the `messages.js` file in each locale directory. These files get loaded at the App root level (see: App.jsx).
|
|
||||||
5) Change the language in your browser and reload the page. You should see your specified translations in place of English strings.
|
|
||||||
|
|||||||
@@ -21,29 +21,28 @@ exports[`mountWithContexts injected ConfigProvider should mount and render with
|
|||||||
|
|
||||||
exports[`mountWithContexts injected I18nProvider should mount and render 1`] = `
|
exports[`mountWithContexts injected I18nProvider should mount and render 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
|
||||||
<span>
|
<span>
|
||||||
Text content
|
Text content
|
||||||
</span>
|
</span>
|
||||||
</I18n>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`mountWithContexts injected I18nProvider should mount and render deeply nested consumer 1`] = `
|
exports[`mountWithContexts injected I18nProvider should mount and render deeply nested consumer 1`] = `
|
||||||
<Parent>
|
<Parent>
|
||||||
<Child>
|
<WithI18n>
|
||||||
<I18n
|
<I18n
|
||||||
update={true}
|
update={true}
|
||||||
withHash={true}
|
withHash={true}
|
||||||
|
>
|
||||||
|
<Component
|
||||||
|
i18n={"/i18n/"}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
Text content
|
Text content
|
||||||
</div>
|
</div>
|
||||||
|
</Component>
|
||||||
</I18n>
|
</I18n>
|
||||||
</Child>
|
</WithI18n>
|
||||||
</Parent>
|
</Parent>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
import { mountWithContexts } from '../enzymeHelpers';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import AddResourceRole from '../../src/components/AddRole/AddResourceRole';
|
import AddResourceRole, { _AddResourceRole } from '../../src/components/AddRole/AddResourceRole';
|
||||||
|
|
||||||
describe('<AddResourceRole />', () => {
|
describe('<_AddResourceRole />', () => {
|
||||||
const readUsers = jest.fn().mockResolvedValue({
|
const readUsers = jest.fn().mockResolvedValue({
|
||||||
data: {
|
data: {
|
||||||
count: 2,
|
count: 2,
|
||||||
@@ -31,21 +31,23 @@ describe('<AddResourceRole />', () => {
|
|||||||
};
|
};
|
||||||
test('initially renders without crashing', () => {
|
test('initially renders without crashing', () => {
|
||||||
shallow(
|
shallow(
|
||||||
<AddResourceRole
|
<_AddResourceRole
|
||||||
api={api}
|
api={api}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
onSave={() => {}}
|
onSave={() => {}}
|
||||||
roles={roles}
|
roles={roles}
|
||||||
|
i18n={{ _: val => val.toString() }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
test('handleRoleCheckboxClick properly updates state', () => {
|
test('handleRoleCheckboxClick properly updates state', () => {
|
||||||
const wrapper = shallow(
|
const wrapper = shallow(
|
||||||
<AddResourceRole
|
<_AddResourceRole
|
||||||
api={api}
|
api={api}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
onSave={() => {}}
|
onSave={() => {}}
|
||||||
roles={roles}
|
roles={roles}
|
||||||
|
i18n={{ _: val => val.toString() }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
wrapper.setState({
|
wrapper.setState({
|
||||||
@@ -76,11 +78,12 @@ describe('<AddResourceRole />', () => {
|
|||||||
});
|
});
|
||||||
test('handleResourceCheckboxClick properly updates state', () => {
|
test('handleResourceCheckboxClick properly updates state', () => {
|
||||||
const wrapper = shallow(
|
const wrapper = shallow(
|
||||||
<AddResourceRole
|
<_AddResourceRole
|
||||||
api={api}
|
api={api}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
onSave={() => {}}
|
onSave={() => {}}
|
||||||
roles={roles}
|
roles={roles}
|
||||||
|
i18n={{ _: val => val.toString() }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
wrapper.setState({
|
wrapper.setState({
|
||||||
@@ -106,14 +109,13 @@ describe('<AddResourceRole />', () => {
|
|||||||
}]);
|
}]);
|
||||||
});
|
});
|
||||||
test('clicking user/team cards updates state', () => {
|
test('clicking user/team cards updates state', () => {
|
||||||
const spy = jest.spyOn(AddResourceRole.prototype, 'handleResourceSelect');
|
const spy = jest.spyOn(_AddResourceRole.prototype, 'handleResourceSelect');
|
||||||
const wrapper = mountWithContexts(
|
const wrapper = mountWithContexts(
|
||||||
<AddResourceRole
|
<AddResourceRole
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
onSave={() => {}}
|
onSave={() => {}}
|
||||||
api={api}
|
|
||||||
roles={roles}
|
roles={roles}
|
||||||
/>
|
/>, { context: { network: { api, handleHttpError: () => {} } } }
|
||||||
).find('AddResourceRole');
|
).find('AddResourceRole');
|
||||||
const selectableCardWrapper = wrapper.find('SelectableCard');
|
const selectableCardWrapper = wrapper.find('SelectableCard');
|
||||||
expect(selectableCardWrapper.length).toBe(2);
|
expect(selectableCardWrapper.length).toBe(2);
|
||||||
@@ -126,11 +128,12 @@ describe('<AddResourceRole />', () => {
|
|||||||
});
|
});
|
||||||
test('readUsers and readTeams call out to corresponding api functions', () => {
|
test('readUsers and readTeams call out to corresponding api functions', () => {
|
||||||
const wrapper = shallow(
|
const wrapper = shallow(
|
||||||
<AddResourceRole
|
<_AddResourceRole
|
||||||
api={api}
|
api={api}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
onSave={() => {}}
|
onSave={() => {}}
|
||||||
roles={roles}
|
roles={roles}
|
||||||
|
i18n={{ _: val => val.toString() }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
wrapper.instance().readUsers({
|
wrapper.instance().readUsers({
|
||||||
@@ -150,11 +153,12 @@ describe('<AddResourceRole />', () => {
|
|||||||
|
|
||||||
test('handleResourceSelect clears out selected lists and sets selectedResource', () => {
|
test('handleResourceSelect clears out selected lists and sets selectedResource', () => {
|
||||||
const wrapper = shallow(
|
const wrapper = shallow(
|
||||||
<AddResourceRole
|
<_AddResourceRole
|
||||||
api={api}
|
api={api}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
onSave={() => {}}
|
onSave={() => {}}
|
||||||
roles={roles}
|
roles={roles}
|
||||||
|
i18n={{ _: val => val.toString() }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
wrapper.setState({
|
wrapper.setState({
|
||||||
@@ -193,11 +197,10 @@ describe('<AddResourceRole />', () => {
|
|||||||
const handleSave = jest.fn();
|
const handleSave = jest.fn();
|
||||||
const wrapper = mountWithContexts(
|
const wrapper = mountWithContexts(
|
||||||
<AddResourceRole
|
<AddResourceRole
|
||||||
api={api}
|
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
onSave={handleSave}
|
onSave={handleSave}
|
||||||
roles={roles}
|
roles={roles}
|
||||||
/>
|
/>, { context: { network: { api, handleHttpError: () => {} } } }
|
||||||
).find('AddResourceRole');
|
).find('AddResourceRole');
|
||||||
wrapper.setState({
|
wrapper.setState({
|
||||||
selectedResource: 'users',
|
selectedResource: 'users',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mountWithContexts } from '../enzymeHelpers';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import AnsibleSelect from '../../src/components/AnsibleSelect';
|
import AnsibleSelect from '../../src/components/AnsibleSelect';
|
||||||
|
import { _AnsibleSelect } from '../../src/components/AnsibleSelect/AnsibleSelect';
|
||||||
|
|
||||||
const label = 'test select';
|
const label = 'test select';
|
||||||
const mockData = ['/venv/baz/', '/venv/ansible/'];
|
const mockData = ['/venv/baz/', '/venv/ansible/'];
|
||||||
@@ -18,7 +19,7 @@ describe('<AnsibleSelect />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('calls "onSelectChange" on dropdown select change', () => {
|
test('calls "onSelectChange" on dropdown select change', () => {
|
||||||
const spy = jest.spyOn(AnsibleSelect.prototype, 'onSelectChange');
|
const spy = jest.spyOn(_AnsibleSelect.prototype, 'onSelectChange');
|
||||||
const wrapper = mountWithContexts(
|
const wrapper = mountWithContexts(
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
value="foo"
|
value="foo"
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ describe('<Lookup />', () => {
|
|||||||
getItems={getItems}
|
getItems={getItems}
|
||||||
handleHttpError={() => {}}
|
handleHttpError={() => {}}
|
||||||
location={{ history }}
|
location={{ history }}
|
||||||
|
i18n={{ _: val => val.toString() }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ describe('<NotifyAndRedirect />', () => {
|
|||||||
to="foo"
|
to="foo"
|
||||||
setRootDialogMessage={setRootDialogMessage}
|
setRootDialogMessage={setRootDialogMessage}
|
||||||
location={{ pathname: 'foo' }}
|
location={{ pathname: 'foo' }}
|
||||||
|
i18n={{ _: val => val.toString() }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
expect(setRootDialogMessage).toHaveBeenCalled();
|
expect(setRootDialogMessage).toHaveBeenCalled();
|
||||||
|
|||||||
@@ -2,13 +2,10 @@
|
|||||||
|
|
||||||
exports[`<ToolbarDeleteButton /> should render button 1`] = `
|
exports[`<ToolbarDeleteButton /> should render button 1`] = `
|
||||||
<ToolbarDeleteButton
|
<ToolbarDeleteButton
|
||||||
|
i18n={"/i18n/"}
|
||||||
itemName="item"
|
itemName="item"
|
||||||
itemsToDelete={Array []}
|
itemsToDelete={Array []}
|
||||||
onDelete={[Function]}
|
onDelete={[Function]}
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
appendTo={[Function]}
|
appendTo={[Function]}
|
||||||
@@ -71,12 +68,14 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
|
|||||||
>
|
>
|
||||||
<ToolbarDeleteButton__Button
|
<ToolbarDeleteButton__Button
|
||||||
aria-label="Delete"
|
aria-label="Delete"
|
||||||
|
className="awx-ToolBarBtn"
|
||||||
isDisabled={true}
|
isDisabled={true}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
variant="plain"
|
variant="plain"
|
||||||
>
|
>
|
||||||
<StyledComponent
|
<StyledComponent
|
||||||
aria-label="Delete"
|
aria-label="Delete"
|
||||||
|
className="awx-ToolBarBtn"
|
||||||
forwardedComponent={
|
forwardedComponent={
|
||||||
Object {
|
Object {
|
||||||
"$$typeof": Symbol(react.forward_ref),
|
"$$typeof": Symbol(react.forward_ref),
|
||||||
@@ -106,7 +105,7 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
aria-label="Delete"
|
aria-label="Delete"
|
||||||
className="ToolbarDeleteButton__Button-sc-1e3r0eg-0 iyjqWq"
|
className="awx-ToolBarBtn ToolbarDeleteButton__Button-sc-1e3r0eg-0 iyjqWq"
|
||||||
component="button"
|
component="button"
|
||||||
isActive={false}
|
isActive={false}
|
||||||
isBlock={false}
|
isBlock={false}
|
||||||
@@ -120,13 +119,14 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
|
|||||||
<button
|
<button
|
||||||
aria-disabled={null}
|
aria-disabled={null}
|
||||||
aria-label="Delete"
|
aria-label="Delete"
|
||||||
className="pf-c-button pf-m-plain pf-m-disabled ToolbarDeleteButton__Button-sc-1e3r0eg-0 iyjqWq"
|
className="pf-c-button pf-m-plain pf-m-disabled awx-ToolBarBtn ToolbarDeleteButton__Button-sc-1e3r0eg-0 iyjqWq"
|
||||||
disabled={true}
|
disabled={true}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
tabIndex={null}
|
tabIndex={null}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<TrashAltIcon
|
<TrashAltIcon
|
||||||
|
className="awx-ToolBarTrashCanIcon"
|
||||||
color="currentColor"
|
color="currentColor"
|
||||||
size="sm"
|
size="sm"
|
||||||
title={null}
|
title={null}
|
||||||
@@ -134,6 +134,7 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
|
|||||||
<svg
|
<svg
|
||||||
aria-hidden={true}
|
aria-hidden={true}
|
||||||
aria-labelledby={null}
|
aria-labelledby={null}
|
||||||
|
className="awx-ToolBarTrashCanIcon"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
height="1em"
|
height="1em"
|
||||||
role="img"
|
role="img"
|
||||||
@@ -198,6 +199,5 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
|
|||||||
</Portal>
|
</Portal>
|
||||||
</Tippy>
|
</Tippy>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</I18n>
|
|
||||||
</ToolbarDeleteButton>
|
</ToolbarDeleteButton>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { createMemoryHistory } from 'history';
|
|||||||
import { shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
import { mountWithContexts } from '../enzymeHelpers';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import { sleep } from '../testUtils';
|
import { sleep } from '../testUtils';
|
||||||
import SelectResourceStep, { _SelectResourceStep } from '../../src/components/AddRole/SelectResourceStep';
|
import SelectResourceStep from '../../src/components/AddRole/SelectResourceStep';
|
||||||
|
|
||||||
describe('<SelectResourceStep />', () => {
|
describe('<SelectResourceStep />', () => {
|
||||||
const columns = [
|
const columns = [
|
||||||
@@ -67,15 +67,14 @@ describe('<SelectResourceStep />', () => {
|
|||||||
initialEntries: ['/organizations/1/access?resource.page=1&resource.order_by=-username'],
|
initialEntries: ['/organizations/1/access?resource.page=1&resource.order_by=-username'],
|
||||||
});
|
});
|
||||||
const wrapper = await mountWithContexts(
|
const wrapper = await mountWithContexts(
|
||||||
<_SelectResourceStep
|
<SelectResourceStep
|
||||||
columns={columns}
|
columns={columns}
|
||||||
displayKey="username"
|
displayKey="username"
|
||||||
onRowClick={() => {}}
|
onRowClick={() => {}}
|
||||||
onSearch={handleSearch}
|
onSearch={handleSearch}
|
||||||
selectedResourceRows={selectedResourceRows}
|
selectedResourceRows={selectedResourceRows}
|
||||||
sortedColumnKey="username"
|
sortedColumnKey="username"
|
||||||
location={history.location}
|
/>, { context: { router: { history, route: { location: history.location } } } }
|
||||||
/>
|
|
||||||
).find('SelectResourceStep');
|
).find('SelectResourceStep');
|
||||||
await wrapper.instance().readResourceList();
|
await wrapper.instance().readResourceList();
|
||||||
expect(handleSearch).toHaveBeenCalledWith({
|
expect(handleSearch).toHaveBeenCalledWith({
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount, shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import SelectRoleStep from '../../src/components/AddRole/SelectRoleStep';
|
import SelectRoleStep from '../../src/components/AddRole/SelectRoleStep';
|
||||||
|
|
||||||
describe('<SelectRoleStep />', () => {
|
describe('<SelectRoleStep />', () => {
|
||||||
@@ -42,7 +43,7 @@ describe('<SelectRoleStep />', () => {
|
|||||||
});
|
});
|
||||||
test('clicking role fires onRolesClick callback', () => {
|
test('clicking role fires onRolesClick callback', () => {
|
||||||
const onRolesClick = jest.fn();
|
const onRolesClick = jest.fn();
|
||||||
wrapper = mount(
|
wrapper = mountWithContexts(
|
||||||
<SelectRoleStep
|
<SelectRoleStep
|
||||||
onRolesClick={onRolesClick}
|
onRolesClick={onRolesClick}
|
||||||
roles={roles}
|
roles={roles}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
canToggleNotifications={true}
|
canToggleNotifications={true}
|
||||||
detailUrl="/foo"
|
detailUrl="/foo"
|
||||||
errorTurnedOn={false}
|
errorTurnedOn={false}
|
||||||
|
i18n={"/i18n/"}
|
||||||
notification={
|
notification={
|
||||||
Object {
|
Object {
|
||||||
"id": 9000,
|
"id": 9000,
|
||||||
@@ -14,10 +15,6 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
}
|
}
|
||||||
successTurnedOn={false}
|
successTurnedOn={false}
|
||||||
toggleNotification={[MockFunction]}
|
toggleNotification={[MockFunction]}
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
>
|
||||||
<DataListItem
|
<DataListItem
|
||||||
aria-labelledby="items-list-item-9000"
|
aria-labelledby="items-list-item-9000"
|
||||||
@@ -451,10 +448,94 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
</NotificationListItem__DataListCell>
|
</NotificationListItem__DataListCell>
|
||||||
</div>
|
</div>
|
||||||
</DataListItemCells>
|
</DataListItemCells>
|
||||||
|
<NotificationListItem__Switch
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
id="notification-9000-error-toggle"
|
||||||
|
isChecked={false}
|
||||||
|
isDisabled={false}
|
||||||
|
key=".1"
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-9000"
|
||||||
|
>
|
||||||
|
<StyledComponent
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
forwardedComponent={
|
||||||
|
Object {
|
||||||
|
"$$typeof": Symbol(react.forward_ref),
|
||||||
|
"attrs": Array [],
|
||||||
|
"componentStyle": ComponentStyle {
|
||||||
|
"componentId": "NotificationListItem__Switch-j7c411-1",
|
||||||
|
"isStatic": true,
|
||||||
|
"lastClassName": "ceuHGn",
|
||||||
|
"rules": Array [
|
||||||
|
"display:flex;flex-wrap:no-wrap;",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"displayName": "NotificationListItem__Switch",
|
||||||
|
"foldedComponentIds": Array [],
|
||||||
|
"render": [Function],
|
||||||
|
"styledComponentId": "NotificationListItem__Switch-j7c411-1",
|
||||||
|
"target": [Function],
|
||||||
|
"toString": [Function],
|
||||||
|
"warnTooManyClasses": [Function],
|
||||||
|
"withComponent": [Function],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
forwardedRef={null}
|
||||||
|
id="notification-9000-error-toggle"
|
||||||
|
isChecked={false}
|
||||||
|
isDisabled={false}
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-9000"
|
||||||
|
>
|
||||||
|
<Switch
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
|
||||||
|
id="notification-9000-error-toggle"
|
||||||
|
isChecked={false}
|
||||||
|
isDisabled={false}
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-9000"
|
||||||
|
>
|
||||||
|
<label
|
||||||
|
className="pf-c-switch NotificationListItem__Switch-j7c411-1 ceuHGn"
|
||||||
|
htmlFor="notification-9000-error-toggle"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
checked={false}
|
||||||
|
className="pf-c-switch__input"
|
||||||
|
disabled={false}
|
||||||
|
id="notification-9000-error-toggle"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-9000"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
className="pf-c-switch__toggle"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
|
className="pf-c-switch__label pf-m-on"
|
||||||
|
>
|
||||||
|
Failure
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
|
className="pf-c-switch__label pf-m-off"
|
||||||
|
>
|
||||||
|
Failure
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</Switch>
|
||||||
|
</StyledComponent>
|
||||||
|
</NotificationListItem__Switch>
|
||||||
</div>
|
</div>
|
||||||
</DataListItemRow>
|
</DataListItemRow>
|
||||||
</li>
|
</li>
|
||||||
</DataListItem>
|
</DataListItem>
|
||||||
</I18n>
|
|
||||||
</NotificationListItem>
|
</NotificationListItem>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
// import { mount } from 'enzyme';
|
import { withI18n } from '@lingui/react';
|
||||||
import { I18n } from '@lingui/react';
|
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { mountWithContexts } from './enzymeHelpers';
|
import { mountWithContexts } from './enzymeHelpers';
|
||||||
import { Config } from '../src/contexts/Config';
|
import { Config } from '../src/contexts/Config';
|
||||||
@@ -11,26 +10,19 @@ import { withRootDialog } from '../src/contexts/RootDialog';
|
|||||||
describe('mountWithContexts', () => {
|
describe('mountWithContexts', () => {
|
||||||
describe('injected I18nProvider', () => {
|
describe('injected I18nProvider', () => {
|
||||||
test('should mount and render', () => {
|
test('should mount and render', () => {
|
||||||
const wrapper = mountWithContexts(
|
const Child = withI18n()(({ i18n }) => (
|
||||||
<div>
|
<div>
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<span>{i18n._(t`Text content`)}</span>
|
<span>{i18n._(t`Text content`)}</span>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
));
|
||||||
|
const wrapper = mountWithContexts(<Child />);
|
||||||
expect(wrapper.find('div')).toMatchSnapshot();
|
expect(wrapper.find('div')).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should mount and render deeply nested consumer', () => {
|
test('should mount and render deeply nested consumer', () => {
|
||||||
const Child = () => (
|
const Child = withI18n()(({ i18n }) => (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<div>{i18n._(t`Text content`)}</div>
|
<div>{i18n._(t`Text content`)}</div>
|
||||||
)}
|
));
|
||||||
</I18n>
|
|
||||||
);
|
|
||||||
const Parent = () => (<Child />);
|
const Parent = () => (<Child />);
|
||||||
const wrapper = mountWithContexts(<Parent />);
|
const wrapper = mountWithContexts(<Parent />);
|
||||||
expect(wrapper.find('Parent')).toMatchSnapshot();
|
expect(wrapper.find('Parent')).toMatchSnapshot();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Applications from '../../src/pages/Applications';
|
import Applications from '../../src/pages/Applications';
|
||||||
|
|
||||||
describe('<Applications />', () => {
|
describe('<Applications />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Applications />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Applications />);
|
pageWrapper = mountWithContexts(<Applications />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import AuthSettings from '../../src/pages/AuthSettings';
|
import AuthSettings from '../../src/pages/AuthSettings';
|
||||||
|
|
||||||
describe('<AuthSettings />', () => {
|
describe('<AuthSettings />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<AuthSettings />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<AuthSettings />);
|
pageWrapper = mountWithContexts(<AuthSettings />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import CredentialTypes from '../../src/pages/CredentialTypes';
|
import CredentialTypes from '../../src/pages/CredentialTypes';
|
||||||
|
|
||||||
describe('<CredentialTypes />', () => {
|
describe('<CredentialTypes />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<CredentialTypes />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<CredentialTypes />);
|
pageWrapper = mountWithContexts(<CredentialTypes />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Credentials from '../../src/pages/Credentials';
|
import Credentials from '../../src/pages/Credentials';
|
||||||
|
|
||||||
describe('<Credentials />', () => {
|
describe('<Credentials />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Credentials />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Credentials />);
|
pageWrapper = mountWithContexts(<Credentials />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Dashboard from '../../src/pages/Dashboard';
|
import Dashboard from '../../src/pages/Dashboard';
|
||||||
|
|
||||||
describe('<Dashboard />', () => {
|
describe('<Dashboard />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Dashboard />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Dashboard />);
|
pageWrapper = mountWithContexts(<Dashboard />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import InstanceGroups from '../../src/pages/InstanceGroups';
|
import InstanceGroups from '../../src/pages/InstanceGroups';
|
||||||
|
|
||||||
describe('<InstanceGroups />', () => {
|
describe('<InstanceGroups />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<InstanceGroups />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<InstanceGroups />);
|
pageWrapper = mountWithContexts(<InstanceGroups />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Inventories from '../../src/pages/Inventories';
|
import Inventories from '../../src/pages/Inventories';
|
||||||
|
|
||||||
describe('<Inventories />', () => {
|
describe('<Inventories />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Inventories />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Inventories />);
|
pageWrapper = mountWithContexts(<Inventories />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import InventoryScripts from '../../src/pages/InventoryScripts';
|
import InventoryScripts from '../../src/pages/InventoryScripts';
|
||||||
|
|
||||||
describe('<InventoryScripts />', () => {
|
describe('<InventoryScripts />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<InventoryScripts />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<InventoryScripts />);
|
pageWrapper = mountWithContexts(<InventoryScripts />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Jobs from '../../src/pages/Jobs';
|
import Jobs from '../../src/pages/Jobs';
|
||||||
|
|
||||||
describe('<Jobs />', () => {
|
describe('<Jobs />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Jobs />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Jobs />);
|
pageWrapper = mountWithContexts(<Jobs />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import JobsSettings from '../../src/pages/JobsSettings';
|
import JobsSettings from '../../src/pages/JobsSettings';
|
||||||
|
|
||||||
describe('<JobsSettings />', () => {
|
describe('<JobsSettings />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<JobsSettings />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<JobsSettings />);
|
pageWrapper = mountWithContexts(<JobsSettings />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import License from '../../src/pages/License';
|
import License from '../../src/pages/License';
|
||||||
|
|
||||||
describe('<License />', () => {
|
describe('<License />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<License />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<License />);
|
pageWrapper = mountWithContexts(<License />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { MemoryRouter } from 'react-router-dom';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import { mount } from 'enzyme';
|
|
||||||
import { I18nProvider } from '@lingui/react';
|
|
||||||
import { asyncFlush } from '../../jest.setup';
|
import { asyncFlush } from '../../jest.setup';
|
||||||
import { _AWXLogin } from '../../src/pages/Login';
|
import AWXLogin from '../../src/pages/Login';
|
||||||
import APIClient from '../../src/api';
|
import APIClient from '../../src/api';
|
||||||
|
|
||||||
describe('<Login />', () => {
|
describe('<Login />', () => {
|
||||||
@@ -18,6 +16,12 @@ describe('<Login />', () => {
|
|||||||
|
|
||||||
const api = new APIClient({});
|
const api = new APIClient({});
|
||||||
|
|
||||||
|
const mountLogin = () => {
|
||||||
|
loginWrapper = mountWithContexts(<AWXLogin />, { context: { network: {
|
||||||
|
api, handleHttpError: () => {}
|
||||||
|
} } });
|
||||||
|
};
|
||||||
|
|
||||||
const findChildren = () => {
|
const findChildren = () => {
|
||||||
awxLogin = loginWrapper.find('AWXLogin');
|
awxLogin = loginWrapper.find('AWXLogin');
|
||||||
loginPage = loginWrapper.find('LoginPage');
|
loginPage = loginWrapper.find('LoginPage');
|
||||||
@@ -28,22 +32,13 @@ describe('<Login />', () => {
|
|||||||
loginHeaderLogo = loginPage.find('img');
|
loginHeaderLogo = loginPage.find('img');
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
loginWrapper = mount(
|
|
||||||
<MemoryRouter>
|
|
||||||
<I18nProvider>
|
|
||||||
<_AWXLogin api={api} clearRootDialogMessage={() => {}} handleHttpError={() => {}} />
|
|
||||||
</I18nProvider>
|
|
||||||
</MemoryRouter>
|
|
||||||
);
|
|
||||||
findChildren();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
loginWrapper.unmount();
|
loginWrapper.unmount();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('initially renders without crashing', () => {
|
test('initially renders without crashing', () => {
|
||||||
|
mountLogin();
|
||||||
|
findChildren();
|
||||||
expect(loginWrapper.length).toBe(1);
|
expect(loginWrapper.length).toBe(1);
|
||||||
expect(loginPage.length).toBe(1);
|
expect(loginPage.length).toBe(1);
|
||||||
expect(loginForm.length).toBe(1);
|
expect(loginForm.length).toBe(1);
|
||||||
@@ -58,13 +53,7 @@ describe('<Login />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('custom logo renders Brand component with correct src and alt', () => {
|
test('custom logo renders Brand component with correct src and alt', () => {
|
||||||
loginWrapper = mount(
|
loginWrapper = mountWithContexts(<AWXLogin logo="images/foo.jpg" alt="Foo Application" />);
|
||||||
<MemoryRouter>
|
|
||||||
<I18nProvider>
|
|
||||||
<_AWXLogin api={api} logo="images/foo.jpg" alt="Foo Application" />
|
|
||||||
</I18nProvider>
|
|
||||||
</MemoryRouter>
|
|
||||||
);
|
|
||||||
findChildren();
|
findChildren();
|
||||||
expect(loginHeaderLogo.length).toBe(1);
|
expect(loginHeaderLogo.length).toBe(1);
|
||||||
expect(loginHeaderLogo.props().src).toBe('data:image/jpeg;images/foo.jpg');
|
expect(loginHeaderLogo.props().src).toBe('data:image/jpeg;images/foo.jpg');
|
||||||
@@ -72,13 +61,7 @@ describe('<Login />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('default logo renders Brand component with correct src and alt', () => {
|
test('default logo renders Brand component with correct src and alt', () => {
|
||||||
loginWrapper = mount(
|
mountLogin();
|
||||||
<MemoryRouter>
|
|
||||||
<I18nProvider>
|
|
||||||
<_AWXLogin api={api} />
|
|
||||||
</I18nProvider>
|
|
||||||
</MemoryRouter>
|
|
||||||
);
|
|
||||||
findChildren();
|
findChildren();
|
||||||
expect(loginHeaderLogo.length).toBe(1);
|
expect(loginHeaderLogo.length).toBe(1);
|
||||||
expect(loginHeaderLogo.props().src).toBe('tower-logo-header.svg');
|
expect(loginHeaderLogo.props().src).toBe('tower-logo-header.svg');
|
||||||
@@ -86,6 +69,8 @@ describe('<Login />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('state maps to un/pw input value props', () => {
|
test('state maps to un/pw input value props', () => {
|
||||||
|
mountLogin();
|
||||||
|
findChildren();
|
||||||
awxLogin.setState({ username: 'un', password: 'pw' });
|
awxLogin.setState({ username: 'un', password: 'pw' });
|
||||||
expect(awxLogin.state().username).toBe('un');
|
expect(awxLogin.state().username).toBe('un');
|
||||||
expect(awxLogin.state().password).toBe('pw');
|
expect(awxLogin.state().password).toBe('pw');
|
||||||
@@ -95,6 +80,8 @@ describe('<Login />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('updating un/pw clears out error', () => {
|
test('updating un/pw clears out error', () => {
|
||||||
|
mountLogin();
|
||||||
|
findChildren();
|
||||||
awxLogin.setState({ isInputValid: false });
|
awxLogin.setState({ isInputValid: false });
|
||||||
expect(loginWrapper.find('.pf-c-form__helper-text.pf-m-error').length).toBe(1);
|
expect(loginWrapper.find('.pf-c-form__helper-text.pf-m-error').length).toBe(1);
|
||||||
usernameInput.instance().value = 'uname';
|
usernameInput.instance().value = 'uname';
|
||||||
@@ -113,6 +100,8 @@ describe('<Login />', () => {
|
|||||||
|
|
||||||
test('api.login not called when loading', () => {
|
test('api.login not called when loading', () => {
|
||||||
api.login = jest.fn().mockImplementation(() => Promise.resolve({}));
|
api.login = jest.fn().mockImplementation(() => Promise.resolve({}));
|
||||||
|
mountLogin();
|
||||||
|
findChildren();
|
||||||
expect(awxLogin.state().isLoading).toBe(false);
|
expect(awxLogin.state().isLoading).toBe(false);
|
||||||
awxLogin.setState({ isLoading: true });
|
awxLogin.setState({ isLoading: true });
|
||||||
submitButton.simulate('click');
|
submitButton.simulate('click');
|
||||||
@@ -121,6 +110,8 @@ describe('<Login />', () => {
|
|||||||
|
|
||||||
test('submit calls api.login successfully', async () => {
|
test('submit calls api.login successfully', async () => {
|
||||||
api.login = jest.fn().mockImplementation(() => Promise.resolve({}));
|
api.login = jest.fn().mockImplementation(() => Promise.resolve({}));
|
||||||
|
mountLogin();
|
||||||
|
findChildren();
|
||||||
expect(awxLogin.state().isLoading).toBe(false);
|
expect(awxLogin.state().isLoading).toBe(false);
|
||||||
awxLogin.setState({ username: 'unamee', password: 'pwordd' });
|
awxLogin.setState({ username: 'unamee', password: 'pwordd' });
|
||||||
submitButton.simulate('click');
|
submitButton.simulate('click');
|
||||||
@@ -137,6 +128,8 @@ describe('<Login />', () => {
|
|||||||
err.response = { status: 401, message: 'problem' };
|
err.response = { status: 401, message: 'problem' };
|
||||||
return Promise.reject(err);
|
return Promise.reject(err);
|
||||||
});
|
});
|
||||||
|
mountLogin();
|
||||||
|
findChildren();
|
||||||
expect(awxLogin.state().isLoading).toBe(false);
|
expect(awxLogin.state().isLoading).toBe(false);
|
||||||
expect(awxLogin.state().isInputValid).toBe(true);
|
expect(awxLogin.state().isInputValid).toBe(true);
|
||||||
awxLogin.setState({ username: 'unamee', password: 'pwordd' });
|
awxLogin.setState({ username: 'unamee', password: 'pwordd' });
|
||||||
@@ -155,6 +148,8 @@ describe('<Login />', () => {
|
|||||||
err.response = { status: 500, message: 'problem' };
|
err.response = { status: 500, message: 'problem' };
|
||||||
return Promise.reject(err);
|
return Promise.reject(err);
|
||||||
});
|
});
|
||||||
|
mountLogin();
|
||||||
|
findChildren();
|
||||||
expect(awxLogin.state().isLoading).toBe(false);
|
expect(awxLogin.state().isLoading).toBe(false);
|
||||||
awxLogin.setState({ username: 'unamee', password: 'pwordd' });
|
awxLogin.setState({ username: 'unamee', password: 'pwordd' });
|
||||||
submitButton.simulate('click');
|
submitButton.simulate('click');
|
||||||
@@ -166,6 +161,8 @@ describe('<Login />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('render Redirect to / when already authenticated', () => {
|
test('render Redirect to / when already authenticated', () => {
|
||||||
|
mountLogin();
|
||||||
|
findChildren();
|
||||||
awxLogin.setState({ isAuthenticated: true });
|
awxLogin.setState({ isAuthenticated: true });
|
||||||
const redirectElem = loginWrapper.find('Redirect');
|
const redirectElem = loginWrapper.find('Redirect');
|
||||||
expect(redirectElem.length).toBe(1);
|
expect(redirectElem.length).toBe(1);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import ManagementJobs from '../../src/pages/ManagementJobs';
|
import ManagementJobs from '../../src/pages/ManagementJobs';
|
||||||
|
|
||||||
describe('<ManagementJobs />', () => {
|
describe('<ManagementJobs />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<ManagementJobs />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<ManagementJobs />);
|
pageWrapper = mountWithContexts(<ManagementJobs />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import NotificationTemplates from '../../src/pages/NotificationTemplates';
|
import NotificationTemplates from '../../src/pages/NotificationTemplates';
|
||||||
|
|
||||||
describe('<NotificationTemplates />', () => {
|
describe('<NotificationTemplates />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<NotificationTemplates />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<NotificationTemplates />);
|
pageWrapper = mountWithContexts(<NotificationTemplates />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
||||||
<DeleteRoleConfirmationModal
|
<DeleteRoleConfirmationModal
|
||||||
|
i18n={"/i18n/"}
|
||||||
onCancel={[Function]}
|
onCancel={[Function]}
|
||||||
onConfirm={[Function]}
|
onConfirm={[Function]}
|
||||||
role={
|
role={
|
||||||
@@ -15,10 +16,6 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
username="jane"
|
username="jane"
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
>
|
||||||
<_default
|
<_default
|
||||||
actions={
|
actions={
|
||||||
@@ -57,7 +54,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
}
|
}
|
||||||
isOpen={true}
|
isOpen={true}
|
||||||
onClose={[Function]}
|
onClose={[Function]}
|
||||||
title="Remove Team Access"
|
title="Remove {0} Access"
|
||||||
variant="danger"
|
variant="danger"
|
||||||
>
|
>
|
||||||
<Modal
|
<Modal
|
||||||
@@ -102,7 +99,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
isOpen={true}
|
isOpen={true}
|
||||||
isSmall={false}
|
isSmall={false}
|
||||||
onClose={[Function]}
|
onClose={[Function]}
|
||||||
title="Remove Team Access"
|
title="Remove {0} Access"
|
||||||
width={null}
|
width={null}
|
||||||
>
|
>
|
||||||
<Portal
|
<Portal
|
||||||
@@ -119,7 +116,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
aria-describedby="pf-modal-0"
|
aria-describedby="pf-modal-0"
|
||||||
aria-label="Remove Team Access"
|
aria-label="Remove {0} Access"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
class="pf-c-modal-box awx-c-modal at-c-alertModal at-c-alertModal--danger"
|
class="pf-c-modal-box awx-c-modal at-c-alertModal at-c-alertModal--danger"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
@@ -148,13 +145,17 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
class="pf-c-title pf-m-2xl"
|
class="pf-c-title pf-m-2xl"
|
||||||
>
|
>
|
||||||
|
|
||||||
Remove Team Access
|
Remove {0} Access
|
||||||
|
|
||||||
</h3>
|
</h3>
|
||||||
<div
|
<div
|
||||||
class="pf-c-modal-box__body"
|
class="pf-c-modal-box__body"
|
||||||
id="pf-modal-0"
|
id="pf-modal-0"
|
||||||
>
|
>
|
||||||
|
Are you sure you want to remove {0} access from {1}? Doing so affects all members of the team.
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
If you {0} want to remove access for this particular user, please remove them from the team.
|
||||||
<svg
|
<svg
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
class="at-c-alertModal__icon"
|
class="at-c-alertModal__icon"
|
||||||
@@ -240,7 +241,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
isOpen={true}
|
isOpen={true}
|
||||||
isSmall={false}
|
isSmall={false}
|
||||||
onClose={[Function]}
|
onClose={[Function]}
|
||||||
title="Remove Team Access"
|
title="Remove {0} Access"
|
||||||
width={null}
|
width={null}
|
||||||
>
|
>
|
||||||
<Backdrop
|
<Backdrop
|
||||||
@@ -281,11 +282,11 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
"width": null,
|
"width": null,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
title="Remove Team Access"
|
title="Remove {0} Access"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
aria-describedby="pf-modal-0"
|
aria-describedby="pf-modal-0"
|
||||||
aria-label="Remove Team Access"
|
aria-label="Remove {0} Access"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
className="pf-c-modal-box awx-c-modal at-c-alertModal at-c-alertModal--danger"
|
className="pf-c-modal-box awx-c-modal at-c-alertModal at-c-alertModal--danger"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
@@ -362,7 +363,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
className="pf-c-title pf-m-2xl"
|
className="pf-c-title pf-m-2xl"
|
||||||
>
|
>
|
||||||
|
|
||||||
Remove Team Access
|
Remove {0} Access
|
||||||
|
|
||||||
</h3>
|
</h3>
|
||||||
</Title>
|
</Title>
|
||||||
@@ -375,55 +376,10 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
className="pf-c-modal-box__body"
|
className="pf-c-modal-box__body"
|
||||||
id="pf-modal-0"
|
id="pf-modal-0"
|
||||||
>
|
>
|
||||||
<WithI18n
|
Are you sure you want to remove {0} access from {1}? Doing so affects all members of the team.
|
||||||
components={
|
<br />
|
||||||
Array [
|
<br />
|
||||||
<b />,
|
If you {0} want to remove access for this particular user, please remove them from the team.
|
||||||
<b />,
|
|
||||||
<br />,
|
|
||||||
<br />,
|
|
||||||
<b />,
|
|
||||||
<i />,
|
|
||||||
]
|
|
||||||
}
|
|
||||||
id="Are you sure you want to remove<0> {0} </0>access from<1> {1}</1>? Doing so affects all members of the team.<2/><3/>If you<4><5> only </5></4>want to remove access for this particular user, please remove them from the team."
|
|
||||||
values={
|
|
||||||
Object {
|
|
||||||
"0": "Member",
|
|
||||||
"1": "The Team",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
|
||||||
<Trans
|
|
||||||
components={
|
|
||||||
Array [
|
|
||||||
<b />,
|
|
||||||
<b />,
|
|
||||||
<br />,
|
|
||||||
<br />,
|
|
||||||
<b />,
|
|
||||||
<i />,
|
|
||||||
]
|
|
||||||
}
|
|
||||||
i18n={"/i18n/"}
|
|
||||||
id="Are you sure you want to remove<0> {0} </0>access from<1> {1}</1>? Doing so affects all members of the team.<2/><3/>If you<4><5> only </5></4>want to remove access for this particular user, please remove them from the team."
|
|
||||||
values={
|
|
||||||
Object {
|
|
||||||
"0": "Member",
|
|
||||||
"1": "The Team",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Render
|
|
||||||
value={null}
|
|
||||||
/>
|
|
||||||
</Trans>
|
|
||||||
</I18n>
|
|
||||||
</WithI18n>
|
|
||||||
<ExclamationCircleIcon
|
<ExclamationCircleIcon
|
||||||
className="at-c-alertModal__icon"
|
className="at-c-alertModal__icon"
|
||||||
color="currentColor"
|
color="currentColor"
|
||||||
@@ -527,6 +483,5 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
</Portal>
|
</Portal>
|
||||||
</Modal>
|
</Modal>
|
||||||
</_default>
|
</_default>
|
||||||
</I18n>
|
|
||||||
</DeleteRoleConfirmationModal>
|
</DeleteRoleConfirmationModal>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -29,11 +29,8 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
|
|||||||
"username": "jane",
|
"username": "jane",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
i18n={"/i18n/"}
|
||||||
onRoleDelete={[Function]}
|
onRoleDelete={[Function]}
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
>
|
||||||
<DataListItem
|
<DataListItem
|
||||||
aria-labelledby="access-list-item"
|
aria-labelledby="access-list-item"
|
||||||
@@ -434,6 +431,5 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
|
|||||||
</DataListItemRow>
|
</DataListItemRow>
|
||||||
</li>
|
</li>
|
||||||
</DataListItem>
|
</DataListItem>
|
||||||
</I18n>
|
|
||||||
</OrganizationAccessItem>
|
</OrganizationAccessItem>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ exports[`<OrganizationAccess /> initially renders succesfully 1`] = `
|
|||||||
api={"/api/"}
|
api={"/api/"}
|
||||||
handleHttpError={[Function]}
|
handleHttpError={[Function]}
|
||||||
history={"/history/"}
|
history={"/history/"}
|
||||||
|
i18n={"/i18n/"}
|
||||||
location={
|
location={
|
||||||
Object {
|
Object {
|
||||||
"hash": "",
|
"hash": "",
|
||||||
|
|||||||
@@ -56,8 +56,69 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
"url": "",
|
"url": "",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
>
|
||||||
|
<WithI18n
|
||||||
|
itemCount={2}
|
||||||
|
itemName="notification"
|
||||||
|
items={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"id": 1,
|
||||||
|
"name": "Notification one",
|
||||||
|
"notification_type": "email",
|
||||||
|
"url": "/api/v2/notification_templates/1/",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"id": 2,
|
||||||
|
"name": "Notification two",
|
||||||
|
"notification_type": "email",
|
||||||
|
"url": "/api/v2/notification_templates/2/",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
qsConfig={
|
||||||
|
Object {
|
||||||
|
"defaultParams": Object {
|
||||||
|
"order_by": "name",
|
||||||
|
"page": 1,
|
||||||
|
"page_size": 5,
|
||||||
|
},
|
||||||
|
"integerFields": Array [
|
||||||
|
"page",
|
||||||
|
"page_size",
|
||||||
|
],
|
||||||
|
"namespace": "notification",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
renderItem={[Function]}
|
||||||
|
toolbarColumns={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "name",
|
||||||
|
"name": "Name",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"isNumeric": true,
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "modified",
|
||||||
|
"name": "Modified",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"isNumeric": true,
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "created",
|
||||||
|
"name": "Created",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<I18n
|
||||||
|
update={true}
|
||||||
|
withHash={true}
|
||||||
>
|
>
|
||||||
<withRouter(PaginatedDataList)
|
<withRouter(PaginatedDataList)
|
||||||
|
i18n={"/i18n/"}
|
||||||
itemCount={2}
|
itemCount={2}
|
||||||
itemName="notification"
|
itemName="notification"
|
||||||
items={
|
items={
|
||||||
@@ -118,6 +179,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
additionalControls={Array []}
|
additionalControls={Array []}
|
||||||
alignToolbarLeft={false}
|
alignToolbarLeft={false}
|
||||||
history={"/history/"}
|
history={"/history/"}
|
||||||
|
i18n={"/i18n/"}
|
||||||
isAllSelected={false}
|
isAllSelected={false}
|
||||||
itemCount={2}
|
itemCount={2}
|
||||||
itemName="notification"
|
itemName="notification"
|
||||||
@@ -194,6 +256,37 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
>
|
||||||
|
<WithI18n
|
||||||
|
additionalControls={Array []}
|
||||||
|
columns={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "name",
|
||||||
|
"name": "Name",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"isNumeric": true,
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "modified",
|
||||||
|
"name": "Modified",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"isNumeric": true,
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "created",
|
||||||
|
"name": "Created",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
isAllSelected={false}
|
||||||
|
onSearch={[Function]}
|
||||||
|
onSelectAll={null}
|
||||||
|
onSort={[Function]}
|
||||||
|
showSelectAll={false}
|
||||||
|
sortOrder="ascending"
|
||||||
|
sortedColumnKey="name"
|
||||||
>
|
>
|
||||||
<I18n
|
<I18n
|
||||||
update={true}
|
update={true}
|
||||||
@@ -222,6 +315,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
i18n={"/i18n/"}
|
||||||
isAllSelected={false}
|
isAllSelected={false}
|
||||||
isCompact={false}
|
isCompact={false}
|
||||||
noLeftMargin={false}
|
noLeftMargin={false}
|
||||||
@@ -233,10 +327,6 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
showSelectAll={false}
|
showSelectAll={false}
|
||||||
sortOrder="ascending"
|
sortOrder="ascending"
|
||||||
sortedColumnKey="name"
|
sortedColumnKey="name"
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
>
|
||||||
<DataListToolbar__AWXToolbar>
|
<DataListToolbar__AWXToolbar>
|
||||||
<StyledComponent
|
<StyledComponent
|
||||||
@@ -367,7 +457,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="pf-l-toolbar__item sc-bwzfXH iBEPfq"
|
className="pf-l-toolbar__item sc-bwzfXH iBEPfq"
|
||||||
>
|
>
|
||||||
<Search
|
<WithI18n
|
||||||
columns={
|
columns={
|
||||||
Array [
|
Array [
|
||||||
Object {
|
Object {
|
||||||
@@ -395,6 +485,32 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
<I18n
|
<I18n
|
||||||
update={true}
|
update={true}
|
||||||
withHash={true}
|
withHash={true}
|
||||||
|
>
|
||||||
|
<Search
|
||||||
|
columns={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "name",
|
||||||
|
"name": "Name",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"isNumeric": true,
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "modified",
|
||||||
|
"name": "Modified",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"isNumeric": true,
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "created",
|
||||||
|
"name": "Created",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
i18n={"/i18n/"}
|
||||||
|
onSearch={[Function]}
|
||||||
|
sortedColumnKey="name"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="pf-c-input-group"
|
className="pf-c-input-group"
|
||||||
@@ -868,8 +984,9 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
</StyledComponent>
|
</StyledComponent>
|
||||||
</Search__Button>
|
</Search__Button>
|
||||||
</div>
|
</div>
|
||||||
</I18n>
|
|
||||||
</Search>
|
</Search>
|
||||||
|
</I18n>
|
||||||
|
</WithI18n>
|
||||||
</div>
|
</div>
|
||||||
</ToolbarItem>
|
</ToolbarItem>
|
||||||
</StyledComponent>
|
</StyledComponent>
|
||||||
@@ -933,7 +1050,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="pf-l-toolbar__item"
|
className="pf-l-toolbar__item"
|
||||||
>
|
>
|
||||||
<Sort
|
<WithI18n
|
||||||
columns={
|
columns={
|
||||||
Array [
|
Array [
|
||||||
Object {
|
Object {
|
||||||
@@ -962,6 +1079,33 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
<I18n
|
<I18n
|
||||||
update={true}
|
update={true}
|
||||||
withHash={true}
|
withHash={true}
|
||||||
|
>
|
||||||
|
<Sort
|
||||||
|
columns={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "name",
|
||||||
|
"name": "Name",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"isNumeric": true,
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "modified",
|
||||||
|
"name": "Modified",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"isNumeric": true,
|
||||||
|
"isSortable": true,
|
||||||
|
"key": "created",
|
||||||
|
"name": "Created",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
i18n={"/i18n/"}
|
||||||
|
onSort={[Function]}
|
||||||
|
sortOrder="ascending"
|
||||||
|
sortedColumnKey="name"
|
||||||
>
|
>
|
||||||
<Sort__Dropdown
|
<Sort__Dropdown
|
||||||
dropdownItems={
|
dropdownItems={
|
||||||
@@ -1405,8 +1549,9 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
</Button>
|
</Button>
|
||||||
</StyledComponent>
|
</StyledComponent>
|
||||||
</Styled(Button)>
|
</Styled(Button)>
|
||||||
</I18n>
|
|
||||||
</Sort>
|
</Sort>
|
||||||
|
</I18n>
|
||||||
|
</WithI18n>
|
||||||
</div>
|
</div>
|
||||||
</ToolbarItem>
|
</ToolbarItem>
|
||||||
<DataListToolbar__AdditionalControlsWrapper>
|
<DataListToolbar__AdditionalControlsWrapper>
|
||||||
@@ -1450,8 +1595,9 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</StyledComponent>
|
</StyledComponent>
|
||||||
</DataListToolbar__AWXToolbar>
|
</DataListToolbar__AWXToolbar>
|
||||||
</I18n>
|
|
||||||
</DataListToolbar>
|
</DataListToolbar>
|
||||||
|
</I18n>
|
||||||
|
</WithI18n>
|
||||||
<DataList
|
<DataList
|
||||||
aria-label="{0} List"
|
aria-label="{0} List"
|
||||||
className=""
|
className=""
|
||||||
@@ -1461,7 +1607,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
className="pf-c-data-list"
|
className="pf-c-data-list"
|
||||||
role="list"
|
role="list"
|
||||||
>
|
>
|
||||||
<NotificationListItem
|
<WithI18n
|
||||||
canToggleNotifications={true}
|
canToggleNotifications={true}
|
||||||
detailUrl="/notifications/1"
|
detailUrl="/notifications/1"
|
||||||
errorTurnedOn={false}
|
errorTurnedOn={false}
|
||||||
@@ -1480,6 +1626,22 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
<I18n
|
<I18n
|
||||||
update={true}
|
update={true}
|
||||||
withHash={true}
|
withHash={true}
|
||||||
|
>
|
||||||
|
<NotificationListItem
|
||||||
|
canToggleNotifications={true}
|
||||||
|
detailUrl="/notifications/1"
|
||||||
|
errorTurnedOn={false}
|
||||||
|
i18n={"/i18n/"}
|
||||||
|
notification={
|
||||||
|
Object {
|
||||||
|
"id": 1,
|
||||||
|
"name": "Notification one",
|
||||||
|
"notification_type": "email",
|
||||||
|
"url": "/api/v2/notification_templates/1/",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
successTurnedOn={true}
|
||||||
|
toggleNotification={[Function]}
|
||||||
>
|
>
|
||||||
<DataListItem
|
<DataListItem
|
||||||
aria-labelledby="items-list-item-1"
|
aria-labelledby="items-list-item-1"
|
||||||
@@ -1913,13 +2075,99 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
</NotificationListItem__DataListCell>
|
</NotificationListItem__DataListCell>
|
||||||
</div>
|
</div>
|
||||||
</DataListItemCells>
|
</DataListItemCells>
|
||||||
|
<NotificationListItem__Switch
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
id="notification-1-error-toggle"
|
||||||
|
isChecked={false}
|
||||||
|
isDisabled={false}
|
||||||
|
key=".1"
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-1"
|
||||||
|
>
|
||||||
|
<StyledComponent
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
forwardedComponent={
|
||||||
|
Object {
|
||||||
|
"$$typeof": Symbol(react.forward_ref),
|
||||||
|
"attrs": Array [],
|
||||||
|
"componentStyle": ComponentStyle {
|
||||||
|
"componentId": "NotificationListItem__Switch-j7c411-1",
|
||||||
|
"isStatic": true,
|
||||||
|
"lastClassName": "ceuHGn",
|
||||||
|
"rules": Array [
|
||||||
|
"display:flex;flex-wrap:no-wrap;",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"displayName": "NotificationListItem__Switch",
|
||||||
|
"foldedComponentIds": Array [],
|
||||||
|
"render": [Function],
|
||||||
|
"styledComponentId": "NotificationListItem__Switch-j7c411-1",
|
||||||
|
"target": [Function],
|
||||||
|
"toString": [Function],
|
||||||
|
"warnTooManyClasses": [Function],
|
||||||
|
"withComponent": [Function],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
forwardedRef={null}
|
||||||
|
id="notification-1-error-toggle"
|
||||||
|
isChecked={false}
|
||||||
|
isDisabled={false}
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-1"
|
||||||
|
>
|
||||||
|
<Switch
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
|
||||||
|
id="notification-1-error-toggle"
|
||||||
|
isChecked={false}
|
||||||
|
isDisabled={false}
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-1"
|
||||||
|
>
|
||||||
|
<label
|
||||||
|
className="pf-c-switch NotificationListItem__Switch-j7c411-1 ceuHGn"
|
||||||
|
htmlFor="notification-1-error-toggle"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
checked={false}
|
||||||
|
className="pf-c-switch__input"
|
||||||
|
disabled={false}
|
||||||
|
id="notification-1-error-toggle"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-1"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
className="pf-c-switch__toggle"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
|
className="pf-c-switch__label pf-m-on"
|
||||||
|
>
|
||||||
|
Failure
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
|
className="pf-c-switch__label pf-m-off"
|
||||||
|
>
|
||||||
|
Failure
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</Switch>
|
||||||
|
</StyledComponent>
|
||||||
|
</NotificationListItem__Switch>
|
||||||
</div>
|
</div>
|
||||||
</DataListItemRow>
|
</DataListItemRow>
|
||||||
</li>
|
</li>
|
||||||
</DataListItem>
|
</DataListItem>
|
||||||
</I18n>
|
|
||||||
</NotificationListItem>
|
</NotificationListItem>
|
||||||
<NotificationListItem
|
</I18n>
|
||||||
|
</WithI18n>
|
||||||
|
<WithI18n
|
||||||
canToggleNotifications={true}
|
canToggleNotifications={true}
|
||||||
detailUrl="/notifications/2"
|
detailUrl="/notifications/2"
|
||||||
errorTurnedOn={true}
|
errorTurnedOn={true}
|
||||||
@@ -1938,6 +2186,22 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
<I18n
|
<I18n
|
||||||
update={true}
|
update={true}
|
||||||
withHash={true}
|
withHash={true}
|
||||||
|
>
|
||||||
|
<NotificationListItem
|
||||||
|
canToggleNotifications={true}
|
||||||
|
detailUrl="/notifications/2"
|
||||||
|
errorTurnedOn={true}
|
||||||
|
i18n={"/i18n/"}
|
||||||
|
notification={
|
||||||
|
Object {
|
||||||
|
"id": 2,
|
||||||
|
"name": "Notification two",
|
||||||
|
"notification_type": "email",
|
||||||
|
"url": "/api/v2/notification_templates/2/",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
successTurnedOn={false}
|
||||||
|
toggleNotification={[Function]}
|
||||||
>
|
>
|
||||||
<DataListItem
|
<DataListItem
|
||||||
aria-labelledby="items-list-item-2"
|
aria-labelledby="items-list-item-2"
|
||||||
@@ -2371,16 +2635,114 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
</NotificationListItem__DataListCell>
|
</NotificationListItem__DataListCell>
|
||||||
</div>
|
</div>
|
||||||
</DataListItemCells>
|
</DataListItemCells>
|
||||||
|
<NotificationListItem__Switch
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
id="notification-2-error-toggle"
|
||||||
|
isChecked={true}
|
||||||
|
isDisabled={false}
|
||||||
|
key=".1"
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-2"
|
||||||
|
>
|
||||||
|
<StyledComponent
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
forwardedComponent={
|
||||||
|
Object {
|
||||||
|
"$$typeof": Symbol(react.forward_ref),
|
||||||
|
"attrs": Array [],
|
||||||
|
"componentStyle": ComponentStyle {
|
||||||
|
"componentId": "NotificationListItem__Switch-j7c411-1",
|
||||||
|
"isStatic": true,
|
||||||
|
"lastClassName": "ceuHGn",
|
||||||
|
"rules": Array [
|
||||||
|
"display:flex;flex-wrap:no-wrap;",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"displayName": "NotificationListItem__Switch",
|
||||||
|
"foldedComponentIds": Array [],
|
||||||
|
"render": [Function],
|
||||||
|
"styledComponentId": "NotificationListItem__Switch-j7c411-1",
|
||||||
|
"target": [Function],
|
||||||
|
"toString": [Function],
|
||||||
|
"warnTooManyClasses": [Function],
|
||||||
|
"withComponent": [Function],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
forwardedRef={null}
|
||||||
|
id="notification-2-error-toggle"
|
||||||
|
isChecked={true}
|
||||||
|
isDisabled={false}
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-2"
|
||||||
|
>
|
||||||
|
<Switch
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
|
||||||
|
id="notification-2-error-toggle"
|
||||||
|
isChecked={true}
|
||||||
|
isDisabled={false}
|
||||||
|
label="Failure"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-2"
|
||||||
|
>
|
||||||
|
<label
|
||||||
|
className="pf-c-switch NotificationListItem__Switch-j7c411-1 ceuHGn"
|
||||||
|
htmlFor="notification-2-error-toggle"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
aria-label="Toggle notification failure"
|
||||||
|
checked={true}
|
||||||
|
className="pf-c-switch__input"
|
||||||
|
disabled={false}
|
||||||
|
id="notification-2-error-toggle"
|
||||||
|
onChange={[Function]}
|
||||||
|
rowid="items-list-item-2"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
className="pf-c-switch__toggle"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
|
className="pf-c-switch__label pf-m-on"
|
||||||
|
>
|
||||||
|
Failure
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
|
className="pf-c-switch__label pf-m-off"
|
||||||
|
>
|
||||||
|
Failure
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</Switch>
|
||||||
|
</StyledComponent>
|
||||||
|
</NotificationListItem__Switch>
|
||||||
</div>
|
</div>
|
||||||
</DataListItemRow>
|
</DataListItemRow>
|
||||||
</li>
|
</li>
|
||||||
</DataListItem>
|
</DataListItem>
|
||||||
</I18n>
|
|
||||||
</NotificationListItem>
|
</NotificationListItem>
|
||||||
|
</I18n>
|
||||||
|
</WithI18n>
|
||||||
</ul>
|
</ul>
|
||||||
</DataList>
|
</DataList>
|
||||||
|
<WithI18n
|
||||||
|
count={2}
|
||||||
|
onSetPage={[Function]}
|
||||||
|
page={1}
|
||||||
|
pageCount={1}
|
||||||
|
page_size={5}
|
||||||
|
>
|
||||||
|
<I18n
|
||||||
|
update={true}
|
||||||
|
withHash={true}
|
||||||
|
>
|
||||||
<Pagination
|
<Pagination
|
||||||
count={2}
|
count={2}
|
||||||
|
i18n={"/i18n/"}
|
||||||
onSetPage={[Function]}
|
onSetPage={[Function]}
|
||||||
page={1}
|
page={1}
|
||||||
pageCount={1}
|
pageCount={1}
|
||||||
@@ -2394,36 +2756,14 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
}
|
}
|
||||||
page_size={5}
|
page_size={5}
|
||||||
showPageSizeOptions={true}
|
showPageSizeOptions={true}
|
||||||
style={null}
|
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="awx-pagination"
|
className="awx-pagination"
|
||||||
style={null}
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="awx-pagination__page-size-selection"
|
className="awx-pagination__page-size-selection"
|
||||||
>
|
>
|
||||||
<WithI18n
|
Items Per Page
|
||||||
id="Items Per Page"
|
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
|
||||||
<Trans
|
|
||||||
i18n={"/i18n/"}
|
|
||||||
id="Items Per Page"
|
|
||||||
>
|
|
||||||
<Render
|
|
||||||
value={null}
|
|
||||||
/>
|
|
||||||
</Trans>
|
|
||||||
</I18n>
|
|
||||||
</WithI18n>
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
className=""
|
className=""
|
||||||
direction="up"
|
direction="up"
|
||||||
@@ -2633,46 +2973,18 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="awx-pagination__item-count"
|
className="awx-pagination__item-count"
|
||||||
>
|
>
|
||||||
<WithI18n
|
Items {itemMin} – {itemMax} of {count}
|
||||||
id="Items {itemMin} – {itemMax} of {count}"
|
|
||||||
values={
|
|
||||||
Object {
|
|
||||||
"count": 2,
|
|
||||||
"itemMax": 2,
|
|
||||||
"itemMin": 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<I18n
|
|
||||||
update={true}
|
|
||||||
withHash={true}
|
|
||||||
>
|
|
||||||
<Trans
|
|
||||||
i18n={"/i18n/"}
|
|
||||||
id="Items {itemMin} – {itemMax} of {count}"
|
|
||||||
values={
|
|
||||||
Object {
|
|
||||||
"count": 2,
|
|
||||||
"itemMax": 2,
|
|
||||||
"itemMin": 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Render
|
|
||||||
value={null}
|
|
||||||
/>
|
|
||||||
</Trans>
|
|
||||||
</I18n>
|
|
||||||
</WithI18n>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</I18n>
|
|
||||||
</Pagination>
|
</Pagination>
|
||||||
</I18n>
|
</I18n>
|
||||||
|
</WithI18n>
|
||||||
</PaginatedDataList>
|
</PaginatedDataList>
|
||||||
</Route>
|
</Route>
|
||||||
</withRouter(PaginatedDataList)>
|
</withRouter(PaginatedDataList)>
|
||||||
|
</I18n>
|
||||||
|
</WithI18n>
|
||||||
</OrganizationNotifications>
|
</OrganizationNotifications>
|
||||||
</Route>
|
</Route>
|
||||||
</withRouter(OrganizationNotifications)>
|
</withRouter(OrganizationNotifications)>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Portal from '../../src/pages/Portal';
|
import Portal from '../../src/pages/Portal';
|
||||||
|
|
||||||
describe('<Portal />', () => {
|
describe('<Portal />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Portal />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Portal />);
|
pageWrapper = mountWithContexts(<Portal />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Projects from '../../src/pages/Projects';
|
import Projects from '../../src/pages/Projects';
|
||||||
|
|
||||||
describe('<Projects />', () => {
|
describe('<Projects />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Projects />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Projects />);
|
pageWrapper = mountWithContexts(<Projects />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Schedules from '../../src/pages/Schedules';
|
import Schedules from '../../src/pages/Schedules';
|
||||||
|
|
||||||
describe('<Schedules />', () => {
|
describe('<Schedules />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Schedules />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Schedules />);
|
pageWrapper = mountWithContexts(<Schedules />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import SystemSettings from '../../src/pages/SystemSettings';
|
import SystemSettings from '../../src/pages/SystemSettings';
|
||||||
|
|
||||||
describe('<SystemSettings />', () => {
|
describe('<SystemSettings />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<SystemSettings />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<SystemSettings />);
|
pageWrapper = mountWithContexts(<SystemSettings />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Teams from '../../src/pages/Teams';
|
import Teams from '../../src/pages/Teams';
|
||||||
|
|
||||||
describe('<Teams />', () => {
|
describe('<Teams />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Teams />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Teams />);
|
pageWrapper = mountWithContexts(<Teams />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Templates from '../../src/pages/Templates';
|
import Templates from '../../src/pages/Templates';
|
||||||
|
|
||||||
describe('<Templates />', () => {
|
describe('<Templates />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Templates />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Templates />);
|
pageWrapper = mountWithContexts(<Templates />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import UISettings from '../../src/pages/UISettings';
|
import UISettings from '../../src/pages/UISettings';
|
||||||
|
|
||||||
describe('<UISettings />', () => {
|
describe('<UISettings />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<UISettings />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<UISettings />);
|
pageWrapper = mountWithContexts(<UISettings />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../enzymeHelpers';
|
||||||
import Users from '../../src/pages/Users';
|
import Users from '../../src/pages/Users';
|
||||||
|
|
||||||
describe('<Users />', () => {
|
describe('<Users />', () => {
|
||||||
@@ -8,7 +8,7 @@ describe('<Users />', () => {
|
|||||||
let title;
|
let title;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
pageWrapper = mount(<Users />);
|
pageWrapper = mountWithContexts(<Users />);
|
||||||
pageSections = pageWrapper.find('PageSection');
|
pageSections = pageWrapper.find('PageSection');
|
||||||
title = pageWrapper.find('Title');
|
title = pageWrapper.find('Title');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,34 +1,36 @@
|
|||||||
import { required, maxLength } from '../../src/util/validators';
|
import { required, maxLength } from '../../src/util/validators';
|
||||||
|
|
||||||
|
const i18n = { _: val => val };
|
||||||
|
|
||||||
describe('validators', () => {
|
describe('validators', () => {
|
||||||
test('required returns undefined if value given', () => {
|
test('required returns undefined if value given', () => {
|
||||||
expect(required()('some value')).toBeUndefined();
|
expect(required(null, i18n)('some value')).toBeUndefined();
|
||||||
expect(required('oops')('some value')).toBeUndefined();
|
expect(required('oops', i18n)('some value')).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('required returns default message if value missing', () => {
|
test('required returns default message if value missing', () => {
|
||||||
expect(required()('')).toEqual('This field must not be blank');
|
expect(required(null, i18n)('')).toEqual({ id: 'This field must not be blank' });
|
||||||
});
|
});
|
||||||
|
|
||||||
test('required returns custom message if value missing', () => {
|
test('required returns custom message if value missing', () => {
|
||||||
expect(required('oops')('')).toEqual('oops');
|
expect(required('oops', i18n)('')).toEqual('oops');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('required interprets white space as empty value', () => {
|
test('required interprets white space as empty value', () => {
|
||||||
expect(required()(' ')).toEqual('This field must not be blank');
|
expect(required(null, i18n)(' ')).toEqual({ id: 'This field must not be blank' });
|
||||||
expect(required()('\t')).toEqual('This field must not be blank');
|
expect(required(null, i18n)('\t')).toEqual({ id: 'This field must not be blank' });
|
||||||
});
|
});
|
||||||
|
|
||||||
test('maxLength accepts value below max', () => {
|
test('maxLength accepts value below max', () => {
|
||||||
expect(maxLength(10)('snazzy')).toBeUndefined();
|
expect(maxLength(10, i18n)('snazzy')).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('maxLength accepts value equal to max', () => {
|
test('maxLength accepts value equal to max', () => {
|
||||||
expect(maxLength(10)('abracadbra')).toBeUndefined();
|
expect(maxLength(10, i18n)('abracadbra')).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('maxLength rejects value above max', () => {
|
test('maxLength rejects value above max', () => {
|
||||||
expect(maxLength(8)('abracadbra'))
|
expect(maxLength(8, i18n)('abracadbra'))
|
||||||
.toEqual('This field must not exceed 8 characters');
|
.toEqual({ id: 'This field must not exceed {max} characters', values: { max: 8 } });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ msgstr ""
|
|||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Plural-Forms: \n"
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#: src/contexts/Network.jsx:56
|
||||||
|
msgid "404"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationBreadcrumb.jsx:60
|
#: src/pages/Organizations/components/OrganizationBreadcrumb.jsx:60
|
||||||
#~ msgid "> add"
|
#~ msgid "> add"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
@@ -25,20 +29,34 @@ msgstr ""
|
|||||||
msgid "About"
|
msgid "About"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/About.jsx:60
|
#: src/components/About.jsx:59
|
||||||
msgid "AboutModal Logo"
|
msgid "AboutModal Logo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:175
|
#: src/index.jsx:140
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:43
|
||||||
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:131
|
||||||
msgid "Access"
|
msgid "Access"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:266
|
#: src/components/PaginatedDataList/ToolbarAddButton.jsx:33
|
||||||
#: src/pages/Organizations/components/OrganizationBreadcrumb.jsx:68
|
#: src/components/PaginatedDataList/ToolbarAddButton.jsx:44
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:196
|
#: src/components/AddRole/AddResourceRole.jsx:153
|
||||||
|
msgid "Add Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:150
|
||||||
|
msgid "Add Team Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:147
|
||||||
|
msgid "Add User Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:161
|
||||||
msgid "Administration"
|
msgid "Administration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -46,67 +64,154 @@ msgstr ""
|
|||||||
#~ msgid "Admins"
|
#~ msgid "Admins"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/components/About.jsx:77
|
#: src/pages/Organizations/components/OrganizationForm.jsx:123
|
||||||
|
#: src/pages/Organizations/components/OrganizationForm.jsx:128
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:142
|
||||||
|
msgid "Ansible Environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/About.jsx:75
|
||||||
msgid "Ansible Version"
|
msgid "Ansible Version"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Applications.jsx:17
|
#: src/pages/Applications.jsx:19
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:231
|
#: src/components/AddRole/AddResourceRole.jsx:209
|
||||||
|
msgid "Apply roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:165
|
||||||
|
msgid "Are you sure you want to delete:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:51
|
||||||
|
msgid "Are you sure you want to remove {0} access from {1}? Doing so affects all members of the team."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:58
|
||||||
|
msgid "Are you sure you want to remove {0} access from {username}?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:196
|
||||||
msgid "Authentication"
|
msgid "Authentication"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/AuthSettings.jsx:17
|
#: src/pages/AuthSettings.jsx:19
|
||||||
msgid "Authentication Settings"
|
msgid "Authentication Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/About.jsx:58
|
#: src/components/About.jsx:57
|
||||||
msgid "Brand Image"
|
msgid "Brand Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:241
|
#: src/components/FormActionGroup/FormActionGroup.jsx:30
|
||||||
|
#: src/components/FormActionGroup/FormActionGroup.jsx:30
|
||||||
|
#: src/components/Lookup/Lookup.jsx:169
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:161
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:45
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:77
|
||||||
|
msgid "Cannot find organization with ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/contexts/Network.jsx:57
|
||||||
|
msgid "Cannot find resource."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/NotifyAndRedirect.jsx:23
|
||||||
|
msgid "Cannot find route {0}."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/App.jsx:94
|
||||||
|
#: src/components/CardCloseButton.jsx:14
|
||||||
|
#: src/components/CardCloseButton.jsx:15
|
||||||
|
#: src/components/CardCloseButton.jsx:27
|
||||||
|
#: src/components/Lookup/Lookup.jsx:169
|
||||||
|
#: src/pages/Organizations/screens/OrganizationAdd.jsx:67
|
||||||
|
msgid "Close"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/ExpandCollapse/ExpandCollapse.jsx:34
|
||||||
msgid "Collapse"
|
msgid "Collapse"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/About.jsx:56
|
#: src/components/About.jsx:55
|
||||||
msgid "Copyright 2018 Red Hat, Inc."
|
msgid "Copyright 2018 Red Hat, Inc."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:29
|
#: src/pages/Organizations/Organizations.jsx:39
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:25
|
||||||
|
msgid "Create New Organization"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:58
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:146
|
||||||
|
#: src/pages/Organizations/screens/OrganizationsList.jsx:164
|
||||||
msgid "Created"
|
msgid "Created"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:200
|
#: src/index.jsx:165
|
||||||
#: src/pages/CredentialTypes.jsx:17
|
#: src/pages/CredentialTypes.jsx:19
|
||||||
msgid "Credential Types"
|
msgid "Credential Types"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:153
|
#: src/index.jsx:118
|
||||||
#: src/pages/Credentials.jsx:17
|
#: src/pages/Credentials.jsx:19
|
||||||
msgid "Credentials"
|
msgid "Credentials"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:122
|
#: src/index.jsx:87
|
||||||
#: src/pages/Dashboard.jsx:17
|
#: src/pages/Dashboard.jsx:19
|
||||||
msgid "Dashboard"
|
msgid "Dashboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:252
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:109
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:257
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:130
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:153
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:42
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationBreadcrumb.jsx:59
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:142
|
||||||
|
msgid "Delete {0}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:141
|
||||||
|
msgid "Delete {itemName}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/OrganizationForm.jsx:113
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:138
|
||||||
|
msgid "Description"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:42
|
||||||
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:130
|
||||||
|
msgid "Details"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:171
|
||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:233
|
#: src/pages/Organizations/Organizations.jsx:41
|
||||||
|
msgid "Edit Details"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/ExpandCollapse/ExpandCollapse.jsx:44
|
||||||
msgid "Expand"
|
msgid "Expand"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:169
|
#: src/components/NotificationsList/NotificationListItem.jsx:82
|
||||||
|
#: src/components/NotificationsList/NotificationListItem.jsx:97
|
||||||
|
msgid "Failure"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Pagination/Pagination.jsx:170
|
||||||
msgid "First"
|
msgid "First"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -114,260 +219,436 @@ msgstr ""
|
|||||||
msgid "Help"
|
msgid "Help"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:215
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:54
|
||||||
#: src/pages/InstanceGroups.jsx:17
|
msgid "If you {0} want to remove access for this particular user, please remove them from the team."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PageHeaderToolbar.jsx:66
|
||||||
|
msgid "Info"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:180
|
||||||
|
#: src/pages/InstanceGroups.jsx:19
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:32
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:50
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:159
|
||||||
msgid "Instance Groups"
|
msgid "Instance Groups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:220
|
#: src/index.jsx:185
|
||||||
msgid "Integrations"
|
msgid "Integrations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Login.jsx:80
|
#: src/pages/Login.jsx:84
|
||||||
msgid "Invalid username or password. Please try again."
|
msgid "Invalid username or password. Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:163
|
#: src/index.jsx:128
|
||||||
#: src/pages/Inventories.jsx:17
|
#: src/pages/Inventories.jsx:19
|
||||||
msgid "Inventories"
|
msgid "Inventories"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:168
|
#: src/index.jsx:133
|
||||||
#: src/pages/InventoryScripts.jsx:17
|
#: src/pages/InventoryScripts.jsx:19
|
||||||
msgid "Inventory Scripts"
|
msgid "Inventory Scripts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:127
|
#: src/components/Pagination/Pagination.jsx:142
|
||||||
#: src/index.jsx:236
|
msgid "Items Per Page"
|
||||||
#: src/pages/Jobs.jsx:17
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Pagination/Pagination.jsx:162
|
||||||
|
msgid "Items {itemMin} – {itemMax} of {count}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:92
|
||||||
|
#: src/index.jsx:201
|
||||||
|
#: src/pages/Jobs.jsx:19
|
||||||
msgid "Jobs"
|
msgid "Jobs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/JobsSettings.jsx:17
|
#: src/pages/JobsSettings.jsx:19
|
||||||
msgid "Jobs Settings"
|
msgid "Jobs Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:221
|
#: src/components/Pagination/Pagination.jsx:213
|
||||||
msgid "Last"
|
msgid "Last"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:251
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:150
|
||||||
#: src/pages/License.jsx:17
|
msgid "Last Modified"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationAccess.jsx:173
|
||||||
|
msgid "Last Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:216
|
||||||
|
#: src/pages/License.jsx:19
|
||||||
msgid "License"
|
msgid "License"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/PageHeaderToolbar.jsx:116
|
#: src/components/AddRole/SelectResourceStep.jsx:96
|
||||||
|
msgid "Loading..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PageHeaderToolbar.jsx:120
|
||||||
msgid "Logout"
|
msgid "Logout"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:210
|
#: src/index.jsx:175
|
||||||
#: src/pages/ManagementJobs.jsx:17
|
#: src/pages/ManagementJobs.jsx:19
|
||||||
msgid "Management Jobs"
|
msgid "Management Jobs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:28
|
#: src/pages/Organizations/components/OrganizationListItem.jsx:91
|
||||||
|
msgid "Members"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:57
|
||||||
|
#: src/pages/Organizations/screens/OrganizationsList.jsx:163
|
||||||
msgid "Modified"
|
msgid "Modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:137
|
#: src/index.jsx:102
|
||||||
#: src/pages/Portal.jsx:17
|
#: src/pages/Portal.jsx:19
|
||||||
msgid "My View"
|
msgid "My View"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:27
|
#: src/components/AddRole/AddResourceRole.jsx:140
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:116
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:56
|
||||||
|
#: src/pages/Organizations/components/OrganizationAccessItem.jsx:109
|
||||||
|
#: src/pages/Organizations/components/OrganizationForm.jsx:105
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationAccess.jsx:171
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:134
|
||||||
|
#: src/pages/Organizations/screens/OrganizationsList.jsx:162
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:212
|
#: src/components/Pagination/Pagination.jsx:204
|
||||||
msgid "Next"
|
msgid "Next"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/NotificationTemplates.jsx:17
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:133
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:196
|
||||||
|
msgid "No {0} Found"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/NotificationTemplates.jsx:19
|
||||||
msgid "Notification Templates"
|
msgid "Notification Templates"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:205
|
#: src/index.jsx:170
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:45
|
||||||
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:137
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organization.add.jsx:79
|
#: src/pages/Organizations/views/Organization.add.jsx:79
|
||||||
msgid "Organization Add"
|
#~ msgid "Organization Add"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:72
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:153
|
||||||
msgid "Organization detail tabs"
|
msgid "Organization detail tabs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:179
|
#: src/index.jsx:144
|
||||||
#: src/pages/Organizations/views/Organization.view.jsx:63
|
#: src/pages/Organizations/Organizations.jsx:38
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:196
|
#: src/pages/Organizations/Organizations.jsx:24
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:202
|
|
||||||
msgid "Organizations"
|
msgid "Organizations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:218
|
#: src/pages/Organizations/views/Organizations.list.jsx:218
|
||||||
msgid "Organizations List"
|
#~ msgid "Organizations List"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Pagination/Pagination.jsx:190
|
||||||
|
msgid "Page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:189
|
#: src/components/Pagination/Pagination.jsx:189
|
||||||
msgid "Page <0/> of {pageCount}"
|
#~ msgid "Page <0/> of {pageCount}"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:192
|
#: src/components/Pagination/Pagination.jsx:193
|
||||||
msgid "Page Number"
|
msgid "Page Number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Login.jsx:79
|
#: src/pages/Login.jsx:82
|
||||||
msgid "Password"
|
msgid "Password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:158
|
#: src/components/Pagination/Pagination.jsx:158
|
||||||
msgid "Per Page"
|
#~ msgid "Per Page"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:136
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:199
|
||||||
|
msgid "Please add {0} {itemName} to populate this list"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/App.jsx:203
|
#: src/App.jsx:203
|
||||||
#~ msgid "Portal Mode"
|
#~ msgid "Portal Mode"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:178
|
#: src/components/Pagination/Pagination.jsx:179
|
||||||
msgid "Previous"
|
msgid "Previous"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:115
|
#: src/index.jsx:80
|
||||||
msgid "Primary Navigation"
|
msgid "Primary Navigation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:158
|
#: src/index.jsx:123
|
||||||
#: src/pages/Projects.jsx:17
|
#: src/pages/Projects.jsx:19
|
||||||
msgid "Projects"
|
msgid "Projects"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:144
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:28
|
||||||
|
msgid "Remove {0} Access"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:109
|
||||||
msgid "Resources"
|
msgid "Resources"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:132
|
#: src/components/AddRole/AddResourceRole.jsx:220
|
||||||
#: src/pages/Schedules.jsx:17
|
#: src/components/FormActionGroup/FormActionGroup.jsx:27
|
||||||
|
#: src/components/FormActionGroup/FormActionGroup.jsx:27
|
||||||
|
#: src/components/Lookup/Lookup.jsx:168
|
||||||
|
msgid "Save"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:97
|
||||||
|
#: src/pages/Schedules.jsx:19
|
||||||
msgid "Schedules"
|
msgid "Schedules"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:191
|
#: src/components/Search/Search.jsx:138
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:185
|
#: src/components/Search/Search.jsx:131
|
||||||
msgid "Search text input"
|
msgid "Search text input"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:160
|
#: src/components/AnsibleSelect/AnsibleSelect.jsx:28
|
||||||
|
msgid "Select Input"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:159
|
||||||
|
msgid "Select Users Or Teams"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:111
|
||||||
|
msgid "Select a row to delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/DataListToolbar/DataListToolbar.jsx:102
|
||||||
msgid "Select all"
|
msgid "Select all"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:227
|
#: src/components/AddRole/AddResourceRole.jsx:178
|
||||||
|
msgid "Select items from list"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/OrganizationForm.jsx:141
|
||||||
|
msgid "Select the Instance Groups for this Organization to run on."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Lookup/Lookup.jsx:164
|
||||||
|
msgid "Select {header}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:187
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:198
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:215
|
||||||
|
#: src/components/AddRole/SelectRoleStep.jsx:29
|
||||||
|
#: src/components/Lookup/Lookup.jsx:193
|
||||||
|
msgid "Selected"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:192
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:222
|
#: src/components/Sort/Sort.jsx:135
|
||||||
msgid "Sort"
|
msgid "Sort"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:241
|
#: src/components/NotificationsList/NotificationListItem.jsx:70
|
||||||
|
msgid "Successful"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:206
|
||||||
msgid "System"
|
msgid "System"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/SystemSettings.jsx:17
|
#: src/pages/SystemSettings.jsx:19
|
||||||
msgid "System Settings"
|
msgid "System Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:189
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:28
|
||||||
#: src/pages/Organizations/components/OrganizationListItem.jsx:57
|
msgid "Team"
|
||||||
#: src/pages/Teams.jsx:17
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/OrganizationAccessItem.jsx:144
|
||||||
|
msgid "Team Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:169
|
||||||
|
#: src/index.jsx:154
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:44
|
||||||
|
#: src/pages/Organizations/components/OrganizationListItem.jsx:99
|
||||||
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:132
|
||||||
|
#: src/pages/Teams.jsx:19
|
||||||
msgid "Teams"
|
msgid "Teams"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:148
|
#: src/index.jsx:113
|
||||||
#: src/pages/Templates.jsx:17
|
#: src/pages/Templates.jsx:19
|
||||||
msgid "Templates"
|
msgid "Templates"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/util/validators.jsx:6
|
||||||
|
msgid "This field must not be blank"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/util/validators.jsx:16
|
||||||
|
msgid "This field must not exceed {max} characters"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/NotificationsList/NotificationListItem.jsx:90
|
||||||
|
#: src/components/NotificationsList/NotificationListItem.jsx:105
|
||||||
|
msgid "Toggle notification failure"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/NotificationsList/NotificationListItem.jsx:78
|
||||||
|
msgid "Toggle notification success"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/TowerLogo/TowerLogo.jsx:48
|
#: src/components/TowerLogo/TowerLogo.jsx:48
|
||||||
msgid "Tower Brand Image"
|
msgid "Tower Brand Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/PageHeaderToolbar.jsx:108
|
#: src/components/AnsibleSelect/AnsibleSelect.jsx:35
|
||||||
|
msgid "Use Default {label}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:28
|
||||||
|
msgid "User"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PageHeaderToolbar.jsx:113
|
||||||
msgid "User Details"
|
msgid "User Details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:246
|
#: src/index.jsx:211
|
||||||
msgid "User Interface"
|
msgid "User Interface"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/UISettings.jsx:17
|
#: src/pages/UISettings.jsx:19
|
||||||
msgid "User Interface Settings"
|
msgid "User Interface Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Login.jsx:78
|
#: src/pages/Organizations/components/OrganizationAccessItem.jsx:122
|
||||||
|
msgid "User Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:136
|
||||||
|
#: src/pages/Login.jsx:81
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationAccess.jsx:172
|
||||||
msgid "Username"
|
msgid "Username"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:184
|
#: src/components/AddRole/AddResourceRole.jsx:164
|
||||||
#: src/pages/Organizations/components/OrganizationListItem.jsx:49
|
#: src/index.jsx:149
|
||||||
#: src/pages/Users.jsx:17
|
#: src/pages/Users.jsx:19
|
||||||
msgid "Users"
|
msgid "Users"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:118
|
#: src/index.jsx:83
|
||||||
msgid "Views"
|
msgid "Views"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Login.jsx:74
|
#: src/pages/Login.jsx:76
|
||||||
msgid "Welcome to Ansible Tower! Please Sign In."
|
msgid "Welcome to Ansible Tower! Please Sign In."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:56
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:104
|
||||||
msgid "add {currentTab}"
|
msgid "You do not have permission to delete the following {0}: {itemsUnableToDelete}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/contexts/Network.jsx:44
|
||||||
|
msgid "You have been logged out."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:56
|
||||||
|
#~ msgid "add {currentTab}"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:45
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:45
|
||||||
msgid "adding {currentTab}"
|
#~ msgid "adding {currentTab}"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:158
|
||||||
|
msgid "cancel delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:150
|
||||||
|
msgid "confirm delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:38
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:38
|
||||||
msgid "confirm removal of {currentTab}/cancel and go back to {currentTab} view."
|
#~ msgid "confirm removal of {currentTab}/cancel and go back to {currentTab} view."
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:60
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:60
|
||||||
msgid "delete {currentTab}"
|
#~ msgid "delete {currentTab}"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:36
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:36
|
||||||
msgid "deleting {currentTab} association with orgs"
|
#~ msgid "deleting {currentTab} association with orgs"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationEdit.jsx:20
|
#: src/pages/Organizations/components/OrganizationEdit.jsx:20
|
||||||
msgid "edit view"
|
#~ msgid "edit view"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Lookup/Lookup.jsx:135
|
||||||
|
msgid "items"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Pagination/Pagination.jsx:198
|
||||||
|
msgid "of {pageCount}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationEdit.jsx:22
|
#: src/pages/Organizations/components/OrganizationEdit.jsx:22
|
||||||
msgid "save/cancel and go back to view"
|
#~ msgid "save/cancel and go back to view"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:47
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:47
|
||||||
msgid "save/cancel and go back to {currentTab} view"
|
#~ msgid "save/cancel and go back to {currentTab} view"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationListItem.jsx:29
|
#: src/pages/Organizations/components/OrganizationListItem.jsx:29
|
||||||
msgid "select organization {itemId}"
|
#~ msgid "select organization {itemId}"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:82
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:82
|
||||||
msgid "{0}"
|
#~ msgid "{0}"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:153
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:215
|
||||||
|
msgid "{0} List"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:54
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:54
|
||||||
msgid "{currentTab} detail view"
|
#~ msgid "{currentTab} detail view"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:163
|
#: src/components/Pagination/Pagination.jsx:163
|
||||||
msgid "{itemMin} - {itemMax} of {count}"
|
#~ msgid "{itemMin} - {itemMax} of {count}"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ msgstr ""
|
|||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Plural-Forms: \n"
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#: src/contexts/Network.jsx:56
|
||||||
|
msgid "404"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationBreadcrumb.jsx:60
|
#: src/pages/Organizations/components/OrganizationBreadcrumb.jsx:60
|
||||||
#~ msgid "> add"
|
#~ msgid "> add"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
@@ -25,20 +29,34 @@ msgstr ""
|
|||||||
msgid "About"
|
msgid "About"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/About.jsx:60
|
#: src/components/About.jsx:59
|
||||||
msgid "AboutModal Logo"
|
msgid "AboutModal Logo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:175
|
#: src/index.jsx:140
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:43
|
||||||
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:131
|
||||||
msgid "Access"
|
msgid "Access"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:266
|
#: src/components/PaginatedDataList/ToolbarAddButton.jsx:33
|
||||||
#: src/pages/Organizations/components/OrganizationBreadcrumb.jsx:68
|
#: src/components/PaginatedDataList/ToolbarAddButton.jsx:44
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:196
|
#: src/components/AddRole/AddResourceRole.jsx:153
|
||||||
|
msgid "Add Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:150
|
||||||
|
msgid "Add Team Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:147
|
||||||
|
msgid "Add User Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:161
|
||||||
msgid "Administration"
|
msgid "Administration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -46,67 +64,154 @@ msgstr ""
|
|||||||
#~ msgid "Admins"
|
#~ msgid "Admins"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/components/About.jsx:77
|
#: src/pages/Organizations/components/OrganizationForm.jsx:123
|
||||||
|
#: src/pages/Organizations/components/OrganizationForm.jsx:128
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:142
|
||||||
|
msgid "Ansible Environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/About.jsx:75
|
||||||
msgid "Ansible Version"
|
msgid "Ansible Version"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Applications.jsx:17
|
#: src/pages/Applications.jsx:19
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:231
|
#: src/components/AddRole/AddResourceRole.jsx:209
|
||||||
|
msgid "Apply roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:165
|
||||||
|
msgid "Are you sure you want to delete:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:51
|
||||||
|
msgid "Are you sure you want to remove {0} access from {1}? Doing so affects all members of the team."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:58
|
||||||
|
msgid "Are you sure you want to remove {0} access from {username}?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:196
|
||||||
msgid "Authentication"
|
msgid "Authentication"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/AuthSettings.jsx:17
|
#: src/pages/AuthSettings.jsx:19
|
||||||
msgid "Authentication Settings"
|
msgid "Authentication Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/About.jsx:58
|
#: src/components/About.jsx:57
|
||||||
msgid "Brand Image"
|
msgid "Brand Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:241
|
#: src/components/FormActionGroup/FormActionGroup.jsx:30
|
||||||
|
#: src/components/FormActionGroup/FormActionGroup.jsx:30
|
||||||
|
#: src/components/Lookup/Lookup.jsx:169
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:161
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:45
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:77
|
||||||
|
msgid "Cannot find organization with ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/contexts/Network.jsx:57
|
||||||
|
msgid "Cannot find resource."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/NotifyAndRedirect.jsx:23
|
||||||
|
msgid "Cannot find route {0}."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/App.jsx:94
|
||||||
|
#: src/components/CardCloseButton.jsx:14
|
||||||
|
#: src/components/CardCloseButton.jsx:15
|
||||||
|
#: src/components/CardCloseButton.jsx:27
|
||||||
|
#: src/components/Lookup/Lookup.jsx:169
|
||||||
|
#: src/pages/Organizations/screens/OrganizationAdd.jsx:67
|
||||||
|
msgid "Close"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/ExpandCollapse/ExpandCollapse.jsx:34
|
||||||
msgid "Collapse"
|
msgid "Collapse"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/About.jsx:56
|
#: src/components/About.jsx:55
|
||||||
msgid "Copyright 2018 Red Hat, Inc."
|
msgid "Copyright 2018 Red Hat, Inc."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:29
|
#: src/pages/Organizations/Organizations.jsx:39
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:25
|
||||||
|
msgid "Create New Organization"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:58
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:146
|
||||||
|
#: src/pages/Organizations/screens/OrganizationsList.jsx:164
|
||||||
msgid "Created"
|
msgid "Created"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:200
|
#: src/index.jsx:165
|
||||||
#: src/pages/CredentialTypes.jsx:17
|
#: src/pages/CredentialTypes.jsx:19
|
||||||
msgid "Credential Types"
|
msgid "Credential Types"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:153
|
#: src/index.jsx:118
|
||||||
#: src/pages/Credentials.jsx:17
|
#: src/pages/Credentials.jsx:19
|
||||||
msgid "Credentials"
|
msgid "Credentials"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:122
|
#: src/index.jsx:87
|
||||||
#: src/pages/Dashboard.jsx:17
|
#: src/pages/Dashboard.jsx:19
|
||||||
msgid "Dashboard"
|
msgid "Dashboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:252
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:109
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:257
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:130
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:153
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:42
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationBreadcrumb.jsx:59
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:142
|
||||||
|
msgid "Delete {0}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:141
|
||||||
|
msgid "Delete {itemName}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/OrganizationForm.jsx:113
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:138
|
||||||
|
msgid "Description"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:42
|
||||||
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:130
|
||||||
|
msgid "Details"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:171
|
||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:233
|
#: src/pages/Organizations/Organizations.jsx:41
|
||||||
|
msgid "Edit Details"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/ExpandCollapse/ExpandCollapse.jsx:44
|
||||||
msgid "Expand"
|
msgid "Expand"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:169
|
#: src/components/NotificationsList/NotificationListItem.jsx:82
|
||||||
|
#: src/components/NotificationsList/NotificationListItem.jsx:97
|
||||||
|
msgid "Failure"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Pagination/Pagination.jsx:170
|
||||||
msgid "First"
|
msgid "First"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -114,260 +219,436 @@ msgstr ""
|
|||||||
msgid "Help"
|
msgid "Help"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:215
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:54
|
||||||
#: src/pages/InstanceGroups.jsx:17
|
msgid "If you {0} want to remove access for this particular user, please remove them from the team."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PageHeaderToolbar.jsx:66
|
||||||
|
msgid "Info"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:180
|
||||||
|
#: src/pages/InstanceGroups.jsx:19
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:32
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:50
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:159
|
||||||
msgid "Instance Groups"
|
msgid "Instance Groups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:220
|
#: src/index.jsx:185
|
||||||
msgid "Integrations"
|
msgid "Integrations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Login.jsx:80
|
#: src/pages/Login.jsx:84
|
||||||
msgid "Invalid username or password. Please try again."
|
msgid "Invalid username or password. Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:163
|
#: src/index.jsx:128
|
||||||
#: src/pages/Inventories.jsx:17
|
#: src/pages/Inventories.jsx:19
|
||||||
msgid "Inventories"
|
msgid "Inventories"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:168
|
#: src/index.jsx:133
|
||||||
#: src/pages/InventoryScripts.jsx:17
|
#: src/pages/InventoryScripts.jsx:19
|
||||||
msgid "Inventory Scripts"
|
msgid "Inventory Scripts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:127
|
#: src/components/Pagination/Pagination.jsx:142
|
||||||
#: src/index.jsx:236
|
msgid "Items Per Page"
|
||||||
#: src/pages/Jobs.jsx:17
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Pagination/Pagination.jsx:162
|
||||||
|
msgid "Items {itemMin} – {itemMax} of {count}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:92
|
||||||
|
#: src/index.jsx:201
|
||||||
|
#: src/pages/Jobs.jsx:19
|
||||||
msgid "Jobs"
|
msgid "Jobs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/JobsSettings.jsx:17
|
#: src/pages/JobsSettings.jsx:19
|
||||||
msgid "Jobs Settings"
|
msgid "Jobs Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:221
|
#: src/components/Pagination/Pagination.jsx:213
|
||||||
msgid "Last"
|
msgid "Last"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:251
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:150
|
||||||
#: src/pages/License.jsx:17
|
msgid "Last Modified"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationAccess.jsx:173
|
||||||
|
msgid "Last Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:216
|
||||||
|
#: src/pages/License.jsx:19
|
||||||
msgid "License"
|
msgid "License"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/PageHeaderToolbar.jsx:116
|
#: src/components/AddRole/SelectResourceStep.jsx:96
|
||||||
|
msgid "Loading..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PageHeaderToolbar.jsx:120
|
||||||
msgid "Logout"
|
msgid "Logout"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:210
|
#: src/index.jsx:175
|
||||||
#: src/pages/ManagementJobs.jsx:17
|
#: src/pages/ManagementJobs.jsx:19
|
||||||
msgid "Management Jobs"
|
msgid "Management Jobs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:28
|
#: src/pages/Organizations/components/OrganizationListItem.jsx:91
|
||||||
|
msgid "Members"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:57
|
||||||
|
#: src/pages/Organizations/screens/OrganizationsList.jsx:163
|
||||||
msgid "Modified"
|
msgid "Modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:137
|
#: src/index.jsx:102
|
||||||
#: src/pages/Portal.jsx:17
|
#: src/pages/Portal.jsx:19
|
||||||
msgid "My View"
|
msgid "My View"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:27
|
#: src/components/AddRole/AddResourceRole.jsx:140
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:116
|
||||||
|
#: src/pages/Organizations/components/InstanceGroupsLookup.jsx:56
|
||||||
|
#: src/pages/Organizations/components/OrganizationAccessItem.jsx:109
|
||||||
|
#: src/pages/Organizations/components/OrganizationForm.jsx:105
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationAccess.jsx:171
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationDetail.jsx:134
|
||||||
|
#: src/pages/Organizations/screens/OrganizationsList.jsx:162
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:212
|
#: src/components/Pagination/Pagination.jsx:204
|
||||||
msgid "Next"
|
msgid "Next"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/NotificationTemplates.jsx:17
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:133
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:196
|
||||||
|
msgid "No {0} Found"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/NotificationTemplates.jsx:19
|
||||||
msgid "Notification Templates"
|
msgid "Notification Templates"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:205
|
#: src/index.jsx:170
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:45
|
||||||
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:137
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organization.add.jsx:79
|
#: src/pages/Organizations/views/Organization.add.jsx:79
|
||||||
msgid "Organization Add"
|
#~ msgid "Organization Add"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:72
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:153
|
||||||
msgid "Organization detail tabs"
|
msgid "Organization detail tabs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:179
|
#: src/index.jsx:144
|
||||||
#: src/pages/Organizations/views/Organization.view.jsx:63
|
#: src/pages/Organizations/Organizations.jsx:38
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:196
|
#: src/pages/Organizations/Organizations.jsx:24
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:202
|
|
||||||
msgid "Organizations"
|
msgid "Organizations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/views/Organizations.list.jsx:218
|
#: src/pages/Organizations/views/Organizations.list.jsx:218
|
||||||
msgid "Organizations List"
|
#~ msgid "Organizations List"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Pagination/Pagination.jsx:190
|
||||||
|
msgid "Page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:189
|
#: src/components/Pagination/Pagination.jsx:189
|
||||||
msgid "Page <0/> of {pageCount}"
|
#~ msgid "Page <0/> of {pageCount}"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:192
|
#: src/components/Pagination/Pagination.jsx:193
|
||||||
msgid "Page Number"
|
msgid "Page Number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Login.jsx:79
|
#: src/pages/Login.jsx:82
|
||||||
msgid "Password"
|
msgid "Password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:158
|
#: src/components/Pagination/Pagination.jsx:158
|
||||||
msgid "Per Page"
|
#~ msgid "Per Page"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:136
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:199
|
||||||
|
msgid "Please add {0} {itemName} to populate this list"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/App.jsx:203
|
#: src/App.jsx:203
|
||||||
#~ msgid "Portal Mode"
|
#~ msgid "Portal Mode"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:178
|
#: src/components/Pagination/Pagination.jsx:179
|
||||||
msgid "Previous"
|
msgid "Previous"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:115
|
#: src/index.jsx:80
|
||||||
msgid "Primary Navigation"
|
msgid "Primary Navigation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:158
|
#: src/index.jsx:123
|
||||||
#: src/pages/Projects.jsx:17
|
#: src/pages/Projects.jsx:19
|
||||||
msgid "Projects"
|
msgid "Projects"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:144
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:28
|
||||||
|
msgid "Remove {0} Access"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:109
|
||||||
msgid "Resources"
|
msgid "Resources"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:132
|
#: src/components/AddRole/AddResourceRole.jsx:220
|
||||||
#: src/pages/Schedules.jsx:17
|
#: src/components/FormActionGroup/FormActionGroup.jsx:27
|
||||||
|
#: src/components/FormActionGroup/FormActionGroup.jsx:27
|
||||||
|
#: src/components/Lookup/Lookup.jsx:168
|
||||||
|
msgid "Save"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:97
|
||||||
|
#: src/pages/Schedules.jsx:19
|
||||||
msgid "Schedules"
|
msgid "Schedules"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:191
|
#: src/components/Search/Search.jsx:138
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:185
|
#: src/components/Search/Search.jsx:131
|
||||||
msgid "Search text input"
|
msgid "Search text input"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:160
|
#: src/components/AnsibleSelect/AnsibleSelect.jsx:28
|
||||||
|
msgid "Select Input"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:159
|
||||||
|
msgid "Select Users Or Teams"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:111
|
||||||
|
msgid "Select a row to delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/DataListToolbar/DataListToolbar.jsx:102
|
||||||
msgid "Select all"
|
msgid "Select all"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:227
|
#: src/components/AddRole/AddResourceRole.jsx:178
|
||||||
|
msgid "Select items from list"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/OrganizationForm.jsx:141
|
||||||
|
msgid "Select the Instance Groups for this Organization to run on."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Lookup/Lookup.jsx:164
|
||||||
|
msgid "Select {header}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:187
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:198
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:215
|
||||||
|
#: src/components/AddRole/SelectRoleStep.jsx:29
|
||||||
|
#: src/components/Lookup/Lookup.jsx:193
|
||||||
|
msgid "Selected"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:192
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/DataListToolbar/DataListToolbar.jsx:222
|
#: src/components/Sort/Sort.jsx:135
|
||||||
msgid "Sort"
|
msgid "Sort"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:241
|
#: src/components/NotificationsList/NotificationListItem.jsx:70
|
||||||
|
msgid "Successful"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/index.jsx:206
|
||||||
msgid "System"
|
msgid "System"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/SystemSettings.jsx:17
|
#: src/pages/SystemSettings.jsx:19
|
||||||
msgid "System Settings"
|
msgid "System Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:189
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:28
|
||||||
#: src/pages/Organizations/components/OrganizationListItem.jsx:57
|
msgid "Team"
|
||||||
#: src/pages/Teams.jsx:17
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/OrganizationAccessItem.jsx:144
|
||||||
|
msgid "Team Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:169
|
||||||
|
#: src/index.jsx:154
|
||||||
|
#: src/pages/Organizations/Organizations.jsx:44
|
||||||
|
#: src/pages/Organizations/components/OrganizationListItem.jsx:99
|
||||||
|
#: src/pages/Organizations/screens/Organization/Organization.jsx:132
|
||||||
|
#: src/pages/Teams.jsx:19
|
||||||
msgid "Teams"
|
msgid "Teams"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:148
|
#: src/index.jsx:113
|
||||||
#: src/pages/Templates.jsx:17
|
#: src/pages/Templates.jsx:19
|
||||||
msgid "Templates"
|
msgid "Templates"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/util/validators.jsx:6
|
||||||
|
msgid "This field must not be blank"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/util/validators.jsx:16
|
||||||
|
msgid "This field must not exceed {max} characters"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/NotificationsList/NotificationListItem.jsx:90
|
||||||
|
#: src/components/NotificationsList/NotificationListItem.jsx:105
|
||||||
|
msgid "Toggle notification failure"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/NotificationsList/NotificationListItem.jsx:78
|
||||||
|
msgid "Toggle notification success"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/TowerLogo/TowerLogo.jsx:48
|
#: src/components/TowerLogo/TowerLogo.jsx:48
|
||||||
msgid "Tower Brand Image"
|
msgid "Tower Brand Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/PageHeaderToolbar.jsx:108
|
#: src/components/AnsibleSelect/AnsibleSelect.jsx:35
|
||||||
|
msgid "Use Default {label}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/DeleteRoleConfirmationModal.jsx:28
|
||||||
|
msgid "User"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PageHeaderToolbar.jsx:113
|
||||||
msgid "User Details"
|
msgid "User Details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:246
|
#: src/index.jsx:211
|
||||||
msgid "User Interface"
|
msgid "User Interface"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/UISettings.jsx:17
|
#: src/pages/UISettings.jsx:19
|
||||||
msgid "User Interface Settings"
|
msgid "User Interface Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Login.jsx:78
|
#: src/pages/Organizations/components/OrganizationAccessItem.jsx:122
|
||||||
|
msgid "User Roles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/AddRole/AddResourceRole.jsx:136
|
||||||
|
#: src/pages/Login.jsx:81
|
||||||
|
#: src/pages/Organizations/screens/Organization/OrganizationAccess.jsx:172
|
||||||
msgid "Username"
|
msgid "Username"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:184
|
#: src/components/AddRole/AddResourceRole.jsx:164
|
||||||
#: src/pages/Organizations/components/OrganizationListItem.jsx:49
|
#: src/index.jsx:149
|
||||||
#: src/pages/Users.jsx:17
|
#: src/pages/Users.jsx:19
|
||||||
msgid "Users"
|
msgid "Users"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/index.jsx:118
|
#: src/index.jsx:83
|
||||||
msgid "Views"
|
msgid "Views"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Login.jsx:74
|
#: src/pages/Login.jsx:76
|
||||||
msgid "Welcome to Ansible Tower! Please Sign In."
|
msgid "Welcome to Ansible Tower! Please Sign In."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:56
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:104
|
||||||
msgid "add {currentTab}"
|
msgid "You do not have permission to delete the following {0}: {itemsUnableToDelete}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/contexts/Network.jsx:44
|
||||||
|
msgid "You have been logged out."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:56
|
||||||
|
#~ msgid "add {currentTab}"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:45
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:45
|
||||||
msgid "adding {currentTab}"
|
#~ msgid "adding {currentTab}"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:158
|
||||||
|
msgid "cancel delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/ToolbarDeleteButton.jsx:150
|
||||||
|
msgid "confirm delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:38
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:38
|
||||||
msgid "confirm removal of {currentTab}/cancel and go back to {currentTab} view."
|
#~ msgid "confirm removal of {currentTab}/cancel and go back to {currentTab} view."
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:60
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:60
|
||||||
msgid "delete {currentTab}"
|
#~ msgid "delete {currentTab}"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:36
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:36
|
||||||
msgid "deleting {currentTab} association with orgs"
|
#~ msgid "deleting {currentTab} association with orgs"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationEdit.jsx:20
|
#: src/pages/Organizations/components/OrganizationEdit.jsx:20
|
||||||
msgid "edit view"
|
#~ msgid "edit view"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Lookup/Lookup.jsx:135
|
||||||
|
msgid "items"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/Pagination/Pagination.jsx:198
|
||||||
|
msgid "of {pageCount}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationEdit.jsx:22
|
#: src/pages/Organizations/components/OrganizationEdit.jsx:22
|
||||||
msgid "save/cancel and go back to view"
|
#~ msgid "save/cancel and go back to view"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:47
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:47
|
||||||
msgid "save/cancel and go back to {currentTab} view"
|
#~ msgid "save/cancel and go back to {currentTab} view"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationListItem.jsx:29
|
#: src/pages/Organizations/components/OrganizationListItem.jsx:29
|
||||||
msgid "select organization {itemId}"
|
#~ msgid "select organization {itemId}"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:82
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:82
|
||||||
msgid "{0}"
|
#~ msgid "{0}"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:153
|
||||||
|
#: src/components/PaginatedDataList/PaginatedDataList.jsx:215
|
||||||
|
msgid "{0} List"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/Organizations/components/OrganizationDetail.jsx:54
|
#: src/pages/Organizations/components/OrganizationDetail.jsx:54
|
||||||
msgid "{currentTab} detail view"
|
#~ msgid "{currentTab} detail view"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
#: src/components/Pagination/Pagination.jsx:163
|
#: src/components/Pagination/Pagination.jsx:163
|
||||||
msgid "{itemMin} - {itemMax} of {count}"
|
#~ msgid "{itemMin} - {itemMax} of {count}"
|
||||||
msgstr ""
|
#~ msgstr ""
|
||||||
|
|||||||
10
src/App.jsx
10
src/App.jsx
@@ -9,7 +9,7 @@ import {
|
|||||||
Button
|
Button
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
|
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
import { RootDialog } from './contexts/RootDialog';
|
import { RootDialog } from './contexts/RootDialog';
|
||||||
@@ -66,13 +66,11 @@ class App extends Component {
|
|||||||
render () {
|
render () {
|
||||||
const { isAboutModalOpen, isNavOpen } = this.state;
|
const { isAboutModalOpen, isNavOpen } = this.state;
|
||||||
|
|
||||||
const { render, routeGroups = [], navLabel = '' } = this.props;
|
const { render, routeGroups = [], navLabel = '', i18n } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Config>
|
<Config>
|
||||||
{({ ansible_version, version, me }) => (
|
{({ ansible_version, version, me }) => (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<RootDialog>
|
<RootDialog>
|
||||||
{({
|
{({
|
||||||
title,
|
title,
|
||||||
@@ -151,12 +149,10 @@ class App extends Component {
|
|||||||
)}
|
)}
|
||||||
</RootDialog>
|
</RootDialog>
|
||||||
)}
|
)}
|
||||||
</I18n>
|
|
||||||
)}
|
|
||||||
</Config>
|
</Config>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { App as _App };
|
export { App as _App };
|
||||||
export default withNetwork(App);
|
export default withI18n()(withNetwork(App));
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { Trans, t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
AboutModal,
|
AboutModal,
|
||||||
TextContent,
|
TextContent,
|
||||||
@@ -41,14 +41,13 @@ class About extends React.Component {
|
|||||||
ansible_version,
|
ansible_version,
|
||||||
version,
|
version,
|
||||||
isOpen,
|
isOpen,
|
||||||
onClose
|
onClose,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const speechBubble = this.createSpeechBubble(version);
|
const speechBubble = this.createSpeechBubble(version);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<AboutModal
|
<AboutModal
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
@@ -73,14 +72,12 @@ class About extends React.Component {
|
|||||||
<TextContent>
|
<TextContent>
|
||||||
<TextList component="dl">
|
<TextList component="dl">
|
||||||
<TextListItem component="dt">
|
<TextListItem component="dt">
|
||||||
<Trans>Ansible Version</Trans>
|
{i18n._(t`Ansible Version`)}
|
||||||
</TextListItem>
|
</TextListItem>
|
||||||
<TextListItem component="dd">{ ansible_version }</TextListItem>
|
<TextListItem component="dd">{ ansible_version }</TextListItem>
|
||||||
</TextList>
|
</TextList>
|
||||||
</TextContent>
|
</TextContent>
|
||||||
</AboutModal>
|
</AboutModal>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,4 +95,4 @@ About.defaultProps = {
|
|||||||
version: null,
|
version: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default About;
|
export default withI18n()(About);
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n, i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Wizard } from '@patternfly/react-core';
|
import { Wizard } from '@patternfly/react-core';
|
||||||
|
import { withNetwork } from '../../contexts/Network';
|
||||||
import SelectResourceStep from './SelectResourceStep';
|
import SelectResourceStep from './SelectResourceStep';
|
||||||
import SelectRoleStep from './SelectRoleStep';
|
import SelectRoleStep from './SelectRoleStep';
|
||||||
import SelectableCard from './SelectableCard';
|
import SelectableCard from './SelectableCard';
|
||||||
@@ -127,37 +128,36 @@ class AddResourceRole extends React.Component {
|
|||||||
} = this.state;
|
} = this.state;
|
||||||
const {
|
const {
|
||||||
onClose,
|
onClose,
|
||||||
roles
|
roles,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const userColumns = [
|
const userColumns = [
|
||||||
{ name: i18nMark('Username'), key: 'username', isSortable: true }
|
{ name: i18n._(t`Username`), key: 'username', isSortable: true }
|
||||||
];
|
];
|
||||||
|
|
||||||
const teamColumns = [
|
const teamColumns = [
|
||||||
{ name: i18nMark('Name'), key: 'name', isSortable: true }
|
{ name: i18n._(t`Name`), key: 'name', isSortable: true }
|
||||||
];
|
];
|
||||||
|
|
||||||
let wizardTitle = '';
|
let wizardTitle = '';
|
||||||
|
|
||||||
switch (selectedResource) {
|
switch (selectedResource) {
|
||||||
case 'users':
|
case 'users':
|
||||||
wizardTitle = i18nMark('Add User Roles');
|
wizardTitle = i18n._(t`Add User Roles`);
|
||||||
break;
|
break;
|
||||||
case 'teams':
|
case 'teams':
|
||||||
wizardTitle = i18nMark('Add Team Roles');
|
wizardTitle = i18n._(t`Add Team Roles`);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wizardTitle = i18nMark('Add Roles');
|
wizardTitle = i18n._(t`Add Roles`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const steps = [
|
const steps = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: i18nMark('Select Users Or Teams'),
|
name: i18n._(t`Select Users Or Teams`),
|
||||||
component: (
|
component: (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<div style={{ display: 'flex' }}>
|
<div style={{ display: 'flex' }}>
|
||||||
<SelectableCard
|
<SelectableCard
|
||||||
isSelected={selectedResource === 'users'}
|
isSelected={selectedResource === 'users'}
|
||||||
@@ -170,17 +170,13 @@ class AddResourceRole extends React.Component {
|
|||||||
onClick={() => this.handleResourceSelect('teams')}
|
onClick={() => this.handleResourceSelect('teams')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
),
|
),
|
||||||
enableNext: selectedResource !== null
|
enableNext: selectedResource !== null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: i18nMark('Select items from list'),
|
name: i18n._(t`Select items from list`),
|
||||||
component: (
|
component: (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{selectedResource === 'users' && (
|
{selectedResource === 'users' && (
|
||||||
<SelectResourceStep
|
<SelectResourceStep
|
||||||
@@ -205,17 +201,13 @@ class AddResourceRole extends React.Component {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
),
|
),
|
||||||
enableNext: selectedResourceRows.length > 0
|
enableNext: selectedResourceRows.length > 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: i18nMark('Apply roles'),
|
name: i18n._(t`Apply roles`),
|
||||||
component: (
|
component: (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<SelectRoleStep
|
<SelectRoleStep
|
||||||
onRolesClick={this.handleRoleCheckboxClick}
|
onRolesClick={this.handleRoleCheckboxClick}
|
||||||
roles={roles}
|
roles={roles}
|
||||||
@@ -224,16 +216,15 @@ class AddResourceRole extends React.Component {
|
|||||||
selectedResourceRows={selectedResourceRows}
|
selectedResourceRows={selectedResourceRows}
|
||||||
selectedRoleRows={selectedRoleRows}
|
selectedRoleRows={selectedRoleRows}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
),
|
),
|
||||||
nextButtonText: i18nMark('Save'),
|
nextButtonText: i18n._(t`Save`),
|
||||||
enableNext: selectedRoleRows.length > 0
|
enableNext: selectedRoleRows.length > 0
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const currentStep = steps.find(step => step.id === currentStepId);
|
const currentStep = steps.find(step => step.id === currentStepId);
|
||||||
|
|
||||||
|
// TODO: somehow internationalize steps and currentStep.nextButtonText
|
||||||
return (
|
return (
|
||||||
<Wizard
|
<Wizard
|
||||||
style={{ overflow: 'scroll' }}
|
style={{ overflow: 'scroll' }}
|
||||||
@@ -259,4 +250,5 @@ AddResourceRole.defaultProps = {
|
|||||||
roles: {}
|
roles: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AddResourceRole;
|
export { AddResourceRole as _AddResourceRole };
|
||||||
|
export default withI18n()(withNetwork(AddResourceRole));
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import PaginatedDataList from '../PaginatedDataList';
|
import PaginatedDataList from '../PaginatedDataList';
|
||||||
import CheckboxListItem from '../ListItem';
|
import CheckboxListItem from '../ListItem';
|
||||||
import SelectedList from '../SelectedList';
|
import SelectedList from '../SelectedList';
|
||||||
@@ -87,11 +88,12 @@ class SelectResourceStep extends React.Component {
|
|||||||
selectedLabel,
|
selectedLabel,
|
||||||
selectedResourceRows,
|
selectedResourceRows,
|
||||||
itemName,
|
itemName,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{isLoading && (<div>Loading...</div>)}
|
{isLoading && (<div>{i18n._(t`Loading...`)}</div>)}
|
||||||
{isInitialized && (
|
{isInitialized && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{selectedResourceRows.length > 0 && (
|
{selectedResourceRows.length > 0 && (
|
||||||
@@ -146,11 +148,11 @@ SelectResourceStep.propTypes = {
|
|||||||
SelectResourceStep.defaultProps = {
|
SelectResourceStep.defaultProps = {
|
||||||
displayKey: 'name',
|
displayKey: 'name',
|
||||||
onRowClick: () => {},
|
onRowClick: () => {},
|
||||||
selectedLabel: i18nMark('Selected Items'),
|
selectedLabel: null,
|
||||||
selectedResourceRows: [],
|
selectedResourceRows: [],
|
||||||
sortedColumnKey: 'name',
|
sortedColumnKey: 'name',
|
||||||
itemName: 'item',
|
itemName: 'item',
|
||||||
};
|
};
|
||||||
|
|
||||||
export { SelectResourceStep as _SelectResourceStep };
|
export { SelectResourceStep as _SelectResourceStep };
|
||||||
export default withRouter(SelectResourceStep);
|
export default withI18n()(withRouter(SelectResourceStep));
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import { i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
import CheckboxCard from './CheckboxCard';
|
import CheckboxCard from './CheckboxCard';
|
||||||
import SelectedList from '../SelectedList';
|
import SelectedList from '../SelectedList';
|
||||||
@@ -14,7 +15,8 @@ class RolesStep extends React.Component {
|
|||||||
selectedListKey,
|
selectedListKey,
|
||||||
selectedListLabel,
|
selectedListLabel,
|
||||||
selectedResourceRows,
|
selectedResourceRows,
|
||||||
selectedRoleRows
|
selectedRoleRows,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -24,7 +26,7 @@ class RolesStep extends React.Component {
|
|||||||
<SelectedList
|
<SelectedList
|
||||||
displayKey={selectedListKey}
|
displayKey={selectedListKey}
|
||||||
isReadOnly
|
isReadOnly
|
||||||
label={selectedListLabel}
|
label={selectedListLabel || i18n._(t`Selected`)}
|
||||||
selected={selectedResourceRows}
|
selected={selectedResourceRows}
|
||||||
showOverflowAfter={5}
|
showOverflowAfter={5}
|
||||||
/>
|
/>
|
||||||
@@ -61,9 +63,9 @@ RolesStep.propTypes = {
|
|||||||
RolesStep.defaultProps = {
|
RolesStep.defaultProps = {
|
||||||
onRolesClick: () => {},
|
onRolesClick: () => {},
|
||||||
selectedListKey: 'name',
|
selectedListKey: 'name',
|
||||||
selectedListLabel: i18nMark('Selected'),
|
selectedListLabel: null,
|
||||||
selectedResourceRows: [],
|
selectedResourceRows: [],
|
||||||
selectedRoleRows: []
|
selectedRoleRows: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RolesStep;
|
export default withI18n()(RolesStep);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
FormSelect,
|
FormSelect,
|
||||||
@@ -20,10 +20,8 @@ class AnsibleSelect extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { label, value, data, defaultSelected } = this.props;
|
const { label, value, data, defaultSelected, i18n } = this.props;
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<FormSelect
|
<FormSelect
|
||||||
value={value}
|
value={value}
|
||||||
onChange={this.onSelectChange}
|
onChange={this.onSelectChange}
|
||||||
@@ -41,8 +39,6 @@ class AnsibleSelect extends React.Component {
|
|||||||
)
|
)
|
||||||
))}
|
))}
|
||||||
</FormSelect>
|
</FormSelect>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,4 +58,5 @@ AnsibleSelect.propTypes = {
|
|||||||
value: PropTypes.string.isRequired,
|
value: PropTypes.string.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AnsibleSelect;
|
export { AnsibleSelect as _AnsibleSelect };
|
||||||
|
export default withI18n()(AnsibleSelect);
|
||||||
|
|||||||
@@ -3,14 +3,12 @@ import { string } from 'prop-types';
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { Button } from '@patternfly/react-core';
|
import { Button } from '@patternfly/react-core';
|
||||||
import { TimesIcon } from '@patternfly/react-icons';
|
import { TimesIcon } from '@patternfly/react-icons';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
function CardCloseButton ({ linkTo, ...props }) {
|
function CardCloseButton ({ linkTo, i18n, i18nHash, ...props }) {
|
||||||
if (linkTo) {
|
if (linkTo) {
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Link
|
<Link
|
||||||
className="pf-c-button pf-c-card__close"
|
className="pf-c-button pf-c-card__close"
|
||||||
aria-label={i18n._(t`Close`)}
|
aria-label={i18n._(t`Close`)}
|
||||||
@@ -20,13 +18,9 @@ function CardCloseButton ({ linkTo, ...props }) {
|
|||||||
>
|
>
|
||||||
<TimesIcon />
|
<TimesIcon />
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Button
|
<Button
|
||||||
variant="plain"
|
variant="plain"
|
||||||
className="pf-c-card__close"
|
className="pf-c-card__close"
|
||||||
@@ -35,8 +29,6 @@ function CardCloseButton ({ linkTo, ...props }) {
|
|||||||
>
|
>
|
||||||
<TimesIcon />
|
<TimesIcon />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
CardCloseButton.propTypes = {
|
CardCloseButton.propTypes = {
|
||||||
@@ -46,4 +38,4 @@ CardCloseButton.defaultProps = {
|
|||||||
linkTo: null,
|
linkTo: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CardCloseButton;
|
export default withI18n()(CardCloseButton);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Checkbox,
|
Checkbox,
|
||||||
@@ -85,12 +85,11 @@ class DataListToolbar extends React.Component {
|
|||||||
sortOrder,
|
sortOrder,
|
||||||
sortedColumnKey,
|
sortedColumnKey,
|
||||||
additionalControls,
|
additionalControls,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const showExpandCollapse = (onCompact && onExpand);
|
const showExpandCollapse = (onCompact && onExpand);
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<AWXToolbar>
|
<AWXToolbar>
|
||||||
<Toolbar marginleft={noLeftMargin ? 1 : 0}>
|
<Toolbar marginleft={noLeftMargin ? 1 : 0}>
|
||||||
<ColumnLeft>
|
<ColumnLeft>
|
||||||
@@ -146,9 +145,6 @@ class DataListToolbar extends React.Component {
|
|||||||
</ColumnRight>
|
</ColumnRight>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AWXToolbar>
|
</AWXToolbar>
|
||||||
|
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,4 +180,4 @@ DataListToolbar.defaultProps = {
|
|||||||
additionalControls: [],
|
additionalControls: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default DataListToolbar;
|
export default withI18n()(DataListToolbar);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -22,12 +22,11 @@ class ExpandCollapse extends React.Component {
|
|||||||
const {
|
const {
|
||||||
onCompact,
|
onCompact,
|
||||||
onExpand,
|
onExpand,
|
||||||
isCompact
|
isCompact,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<ToolbarItem>
|
<ToolbarItem>
|
||||||
<Button
|
<Button
|
||||||
@@ -50,8 +49,6 @@ class ExpandCollapse extends React.Component {
|
|||||||
</Button>
|
</Button>
|
||||||
</ToolbarItem>
|
</ToolbarItem>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -64,4 +61,4 @@ ExpandCollapse.propTypes = {
|
|||||||
|
|
||||||
ExpandCollapse.defaultProps = {};
|
ExpandCollapse.defaultProps = {};
|
||||||
|
|
||||||
export default ExpandCollapse;
|
export default withI18n()(ExpandCollapse);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
ActionGroup,
|
ActionGroup,
|
||||||
@@ -20,9 +20,7 @@ const buttonGroupStyle = {
|
|||||||
marginRight: '20px'
|
marginRight: '20px'
|
||||||
};
|
};
|
||||||
|
|
||||||
const FormActionGroup = ({ onSubmit, submitDisabled, onCancel }) => (
|
const FormActionGroup = ({ onSubmit, submitDisabled, onCancel, i18n }) => (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<ActionGroup style={formActionGroupStyle}>
|
<ActionGroup style={formActionGroupStyle}>
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<ToolbarGroup style={buttonGroupStyle}>
|
<ToolbarGroup style={buttonGroupStyle}>
|
||||||
@@ -33,8 +31,6 @@ const FormActionGroup = ({ onSubmit, submitDisabled, onCancel }) => (
|
|||||||
</ToolbarGroup>
|
</ToolbarGroup>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</ActionGroup>
|
</ActionGroup>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
FormActionGroup.propTypes = {
|
FormActionGroup.propTypes = {
|
||||||
@@ -47,4 +43,4 @@ FormActionGroup.defaultProps = {
|
|||||||
submitDisabled: false,
|
submitDisabled: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default FormActionGroup;
|
export default withI18n()(FormActionGroup);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
InputGroup,
|
InputGroup,
|
||||||
Modal,
|
Modal,
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
import { withNetwork } from '../../contexts/Network';
|
import { withNetwork } from '../../contexts/Network';
|
||||||
@@ -130,7 +130,9 @@ class Lookup extends React.Component {
|
|||||||
results,
|
results,
|
||||||
count,
|
count,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { id, lookupHeader = 'items', value, columns } = this.props;
|
const { id, lookupHeader, value, columns, i18n } = this.props;
|
||||||
|
|
||||||
|
const header = lookupHeader || i18n._(t`items`);
|
||||||
|
|
||||||
const chips = value ? (
|
const chips = value ? (
|
||||||
<div className="pf-c-chip-group">
|
<div className="pf-c-chip-group">
|
||||||
@@ -143,8 +145,6 @@ class Lookup extends React.Component {
|
|||||||
) : null;
|
) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<InputGroup className="awx-lookup">
|
<InputGroup className="awx-lookup">
|
||||||
<Button
|
<Button
|
||||||
@@ -161,7 +161,7 @@ class Lookup extends React.Component {
|
|||||||
</InputGroup>
|
</InputGroup>
|
||||||
<Modal
|
<Modal
|
||||||
className="awx-c-modal"
|
className="awx-c-modal"
|
||||||
title={`Select ${lookupHeader}`}
|
title={i18n._(t`Select ${header}`)}
|
||||||
isOpen={isModalOpen}
|
isOpen={isModalOpen}
|
||||||
onClose={this.handleModalToggle}
|
onClose={this.handleModalToggle}
|
||||||
actions={[
|
actions={[
|
||||||
@@ -199,8 +199,6 @@ class Lookup extends React.Component {
|
|||||||
{ error ? <div>error</div> : '' }
|
{ error ? <div>error</div> : '' }
|
||||||
</Modal>
|
</Modal>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -217,9 +215,9 @@ Lookup.propTypes = {
|
|||||||
|
|
||||||
Lookup.defaultProps = {
|
Lookup.defaultProps = {
|
||||||
id: 'lookup-search',
|
id: 'lookup-search',
|
||||||
lookupHeader: 'items',
|
lookupHeader: null,
|
||||||
name: null,
|
name: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { Lookup as _Lookup };
|
export { Lookup as _Lookup };
|
||||||
export default withNetwork(withRouter(Lookup));
|
export default withI18n()(withNetwork(withRouter(Lookup)));
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shape, number, string, bool, func } from 'prop-types';
|
import { shape, number, string, bool, func } from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import {
|
import {
|
||||||
@@ -37,12 +37,11 @@ function NotificationListItem (props) {
|
|||||||
detailUrl,
|
detailUrl,
|
||||||
successTurnedOn,
|
successTurnedOn,
|
||||||
errorTurnedOn,
|
errorTurnedOn,
|
||||||
toggleNotification
|
toggleNotification,
|
||||||
|
i18n
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<DataListItem
|
<DataListItem
|
||||||
aria-labelledby={`items-list-item-${notification.id}`}
|
aria-labelledby={`items-list-item-${notification.id}`}
|
||||||
key={notification.id}
|
key={notification.id}
|
||||||
@@ -95,8 +94,6 @@ function NotificationListItem (props) {
|
|||||||
/>
|
/>
|
||||||
</DataListItemRow>
|
</DataListItemRow>
|
||||||
</DataListItem>
|
</DataListItem>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,4 +115,4 @@ NotificationListItem.defaultProps = {
|
|||||||
successTurnedOn: false,
|
successTurnedOn: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default NotificationListItem;
|
export default withI18n()(NotificationListItem);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
|
|
||||||
import { Redirect, withRouter } from 'react-router-dom';
|
import { Redirect, withRouter } from 'react-router-dom';
|
||||||
|
import { withI18n } from '@lingui/react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
import { withRootDialog } from '../contexts/RootDialog';
|
import { withRootDialog } from '../contexts/RootDialog';
|
||||||
|
|
||||||
@@ -14,16 +14,13 @@ const NotifyAndRedirect = ({
|
|||||||
strict,
|
strict,
|
||||||
sensitive,
|
sensitive,
|
||||||
setRootDialogMessage,
|
setRootDialogMessage,
|
||||||
location
|
location,
|
||||||
|
i18n
|
||||||
}) => {
|
}) => {
|
||||||
setRootDialogMessage({
|
setRootDialogMessage({
|
||||||
title: '404',
|
title: '404',
|
||||||
bodyText: (
|
bodyText: (
|
||||||
<Trans>
|
<Fragment>{i18n._(t`Cannot find route ${(<strong>{location.pathname}</strong>)}.`)}</Fragment>
|
||||||
Cannot find route
|
|
||||||
<strong>{` ${location.pathname}`}</strong>
|
|
||||||
.
|
|
||||||
</Trans>
|
|
||||||
),
|
),
|
||||||
variant: 'warning'
|
variant: 'warning'
|
||||||
});
|
});
|
||||||
@@ -41,4 +38,4 @@ const NotifyAndRedirect = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
export { NotifyAndRedirect as _NotifyAndRedirect };
|
export { NotifyAndRedirect as _NotifyAndRedirect };
|
||||||
export default withRootDialog(withRouter(NotifyAndRedirect));
|
export default withI18n()(withRootDialog(withRouter(NotifyAndRedirect)));
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { I18n } from '@lingui/react';
|
|
||||||
import {
|
import {
|
||||||
Dropdown,
|
Dropdown,
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
@@ -57,12 +56,11 @@ class PageHeaderToolbar extends Component {
|
|||||||
isAboutDisabled,
|
isAboutDisabled,
|
||||||
onAboutClick,
|
onAboutClick,
|
||||||
onLogoutClick,
|
onLogoutClick,
|
||||||
loggedInUser
|
loggedInUser,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<ToolbarGroup>
|
<ToolbarGroup>
|
||||||
<Tooltip position="left" content={<div>{i18n._(t`Info`)}</div>}>
|
<Tooltip position="left" content={<div>{i18n._(t`Info`)}</div>}>
|
||||||
@@ -127,8 +125,6 @@ class PageHeaderToolbar extends Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</ToolbarGroup>
|
</ToolbarGroup>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,4 +139,4 @@ PageHeaderToolbar.defaultProps = {
|
|||||||
isAboutDisabled: false
|
isAboutDisabled: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PageHeaderToolbar;
|
export default withI18n()(PageHeaderToolbar);
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import {
|
|||||||
EmptyStateBody,
|
EmptyStateBody,
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
import { CubesIcon } from '@patternfly/react-icons';
|
import { CubesIcon } from '@patternfly/react-icons';
|
||||||
import { I18n, i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { Trans, t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { withRouter, Link } from 'react-router-dom';
|
import { withRouter, Link } from 'react-router-dom';
|
||||||
|
|
||||||
import Pagination from '../Pagination';
|
import Pagination from '../Pagination';
|
||||||
@@ -108,13 +108,15 @@ class PaginatedDataList extends React.Component {
|
|||||||
showPageSizeOptions,
|
showPageSizeOptions,
|
||||||
paginationStyling,
|
paginationStyling,
|
||||||
location,
|
location,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { error } = this.state;
|
const { error } = this.state;
|
||||||
const [orderBy, sortOrder] = this.getSortOrder();
|
const [orderBy, sortOrder] = this.getSortOrder();
|
||||||
const queryParams = parseNamespacedQueryString(qsConfig, location.search);
|
const queryParams = parseNamespacedQueryString(qsConfig, location.search);
|
||||||
|
const columns = toolbarColumns.length ? toolbarColumns : [{ name: i18n._(t`Name`), key: 'name', isSortable: true }];
|
||||||
return (
|
return (
|
||||||
<I18n>
|
<Fragment>
|
||||||
{({ i18n }) => (
|
{error && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{error && (
|
{error && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@@ -128,24 +130,10 @@ class PaginatedDataList extends React.Component {
|
|||||||
<EmptyState>
|
<EmptyState>
|
||||||
<EmptyStateIcon icon={CubesIcon} />
|
<EmptyStateIcon icon={CubesIcon} />
|
||||||
<Title size="lg">
|
<Title size="lg">
|
||||||
<Trans>
|
{i18n._(t`No ${ucFirst(itemNamePlural || pluralize(itemName))} Found`)}
|
||||||
No
|
|
||||||
{' '}
|
|
||||||
{ucFirst(itemNamePlural || pluralize(itemName))}
|
|
||||||
{' '}
|
|
||||||
Found
|
|
||||||
</Trans>
|
|
||||||
</Title>
|
</Title>
|
||||||
<EmptyStateBody>
|
<EmptyStateBody>
|
||||||
<Trans>
|
{i18n._(t`Please add ${getArticle(itemName)} ${itemName} to populate this list`)}
|
||||||
Please add
|
|
||||||
{' '}
|
|
||||||
{getArticle(itemName)}
|
|
||||||
{' '}
|
|
||||||
{itemName}
|
|
||||||
{' '}
|
|
||||||
to populate this list
|
|
||||||
</Trans>
|
|
||||||
</EmptyStateBody>
|
</EmptyStateBody>
|
||||||
</EmptyState>
|
</EmptyState>
|
||||||
) : (
|
) : (
|
||||||
@@ -153,7 +141,7 @@ class PaginatedDataList extends React.Component {
|
|||||||
<DataListToolbar
|
<DataListToolbar
|
||||||
sortedColumnKey={orderBy}
|
sortedColumnKey={orderBy}
|
||||||
sortOrder={sortOrder}
|
sortOrder={sortOrder}
|
||||||
columns={toolbarColumns}
|
columns={columns}
|
||||||
onSearch={() => { }}
|
onSearch={() => { }}
|
||||||
onSort={this.handleSort}
|
onSort={this.handleSort}
|
||||||
showSelectAll={showSelectAll}
|
showSelectAll={showSelectAll}
|
||||||
@@ -199,9 +187,67 @@ class PaginatedDataList extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
|
</Fragment> // TODO: replace with proper error handling
|
||||||
|
)}
|
||||||
|
{items.length === 0 ? (
|
||||||
|
<EmptyState>
|
||||||
|
<EmptyStateIcon icon={CubesIcon} />
|
||||||
|
<Title size="lg">
|
||||||
|
{i18n._(t`No ${ucFirst(itemNamePlural || pluralize(itemName))} Found`)}
|
||||||
|
</Title>
|
||||||
|
<EmptyStateBody>
|
||||||
|
{i18n._(t`Please add ${getArticle(itemName)} ${itemName} to populate this list`)}
|
||||||
|
</EmptyStateBody>
|
||||||
|
</EmptyState>
|
||||||
|
) : (
|
||||||
|
<Fragment>
|
||||||
|
<DataListToolbar
|
||||||
|
sortedColumnKey={orderBy}
|
||||||
|
sortOrder={sortOrder}
|
||||||
|
columns={columns}
|
||||||
|
onSearch={() => { }}
|
||||||
|
onSort={this.handleSort}
|
||||||
|
showSelectAll={showSelectAll}
|
||||||
|
isAllSelected={isAllSelected}
|
||||||
|
onSelectAll={onSelectAll}
|
||||||
|
additionalControls={additionalControls}
|
||||||
|
/>
|
||||||
|
<DataList aria-label={i18n._(t`${ucFirst(pluralize(itemName))} List`)}>
|
||||||
|
{items.map(item => (renderItem ? renderItem(item) : (
|
||||||
|
<DataListItem
|
||||||
|
aria-labelledby={`items-list-item-${item.id}`}
|
||||||
|
key={item.id}
|
||||||
|
>
|
||||||
|
<DataListItemRow>
|
||||||
|
<DataListItemCells dataListCells={[
|
||||||
|
<DataListCell key="team-name">
|
||||||
|
<TextContent style={detailWrapperStyle}>
|
||||||
|
<Link to={{ pathname: item.url }}>
|
||||||
|
<Text
|
||||||
|
id={`items-list-item-${item.id}`}
|
||||||
|
style={detailLabelStyle}
|
||||||
|
>
|
||||||
|
{item.name}
|
||||||
|
</Text>
|
||||||
|
</Link>
|
||||||
|
</TextContent>
|
||||||
|
</DataListCell>
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</DataListItemRow>
|
||||||
|
</DataListItem>
|
||||||
|
)))}
|
||||||
|
</DataList>
|
||||||
|
<Pagination
|
||||||
|
count={itemCount}
|
||||||
|
page={queryParams.page}
|
||||||
|
pageCount={this.getPageCount()}
|
||||||
|
page_size={queryParams.page_size}
|
||||||
|
onSetPage={this.handleSetPage}
|
||||||
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
</I18n>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,9 +281,7 @@ PaginatedDataList.propTypes = {
|
|||||||
|
|
||||||
PaginatedDataList.defaultProps = {
|
PaginatedDataList.defaultProps = {
|
||||||
renderItem: null,
|
renderItem: null,
|
||||||
toolbarColumns: [
|
toolbarColumns: [],
|
||||||
{ name: i18nMark('Name'), key: 'name', isSortable: true },
|
|
||||||
],
|
|
||||||
additionalControls: [],
|
additionalControls: [],
|
||||||
itemName: 'item',
|
itemName: 'item',
|
||||||
itemNamePlural: '',
|
itemNamePlural: '',
|
||||||
@@ -250,4 +294,4 @@ PaginatedDataList.defaultProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export { PaginatedDataList as _PaginatedDataList };
|
export { PaginatedDataList as _PaginatedDataList };
|
||||||
export default withRouter(PaginatedDataList);
|
export default withI18n()(withRouter(PaginatedDataList));
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { string, func } from 'prop-types';
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { Button as PFButton } from '@patternfly/react-core';
|
import { Button as PFButton } from '@patternfly/react-core';
|
||||||
import { PlusIcon } from '@patternfly/react-icons';
|
import { PlusIcon } from '@patternfly/react-icons';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
@@ -20,15 +20,13 @@ const Button = styled(PFButton)`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
function ToolbarAddButton ({ linkTo, onClick }) {
|
function ToolbarAddButton ({ linkTo, onClick, i18n }) {
|
||||||
if (!linkTo && !onClick) {
|
if (!linkTo && !onClick) {
|
||||||
throw new Error('ToolbarAddButton requires either `linkTo` or `onClick` prop');
|
throw new Error('ToolbarAddButton requires either `linkTo` or `onClick` prop');
|
||||||
}
|
}
|
||||||
if (linkTo) {
|
if (linkTo) {
|
||||||
// TODO: This should only be a <Link> (no <Button>) but CSS is off
|
// TODO: This should only be a <Link> (no <Button>) but CSS is off
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Link to={linkTo}>
|
<Link to={linkTo}>
|
||||||
<Button
|
<Button
|
||||||
variant="primary"
|
variant="primary"
|
||||||
@@ -37,13 +35,10 @@ function ToolbarAddButton ({ linkTo, onClick }) {
|
|||||||
<PlusIcon />
|
<PlusIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Button
|
<Button
|
||||||
variant="primary"
|
variant="primary"
|
||||||
aria-label={i18n._(t`Add`)}
|
aria-label={i18n._(t`Add`)}
|
||||||
@@ -51,8 +46,6 @@ function ToolbarAddButton ({ linkTo, onClick }) {
|
|||||||
>
|
>
|
||||||
<PlusIcon />
|
<PlusIcon />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
ToolbarAddButton.propTypes = {
|
ToolbarAddButton.propTypes = {
|
||||||
@@ -64,4 +57,4 @@ ToolbarAddButton.defaultProps = {
|
|||||||
onClick: null
|
onClick: null
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ToolbarAddButton;
|
export default withI18n()(ToolbarAddButton);
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import React, { Fragment } from 'react';
|
|||||||
import { func, bool, number, string, arrayOf, shape } from 'prop-types';
|
import { func, bool, number, string, arrayOf, shape } from 'prop-types';
|
||||||
import { Button as PFButton, Tooltip } from '@patternfly/react-core';
|
import { Button as PFButton, Tooltip } from '@patternfly/react-core';
|
||||||
import { TrashAltIcon } from '@patternfly/react-icons';
|
import { TrashAltIcon } from '@patternfly/react-icons';
|
||||||
import { I18n, i18nMark } from '@lingui/react';
|
|
||||||
import { Trans, t } from '@lingui/macro';
|
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import AlertModal from '../AlertModal';
|
import AlertModal from '../AlertModal';
|
||||||
import { pluralize } from '../../util/strings';
|
import { pluralize } from '../../util/strings';
|
||||||
|
|
||||||
@@ -89,55 +89,49 @@ class ToolbarDeleteButton extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderTooltip () {
|
renderTooltip () {
|
||||||
const { itemsToDelete, itemName } = this.props;
|
const { itemsToDelete, itemName, i18n } = this.props;
|
||||||
if (itemsToDelete.some(cannotDelete)) {
|
|
||||||
return (
|
const itemsUnableToDelete = itemsToDelete
|
||||||
<div>
|
|
||||||
<Trans>
|
|
||||||
You dont have permission to delete the following
|
|
||||||
{' '}
|
|
||||||
{pluralize(itemName)}
|
|
||||||
:
|
|
||||||
</Trans>
|
|
||||||
{itemsToDelete
|
|
||||||
.filter(cannotDelete)
|
.filter(cannotDelete)
|
||||||
.map(item => (
|
.map(item => (
|
||||||
<div key={item.id}>
|
<div key={item.id}>
|
||||||
{item.name}
|
{item.name}
|
||||||
</div>
|
</div>
|
||||||
))
|
));
|
||||||
}
|
if (itemsToDelete.some(cannotDelete)) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{i18n._(t`You do not have permission to delete the following ${pluralize(itemName)}: ${itemsUnableToDelete}`)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (itemsToDelete.length) {
|
if (itemsToDelete.length) {
|
||||||
return i18nMark('Delete');
|
return i18n._(t`Delete`);
|
||||||
}
|
}
|
||||||
return i18nMark('Select a row to delete');
|
return i18n._(t`Select a row to delete`);
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { itemsToDelete, itemName } = this.props;
|
const { itemsToDelete, itemName, i18n } = this.props;
|
||||||
const { isModalOpen } = this.state;
|
const { isModalOpen } = this.state;
|
||||||
|
|
||||||
const isDisabled = itemsToDelete.length === 0
|
const isDisabled = itemsToDelete.length === 0
|
||||||
|| itemsToDelete.some(cannotDelete);
|
|| itemsToDelete.some(cannotDelete);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={this.renderTooltip()}
|
content={this.renderTooltip()}
|
||||||
position="left"
|
position="left"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
className="awx-ToolBarBtn"
|
||||||
variant="plain"
|
variant="plain"
|
||||||
aria-label={i18n._(t`Delete`)}
|
aria-label={i18n._(t`Delete`)}
|
||||||
onClick={this.handleConfirmDelete}
|
onClick={this.handleConfirmDelete}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
>
|
>
|
||||||
<TrashAltIcon />
|
<TrashAltIcon className="awx-ToolBarTrashCanIcon" />
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{ isModalOpen && (
|
{ isModalOpen && (
|
||||||
@@ -182,10 +176,8 @@ class ToolbarDeleteButton extends React.Component {
|
|||||||
</AlertModal>
|
</AlertModal>
|
||||||
)}
|
)}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ToolbarDeleteButton;
|
export default withI18n()(ToolbarDeleteButton);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { Trans, t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Dropdown,
|
Dropdown,
|
||||||
@@ -106,7 +106,8 @@ class Pagination extends Component {
|
|||||||
page_size,
|
page_size,
|
||||||
pageSizeOptions,
|
pageSizeOptions,
|
||||||
showPageSizeOptions,
|
showPageSizeOptions,
|
||||||
style
|
style,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { value, isOpen } = this.state;
|
const { value, isOpen } = this.state;
|
||||||
let opts = [];
|
let opts = [];
|
||||||
@@ -135,12 +136,10 @@ class Pagination extends Component {
|
|||||||
));
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<div className="awx-pagination" style={style}>
|
<div className="awx-pagination" style={style}>
|
||||||
{showPageSizeOptions && (
|
{showPageSizeOptions && (
|
||||||
<div className="awx-pagination__page-size-selection">
|
<div className="awx-pagination__page-size-selection">
|
||||||
<Trans>Items Per Page</Trans>
|
{i18n._(t`Items Per Page`)}
|
||||||
<Dropdown
|
<Dropdown
|
||||||
onToggle={this.onTogglePageSize}
|
onToggle={this.onTogglePageSize}
|
||||||
onSelect={this.onSelectPageSize}
|
onSelect={this.onSelectPageSize}
|
||||||
@@ -160,7 +159,7 @@ class Pagination extends Component {
|
|||||||
)}
|
)}
|
||||||
<div className="awx-pagination__counts">
|
<div className="awx-pagination__counts">
|
||||||
<div className="awx-pagination__item-count">
|
<div className="awx-pagination__item-count">
|
||||||
<Trans>{`Items ${itemMin} – ${itemMax} of ${count}`}</Trans>
|
{i18n._(t`Items ${itemMin} – ${itemMax} of ${count}`)}
|
||||||
</div>
|
</div>
|
||||||
{pageCount !== 1 && (
|
{pageCount !== 1 && (
|
||||||
<div className="awx-pagination__page-count">
|
<div className="awx-pagination__page-count">
|
||||||
@@ -188,8 +187,7 @@ class Pagination extends Component {
|
|||||||
className="awx-pagination__page-input-form"
|
className="awx-pagination__page-input-form"
|
||||||
onSubmit={this.onSubmit}
|
onSubmit={this.onSubmit}
|
||||||
>
|
>
|
||||||
<Trans>
|
{i18n._(t`Page `)}
|
||||||
{'Page '}
|
|
||||||
<TextInput
|
<TextInput
|
||||||
className="awx-pagination__page-input"
|
className="awx-pagination__page-input"
|
||||||
aria-label={i18n._(t`Page Number`)}
|
aria-label={i18n._(t`Page Number`)}
|
||||||
@@ -197,9 +195,7 @@ class Pagination extends Component {
|
|||||||
type="text"
|
type="text"
|
||||||
onChange={this.onPageChange}
|
onChange={this.onPageChange}
|
||||||
/>
|
/>
|
||||||
{' of '}
|
{i18n._(t` of ${pageCount}`)}
|
||||||
{pageCount}
|
|
||||||
</Trans>
|
|
||||||
</form>
|
</form>
|
||||||
<div className="pf-c-input-group">
|
<div className="pf-c-input-group">
|
||||||
<Button
|
<Button
|
||||||
@@ -225,8 +221,6 @@ class Pagination extends Component {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,4 +242,4 @@ Pagination.defaultProps = {
|
|||||||
showPageSizeOptions: true
|
showPageSizeOptions: true
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Pagination;
|
export default withI18n()(Pagination);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Button as PFButton,
|
Button as PFButton,
|
||||||
@@ -90,7 +90,8 @@ class Search extends React.Component {
|
|||||||
render () {
|
render () {
|
||||||
const { up } = DropdownPosition;
|
const { up } = DropdownPosition;
|
||||||
const {
|
const {
|
||||||
columns
|
columns,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const {
|
const {
|
||||||
isSearchDropdownOpen,
|
isSearchDropdownOpen,
|
||||||
@@ -109,8 +110,6 @@ class Search extends React.Component {
|
|||||||
));
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<div className="pf-c-input-group">
|
<div className="pf-c-input-group">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
onToggle={this.handleDropdownToggle}
|
onToggle={this.handleDropdownToggle}
|
||||||
@@ -129,7 +128,7 @@ class Search extends React.Component {
|
|||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
type="search"
|
type="search"
|
||||||
aria-label="Search text input"
|
aria-label={i18n._(t`Search text input`)}
|
||||||
value={searchValue}
|
value={searchValue}
|
||||||
onChange={this.handleSearchInputChange}
|
onChange={this.handleSearchInputChange}
|
||||||
style={{ height: '30px' }}
|
style={{ height: '30px' }}
|
||||||
@@ -142,8 +141,6 @@ class Search extends React.Component {
|
|||||||
<SearchIcon />
|
<SearchIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,4 +156,4 @@ Search.defaultProps = {
|
|||||||
sortedColumnKey: 'name'
|
sortedColumnKey: 'name'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Search;
|
export default withI18n()(Search);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -85,7 +85,8 @@ class Sort extends React.Component {
|
|||||||
const {
|
const {
|
||||||
columns,
|
columns,
|
||||||
sortedColumnKey,
|
sortedColumnKey,
|
||||||
sortOrder
|
sortOrder,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const {
|
const {
|
||||||
isSortDropdownOpen
|
isSortDropdownOpen
|
||||||
@@ -109,8 +110,6 @@ class Sort extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{ sortDropdownItems.length > 1 && (
|
{ sortDropdownItems.length > 1 && (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
@@ -141,8 +140,6 @@ class Sort extends React.Component {
|
|||||||
</IconWrapper>
|
</IconWrapper>
|
||||||
</Button>
|
</Button>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -160,4 +157,4 @@ Sort.defaultProps = {
|
|||||||
sortedColumnKey: 'name'
|
sortedColumnKey: 'name'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Sort;
|
export default withI18n()(Sort);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Brand } from '@patternfly/react-core';
|
import { Brand } from '@patternfly/react-core';
|
||||||
|
|
||||||
@@ -34,6 +34,7 @@ class TowerLogo extends Component {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { hover } = this.state;
|
const { hover } = this.state;
|
||||||
|
const { i18n } = this.props;
|
||||||
|
|
||||||
let src = TowerLogoHeader;
|
let src = TowerLogoHeader;
|
||||||
|
|
||||||
@@ -42,8 +43,6 @@ class TowerLogo extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Brand
|
<Brand
|
||||||
src={src}
|
src={src}
|
||||||
alt={i18n._(t`Tower Brand Image`)}
|
alt={i18n._(t`Tower Brand Image`)}
|
||||||
@@ -53,8 +52,6 @@ class TowerLogo extends Component {
|
|||||||
onFocus={this.onHover}
|
onFocus={this.onHover}
|
||||||
onClick={this.onClick}
|
onClick={this.onClick}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,4 +64,4 @@ TowerLogo.defaultProps = {
|
|||||||
linkTo: null,
|
linkTo: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withRouter(TowerLogo);
|
export default withI18n()(withRouter(TowerLogo));
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import React, { Component } from 'react';
|
|||||||
|
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
|
|
||||||
import { i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
import { withRootDialog } from './RootDialog';
|
import { withRootDialog } from './RootDialog';
|
||||||
|
|
||||||
@@ -33,27 +34,27 @@ class Provider extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handle401 () {
|
handle401 () {
|
||||||
const { handle401, history, setRootDialogMessage } = this.props;
|
const { handle401, history, setRootDialogMessage, i18n } = this.props;
|
||||||
if (handle401) {
|
if (handle401) {
|
||||||
handle401();
|
handle401();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
history.replace('/login');
|
history.replace('/login');
|
||||||
setRootDialogMessage({
|
setRootDialogMessage({
|
||||||
bodyText: i18nMark('You have been logged out.')
|
bodyText: i18n._(t`You have been logged out.`)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handle404 () {
|
handle404 () {
|
||||||
const { handle404, history, setRootDialogMessage } = this.props;
|
const { handle404, history, setRootDialogMessage, i18n } = this.props;
|
||||||
if (handle404) {
|
if (handle404) {
|
||||||
handle404();
|
handle404();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
history.replace('/home');
|
history.replace('/home');
|
||||||
setRootDialogMessage({
|
setRootDialogMessage({
|
||||||
title: i18nMark('404'),
|
title: i18n._(t`404`),
|
||||||
bodyText: i18nMark('Cannot find resource.'),
|
bodyText: i18n._(t`Cannot find resource.`),
|
||||||
variant: 'warning'
|
variant: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -72,7 +73,7 @@ class Provider extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export { Provider as _NetworkProvider };
|
export { Provider as _NetworkProvider };
|
||||||
export const NetworkProvider = withRootDialog(withRouter(Provider));
|
export const NetworkProvider = withI18n()(withRootDialog(withRouter(Provider)));
|
||||||
|
|
||||||
export function withNetwork (Child) {
|
export function withNetwork (Child) {
|
||||||
return (props) => (
|
return (props) => (
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Applications extends Component {
|
class Applications extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Applications</Trans>
|
{i18n._(t`Applications`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Applications extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Applications;
|
export default withI18n()(Applications);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class AuthSettings extends Component {
|
class AuthSettings extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Authentication Settings</Trans>
|
{i18n._(t`Authentication Settings`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class AuthSettings extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default AuthSettings;
|
export default withI18n()(AuthSettings);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class CredentialTypes extends Component {
|
class CredentialTypes extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Credential Types</Trans>
|
{i18n._(t`Credential Types`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class CredentialTypes extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CredentialTypes;
|
export default withI18n()(CredentialTypes);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Credentials extends Component {
|
class Credentials extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Credentials</Trans>
|
{i18n._(t`Credentials`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Credentials extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Credentials;
|
export default withI18n()(Credentials);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Dashboard extends Component {
|
class Dashboard extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Dashboard</Trans>
|
{i18n._(t`Dashboard`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Dashboard extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Dashboard;
|
export default withI18n()(Dashboard);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class InstanceGroups extends Component {
|
class InstanceGroups extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Instance Groups</Trans>
|
{i18n._(t`Instance Groups`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class InstanceGroups extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default InstanceGroups;
|
export default withI18n()(InstanceGroups);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Inventories extends Component {
|
class Inventories extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Inventories</Trans>
|
{i18n._(t`Inventories`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Inventories extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Inventories;
|
export default withI18n()(Inventories);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class InventoryScripts extends Component {
|
class InventoryScripts extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Inventory Scripts</Trans>
|
{i18n._(t`Inventory Scripts`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class InventoryScripts extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default InventoryScripts;
|
export default withI18n()(InventoryScripts);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Jobs extends Component {
|
class Jobs extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Jobs</Trans>
|
{i18n._(t`Jobs`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Jobs extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Jobs;
|
export default withI18n()(Jobs);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class JobsSettings extends Component {
|
class JobsSettings extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Jobs Settings</Trans>
|
{i18n._(t`Jobs Settings`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class JobsSettings extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default JobsSettings;
|
export default withI18n()(JobsSettings);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class License extends Component {
|
class License extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>License</Trans>
|
{i18n._(t`License`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class License extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default License;
|
export default withI18n()(License);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Redirect, withRouter } from 'react-router-dom';
|
import { Redirect, withRouter } from 'react-router-dom';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
LoginForm,
|
LoginForm,
|
||||||
@@ -62,7 +62,7 @@ class AWXLogin extends Component {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { username, password, isInputValid, isAuthenticated } = this.state;
|
const { username, password, isInputValid, isAuthenticated } = this.state;
|
||||||
const { alt, loginInfo, logo, bodyText: errorMessage } = this.props;
|
const { alt, loginInfo, logo, bodyText: errorMessage, i18n } = this.props;
|
||||||
const logoSrc = logo ? `data:image/jpeg;${logo}` : towerLogo;
|
const logoSrc = logo ? `data:image/jpeg;${logo}` : towerLogo;
|
||||||
|
|
||||||
if (isAuthenticated) {
|
if (isAuthenticated) {
|
||||||
@@ -70,8 +70,6 @@ class AWXLogin extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<LoginPage
|
<LoginPage
|
||||||
brandImgSrc={logoSrc}
|
brandImgSrc={logoSrc}
|
||||||
brandImgAlt={alt || 'Ansible Tower'}
|
brandImgAlt={alt || 'Ansible Tower'}
|
||||||
@@ -93,11 +91,9 @@ class AWXLogin extends Component {
|
|||||||
onLoginButtonClick={this.onLoginButtonClick}
|
onLoginButtonClick={this.onLoginButtonClick}
|
||||||
/>
|
/>
|
||||||
</LoginPage>
|
</LoginPage>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { AWXLogin as _AWXLogin };
|
export { AWXLogin as _AWXLogin };
|
||||||
export default withNetwork(withRootDialog(withRouter(AWXLogin)));
|
export default withI18n()(withNetwork(withRootDialog(withRouter(AWXLogin))));
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class ManagementJobs extends Component {
|
class ManagementJobs extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Management Jobs</Trans>
|
{i18n._(t`Management Jobs`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class ManagementJobs extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ManagementJobs;
|
export default withI18n()(ManagementJobs);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class NotificationTemplates extends Component {
|
class NotificationTemplates extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Notification Templates</Trans>
|
{i18n._(t`Notification Templates`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class NotificationTemplates extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NotificationTemplates;
|
export default withI18n()(NotificationTemplates);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Route, withRouter, Switch } from 'react-router-dom';
|
import { Route, withRouter, Switch } from 'react-router-dom';
|
||||||
import { i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
import { Config } from '../../contexts/Config';
|
import { Config } from '../../contexts/Config';
|
||||||
import { NetworkProvider } from '../../contexts/Network';
|
import { NetworkProvider } from '../../contexts/Network';
|
||||||
@@ -14,34 +14,42 @@ import OrganizationAdd from './screens/OrganizationAdd';
|
|||||||
import Organization from './screens/Organization/Organization';
|
import Organization from './screens/Organization/Organization';
|
||||||
|
|
||||||
class Organizations extends Component {
|
class Organizations extends Component {
|
||||||
state = {
|
constructor (props) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
const { i18n } = props;
|
||||||
|
|
||||||
|
this.state = {
|
||||||
breadcrumbConfig: {
|
breadcrumbConfig: {
|
||||||
'/organizations': i18nMark('Organizations'),
|
'/organizations': i18n._(t`Organizations`),
|
||||||
'/organizations/add': i18nMark('Create New Organization')
|
'/organizations/add': i18n._(t`Create New Organization`)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
setBreadcrumbConfig = (organization) => {
|
setBreadcrumbConfig = (organization) => {
|
||||||
|
const { i18n } = this.props;
|
||||||
|
|
||||||
if (!organization) {
|
if (!organization) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const breadcrumbConfig = {
|
const breadcrumbConfig = {
|
||||||
'/organizations': i18nMark('Organizations'),
|
'/organizations': i18n._(t`Organizations`),
|
||||||
'/organizations/add': i18nMark('Create New Organization'),
|
'/organizations/add': i18n._(t`Create New Organization`),
|
||||||
[`/organizations/${organization.id}`]: `${organization.name}`,
|
[`/organizations/${organization.id}`]: `${organization.name}`,
|
||||||
[`/organizations/${organization.id}/edit`]: i18nMark('Edit Details'),
|
[`/organizations/${organization.id}/edit`]: i18n._(t`Edit Details`),
|
||||||
[`/organizations/${organization.id}/details`]: i18nMark('Details'),
|
[`/organizations/${organization.id}/details`]: i18n._(t`Details`),
|
||||||
[`/organizations/${organization.id}/access`]: i18nMark('Access'),
|
[`/organizations/${organization.id}/access`]: i18n._(t`Access`),
|
||||||
[`/organizations/${organization.id}/teams`]: i18nMark('Teams'),
|
[`/organizations/${organization.id}/teams`]: i18n._(t`Teams`),
|
||||||
[`/organizations/${organization.id}/notifications`]: i18nMark('Notifications'),
|
[`/organizations/${organization.id}/notifications`]: i18n._(t`Notifications`),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setState({ breadcrumbConfig });
|
this.setState({ breadcrumbConfig });
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { match, history, location, setRootDialogMessage } = this.props;
|
const { match, history, location, setRootDialogMessage, i18n } = this.props;
|
||||||
const { breadcrumbConfig } = this.state;
|
const { breadcrumbConfig } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -65,11 +73,11 @@ class Organizations extends Component {
|
|||||||
setRootDialogMessage({
|
setRootDialogMessage({
|
||||||
title: '404',
|
title: '404',
|
||||||
bodyText: (
|
bodyText: (
|
||||||
<Trans>
|
<Fragment>
|
||||||
Cannot find organization with ID
|
{i18n._(t`Cannot find organization with ID`)}
|
||||||
<strong>{` ${newRouteMatch.params.id}`}</strong>
|
<strong>{` ${newRouteMatch.params.id}`}</strong>
|
||||||
.
|
.
|
||||||
</Trans>
|
</Fragment>
|
||||||
),
|
),
|
||||||
variant: 'warning'
|
variant: 'warning'
|
||||||
});
|
});
|
||||||
@@ -101,4 +109,4 @@ class Organizations extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export { Organizations as _Organizations };
|
export { Organizations as _Organizations };
|
||||||
export default withRootDialog(withRouter(Organizations));
|
export default withI18n()(withRootDialog(withRouter(Organizations)));
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import { func, string } from 'prop-types';
|
import { func, string } from 'prop-types';
|
||||||
import { Button } from '@patternfly/react-core';
|
import { Button } from '@patternfly/react-core';
|
||||||
import { I18n, i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t, Trans } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import AlertModal from '../../../components/AlertModal';
|
import AlertModal from '../../../components/AlertModal';
|
||||||
import { Role } from '../../../types';
|
import { Role } from '../../../types';
|
||||||
|
|
||||||
@@ -24,14 +24,12 @@ class DeleteRoleConfirmationModal extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { role, username, onCancel, onConfirm } = this.props;
|
const { role, username, onCancel, onConfirm, i18n } = this.props;
|
||||||
const title = `Remove ${this.isTeamRole() ? 'Team' : 'User'} Access`;
|
const title = i18n._(t`Remove ${this.isTeamRole() ? i18n._(t`Team`) : i18n._(t`User`)} Access`);
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<AlertModal
|
<AlertModal
|
||||||
variant="danger"
|
variant="danger"
|
||||||
title={i18nMark(title)}
|
title={title}
|
||||||
isOpen
|
isOpen
|
||||||
onClose={onCancel}
|
onClose={onCancel}
|
||||||
actions={[
|
actions={[
|
||||||
@@ -49,32 +47,20 @@ class DeleteRoleConfirmationModal extends React.Component {
|
|||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{this.isTeamRole() ? (
|
{this.isTeamRole() ? (
|
||||||
<Trans>
|
<Fragment>
|
||||||
Are you sure you want to remove
|
{i18n._(t`Are you sure you want to remove ${role.name} access from ${role.team_name}? Doing so affects all members of the team.`)}
|
||||||
<b>{` ${role.name} `}</b>
|
|
||||||
access from
|
|
||||||
<b>{` ${role.team_name}`}</b>
|
|
||||||
? Doing so affects all members of the team.
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
If you
|
{i18n._(t`If you ${(<b><i>only</i></b>)} want to remove access for this particular user, please remove them from the team.`)}
|
||||||
<b><i> only </i></b>
|
</Fragment>
|
||||||
want to remove access for this particular user, please remove them from the team.
|
|
||||||
</Trans>
|
|
||||||
) : (
|
) : (
|
||||||
<Trans>
|
<Fragment>
|
||||||
Are you sure you want to remove
|
{i18n._(t`Are you sure you want to remove ${role.name} access from ${username}?`)}
|
||||||
<b>{` ${role.name} `}</b>
|
</Fragment>
|
||||||
access from
|
|
||||||
<b>{` ${username}`}</b>
|
|
||||||
?
|
|
||||||
</Trans>
|
|
||||||
)}
|
)}
|
||||||
</AlertModal>
|
</AlertModal>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DeleteRoleConfirmationModal;
|
export default withI18n()(DeleteRoleConfirmationModal);
|
||||||
|
|||||||
@@ -1,20 +1,14 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18n, i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
||||||
import { QuestionCircleIcon } from '@patternfly/react-icons';
|
import { QuestionCircleIcon } from '@patternfly/react-icons';
|
||||||
import { t } from '@lingui/macro';
|
|
||||||
|
|
||||||
import Lookup from '../../../components/Lookup';
|
import Lookup from '../../../components/Lookup';
|
||||||
|
|
||||||
import { withNetwork } from '../../../contexts/Network';
|
import { withNetwork } from '../../../contexts/Network';
|
||||||
|
|
||||||
const INSTANCE_GROUPS_LOOKUP_COLUMNS = [
|
|
||||||
{ name: i18nMark('Name'), key: 'name', isSortable: true },
|
|
||||||
{ name: i18nMark('Modified'), key: 'modified', isSortable: false, isNumeric: true },
|
|
||||||
{ name: i18nMark('Created'), key: 'created', isSortable: false, isNumeric: true }
|
|
||||||
];
|
|
||||||
|
|
||||||
class InstanceGroupsLookup extends React.Component {
|
class InstanceGroupsLookup extends React.Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
super(props);
|
super(props);
|
||||||
@@ -29,11 +23,9 @@ class InstanceGroupsLookup extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { value, tooltip, onChange } = this.props;
|
const { value, tooltip, onChange, i18n } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={(
|
label={(
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@@ -60,12 +52,14 @@ class InstanceGroupsLookup extends React.Component {
|
|||||||
value={value}
|
value={value}
|
||||||
onLookupSave={onChange}
|
onLookupSave={onChange}
|
||||||
getItems={this.getInstanceGroups}
|
getItems={this.getInstanceGroups}
|
||||||
columns={INSTANCE_GROUPS_LOOKUP_COLUMNS}
|
columns={[
|
||||||
|
{ name: i18n._(t`Name`), key: 'name', isSortable: true },
|
||||||
|
{ name: i18n._(t`Modified`), key: 'modified', isSortable: false, isNumeric: true },
|
||||||
|
{ name: i18n._(t`Created`), key: 'created', isSortable: false, isNumeric: true }
|
||||||
|
]}
|
||||||
sortedColumnKey="name"
|
sortedColumnKey="name"
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,4 +74,4 @@ InstanceGroupsLookup.defaultProps = {
|
|||||||
tooltip: '',
|
tooltip: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withNetwork(InstanceGroupsLookup);
|
export default withI18n()(withNetwork(InstanceGroupsLookup));
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { func } from 'prop-types';
|
import { func } from 'prop-types';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
DataListItem,
|
DataListItem,
|
||||||
@@ -81,12 +81,10 @@ class OrganizationAccessItem extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { accessRecord, onRoleDelete } = this.props;
|
const { accessRecord, onRoleDelete, i18n } = this.props;
|
||||||
const [teamRoles, userRoles] = this.getRoleLists();
|
const [teamRoles, userRoles] = this.getRoleLists();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<DataListItem aria-labelledby="access-list-item" key={accessRecord.id}>
|
<DataListItem aria-labelledby="access-list-item" key={accessRecord.id}>
|
||||||
<DataListItemRow>
|
<DataListItemRow>
|
||||||
<DataListItemCells dataListCells={[
|
<DataListItemCells dataListCells={[
|
||||||
@@ -167,10 +165,8 @@ class OrganizationAccessItem extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</DataListItemRow>
|
</DataListItemRow>
|
||||||
</DataListItem>
|
</DataListItem>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default OrganizationAccessItem;
|
export default withI18n()(OrganizationAccessItem);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { Formik, Field } from 'formik';
|
import { Formik, Field } from 'formik';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
@@ -83,13 +83,11 @@ class OrganizationForm extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { organization, handleCancel } = this.props;
|
const { organization, handleCancel, i18n } = this.props;
|
||||||
const { instanceGroups, formIsValid, error } = this.state;
|
const { instanceGroups, formIsValid, error } = this.state;
|
||||||
const defaultVenv = '/venv/ansible/';
|
const defaultVenv = '/venv/ansible/';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Formik
|
<Formik
|
||||||
initialValues={{
|
initialValues={{
|
||||||
name: organization.name,
|
name: organization.name,
|
||||||
@@ -105,7 +103,7 @@ class OrganizationForm extends Component {
|
|||||||
name="name"
|
name="name"
|
||||||
type="text"
|
type="text"
|
||||||
label={i18n._(t`Name`)}
|
label={i18n._(t`Name`)}
|
||||||
validate={required()}
|
validate={required(null, i18n)}
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
<FormField
|
<FormField
|
||||||
@@ -151,8 +149,6 @@ class OrganizationForm extends Component {
|
|||||||
</Form>
|
</Form>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,4 +172,4 @@ OrganizationForm.contextTypes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export { OrganizationForm as _OrganizationForm };
|
export { OrganizationForm as _OrganizationForm };
|
||||||
export default withNetwork(withRouter(OrganizationForm));
|
export default withI18n()(withNetwork(withRouter(OrganizationForm)));
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { string, bool, func } from 'prop-types';
|
import { string, bool, func } from 'prop-types';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Badge as PFBadge,
|
Badge as PFBadge,
|
||||||
DataListItem,
|
DataListItem,
|
||||||
@@ -62,6 +63,7 @@ class OrganizationListItem extends React.Component {
|
|||||||
isSelected,
|
isSelected,
|
||||||
onSelect,
|
onSelect,
|
||||||
detailUrl,
|
detailUrl,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const labelId = `check-action-${organization.id}`;
|
const labelId = `check-action-${organization.id}`;
|
||||||
return (
|
return (
|
||||||
@@ -86,13 +88,15 @@ class OrganizationListItem extends React.Component {
|
|||||||
</DataListCell>,
|
</DataListCell>,
|
||||||
<DataListCell key="org-members" righthalf="true" width={2}>
|
<DataListCell key="org-members" righthalf="true" width={2}>
|
||||||
<ListGroup>
|
<ListGroup>
|
||||||
<Trans>Members</Trans>
|
{i18n._(t`Members`)}
|
||||||
<Badge isRead>
|
<Badge isRead>
|
||||||
{organization.summary_fields.related_field_counts.users}
|
{organization.summary_fields.related_field_counts.users}
|
||||||
</Badge>
|
</Badge>
|
||||||
</ListGroup>
|
</ListGroup>
|
||||||
|
</DataListCell>,
|
||||||
|
<DataListCell key="teams">
|
||||||
<ListGroup>
|
<ListGroup>
|
||||||
<Trans>Teams</Trans>
|
{i18n._(t`Teams`)}
|
||||||
<Badge isRead>
|
<Badge isRead>
|
||||||
{organization.summary_fields.related_field_counts.teams}
|
{organization.summary_fields.related_field_counts.teams}
|
||||||
</Badge>
|
</Badge>
|
||||||
@@ -105,4 +109,4 @@ class OrganizationListItem extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default OrganizationListItem;
|
export default withI18n()(OrganizationListItem);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { I18n, i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Switch, Route, withRouter, Redirect } from 'react-router-dom';
|
import { Switch, Route, withRouter, Redirect } from 'react-router-dom';
|
||||||
import { Card, CardHeader, PageSection } from '@patternfly/react-core';
|
import { Card, CardHeader, PageSection } from '@patternfly/react-core';
|
||||||
@@ -100,7 +100,8 @@ class Organization extends Component {
|
|||||||
location,
|
location,
|
||||||
match,
|
match,
|
||||||
me,
|
me,
|
||||||
history
|
history,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -126,14 +127,14 @@ class Organization extends Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const tabsArray = [
|
const tabsArray = [
|
||||||
{ name: i18nMark('Details'), link: `${match.url}/details`, id: 0 },
|
{ name: i18n._(t`Details`), link: `${match.url}/details`, id: 0 },
|
||||||
{ name: i18nMark('Access'), link: `${match.url}/access`, id: 1 },
|
{ name: i18n._(t`Access`), link: `${match.url}/access`, id: 1 },
|
||||||
{ name: i18nMark('Teams'), link: `${match.url}/teams`, id: 2 }
|
{ name: i18n._(t`Teams`), link: `${match.url}/teams`, id: 2 }
|
||||||
];
|
];
|
||||||
|
|
||||||
if (canSeeNotificationsTab) {
|
if (canSeeNotificationsTab) {
|
||||||
tabsArray.push({
|
tabsArray.push({
|
||||||
name: i18nMark('Notifications'),
|
name: i18n._(t`Notifications`),
|
||||||
link: `${match.url}/notifications`,
|
link: `${match.url}/notifications`,
|
||||||
id: 3
|
id: 3
|
||||||
});
|
});
|
||||||
@@ -145,9 +146,6 @@ class Organization extends Component {
|
|||||||
<CardHeader
|
<CardHeader
|
||||||
style={tabsStyle}
|
style={tabsStyle}
|
||||||
>
|
>
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<React.Fragment>
|
|
||||||
<div className="awx-orgTabs-container">
|
<div className="awx-orgTabs-container">
|
||||||
<RoutedTabs
|
<RoutedTabs
|
||||||
match={match}
|
match={match}
|
||||||
@@ -160,9 +158,6 @@ class Organization extends Component {
|
|||||||
className="awx-orgTabs__bottom-border"
|
className="awx-orgTabs__bottom-border"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
));
|
));
|
||||||
if (!match) {
|
if (!match) {
|
||||||
@@ -245,5 +240,5 @@ class Organization extends Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default withNetwork(withRouter(Organization));
|
export default withI18n()(withNetwork(withRouter(Organization)));
|
||||||
export { Organization as _Organization };
|
export { Organization as _Organization };
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import PaginatedDataList, { ToolbarAddButton } from '../../../../components/PaginatedDataList';
|
import PaginatedDataList, { ToolbarAddButton } from '../../../../components/PaginatedDataList';
|
||||||
import OrganizationAccessItem from '../../components/OrganizationAccessItem';
|
import OrganizationAccessItem from '../../components/OrganizationAccessItem';
|
||||||
import DeleteRoleConfirmationModal from '../../components/DeleteRoleConfirmationModal';
|
import DeleteRoleConfirmationModal from '../../components/DeleteRoleConfirmationModal';
|
||||||
@@ -130,7 +131,7 @@ class OrganizationAccess extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { api, organization } = this.props;
|
const { organization, i18n } = this.props;
|
||||||
const {
|
const {
|
||||||
isLoading,
|
isLoading,
|
||||||
isInitialized,
|
isInitialized,
|
||||||
@@ -167,9 +168,9 @@ class OrganizationAccess extends React.Component {
|
|||||||
itemName="role"
|
itemName="role"
|
||||||
qsConfig={QS_CONFIG}
|
qsConfig={QS_CONFIG}
|
||||||
toolbarColumns={[
|
toolbarColumns={[
|
||||||
{ name: i18nMark('Name'), key: 'first_name', isSortable: true },
|
{ name: i18n._(t`Name`), key: 'first_name', isSortable: true },
|
||||||
{ name: i18nMark('Username'), key: 'username', isSortable: true },
|
{ name: i18n._(t`Username`), key: 'username', isSortable: true },
|
||||||
{ name: i18nMark('Last Name'), key: 'last_name', isSortable: true },
|
{ name: i18n._(t`Last Name`), key: 'last_name', isSortable: true },
|
||||||
]}
|
]}
|
||||||
additionalControls={canEdit ? [
|
additionalControls={canEdit ? [
|
||||||
<ToolbarAddButton key="add" onClick={this.toggleAddModal} />
|
<ToolbarAddButton key="add" onClick={this.toggleAddModal} />
|
||||||
@@ -187,7 +188,6 @@ class OrganizationAccess extends React.Component {
|
|||||||
<AddResourceRole
|
<AddResourceRole
|
||||||
onClose={this.toggleAddModal}
|
onClose={this.toggleAddModal}
|
||||||
onSave={this.handleSuccessfulRoleAdd}
|
onSave={this.handleSuccessfulRoleAdd}
|
||||||
api={api}
|
|
||||||
roles={organization.summary_fields.object_roles}
|
roles={organization.summary_fields.object_roles}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -197,4 +197,4 @@ class OrganizationAccess extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export { OrganizationAccess as _OrganizationAccess };
|
export { OrganizationAccess as _OrganizationAccess };
|
||||||
export default withNetwork(withRouter(OrganizationAccess));
|
export default withI18n()(withNetwork(withRouter(OrganizationAccess)));
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Link, withRouter } from 'react-router-dom';
|
import { Link, withRouter } from 'react-router-dom';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { Trans, t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CardBody,
|
CardBody,
|
||||||
@@ -103,7 +103,8 @@ class OrganizationDetail extends Component {
|
|||||||
modified,
|
modified,
|
||||||
summary_fields
|
summary_fields
|
||||||
},
|
},
|
||||||
match
|
match,
|
||||||
|
i18n
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const showOverflowChipAfter = 5;
|
const showOverflowChipAfter = 5;
|
||||||
|
|
||||||
@@ -127,8 +128,6 @@ class OrganizationDetail extends Component {
|
|||||||
) : null;
|
) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<CardBody>
|
<CardBody>
|
||||||
<div className="pf-l-grid pf-m-gutter pf-m-all-12-col-on-md pf-m-all-6-col-on-lg pf-m-all-4-col-on-xl">
|
<div className="pf-l-grid pf-m-gutter pf-m-all-12-col-on-md pf-m-all-6-col-on-lg pf-m-all-4-col-on-xl">
|
||||||
<Detail
|
<Detail
|
||||||
@@ -157,7 +156,7 @@ class OrganizationDetail extends Component {
|
|||||||
component={TextVariants.h6}
|
component={TextVariants.h6}
|
||||||
style={detailLabelStyle}
|
style={detailLabelStyle}
|
||||||
>
|
>
|
||||||
<Trans>Instance Groups</Trans>
|
{i18n._(t`Instance Groups`)}
|
||||||
</Text>
|
</Text>
|
||||||
<div style={detailValueStyle}>
|
<div style={detailValueStyle}>
|
||||||
{instanceGroupChips}
|
{instanceGroupChips}
|
||||||
@@ -169,16 +168,14 @@ class OrganizationDetail extends Component {
|
|||||||
{summary_fields.user_capabilities.edit && (
|
{summary_fields.user_capabilities.edit && (
|
||||||
<div style={{ display: 'flex', flexDirection: 'row-reverse', marginTop: '20px' }}>
|
<div style={{ display: 'flex', flexDirection: 'row-reverse', marginTop: '20px' }}>
|
||||||
<Link to={`/organizations/${match.params.id}/edit`}>
|
<Link to={`/organizations/${match.params.id}/edit`}>
|
||||||
<Button><Trans>Edit</Trans></Button>
|
<Button>{i18n._(t`Edit`)}</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{error ? 'error!' : ''}
|
{error ? 'error!' : ''}
|
||||||
</CardBody>
|
</CardBody>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withRouter(withNetwork(OrganizationDetail));
|
export default withI18n()(withRouter(withNetwork(OrganizationDetail)));
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { I18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
@@ -57,11 +57,10 @@ class OrganizationAdd extends React.Component {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { error } = this.state;
|
const { error } = this.state;
|
||||||
|
const { i18n } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageSection>
|
<PageSection>
|
||||||
<I18n>
|
|
||||||
{({ i18n }) => (
|
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader className="at-u-textRight">
|
<CardHeader className="at-u-textRight">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
@@ -79,8 +78,6 @@ class OrganizationAdd extends React.Component {
|
|||||||
{error ? <div>error</div> : ''}
|
{error ? <div>error</div> : ''}
|
||||||
</CardBody>
|
</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
|
||||||
</I18n>
|
|
||||||
</PageSection>
|
</PageSection>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -95,4 +92,4 @@ OrganizationAdd.contextTypes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export { OrganizationAdd as _OrganizationAdd };
|
export { OrganizationAdd as _OrganizationAdd };
|
||||||
export default withNetwork(withRouter(OrganizationAdd));
|
export default withI18n()(withNetwork(withRouter(OrganizationAdd)));
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { i18nMark } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
PageSection,
|
PageSection,
|
||||||
@@ -15,12 +16,6 @@ import PaginatedDataList, {
|
|||||||
import OrganizationListItem from '../components/OrganizationListItem';
|
import OrganizationListItem from '../components/OrganizationListItem';
|
||||||
import { getQSConfig, parseNamespacedQueryString } from '../../../util/qs';
|
import { getQSConfig, parseNamespacedQueryString } from '../../../util/qs';
|
||||||
|
|
||||||
const COLUMNS = [
|
|
||||||
{ name: i18nMark('Name'), key: 'name', isSortable: true },
|
|
||||||
{ name: i18nMark('Modified'), key: 'modified', isSortable: true, isNumeric: true },
|
|
||||||
{ name: i18nMark('Created'), key: 'created', isSortable: true, isNumeric: true },
|
|
||||||
];
|
|
||||||
|
|
||||||
const QS_CONFIG = getQSConfig('organization', {
|
const QS_CONFIG = getQSConfig('organization', {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 5,
|
page_size: 5,
|
||||||
@@ -36,7 +31,7 @@ class OrganizationsList extends Component {
|
|||||||
isLoading: true,
|
isLoading: true,
|
||||||
isInitialized: false,
|
isInitialized: false,
|
||||||
organizations: [],
|
organizations: [],
|
||||||
selected: [],
|
selected: []
|
||||||
};
|
};
|
||||||
|
|
||||||
this.handleSelectAll = this.handleSelectAll.bind(this);
|
this.handleSelectAll = this.handleSelectAll.bind(this);
|
||||||
@@ -148,9 +143,9 @@ class OrganizationsList extends Component {
|
|||||||
isLoading,
|
isLoading,
|
||||||
isInitialized,
|
isInitialized,
|
||||||
selected,
|
selected,
|
||||||
organizations,
|
organizations
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { match } = this.props;
|
const { match, i18n } = this.props;
|
||||||
|
|
||||||
const isAllSelected = selected.length === organizations.length;
|
const isAllSelected = selected.length === organizations.length;
|
||||||
|
|
||||||
@@ -163,7 +158,11 @@ class OrganizationsList extends Component {
|
|||||||
itemCount={itemCount}
|
itemCount={itemCount}
|
||||||
itemName="organization"
|
itemName="organization"
|
||||||
qsConfig={QS_CONFIG}
|
qsConfig={QS_CONFIG}
|
||||||
toolbarColumns={COLUMNS}
|
toolbarColumns={[
|
||||||
|
{ name: i18n._(t`Name`), key: 'name', isSortable: true },
|
||||||
|
{ name: i18n._(t`Modified`), key: 'modified', isSortable: true, isNumeric: true },
|
||||||
|
{ name: i18n._(t`Created`), key: 'created', isSortable: true, isNumeric: true },
|
||||||
|
]}
|
||||||
showSelectAll
|
showSelectAll
|
||||||
isAllSelected={isAllSelected}
|
isAllSelected={isAllSelected}
|
||||||
onSelectAll={this.handleSelectAll}
|
onSelectAll={this.handleSelectAll}
|
||||||
@@ -198,4 +197,4 @@ class OrganizationsList extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export { OrganizationsList as _OrganizationsList };
|
export { OrganizationsList as _OrganizationsList };
|
||||||
export default withNetwork(withRouter(OrganizationsList));
|
export default withI18n()(withNetwork(withRouter(OrganizationsList)));
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Portal extends Component {
|
class Portal extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>My View</Trans>
|
{i18n._(t`My View`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Portal extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Portal;
|
export default withI18n()(Portal);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Projects extends Component {
|
class Projects extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Projects</Trans>
|
{i18n._(t`Projects`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Projects extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Projects;
|
export default withI18n()(Projects);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Schedules extends Component {
|
class Schedules extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Schedules</Trans>
|
{i18n._(t`Schedules`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Schedules extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Schedules;
|
export default withI18n()(Schedules);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class SystemSettings extends Component {
|
class SystemSettings extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>System Settings</Trans>
|
{i18n._(t`System Settings`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class SystemSettings extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SystemSettings;
|
export default withI18n()(SystemSettings);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Teams extends Component {
|
class Teams extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Teams</Trans>
|
{i18n._(t`Teams`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Teams extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Teams;
|
export default withI18n()(Teams);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Templates extends Component {
|
class Templates extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Templates</Trans>
|
{i18n._(t`Templates`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Templates extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Templates;
|
export default withI18n()(Templates);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class UISettings extends Component {
|
class UISettings extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>User Interface Settings</Trans>
|
{i18n._(t`User Interface Settings`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class UISettings extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UISettings;
|
export default withI18n()(UISettings);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Trans } from '@lingui/macro';
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
PageSectionVariants,
|
||||||
@@ -8,13 +9,14 @@ import {
|
|||||||
|
|
||||||
class Users extends Component {
|
class Users extends Component {
|
||||||
render () {
|
render () {
|
||||||
|
const { i18n } = this.props;
|
||||||
const { light, medium } = PageSectionVariants;
|
const { light, medium } = PageSectionVariants;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl">
|
<Title size="2xl">
|
||||||
<Trans>Users</Trans>
|
{i18n._(t`Users`)}
|
||||||
</Title>
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection variant={medium} />
|
<PageSection variant={medium} />
|
||||||
@@ -23,4 +25,4 @@ class Users extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Users;
|
export default withI18n()(Users);
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
import { i18nMark } from '@lingui/react';
|
|
||||||
|
|
||||||
export function required (message) {
|
|
||||||
return value => {
|
|
||||||
if (!value.trim()) {
|
|
||||||
return message || i18nMark('This field must not be blank');
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function maxLength (max) {
|
|
||||||
return value => {
|
|
||||||
if (value.trim().length
|
|
||||||
> max) {
|
|
||||||
return i18nMark(`This field must not exceed ${max} characters`);
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
20
src/util/validators.jsx
Normal file
20
src/util/validators.jsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
|
export function required (message, i18n) {
|
||||||
|
return value => {
|
||||||
|
if (!value.trim()) {
|
||||||
|
return message || i18n._(t`This field must not be blank`);
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function maxLength (max, i18n) {
|
||||||
|
return value => {
|
||||||
|
if (value.trim().length
|
||||||
|
> max) {
|
||||||
|
return i18n._(t`This field must not exceed ${max} characters`);
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user