Skip to content

Commit

Permalink
Add issue templates
Browse files Browse the repository at this point in the history
  • Loading branch information
mawandm committed Apr 10, 2024
1 parent 89c965d commit b1eb502
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 33 deletions.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bug report
description: Create a report to help us improve
title: '[BUG] '
labels: ['bug']
assignees: []
body:
- type: input
attributes:
label: Nsis version
description: What Nesis version are you using?
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: To reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's objective.
title: ''
labels: ''
assignees: ''

---


17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request.
16 changes: 11 additions & 5 deletions nesis/frontend/client/src/components/MenuHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useHistory } from 'react-router-dom';
import { PersonCircle, QuestionSquare } from 'react-bootstrap-icons';
import { useCurrentSession, useSignOut } from '../SessionContext';
import { ReactComponent as Hamburger } from '../images/Hamburger.svg';
import { ReactComponent as Logo } from '../images/NesisIcon.svg';
import { ReactComponent as Logo } from '../images/Nesis.svg';
import styled from 'styled-components/macro';
import { device } from '../utils/breakpoints';
import client from '../utils/httpClient';
Expand All @@ -28,8 +28,9 @@ const LogoContainer = styled.div`

const LogoFull = styled(Logo)`
display: block;
height: 35px;
width: 35px;
height: 105px;
width: 105px;
margin-right: 10px;
`;

const UserControlsRow = styled.div`
Expand Down Expand Up @@ -88,12 +89,17 @@ export default function MenuHeader({ onMobileMenuClick }) {
<Hamburger />
</MobileMenuTrigger>
<LogoContainer>
<LogoFull /> Nesis - Enterprise Knowledge
<LogoFull />
</LogoContainer>
{session && (
<UserControlsRow>
<HeaderToolBarIcon>
<QuestionSquare size={iconSize} className="help-icon" /> Help
<a
href="https://github.com/ametnes/nesis/blob/main/docs/README.md"
target="_blank"
>
<QuestionSquare size={iconSize} className="help-icon" /> Help
</a>
</HeaderToolBarIcon>
<HeaderToolBarIcon>
<PersonCircle size={iconSize} className="account-icon" />
Expand Down
3 changes: 2 additions & 1 deletion nesis/frontend/client/src/components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ const DeleteButtonContainer = styled.button`
background: none;
border: none;
cursor: pointer;
margin-left: 16px;
margin-left: 8px;
margin-right: 8px;
fill: ${(props) => props.theme.danger2};
Expand Down
2 changes: 2 additions & 0 deletions nesis/frontend/client/src/components/inputs/SquareButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export const OutlinedSquareButton = styled(SquareButton)`

export const EditOutlinedSquareButton = styled(OutlinedSquareButton)`
min-width: 50px;
margin-left: 8px;
margin-right: 8px;
`;

export default SquareButton;
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function DocumentForm({
initialValues = {
id: role?.id,
name: role?.name,
policy: JSON.stringify(role?.policy || '', null, 4),
policy: JSON.stringify(role?.policy || 'Enter value json here', null, 4),
},
}) {
const history = useHistory();
Expand Down
24 changes: 12 additions & 12 deletions nesis/frontend/client/src/pages/Settings/Roles/RolesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,27 +276,27 @@ const DocumentsGPTPage = () => {
</td>
</tr>
)}
{paginatedDocuments.map((Roles) => (
<tr key={Roles.id}>
<td>{Roles.name}</td>
<td>{Roles?.create_date}</td>
{paginatedDocuments.map((role) => (
<tr key={role.id}>
<td>{role.name}</td>
<td>{role?.create_date}</td>
<td style={{ display: 'flex' }}>
<DeleteItemButton
onClick={() => {
setCurrentItem(Roles.id);
showConfirmModal();
}}
/>
<EditOutlinedSquareButton
onClick={() =>
history.push({
pathname: `/settings/roles/${Roles.id}/edit`,
state: Roles,
pathname: `/settings/roles/${role.id}/edit`,
state: role,
})
}
>
Edit
</EditOutlinedSquareButton>
<DeleteItemButton
onClick={() => {
setCurrentItem(role.id);
showConfirmModal();
}}
/>
</td>
</tr>
))}
Expand Down
28 changes: 14 additions & 14 deletions nesis/frontend/client/src/pages/Settings/Users/UsersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,28 +292,28 @@ const DocumentsGPTPage = () => {
</td>
</tr>
)}
{paginatedDocuments.map((Documents) => (
<tr key={Documents.id}>
<td>{Documents.name}</td>
<td>{Documents.email}</td>
<td>{Documents.enabled ? 'True' : 'False'}</td>
<td style={{ display: 'flex' }}>
<DeleteItemButton
onClick={() => {
setCurrentItem(Documents.id);
showConfirmModal();
}}
/>
{paginatedDocuments.map((user) => (
<tr key={user.id}>
<td>{user.name}</td>
<td>{user.email}</td>
<td>{user.enabled ? 'True' : 'False'}</td>
<td style={{ display: 'flex', padding: '5px' }}>
<EditOutlinedSquareButton
onClick={() =>
history.push({
pathname: `/settings/users/${Documents.id}/edit`,
state: Documents,
pathname: `/settings/users/${user.id}/edit`,
state: user,
})
}
>
Edit
</EditOutlinedSquareButton>
<DeleteItemButton
onClick={() => {
setCurrentItem(user.id);
showConfirmModal();
}}
/>
</td>
</tr>
))}
Expand Down

0 comments on commit b1eb502

Please sign in to comment.