-
Notifications
You must be signed in to change notification settings - Fork 264
Showing recently added task in create task #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I probably didn't explain this properly. We want a table of recent created task definitions. Clicking on a task definition should update the editor with the saved copy. An example of a task definition can be seen in https://taskcluster-web.netlify.com/tasks/create/ (notice how metadata.name was modifed to foo-bar-baz):
provisionerId: aws-provisioner-v1
workerType: tutorial
created: '2019-02-14T14:17:27.131Z'
deadline: '2019-02-14T17:17:27.131Z'
dependencies: YrHJCEpnSda_R08SGy3cqA
payload:
image: 'ubuntu:13.10'
command:
- /bin/bash
- '-c'
- for ((i=1;i<=600;i++)); do echo $i; sleep 1; done
maxRunTime: 630
metadata:
name: foo-bar-baz
description: Markdown description of **what** this task does
owner: name@example.com
source: 'https://taskcluster-web.netlify.com/tasks/create'When the user clicks the plus icon "Create Task", an entry should be added to the database so that when the user navigates back to https://taskcluster-web.netlify.com/tasks/create/, there is a list with the label (e.g., "foo-bar-baz" considering the above task definition).
|
@helfi92 how I can convert the value of task(which is a string) to object so that I can extract the metadata.name from it? |
|
You'd have to use the |
|
@helfi92 I amend a new commit as you suggested. Now createTask component shows the recent task based on metadata.name and if you click on that it updated the editor with its content. can you review this once again? |
|
@helfi92 Can you make some comment on the pr. I don't want to disturb you. sorry! |
|
I am currently reviewing. One moment please :) |
|
ok, thanks |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome! I added some requested changes but overall I'm pretty happy with how it's going :)
|
@helfi92 I amend a new commit which solves all the problems which you mention above. can you take a look once again? :) |
|
I'll review it when I get the chance. In the meantime, feel free to tackle another UI issue like #208. I haven't heard back from the other person... |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost :)
|
@iFlameing When adding requested changes, try not to rebase and force push please. That way I could look at the |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last small change then we should be ready to merge :)
diff --git a/ui/src/views/Tasks/CreateTask/index.jsx b/ui/src/views/Tasks/CreateTask/index.jsx
index 135b0eaa4..a07e80392 100644
--- a/ui/src/views/Tasks/CreateTask/index.jsx
+++ b/ui/src/views/Tasks/CreateTask/index.jsx
@@ -73,6 +73,9 @@ const defaultTask = {
...theme.mixins.actionButton,
right: theme.spacing.unit * 11,
},
+ listItemButton: {
+ ...theme.mixins.listItemButton,
+ },
}))
export default class CreateTask extends Component {
static defaultProps = {
@@ -313,6 +316,7 @@ export default class CreateTask extends Component {
}>
{this.state.recentTaskDefinitions.map(task => (
<ListItem
+ className={classes.listItemButton}
button
onClick={() => {
this.handleRecentTaskDefinitionClick(task);|
Oops, next time don't rebase please :) FYI, the GitHub UI always gives me the chance to squash all commits before merging to master. |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 Thank you!
Bug 1568471 - close HTTP response bodies when finished with them
Expand scopes before validating task scopes
Expand scopes before validating task scopes

Fixes #164
@helfi92 can you review my initial commit?
