Skip to content

Commit

Permalink
merging remote to local
Browse files Browse the repository at this point in the history
  • Loading branch information
asimregmi committed Dec 19, 2023
2 parents 796fe39 + a3267f0 commit 8c86f01
Show file tree
Hide file tree
Showing 23 changed files with 206 additions and 53 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.4.3] - 2023-12-11: Fix push key handling
### Fixed

- WP-408: use archiveSystemId set in app definition as default (#917)


## [3.4.2] - 2023-12-07: Fix push key handling
### Fixed

- WP-402: handle 401 unauthorized Tapis error for pushing keys (#915, #916)

## [3.4.1] - 2023-12-05: Fix web hook and impersonation bug
### Fixed

- WP-400: Fix impersonate url (#912)
- Bug: Fix websockets via ASGI_APPLICATION setting (#913)


## [3.4.0] - 2023-11-27: Django upgrade to 4 and bug fixes
### Changed

Expand Down Expand Up @@ -1006,7 +1025,10 @@ WP-306: Fix target path regression (#871)
## [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.4.0...HEAD
[unreleased]: https://github.com/TACC/Core-Portal/compare/v3.4.3...HEAD
[3.4.3]: https://github.com/TACC/Core-Portal/releases/tag/v3.4.3
[3.4.2]: https://github.com/TACC/Core-Portal/releases/tag/v3.4.2
[3.4.1]: https://github.com/TACC/Core-Portal/releases/tag/v3.4.1
[3.4.0]: https://github.com/TACC/Core-Portal/releases/tag/v3.4.0
[3.3.2]: https://github.com/TACC/Core-Portal/releases/tag/v3.3.2
[3.3.1]: https://github.com/TACC/Core-Portal/releases/tag/v3.3.1
Expand Down
11 changes: 8 additions & 3 deletions client/src/components/Applications/AppForm/AppForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export const AppSchemaForm = ({ app }) => {
coresPerNode: app.definition.jobAttributes.coresPerNode,
maxMinutes: app.definition.jobAttributes.maxMinutes,
archiveSystemId:
defaultSystem || app.definition.jobAttributes.archiveSystemId,
app.definition.jobAttributes.archiveSystemId || defaultSystem,
archiveSystemDir: app.definition.jobAttributes.archiveSystemDir,
archiveOnAppError: true,
appId: app.definition.id,
Expand Down Expand Up @@ -787,14 +787,19 @@ export const AppSchemaForm = ({ app }) => {
description="System into which output files are archived after application execution."
name="archiveSystemId"
type="text"
placeholder={defaultSystem}
placeholder={
app.definition.archiveSystemId || defaultSystem
}
/>
<FormField
label="Archive Directory"
description="Directory into which output files are archived after application execution."
name="archiveSystemDir"
type="text"
placeholder="HOST_EVAL($WORK)/tapis-jobs-archive/${JobCreateDate}/${JobName}-${JobUUID}" // TODOv3: Determine safe root path for archiving https://jira.tacc.utexas.edu/browse/WP-103
placeholder={
app.definition.archiveSystemDir ||
'HOST_EVAL($HOME)/tapis-jobs-archive/${JobCreateDate}/${JobName}-${JobUUID}'
}
/>
</>
) : null}
Expand Down
11 changes: 10 additions & 1 deletion client/src/components/Applications/AppForm/AppForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,20 @@ describe('AppSchemaForm', () => {
...initialMockState,
});

const { getByText } = renderAppSchemaFormComponent(store, {
const { getByText, container } = renderAppSchemaFormComponent(store, {
...helloWorldAppFixture,
});

const archiveSystemId = container.querySelector(
'input[name="archiveSystemId"]'
);
await waitFor(() => {
expect(getByText(/TACC-ACI/)).toBeDefined();

// use app definition default archive system
expect(archiveSystemId.value).toBe(
helloWorldAppFixture.definition.jobAttributes.archiveSystemId
);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const helloWorldAppFixture = {
execSystemInputDir: '${JobWorkingDir}',
execSystemOutputDir: '${JobWorkingDir}/output',
execSystemLogicalQueue: 'development',
archiveSystemId: 'cloud.data',
archiveSystemId: 'frontera',
archiveSystemDir:
'HOST_EVAL($HOME)/tapis-jobs-archive/${JobCreateDate}/${JobName}-${JobUUID}',
archiveOnAppError: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,32 @@ const DataFilesListing = ({ api, scheme, system, path, isPublic }) => {
const systemDisplayName = useSystemDisplayName({ scheme, system, path });
const homeDir = selectedSystem?.homeDir;

// Check if the current path is the home directory itself
const isAtHomeDir = path.replace(/^\/+/, '') === homeDir?.replace(/^\/+/, '');
// Check if the current path is the root directory
const isRootDir = path === '/' || path === '';

// Determine the sectionName based on the path (if homeDir, use systemDisplayName--else use current dir)
const sectionName = isAtHomeDir
? systemDisplayName
: getCurrentDirectory(path);
// Adjusted check for home directory
const isAtHomeDir =
isRootDir || path.replace(/^\/+/, '') === homeDir?.replace(/^\/+/, '');

// Determine the sectionName with added handling for root directory
function determineSectionName(
isAtHomeDir,
isRootDir,
systemDisplayName,
path
) {
if (isAtHomeDir) {
return isRootDir ? 'Root' : systemDisplayName;
}
return getCurrentDirectory(path);
}

const sectionName = determineSectionName(
isAtHomeDir,
isRootDir,
systemDisplayName,
path
);

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const DataFilesTablePlaceholder = ({ section, data }) => {
.
</>
);
if (err === '500') {
if (err === '500' || err === '401') {
if (downSystems.includes(currSystemHost)) {
return (
<div className="h-100 listing-placeholder">
Expand Down
32 changes: 19 additions & 13 deletions client/src/components/Onboarding/OnboardingAdmin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,21 @@ const OnboardingAdmin = () => {
const [showIncompleteOnly, setShowIncompleteOnly] = useState(false);

const toggleShowIncomplete = () => {
dispatch({
type: 'FETCH_ONBOARDING_ADMIN_LIST',
payload: {
offset: 0,
limit,
query,
showIncompleteOnly: !showIncompleteOnly, // Toggle the parameter
},
});
setShowIncompleteOnly((prev) => !prev);
};

const { users, offset, limit, total, query, loading, error } = useSelector(
(state) => state.onboarding.admin
);

const filteredUsers = users.filter((user) =>
showIncompleteOnly ? !user.setupComplete : true
);

const paginationCallback = useCallback(
(page) => {
dispatch({
Expand All @@ -256,10 +260,11 @@ const OnboardingAdmin = () => {
offset: (page - 1) * limit,
limit,
query,
showIncompleteOnly,
},
});
},
[offset, limit, query]
[offset, limit, query, showIncompleteOnly]
);

const viewLogCallback = useCallback(
Expand All @@ -276,7 +281,7 @@ const OnboardingAdmin = () => {
useEffect(() => {
dispatch({
type: 'FETCH_ONBOARDING_ADMIN_LIST',
payload: { offset, limit, query: null },
payload: { offset, limit, query: null, showIncompleteOnly },
});
}, [dispatch]);

Expand All @@ -294,6 +299,7 @@ const OnboardingAdmin = () => {
</div>
);
}

return (
<div className={styles.root}>
<div className={styles['container']}>
Expand All @@ -302,7 +308,7 @@ const OnboardingAdmin = () => {
<div className={styles['search-checkbox-container']}>
<OnboardingAdminSearchbar />
<label
className={styles['checkbox-label']}
className={styles['checkbox-label-container']}
htmlFor="incompleteuser"
>
<Checkbox
Expand All @@ -313,24 +319,24 @@ const OnboardingAdmin = () => {
tabIndex={0}
onClick={toggleShowIncomplete}
/>
Show Incomplete
<span className={styles['label']}>Show Only Incomplete</span>
</label>
</div>
</div>
{filteredUsers.length === 0 && (
{users.length === 0 && (
<div className={styles['no-users-placeholder']}>
<Message type="warn">No users to show.</Message>
</div>
)}
<div className={styles['user-container']}>
{filteredUsers.length > 0 && (
{users.length > 0 && (
<OnboardingAdminList
users={filteredUsers}
users={users}
viewLogCallback={viewLogCallback}
/>
)}
</div>
{filteredUsers.length > 0 && (
{users.length > 0 && (
<div className={styles['paginator-container']}>
<Paginator
current={current}
Expand Down
38 changes: 29 additions & 9 deletions client/src/components/Onboarding/OnboardingAdmin.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,44 @@
border-bottom: 1px solid #707070;
padding-bottom: 8px;
margin-bottom: 1.5em;

@media (max-width: 768px) {
flex-direction: column;
align-items: flex-start;
}
}

.search-checkbox-container {
display: flex;
width: 45%;
justify-content: space-between;
align-items: center;

@media (max-width: 990px) {
flex-direction: column;
align-items: flex-start;
}
}

.checkbox-label {
.checkbox-label-container {
display: flex;
justify-content: space-between;
align-items: center;
width: 130px;
margin: 0;
font-weight: bold;
font-size: 13px;
margin: 0 0 0 20px;

@media (max-width: 768px) {
margin-left: 0;
margin-top: 20px;
}

@media (max-width: 991px) {
margin-left: 0;
margin-top: 10px;
}
}

.label {
font-weight: bold;
margin: 0 0 0 10px;
}
.paginator-container {
width: 100%;
display: flex;
Expand Down Expand Up @@ -100,8 +119,9 @@
.user > td:not(.has-wrappable-content):not(.status) {
@include truncate-with-ellipsis;
}
.user:nth-child(even) > td:not(.staffwait):not(.name) {
background-color: #c6c6c61a;
.user:nth-child(4n),
.user:nth-child(4n-1) > td:not(.staffwait) {
background-color: #f4f4f4;
}

.username {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
/* WARN: Non-standard un-documented first-party breakpoint */
@media (max-width: 1700px) {
.query-fieldset {
width: 460px;
width: 360px;
}
}

@media (max-width: 768px) {
.query-fieldset {
width: 260px;
}
}
/* FP-563: Support count in status message */
Expand Down
5 changes: 5 additions & 0 deletions client/src/components/Onboarding/OnboardingStatus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ const getContents = (step) => {
case 'completed':
type = 'success';
break;
case null:
type = 'unavailable';
break;
default:
type = 'normal';
}
Expand All @@ -38,6 +41,8 @@ const getContents = (step) => {
case 'failed':
case 'error':
return <Pill type={type}>Unsuccessful</Pill>;
case null:
return <Pill type={type}>Unavailable</Pill>;
case 'completed':
return <Pill type={type}>Completed</Pill>;
case 'processing':
Expand Down
6 changes: 4 additions & 2 deletions client/src/components/PublicData/PublicData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import DataFilesShowPathModal from '../DataFiles/DataFilesModals/DataFilesShowPa
import { ToolbarButton } from '../DataFiles/DataFilesToolbar/DataFilesToolbar';

import styles from './PublicData.module.css';
import dropdownStyles from '../../styles/components/dropdown-menu.css';
import CombinedBreadcrumbs from '../DataFiles/CombinedBreadcrumbs/CombinedBreadcrumbs';

const PublicData = () => {
const history = useHistory();
Expand Down Expand Up @@ -98,9 +100,9 @@ const PublicDataListing = ({ canDownload, downloadCallback }) => {
<Section
// HACK: Replicate wrapper class gives button correct global style
// WARNING: Applies unused and redundant `.workbench-content` styles
className="workbench-content"
className="workbench-content workbench-wrapper"
header={
<DataFilesBreadcrumbs
<CombinedBreadcrumbs
api={api}
scheme={scheme}
system={system}
Expand Down
5 changes: 5 additions & 0 deletions client/src/components/_common/Pill/Pill.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@
.is-normal {
background-color: var(--global-color-accent--normal);
}

.is-unavailable {
background-color: transparent;
color: inherit;
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const SystemsPushKeysModal = () => {
label="TACC Token"
required
disabled={submitting}
autocomplete="off"
autoComplete="off"
/>
</ModalBody>
<ModalFooter>
Expand Down
2 changes: 1 addition & 1 deletion client/src/redux/sagas/datafiles.sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function* fetchFiles(action) {
},
});
// If listing returns 500, body should contain a system def for key pushing.
yield e.status === 500 &&
yield (e.status === 500 || e.status === 401) &&
put({
type: 'SET_SYSTEM',
payload: {
Expand Down
Loading

0 comments on commit 8c86f01

Please sign in to comment.