-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hwgroup selection on the edit limits page (#184)
* Test limits were moved to a separate page. * Fixing links and button captions. * Massive reorg. of low level technicalities and helpers. * Limit form (and related stuff) modified to use hwGroup limits endpoint instead of simpleLimits endpoint. Simple limits are no more. * Cleanup - removing unused old components. * Remaining SimpleLimits components renamed to Limits only. * Fixing state-detection bug in multiple forms (spread by copy-and-paste). * Edit hardware group form added to Edit Limits page. * Adding metadata panel on Edit Limits page, so the limits constraints for selected hardware group are visible. * Final polishing and minor tune-ups.
- Loading branch information
Martin Kruliš
committed
Feb 24, 2018
1 parent
84e3725
commit 41f4a6f
Showing
142 changed files
with
2,155 additions
and
2,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
src/components/Exercises/ExerciseButtons/ExerciseButtons.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { FormattedMessage } from 'react-intl'; | ||
import { ButtonGroup } from 'react-bootstrap'; | ||
import { LinkContainer } from 'react-router-bootstrap'; | ||
|
||
import Button from '../../widgets/FlatButton'; | ||
import { EditIcon } from '../../icons'; | ||
// import Confirm from '../../components/forms/Confirm'; | ||
// import ForkExerciseForm from '../../components/forms/ForkExerciseForm'; | ||
|
||
import withLinks from '../../../helpers/withLinks'; | ||
|
||
const ExerciseButtons = ({ | ||
exerciseId, | ||
links: { | ||
EXERCISE_EDIT_URI_FACTORY, | ||
EXERCISE_EDIT_SIMPLE_CONFIG_URI_FACTORY, | ||
EXERCISE_EDIT_LIMITS_URI_FACTORY | ||
} | ||
}) => | ||
<div> | ||
<ButtonGroup> | ||
<LinkContainer to={EXERCISE_EDIT_URI_FACTORY(exerciseId)}> | ||
<Button bsStyle="warning" bsSize="sm"> | ||
<EditIcon /> | ||
| ||
<FormattedMessage | ||
id="app.exercise.editSettings" | ||
defaultMessage="Exercise Settings" | ||
/> | ||
</Button> | ||
</LinkContainer> | ||
<LinkContainer to={EXERCISE_EDIT_SIMPLE_CONFIG_URI_FACTORY(exerciseId)}> | ||
<Button bsStyle="warning" bsSize="sm"> | ||
<EditIcon /> | ||
| ||
<FormattedMessage | ||
id="app.exercise.editConfig" | ||
defaultMessage="Tests Configuration" | ||
/> | ||
</Button> | ||
</LinkContainer> | ||
<LinkContainer to={EXERCISE_EDIT_LIMITS_URI_FACTORY(exerciseId)}> | ||
<Button bsStyle="warning" bsSize="sm"> | ||
<EditIcon /> | ||
| ||
<FormattedMessage | ||
id="app.exercise.editLimits" | ||
defaultMessage="Tests Limits" | ||
/> | ||
</Button> | ||
</LinkContainer> | ||
{/* <ForkExerciseForm | ||
exerciseId={exercise.id} | ||
groups={groups} | ||
forkId={forkId} | ||
onSubmit={formData => forkExercise(forkId, formData)} | ||
/> */} | ||
</ButtonGroup> | ||
<p /> | ||
</div>; | ||
|
||
ExerciseButtons.propTypes = { | ||
exerciseId: PropTypes.string.isRequired, | ||
links: PropTypes.object | ||
}; | ||
|
||
export default withLinks(ExerciseButtons); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default from './ExerciseButtons'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.