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

Fixes #37140 - Update web UI for SCA-only #10880

Merged
merged 4 commits into from
Feb 14, 2024
Merged
Changes from 1 commit
Commits
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
Refs #37140 - remove RepositorySetsTab non-SCA banner
jeremylenz committed Feb 14, 2024
commit bdc92eaa7d8a30f24aa050390f553fa51c47f9b3
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ import {
setContentOverrides,
} from './RepositorySetsActions';

import { selectOrganization, selectOrganizationStatus } from '../../Cards/SystemPurposeCard/SystemPurposeSelectors';
import { selectOrganizationStatus } from '../../Cards/SystemPurposeCard/SystemPurposeSelectors';
import { getOrganization } from '../../Cards/SystemPurposeCard/SystemPurposeActions';

import { REPOSITORY_SETS_KEY, STATUSES, STATUS_TO_PARAM, PARAM_TO_FRIENDLY_NAME, PROVIDER_TYPES, PROVIDER_TYPE_PARAM_TO_FRIENDLY_NAME, PROVIDER_TYPE_TO_PARAM } from './RepositorySetsConstants.js';
@@ -172,9 +172,6 @@ const RepositorySetsTab = () => {
organization_id: orgId,
} = hostDetails;

const {
simple_content_access: simpleContentAccess,
} = useSelector(state => selectOrganization(state, orgId));
const orgStatus = useSelector(state => selectOrganizationStatus(state, orgId));
const orgNotLoaded = orgStatus !== STATUS.RESOLVED;

@@ -265,14 +262,14 @@ const RepositorySetsTab = () => {
}
return getHostRepositorySets({
content_access_mode_env: toggleGroupState === LIMIT_TO_ENVIRONMENT,
content_access_mode_all: simpleContentAccess,
content_access_mode_all: true,
host_id: hostId,
...apiSortParams,
...modifiedParams,
});
},
[hostId, statusSelected, STATUS_LABEL, repoTypeSelected,
REPO_TYPE_LABEL, toggleGroupState, LIMIT_TO_ENVIRONMENT, simpleContentAccess, apiSortParams],
REPO_TYPE_LABEL, toggleGroupState, LIMIT_TO_ENVIRONMENT, apiSortParams],
);

useEffect(() => {
@@ -501,21 +498,10 @@ const RepositorySetsTab = () => {

const hostEnvText = 'the "{contentViewName}" content view and "{lifecycleEnvironmentName}" environment';

const scaAlert = (toggleGroupState === LIMIT_TO_ENVIRONMENT ?
const alertText = (toggleGroupState === LIMIT_TO_ENVIRONMENT ?
`Showing only repositories in ${hostEnvText}.` :
'Showing all available repositories.');

const nonScaAlert = (toggleGroupState === LIMIT_TO_ENVIRONMENT ?
`Showing repositories in ${hostEnvText} that are available through subscriptions.` :
'Showing all repositories available through subscriptions.');

let alertText;
if (simpleContentAccess) {
alertText = scaAlert;
} else {
alertText = nonScaAlert;
}

return (
<div>
<div id="repo-sets-tab">