Skip to content

Commit

Permalink
cleanup - insights, community, gateway
Browse files Browse the repository at this point in the history
remove ansible roles
remove ansible wisdom
remove community landing page
clean up left/top nav docs links
remove synclists
remove gateway apis
remove roleratings/collectionratings
  • Loading branch information
himdel committed Jun 14, 2024
1 parent 86e097f commit 974aea2
Show file tree
Hide file tree
Showing 85 changed files with 125 additions and 4,909 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- name: "Checkout ansible-hub-ui (${{ github.ref }})"
uses: actions/checkout@v4

- name: "Install node 18"
- name: "Install node 20"
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- name: "Check automerge conditions"
working-directory: ".github/workflows"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ jobs:
working-directory: 'oci_env'
run: 'oci-env compose up &'

- name: "Install node 18"
- name: "Install node 20"
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- name: "Cache ~/.npm & ~/.cache/Cypress"
uses: actions/cache@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- name: "Checkout ansible-hub-ui (${{ github.ref }})"
uses: actions/checkout@v4

- name: "Install node 18"
- name: "Install node 20"
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'

- name: "Checks"
Expand Down Expand Up @@ -88,10 +88,10 @@ jobs:
with:
path: 'pr'

- name: "Install node 18"
- name: "Install node 20"
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
cache-dependency-path: |
base/package-lock.json
Expand Down
6 changes: 1 addition & 5 deletions config/standalone.dev.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const webpackBase = require('./webpack.base.config');
const proxyHost = process.env.API_PROXY_HOST || 'localhost';
const proxyPort = process.env.API_PROXY_PORT || '55001';
const apiBasePath = process.env.API_BASE_PATH || '/api/galaxy/';
const uiExternalLoginURI = process.env.UI_EXTERNAL_LOGIN_URI || '/login';

module.exports = webpackBase({
// The host where the API lives. EX: https://localhost:55001
Expand All @@ -19,17 +18,14 @@ module.exports = webpackBase({
// Port that the UI is served over
UI_PORT: 8002,

// dev-mode only, support `IS_COMMUNITY=1 npm run start-standalone` in addition to `npm run start-community`
IS_COMMUNITY: !!process.env.IS_COMMUNITY,

// Serve the UI over http or https. Options: true, false
UI_USE_HTTPS: false,

// Enables webpack debug mode. Options: true, false
UI_DEBUG: true,

// Login URI to allow stand alone with and without keycloak
UI_EXTERNAL_LOGIN_URI: uiExternalLoginURI,
UI_EXTERNAL_LOGIN_URI: '/login',

// Value for webpack.devServer.proxy
// https://webpack.js.org/configuration/dev-server/#devserverproxy
Expand Down
2 changes: 0 additions & 2 deletions config/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ const defaultConfigs = [
{ name: 'UI_COMMIT_HASH', default: gitCommit, scope: 'global' },
{ name: 'UI_DOCS_URL', default: docsURL, scope: 'global' },
{ name: 'UI_EXTERNAL_LOGIN_URI', default: '/login', scope: 'global' },
{ name: 'IS_INSIGHTS', default: false, scope: 'global' },
{ name: 'IS_COMMUNITY', default: false, scope: 'global' },

// Webpack scope: only available in customConfigs here, not exposed to the UI
{ name: 'UI_PORT', default: 8002, scope: 'webpack' },
Expand Down
38 changes: 0 additions & 38 deletions cypress/e2e/community/lightspeed-modal.js

This file was deleted.

66 changes: 0 additions & 66 deletions cypress/e2e/community/view-only.js

This file was deleted.

12 changes: 0 additions & 12 deletions cypress/e2e/namespaces/docs-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@ describe('Documentation dropdown', () => {

it('user can open docs dropdown menu', () => {
cy.get('[data-cy="docs-dropdown"]').click();

cy.get('.pf-v5-c-dropdown__menu')
.contains('Customer Support')
.should('have.attr', 'href')
.and('contain', 'https://access.redhat.com/support');

cy.get('.pf-v5-c-dropdown__menu')
.contains('Training')
.should('have.attr', 'href')
.and('contain', 'https://www.ansible.com/resources/webinars-training');

cy.get('.pf-v5-c-dropdown__menu').contains('Documentation');

cy.get('.pf-v5-c-dropdown__menu').contains('About');
});

Expand Down
23 changes: 0 additions & 23 deletions cypress/e2e/repo/remote-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,6 @@ describe('Remote Registry Tests', () => {
).contains('Completed', { timeout: 10000 });
});

it('users can index only redhat.registry.io', () => {
cy.addRemoteRegistry('registry.test.io', 'https://registry.test.io');

cy.get(
'tr[data-cy="ExecutionEnvironmentRegistryList-row-registry.test.io"] button[aria-label="Actions"]',
).click();
cy.contains('Index execution environments').should(
'have.class',
'pf-m-disabled',
);

cy.addRemoteRegistry('registry.redhat.io', 'https://registry.redhat.io');

cy.get(
'tr[data-cy="ExecutionEnvironmentRegistryList-row-registry.redhat.io"] button[aria-label="Actions"]',
).click();

cy.contains('Index execution environments').click();
cy.get('[data-cy="AlertList"]').contains(
'Indexing started for execution environment "registry.redhat.io',
);
});

it('admin can edit new remote registry', () => {
cy.menuGo('Execution Environments > Remote Registries');

Expand Down
34 changes: 0 additions & 34 deletions src/api/ai-deny-index.ts

This file was deleted.

9 changes: 1 addition & 8 deletions src/api/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,7 @@ export class BaseAPI {
}

private async authHandler(request) {
// This runs before every API request and ensures that the user is
// authenticated before the request is executed. On most calls it appears
// to only add ~10ms of latency.
if (IS_INSIGHTS) {
await window.insights.chrome.auth.getUser();
} else {
request.headers['X-CSRFToken'] = Cookies.get('csrftoken');
}
request.headers['X-CSRFToken'] = Cookies.get('csrftoken');
return request;
}
}
9 changes: 0 additions & 9 deletions src/api/gateway-logout.ts

This file was deleted.

9 changes: 0 additions & 9 deletions src/api/gateway.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export { ActiveUserAPI } from './active-user';
export { ActivitiesAPI } from './activities';
export { AIDenyIndexAPI } from './ai-deny-index';
export { AnsibleDistributionAPI } from './ansible-distribution';
export { AnsibleRemoteAPI } from './ansible-remote';
export { AnsibleRepositoryAPI } from './ansible-repository';
Expand All @@ -15,17 +14,11 @@ export { ExecutionEnvironmentNamespaceAPI } from './execution-environment-namesp
export { ExecutionEnvironmentRegistryAPI } from './execution-environment-registry';
export { ExecutionEnvironmentRemoteAPI } from './execution-environment-remote';
export { FeatureFlagsAPI } from './feature-flags';
export { GatewayLogoutAPI } from './gateway-logout';
export { GenericPulpAPI } from './generic-pulp';
export { GroupAPI } from './group';
export { GroupRoleAPI } from './group-role';
export { ImportAPI } from './import';
export { LegacyImportAPI } from './legacy-import';
export { LegacyNamespaceAPI } from './legacy-namespace';
export { LegacyRoleAPI } from './legacy-role';
export { LegacySyncAPI } from './legacy-sync';
export { MyNamespaceAPI } from './my-namespace';
export { MySyncListAPI } from './my-synclist';
export { NamespaceAPI } from './namespace';
export { PulpAPI } from './pulp';
export { AnsibleRemoteType } from './response-types/ansible-remote';
Expand Down Expand Up @@ -54,16 +47,6 @@ export {
} from './response-types/execution-environment';
export { FeatureFlagsType } from './response-types/feature-flags';
export { ImportDetailType, ImportListType } from './response-types/import';
export { LegacyRoleImportDetailType } from './response-types/legacy-import';
export {
LegacyNamespaceDetailType,
LegacyNamespaceListType,
} from './response-types/legacy-namespace';
export {
LegacyRoleDetailType,
LegacyRoleListType,
LegacyRoleVersionDetailType,
} from './response-types/legacy-role';
export {
NamespaceLinkType,
NamespaceListType,
Expand All @@ -74,7 +57,6 @@ export { PulpStatus } from './response-types/pulp';
export { RemoteType } from './response-types/remote';
export { GroupRoleType, RoleType } from './response-types/role';
export { SettingsType } from './response-types/settings';
export { SyncListType } from './response-types/synclists';
export { TaskType } from './response-types/task';
export {
GroupType,
Expand Down
14 changes: 0 additions & 14 deletions src/api/legacy-import.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/api/legacy-namespace.ts

This file was deleted.

Loading

0 comments on commit 974aea2

Please sign in to comment.