Skip to content

Commit

Permalink
task/WP-288-QueueFilter-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor Grafft authored and Taylor Grafft committed Oct 10, 2023
1 parent a0ade92 commit ff2cd88
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions client/src/components/Applications/AppForm/AppForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const appShape = PropTypes.shape({
coresPerNode: PropTypes.number,
maxMinutes: PropTypes.number,
tags: PropTypes.arrayOf(PropTypes.string),
queueFilter: PropTypes.arrayOf(PropTypes.string),
}),
systemNeedsKeys: PropTypes.bool,
pushKeysSystem: PropTypes.shape({}),
Expand Down Expand Up @@ -268,6 +269,7 @@ export const AppSchemaForm = ({ app }) => {
appId: app.definition.id,
appVersion: app.definition.version,
execSystemId: app.definition.jobAttributes.execSystemId,
queueFilter: app.definition.notes.queueFilter,
};

let missingAllocation = false;
Expand Down Expand Up @@ -691,11 +693,21 @@ export const AppSchemaForm = ({ app }) => {
)
.map((q) => q.name)
.sort()
.map((queueName) => (
<option key={queueName} value={queueName}>
{queueName}
</option>
))
.map((queueName) =>
app.definition.notes.queueFilter ? (
app.definition.notes.queueFilter.includes(
queueName
) && (
<option key={queueName} value={queueName}>
{queueName}
</option>
)
) : (
<option key={queueName} value={queueName}>
{queueName}
</option>
)
)
.sort()}
</FormField>
)}
Expand Down

0 comments on commit ff2cd88

Please sign in to comment.