Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 0 additions & 4 deletions web/.eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions web/.eslintrc.js

This file was deleted.

6 changes: 3 additions & 3 deletions web/cypress/e2e/topology/topology.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ describe('netflow-topology', () => {
cy.get('#elementPanel-drawer-body').should('exist');
cy.get('#drawer-tabs').click();
cy.get('.element-metrics-container').should('exist');
cy.get('.pf-v5-c-chart').should('exist');
cy.get('.pf-v6-c-chart').should('exist');

//close drawer
cy.get('.pf-v5-c-drawer__close').click();
cy.get('.pf-v5-c-drawer__panel-main').should('not.exist');
cy.get('.pf-v6-c-drawer__close').click();
cy.get('.pf-v6-c-drawer__panel-main').should('not.exist');
});

it('update options', () => {
Expand Down
20 changes: 10 additions & 10 deletions web/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Cypress.Commands.add('openPanelsModal', () => {
cy.showAdvancedOptions();
cy.get('#manage-overview-panels-button').click();
cy.get('#overview-panels-modal').should('exist');
cy.get('#overview-panels-modal').find('.pf-v5-c-data-list__item-content').should('have.length', c.availablePanelsCount);
cy.get('#overview-panels-modal').find('.pf-v6-c-data-list__item-content').should('have.length', c.availablePanelsCount);
});

Cypress.Commands.add('checkColumns', (groups = c.defaultColumnGroupCount, cols = c.defaultColumnCount) => {
Expand All @@ -104,13 +104,13 @@ Cypress.Commands.add('openColumnsModal', () => {
cy.showAdvancedOptions();
cy.get('#manage-columns-button').click();
cy.get('#columns-modal').should('exist');
cy.get('#columns-modal').find('.pf-v5-c-data-list__item-content').should('have.length', c.availableColumnCount);
cy.get('#columns-modal').find('.pf-v6-c-data-list__item-content').should('have.length', c.availableColumnCount);
});

Cypress.Commands.add('selectPopupItems', (id, names) => {
for (let i = 0; i < names.length; i++) {
cy.get(id).get('.modal-body').contains(names[i])
.closest('.pf-v5-c-data-list__item-row').find('.pf-v5-c-data-list__check').click();
.closest('.pf-v6-c-data-list__item-row').find('.pf-v6-c-data-list__check').click();
}
});

Expand All @@ -131,8 +131,8 @@ Cypress.Commands.add('sortColumn', (name) => {

Cypress.Commands.add('dropdownSelect', (id, name) => {
cy.get(`#${id}`).click();
cy.get('.pf-v5-c-menu__content').should('exist');
cy.get('.pf-v5-c-menu__content').find(`#${name}`).click();
cy.get('.pf-v6-c-menu__content').should('exist');
cy.get('.pf-v6-c-menu__content').find(`#${name}`).click();
});

Cypress.Commands.add('checkContent', (topology) => {
Expand All @@ -145,8 +145,8 @@ Cypress.Commands.add('checkContent', (topology) => {

Cypress.Commands.add('addFilter', (filter, value, topology) => {
cy.get('#column-filter-toggle').click();
cy.get('.pf-v5-c-accordion__expandable-content.pf-m-expanded').find(`#${filter}`).click();
cy.get('.pf-v5-c-accordion__expandable-content.pf-m-expanded').should('not.exist');
cy.get('.pf-v6-c-accordion__expandable-content.pf-m-expanded').find(`#${filter}`).click();
cy.get('.pf-v6-c-accordion__expandable-content.pf-m-expanded').should('not.exist');
cy.get('input[type="search"]').type(`${value}{enter}`);
cy.checkContent(topology);
});
Expand All @@ -160,7 +160,7 @@ Cypress.Commands.add('changeQueryOption', (name, topology) => {

Cypress.Commands.add('changeTimeRange', (name, topology) => {
cy.get('#time-range-dropdown-dropdown').click();
cy.get('.pf-v5-c-menu__content').contains(name).click();
cy.get('.pf-v6-c-menu__content').contains(name).click();
cy.checkContent(topology);
});

Expand All @@ -169,7 +169,7 @@ Cypress.Commands.add('changeMetricFunction', (name) => {
cy.showDisplayOptions();

cy.get('#metricFunction-dropdown').click();
cy.get('.pf-v5-c-menu__content').contains(name).click();
cy.get('.pf-v6-c-menu__content').contains(name).click();
cy.get('[data-layer-id="default"]').children().its('length').should('be.gte', 5);
});

Expand All @@ -178,7 +178,7 @@ Cypress.Commands.add('changeMetricType', (name) => {
cy.showDisplayOptions();

cy.get('#metricType-dropdown').click();
cy.get('.pf-v5-c-menu__content').contains(name).click();
cy.get('.pf-v6-c-menu__content').contains(name).click();
cy.get('[data-layer-id="default"]').children().its('length').should('be.gte', 5);
});

Expand Down
49 changes: 49 additions & 0 deletions web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import eslint from '@eslint/js';
import react from 'eslint-plugin-react';
import tseslint from 'typescript-eslint';

export default [
{
ignores: [
"**/node_modules/*",
"**/dist/*",
"**/cypress/*",
"**/i18next-parser.config.js",
"**/setup-tests.tsx",
"**/webpack.*.ts"
]
},
eslint.configs.recommended,
...tseslint.configs.strict,
{
files: ['**/*.{js,jsx,ts,tsx}'],
plugins: {
react,
},
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
settings: {
react: {
pragma: "React",
version: "detect",
},
},
rules: {
"max-len": ["warn", {
code: 170,
}],
"no-case-declarations": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-non-null-assertion": "off",
},
}
];
2 changes: 2 additions & 0 deletions web/moduleMapper/dummy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ export class Dummy extends Error {
}
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function isModelFeatureFlag(e: never) {
return null;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function useResolvedExtensions(isModelFeatureFlag: boolean) {
return [
[{
Expand Down
Loading
Loading