mirror of
https://github.com/ansible/awx.git
synced 2026-02-04 02:58:13 -03:30
one way of approaching nav
This commit is contained in:
21
src/pages/Applications.jsx
Normal file
21
src/pages/Applications.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Applications extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Applications</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Applications;
|
||||
21
src/pages/CredentialTypes.jsx
Normal file
21
src/pages/CredentialTypes.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class CredentialTypes extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Credential Types</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CredentialTypes;
|
||||
21
src/pages/Credentials.jsx
Normal file
21
src/pages/Credentials.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Credentials extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Credentials</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Credentials;
|
||||
21
src/pages/Dashboard.jsx
Normal file
21
src/pages/Dashboard.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Dashboard extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Dashboard</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Dashboard;
|
||||
21
src/pages/InstanceGroups.jsx
Normal file
21
src/pages/InstanceGroups.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class InstanceGroups extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Instance Groups</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default InstanceGroups;
|
||||
21
src/pages/Inventories.jsx
Normal file
21
src/pages/Inventories.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Inventories extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Inventories</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Inventories;
|
||||
21
src/pages/InventoryScripts.jsx
Normal file
21
src/pages/InventoryScripts.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class InventoryScripts extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Inventory Scripts</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default InventoryScripts;
|
||||
21
src/pages/Jobs.jsx
Normal file
21
src/pages/Jobs.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Jobs extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Jobz</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Jobs;
|
||||
69
src/pages/Login.jsx
Normal file
69
src/pages/Login.jsx
Normal file
@@ -0,0 +1,69 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
|
||||
import {
|
||||
Bullseye,
|
||||
Button,
|
||||
TextInput
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
import api from '../api';
|
||||
|
||||
class Login extends Component {
|
||||
state = {
|
||||
username: '',
|
||||
password: '',
|
||||
redirect: false,
|
||||
};
|
||||
|
||||
handleUsernameChange = value => this.setState({ username: value });
|
||||
|
||||
handlePasswordChange = value => this.setState({ password: value });
|
||||
|
||||
handleSubmit = event => {
|
||||
const { username, password } = this.state;
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
api.login(username, password)
|
||||
.then(() => this.setState({ redirect: true }));
|
||||
}
|
||||
|
||||
render () {
|
||||
const { username, password, redirect } = this.state;
|
||||
|
||||
if (redirect) {
|
||||
return (<Redirect to="/" />);
|
||||
}
|
||||
|
||||
return (
|
||||
<Bullseye>
|
||||
<form onSubmit={this.handleSubmit}>
|
||||
<div>
|
||||
<TextInput
|
||||
aria-label="Username"
|
||||
name="username"
|
||||
type="text"
|
||||
onChange={this.handleUsernameChange}
|
||||
value={username}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<TextInput
|
||||
aria-label="Password"
|
||||
name="password"
|
||||
type="password"
|
||||
onChange={this.handlePasswordChange}
|
||||
value={password}
|
||||
/>
|
||||
</div>
|
||||
<Button type="submit">
|
||||
Login
|
||||
</Button>
|
||||
</form>
|
||||
</Bullseye>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Login;
|
||||
21
src/pages/ManagementJobs.jsx
Normal file
21
src/pages/ManagementJobs.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class ManagementJobs extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Management Jobs</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ManagementJobs;
|
||||
21
src/pages/NotificationTemplates.jsx
Normal file
21
src/pages/NotificationTemplates.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class NotificationTemplates extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Notification Templates</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default NotificationTemplates;
|
||||
48
src/pages/Organizations.jsx
Normal file
48
src/pages/Organizations.jsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
Gallery,
|
||||
GalleryItem,
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
import OrganizationCard from '../components/OrganizationCard';
|
||||
import api from '../api';
|
||||
|
||||
class Organizations extends Component {
|
||||
constructor (props) {
|
||||
super(props);
|
||||
|
||||
this.state = { organizations: [] };
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
api.getOrganizations()
|
||||
.then(({ data }) => this.setState({ organizations: data.results }));
|
||||
}
|
||||
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
const { organizations } = this.state;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}>
|
||||
<Title size="2xl">Organizations</Title>
|
||||
</PageSection>
|
||||
<PageSection variant={medium}>
|
||||
<Gallery gutter="md">
|
||||
{organizations.map(o => (
|
||||
<GalleryItem key={o.id}>
|
||||
<OrganizationCard key={o.id} organization={o} />
|
||||
</GalleryItem>
|
||||
))}
|
||||
</Gallery>
|
||||
</PageSection>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Organizations;
|
||||
21
src/pages/Portal.jsx
Normal file
21
src/pages/Portal.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Portal extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">My View</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Portal;
|
||||
21
src/pages/Projects.jsx
Normal file
21
src/pages/Projects.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Projects extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Projects</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Projects;
|
||||
21
src/pages/Schedules.jsx
Normal file
21
src/pages/Schedules.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Schedules extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Schedules</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Schedules;
|
||||
21
src/pages/Settings.jsx
Normal file
21
src/pages/Settings.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Settings extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Settings</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Settings;
|
||||
21
src/pages/Teams.jsx
Normal file
21
src/pages/Teams.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Teams extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Teams</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Teams;
|
||||
21
src/pages/Templates.jsx
Normal file
21
src/pages/Templates.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Templates extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Templates</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Templates;
|
||||
21
src/pages/Users.jsx
Normal file
21
src/pages/Users.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import {
|
||||
PageSection,
|
||||
PageSectionVariants,
|
||||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
class Users extends Component {
|
||||
render () {
|
||||
const { light, medium } = PageSectionVariants;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageSection variant={light}><Title size="2xl">Users</Title></PageSection>
|
||||
<PageSection variant={medium} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Users;
|
||||
Reference in New Issue
Block a user