Skip to content

Commit

Permalink
Merge branch 'main' into task/WP-100--display-all-jobAttributes-via-g…
Browse files Browse the repository at this point in the history
…etJobDisplayInformation
  • Loading branch information
chandra-tacc authored Oct 24, 2023
2 parents c7bfc84 + fa8c979 commit f2b97be
Show file tree
Hide file tree
Showing 54 changed files with 1,107 additions and 515 deletions.
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.2.1] - 2023-10-05: Search and Target Path fixes

### Fixed
WP-297: Fix site search for public and community data (#870)
WP-306: Fix target path regression (#871)

## [3.2.0] - 2023-10-02: V3 integration improvements; bug fixes

### Added

- WP-211: App Form updates to allow target path (#857)
- WP-272: Include username in Onboarding Admin user listing (#861)

### Changed

- WP-189 Handle timeout exit code for interactive app jobs (#851)
- WP-163 Compress Archive Path Fix (#846)
- WP-105: create common utils function (#850)
- WP-172: Minimize unit test warnings (#855)
- WP-62: Changed upload function to use TAPIS file insert api (#859)

### Fixed
- WP-249 Shared Workspace Copy Bug Fix (#858)
- WP-262 Workspace file operations bug fixes (#862)
- WP-276: Fixed Data Files Add button dropdown off-centered UI (#863)
- Quick: handle missing default system; enable work as default system locally (#867)
- WP-52 Jobs View Infinite Scroll Fix (#865)
- WP-228: Fixed sorting for system list (#860)
- WP-209: fix deprecated warnings (part II) (#852)


## [3.1.2] - 2023-08-22: Secure user search endpoint

### Fixed
Expand Down Expand Up @@ -928,7 +959,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.0.0] - 2020-02-28
v1.0.0 Production release as of Feb 28, 2020.

[unreleased]: https://github.com/TACC/Core-Portal/compare/v3.1.2...HEAD
[unreleased]: https://github.com/TACC/Core-Portal/compare/v3.2.1...HEAD
[3.2.1]: https://github.com/TACC/Core-Portal/releases/tag/v3.2.1
[3.2.0]: https://github.com/TACC/Core-Portal/releases/tag/v3.2.0
[3.1.2]: https://github.com/TACC/Core-Portal/releases/tag/v3.1.2
[3.1.1]: https://github.com/TACC/Core-Portal/releases/tag/v3.1.1
[3.1.0]: https://github.com/TACC/Core-Portal/releases/tag/v3.1.0
Expand Down
309 changes: 163 additions & 146 deletions client/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"stylelint": "^14.4.0",
"stylelint-config-recommended": "^7.0.0",
"stylelint-config-standard": "^25.0.0",
"timekeeper": "^2.3.1",
"typescript": "^4.4.3",
"vite": "^2.9.16",
"weak-key": "^1.0.1"
Expand Down
95 changes: 76 additions & 19 deletions client/src/components/Applications/AppForm/AppForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ import { Link } from 'react-router-dom';
import { getSystemName } from 'utils/systems';
import FormSchema from './AppFormSchema';
import {
isTargetPathEmpty,
isTargetPathField,
getInputFieldFromTargetPathField,
getQueueMaxMinutes,
getMaxMinutesValidation,
getNodeCountValidation,
getCoresPerNodeValidation,
getTargetPathFieldName,
updateValuesForQueue,
} from './AppFormUtils';
import DataFilesSelectModal from '../../DataFiles/DataFilesModals/DataFilesSelectModal';
Expand Down Expand Up @@ -201,7 +205,7 @@ export const AppSchemaForm = ({ app }) => {
const hasCorral =
configuration.length &&
['corral.tacc.utexas.edu', 'data.tacc.utexas.edu'].some((s) =>
defaultHost.endsWith(s)
defaultHost?.endsWith(s)
);
return {
allocations: matchingExecutionHost
Expand Down Expand Up @@ -459,17 +463,53 @@ export const AppSchemaForm = ({ app }) => {
onSubmit={(values, { setSubmitting, resetForm }) => {
const job = cloneDeep(values);

job.fileInputs = Object.entries(job.fileInputs)
.map(([k, v]) => {
// filter out read only inputs. 'FIXED' inputs are tracked as readOnly
if (
Object.hasOwn(appFields.fileInputs, k) &&
appFields.fileInputs[k].readOnly
)
return;
return { name: k, sourceUrl: v };
})
.filter((fileInput) => fileInput && fileInput.sourceUrl); // filter out any empty values
// Transform input field values into format that jobs service wants.
// File Input structure will have 2 fields if target path is required by the app.
// field 1 - has source url
// field 2 - has target path for the source url.
// tapis wants only 1 field with 2 properties - source url and target path.
// The logic below handles that scenario by merging the related fields into 1 field.
job.fileInputs = Object.values(
Object.entries(job.fileInputs)
.map(([k, v]) => {
// filter out read only inputs. 'FIXED' inputs are tracked as readOnly
if (
Object.hasOwn(appFields.fileInputs, k) &&
appFields.fileInputs[k].readOnly
)
return;
return {
name: k,
sourceUrl: !isTargetPathField(k) ? v : null,
targetDir: isTargetPathField(k) ? v : null,
};
})
.filter((v) => v) //filter nulls
.reduce((acc, entry) => {
// merge input field and targetPath fields into one.
const key = getInputFieldFromTargetPathField(entry.name);
if (!acc[key]) {
acc[key] = {};
}
acc[key]['name'] = key;
acc[key]['sourceUrl'] =
acc[key]['sourceUrl'] ?? entry.sourceUrl;
acc[key]['targetPath'] =
acc[key]['targetPath'] ?? entry.targetDir;
return acc;
}, {})
)
.flat()
.filter((fileInput) => fileInput.sourceUrl) // filter out any empty values
.map((fileInput) => {
if (isTargetPathEmpty(fileInput.targetPath)) {
return {
name: fileInput.name,
sourceUrl: fileInput.sourceUrl,
};
}
return fileInput;
});

job.parameterSet = Object.assign(
{},
Expand Down Expand Up @@ -559,8 +599,15 @@ export const AppSchemaForm = ({ app }) => {
</div>
{Object.entries(appFields.fileInputs).map(
([name, field]) => {
// TODOv3 handle fileInputArrays https://jira.tacc.utexas.edu/browse/TV3-81
return (
// TODOv3 handle fileInputArrays https://jira.tacc.utexas.edu/browse/WP-81
return isTargetPathField(name) ? (
<FormField
{...field}
name={`fileInputs.${name}`}
placeholder="Target Path Name"
key={`fileInputs.${name}`}
/>
) : (
<FormField
{...field}
name={`fileInputs.${name}`}
Expand Down Expand Up @@ -645,11 +692,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
Loading

0 comments on commit f2b97be

Please sign in to comment.