-
Notifications
You must be signed in to change notification settings - Fork 86
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
Webui settings #3075
Merged
Merged
Webui settings #3075
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
fec62c6
Adding skeleton for Job Detail page. Temp available at HOST:PORT/jobd…
XandraMcC d931433
Allow running the Web UI detached / in dev mode
simonwo 3c5098f
Show jobs table in date order and with relative dates.
simonwo 30b2932
Docker parameters should be separated by spaces at least.
simonwo 5758e35
Make jobs table more closely match design
simonwo 5e86670
Space out action buttons and add contrast.
simonwo bc75372
Refactor sidebar to be Bacalhau branded
simonwo d48140e
Replace new color icons + fixed jobs table css
XandraMcC 19161e0
Merge branch 'deploy-web-ui' into webui-job-detail
XandraMcC a4ed0fb
Adding containers to Job Detail page
XandraMcC dc585d9
Adding routing for Job Detail page
XandraMcC ce9150b
Add JobInfo component with some data
XandraMcC 539e5c8
Merge branch 'main' into webui-job-detail
XandraMcC a667c90
Creation of Table reusable component & new API call for job executions
XandraMcC d962bd7
Merge branch 'main' into webui-job-detail
XandraMcC 6c95b02
Add styling to svgs so they appear in UI
XandraMcC 7a5d1db
Adding execution data and rejigging layout of job detail page
XandraMcC b72eef9
Refactoring and styling
XandraMcC 3813d67
Merge branch 'main' into webui-job-detail
XandraMcC a35b5ae
Dispalying individual execution data in GUI
XandraMcC 430e062
refactor - still infinite looping
XandraMcC 06d2fe9
finishing off job detail page
XandraMcC 65157af
Merge branch 'main' into webui-job-detail
XandraMcC 0816e1c
Merge branch 'main' into webui-job-detail
XandraMcC e6926b4
fix lint error
XandraMcC ee03bf7
linting
XandraMcC 3c1d36d
Updating Moment & cleaning up code
XandraMcC cb44f38
A few stragglers
XandraMcC 3c7411d
Merge branch 'main' into webui-job-detail
XandraMcC 29b0853
Fixing as per comments on PR
XandraMcC 400ca34
Merge branch 'main' into webui-job-detail
XandraMcC be389dd
Merge branch 'webui-job-detail' of https://github.com/bacalhau-projec…
XandraMcC 0d16f2e
Styling + adding jobs options to settings
XandraMcC 1551cd4
Merge branch 'main' into webui-settings
XandraMcC 98d6b2c
Adding ability to change jobs table in settings
XandraMcC 659ae62
Merge branch 'main' into webui-settings
XandraMcC e2c6025
Merge branch 'main' into webui-settings
XandraMcC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@import '../../styles/variables'; | ||
|
||
.checkboxGroup { | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 10px; | ||
|
||
label { | ||
margin-left: 10px; | ||
font-size: 16px; | ||
color: #333; | ||
} | ||
} | ||
|
||
.saveButton { | ||
padding: 5px 15px; | ||
background-color: rgba($light-blue, .5); | ||
color: $text-color-dark; | ||
border: none; | ||
border-radius: 20px; | ||
cursor: pointer; | ||
font-size: 14px; | ||
|
||
&:hover { | ||
background-color: rgba($light-blue, .7); | ||
} | ||
} | ||
|
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 |
---|---|---|
|
@@ -3,8 +3,10 @@ import { | |
useTableSettings, | ||
TableSettings, | ||
} from "../../context/TableSettingsContext"; | ||
import styles from "./Settings.module.scss"; | ||
import Layout from "../../layout/Layout"; | ||
import Checkbox from "../../components/Checkbox/Checkbox"; | ||
import Container from "../../components/Container/Container"; | ||
|
||
const Settings = () => { | ||
const { settings, toggleSetting } = useTableSettings(); | ||
|
@@ -24,53 +26,61 @@ const Settings = () => { | |
localStorage.setItem("tableSettings", JSON.stringify(tempSettings)); | ||
} | ||
}); | ||
window.alert("Settings updated"); | ||
}; | ||
|
||
const jobsOptions: { label: string; key: keyof TableSettings }[] = [ | ||
{ label: "Job ID", key: "showJobId" }, | ||
{ label: "Name", key: "showJobName" }, | ||
{ label: "Created", key: "showCreated" }, | ||
{ label: "Program", key: "showProgram" }, | ||
{ label: "Job Type", key: "showJobType" }, | ||
{ label: "Label", key: "showLabel" }, | ||
{ label: "Status", key: "showStatus" }, | ||
]; | ||
Comment on lines
+32
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use a similar technique to avoid hard-coding the |
||
|
||
const nodesOptions: { label: string; key: keyof TableSettings }[] = [ | ||
{ label: "Node ID", key: "showNodeId" }, | ||
{ label: "Name", key: "showNodeName" }, | ||
{ label: "Type", key: "showNodeType" }, | ||
{ label: "Environment", key: "showEnv" }, | ||
{ label: "Inputs In", key: "showInputs" }, | ||
{ label: "Outputs", key: "showOutputs" }, | ||
{ label: "Version", key: "showVersion" }, | ||
]; | ||
|
||
return ( | ||
<Layout pageTitle="Settings"> | ||
{/* Jobs Dashboard Settings */} | ||
<Container title={"Jobs Dashboard Settings"}> | ||
{jobsOptions.map(({ label, key }) => ( | ||
<div className={styles.checkboxGroup}> | ||
<Checkbox | ||
label={label} | ||
checked={tempSettings[key]} | ||
onChange={() => handleToggle(key)} | ||
/> | ||
</div> | ||
))} | ||
<button onClick={handleSave} className={styles.saveButton}> | ||
Save | ||
</button> | ||
</Container> | ||
{/* Node Dashboard Settings */} | ||
<h3>Nodes Dashboard Settings:</h3> | ||
<Checkbox | ||
label="Node ID" | ||
checked={tempSettings.showNodeId} | ||
onChange={() => handleToggle("showNodeId")} | ||
/> | ||
<Checkbox | ||
label="Name" | ||
checked={tempSettings.showName} | ||
onChange={() => handleToggle("showName")} | ||
/> | ||
<Checkbox | ||
label="Type" | ||
checked={tempSettings.showType} | ||
onChange={() => handleToggle("showType")} | ||
/> | ||
<Checkbox | ||
label="Environment" | ||
checked={tempSettings.showEnv} | ||
onChange={() => handleToggle("showEnv")} | ||
/> | ||
<Checkbox | ||
label="Inputs In" | ||
checked={tempSettings.showInputs} | ||
onChange={() => handleToggle("showInputs")} | ||
/> | ||
<Checkbox | ||
label="Outputs" | ||
checked={tempSettings.showOutputs} | ||
onChange={() => handleToggle("showOutputs")} | ||
/> | ||
<Checkbox | ||
label="Version" | ||
checked={tempSettings.showVersion} | ||
onChange={() => handleToggle("showVersion")} | ||
/> | ||
{/* <Checkbox | ||
label="Action" | ||
checked={tempSettings.showAction} | ||
onChange={() => handleToggle("showAction")} | ||
/> */} | ||
<button onClick={handleSave}>Save</button> | ||
<Container title={"Nodes Dashboard Settings"}> | ||
{nodesOptions.map(({ label, key }) => ( | ||
<div className={styles.checkboxGroup}> | ||
<Checkbox | ||
label={label} | ||
checked={tempSettings[key]} | ||
onChange={() => handleToggle(key)} | ||
/> | ||
</div> | ||
))} | ||
<button onClick={handleSave} className={styles.saveButton}> | ||
Save | ||
</button> | ||
</Container> | ||
</Layout> | ||
); | ||
}; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We added customisable columns so that we could get more node details available in the table. Currently we're missing labels and capacity. Could you (add a new ticket to) add those in plz?