Skip to content
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

Run tasks from ui #845

Merged
merged 19 commits into from
Jan 14, 2019
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4fcf6c3
Add specific task mutations to the api
rocketeerbkw Dec 3, 2018
f80feaa
Increase storage size of task commands
rocketeerbkw Dec 3, 2018
b305b56
Invoke a shell to allow more complicated task commands
rocketeerbkw Dec 3, 2018
6050674
taskDrushArchiveDump saves to PV location and gives download instruct…
rocketeerbkw Dec 3, 2018
2d6e93d
Switch to apollo-server-express for graphql server
rocketeerbkw Dec 10, 2018
3bfe7fa
Add graphql subscription support to api
rocketeerbkw Dec 10, 2018
c776c0e
Add api subscription for backup/restore data
rocketeerbkw Dec 10, 2018
74f4f6a
UI now updates backups page in real-time when websockets are available
rocketeerbkw Dec 10, 2018
7286ba9
API subscriptions should filter on environment, not project
rocketeerbkw Dec 10, 2018
52ef93b
Add deploymentChanged API subscription and utilize it in UI
rocketeerbkw Dec 10, 2018
8ab8b83
Use rabbitmq for API pubsub engine
rocketeerbkw Dec 10, 2018
3597c24
Add taskChanged API subscription and utilize it in UI
rocketeerbkw Dec 10, 2018
b296f24
Merge remote-tracking branch 'origin/786-add-api-subscriptions' into …
rocketeerbkw Dec 19, 2018
cd9bebf
Merge remote-tracking branch 'origin/api-distinct-task-add' into 805-…
rocketeerbkw Dec 19, 2018
1b5b2aa
Add file upload/download for tasks to api
rocketeerbkw Dec 21, 2018
3e2a59e
Upload files generated by taskDrushArchiveDump to api
rocketeerbkw Dec 21, 2018
eba8d08
Show task files in the UI
rocketeerbkw Dec 21, 2018
8abdd75
Merge branch '805-task-file-storage' into run-tasks-from-ui
rocketeerbkw Jan 9, 2019
5a2ad76
Update "add task" UI to match api
rocketeerbkw Jan 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Show task files in the UI
  • Loading branch information
rocketeerbkw committed Dec 21, 2018
commit eba8d08d353e964f2b8092ac1edc51ed088013a1
22 changes: 22 additions & 0 deletions services/ui/src/components/Task/index.js
Original file line number Diff line number Diff line change
@@ -45,6 +45,17 @@ const Task = ({ task }) => (
</div>
</div>
</div>
{task.files.length > 0 &&
<div className="field-wrapper files">
<div>
<label>Files</label>
<ul className="field">
{task.files.map(file => (
<li key={file.id}><a href={file.download}>{file.filename}</a></li>
))}
</ul>
</div>
</div>}
</div>
<LogViewer logs={task.logs} />
<style jsx>{`
@@ -166,6 +177,17 @@ const Task = ({ task }) => (
padding-right: calc((100vw / 16) * 0.5);
}
}
&.files {
ul.field {
margin: 0;

li {
list-style: none;
margin: 0;
padding: 0;
}
}
}
}
}
`}</style>
2 changes: 0 additions & 2 deletions services/ui/src/components/Tasks/index.js
Original file line number Diff line number Diff line change
@@ -43,7 +43,6 @@ const Tasks = ({
<div className="header">
<label>Name</label>
<label>Created</label>
<label>Command</label>
<label className="service">Service</label>
<label className="status">Status</label>
</div>
@@ -71,7 +70,6 @@ const Tasks = ({
.local()
.format('DD MMM YYYY, HH:mm:ss')}
</div>
<div className="command">{task.command}</div>
<div className="service">{task.service}</div>
<div className={`status ${task.status}`}>
<span>{task.status.charAt(0).toUpperCase() +
10 changes: 10 additions & 0 deletions services/ui/src/pages/tasks.js
Original file line number Diff line number Diff line change
@@ -38,6 +38,11 @@ const query = gql`
command
service
logs
files {
id
filename
download
}
}
}
}
@@ -56,6 +61,11 @@ const subscribe = gql`
command
service
logs
files {
id
filename
download
}
}
}
`;