Skip to content

Commit

Permalink
migrate to PF5
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinsonneau committed Dec 4, 2024
1 parent 765ca7c commit 233f64e
Show file tree
Hide file tree
Showing 137 changed files with 6,467 additions and 5,670 deletions.
Binary file added web/cypress/downloads/downloads.html
Binary file not shown.
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-c-chart').should('exist');
cy.get('.pf-v5-c-chart').should('exist');

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

it('update options', () => {
Expand Down
22 changes: 11 additions & 11 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-c-data-list__item-content').should('have.length', c.availablePanelsCount);
cy.get('#overview-panels-modal').find('.pf-v5-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-c-data-list__item-content').should('have.length', c.availableColumnCount);
cy.get('#columns-modal').find('.pf-v5-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-c-data-list__item-row').find('.pf-c-data-list__check').click();
.closest('.pf-v5-c-data-list__item-row').find('.pf-v5-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-c-dropdown__menu').should('exist');
cy.get('.pf-c-dropdown__menu').find(`#${name}`).click();
cy.get('.pf-v5-c-menu__content').should('exist');
cy.get('.pf-v5-c-menu__content').find(`#${name}`).click();
});

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

Cypress.Commands.add('addFilter', (filter, value, topology) => {
cy.get('#column-filter-toggle').click();
cy.get('.pf-c-accordion__expanded-content-body').find(`#${filter}`).click();
cy.get('.pf-c-accordion__expanded-content-body').should('not.exist');
cy.get('#column-filter-dropdown').parent().children().eq(1).type(`${value}{enter}`);
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('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-c-dropdown__menu').contains(name).click();
cy.get('.pf-v5-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-c-dropdown__menu').contains(name).click();
cy.get('.pf-v5-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-c-dropdown__menu').contains(name).click();
cy.get('.pf-v5-c-menu__content').contains(name).click();
cy.get('[data-layer-id="default"]').children().its('length').should('be.gte', 5);
});

Expand Down
7 changes: 4 additions & 3 deletions web/locales/en/plugin__netobserv-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"Latest rate": "Latest rate",
"Total": "Total",
"Edge": "Edge",
"Unknown": "Unknown",
"Details": "Details",
"Metrics": "Metrics",
"Drops": "Drops",
Expand All @@ -52,18 +53,18 @@
"Flow information": "Flow information",
"More info": "More info",
"Raw": "Raw",
"JSON": "JSON",
"Copy": "Copy",
"Copied": "Copied",
"3D": "3D",
"BreadthFirst": "BreadthFirst",
"Cola": "Cola",
"ColaGroups": "ColaGroups",
"ColaNoForce": "ColaNoForce",
"Concentric": "Concentric",
"Dagre": "Dagre",
"DagreGroup": "DagreGroup",
"Force": "Force",
"Grid": "Grid",
"ColaGroups": "ColaGroups",
"Invalid": "Invalid",
"rate": "rate",
"Average": "Average",
Expand Down Expand Up @@ -361,6 +362,7 @@
"Show filters": "Show filters",
"Collapse": "Collapse",
"Expand": "Expand",
"Default filters": "Default filters",
"Equals": "Equals",
"Not equals": "Not equals",
"More than": "More than",
Expand Down Expand Up @@ -393,7 +395,6 @@
"Export view": "Export view",
"Observe": "Observe",
"External": "External",
"Unknown": "Unknown",
"Last 5 minutes": "Last 5 minutes",
"Last 15 minutes": "Last 15 minutes",
"Last 30 minutes": "Last 30 minutes",
Expand Down
Loading

0 comments on commit 233f64e

Please sign in to comment.