Skip to content

Commit 67a9dd2

Browse files
authored
NETOBSERV-1924 pf5 migration (#658)
* migrate to PF5 * removed short name * Simplify standalone header * fix node decorators * remove PF styling import * skip chips popover when no message for jest * increase blur timeout * restore ids for testing * fix topology zoom buttons * add some ids to simplify cypress tests
1 parent 937e906 commit 67a9dd2

File tree

142 files changed

+6513
-5747
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+6513
-5747
lines changed

config/sample-config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,6 @@ frontend:
12241224
scopes:
12251225
- id: cluster
12261226
name: Cluster
1227-
shortName: Cl
12281227
description: Cluster name or identifier
12291228
labels:
12301229
- K8S_ClusterName
@@ -1245,7 +1244,6 @@ frontend:
12451244
stepInto: namespace
12461245
- id: zone
12471246
name: Zone
1248-
shortName: AZ
12491247
description: Availability zone
12501248
labels:
12511249
- SrcK8S_Zone
@@ -1277,7 +1275,6 @@ frontend:
12771275
stepInto: resource
12781276
- id: namespace
12791277
name: Namespace
1280-
shortName: NS
12811278
description: Resource namespace
12821279
labels:
12831280
- SrcK8S_Namespace
@@ -1298,7 +1295,6 @@ frontend:
12981295
stepInto: owner
12991296
- id: owner
13001297
name: Owner
1301-
shortName: Own
13021298
description: Controller owner, such as a Deployment
13031299
labels:
13041300
- SrcK8S_OwnerName
@@ -1328,7 +1324,6 @@ frontend:
13281324
stepInto: resource
13291325
- id: resource
13301326
name: Resource
1331-
shortName: Res
13321327
description: Base resource, such as a Pod, a Service or a Node
13331328
labels:
13341329
- SrcK8S_Name

pkg/config/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ type Filter struct {
9595
type Scope struct {
9696
ID string `yaml:"id" json:"id"`
9797
Name string `yaml:"name" json:"name"`
98-
ShortName string `yaml:"shortName" json:"shortName"`
9998
Description string `yaml:"description" json:"description"`
10099
Labels []string `yaml:"labels" json:"labels"`
101100
Feature string `yaml:"feature,omitempty" json:"feature,omitempty"`

web/cypress/e2e/topology/topology.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ describe('netflow-topology', () => {
3838
cy.get('#elementPanel-drawer-body').should('exist');
3939
cy.get('#drawer-tabs').click();
4040
cy.get('.element-metrics-container').should('exist');
41-
cy.get('.pf-c-chart').should('exist');
41+
cy.get('.pf-v5-c-chart').should('exist');
4242

4343
//close drawer
44-
cy.get('.pf-c-drawer__close').click();
45-
cy.get('.pf-c-drawer__panel-main').should('not.exist');
44+
cy.get('.pf-v5-c-drawer__close').click();
45+
cy.get('.pf-v5-c-drawer__panel-main').should('not.exist');
4646
});
4747

4848
it('update options', () => {

web/cypress/support/commands.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Cypress.Commands.add('openPanelsModal', () => {
7979
cy.showAdvancedOptions();
8080
cy.get('#manage-overview-panels-button').click();
8181
cy.get('#overview-panels-modal').should('exist');
82-
cy.get('#overview-panels-modal').find('.pf-c-data-list__item-content').should('have.length', c.availablePanelsCount);
82+
cy.get('#overview-panels-modal').find('.pf-v5-c-data-list__item-content').should('have.length', c.availablePanelsCount);
8383
});
8484

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

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

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

132132
Cypress.Commands.add('dropdownSelect', (id, name) => {
133133
cy.get(`#${id}`).click();
134-
cy.get('.pf-c-dropdown__menu').should('exist');
135-
cy.get('.pf-c-dropdown__menu').find(`#${name}`).click();
134+
cy.get('.pf-v5-c-menu__content').should('exist');
135+
cy.get('.pf-v5-c-menu__content').find(`#${name}`).click();
136136
});
137137

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

146146
Cypress.Commands.add('addFilter', (filter, value, topology) => {
147147
cy.get('#column-filter-toggle').click();
148-
cy.get('.pf-c-accordion__expanded-content-body').find(`#${filter}`).click();
149-
cy.get('.pf-c-accordion__expanded-content-body').should('not.exist');
150-
cy.get('#column-filter-dropdown').parent().children().eq(1).type(`${value}{enter}`);
148+
cy.get('.pf-v5-c-accordion__expandable-content.pf-m-expanded').find(`#${filter}`).click();
149+
cy.get('.pf-v5-c-accordion__expandable-content.pf-m-expanded').should('not.exist');
150+
cy.get('input[type="search"]').type(`${value}{enter}`);
151151
cy.checkContent(topology);
152152
});
153153

@@ -160,7 +160,7 @@ Cypress.Commands.add('changeQueryOption', (name, topology) => {
160160

161161
Cypress.Commands.add('changeTimeRange', (name, topology) => {
162162
cy.get('#time-range-dropdown-dropdown').click();
163-
cy.get('.pf-c-dropdown__menu').contains(name).click();
163+
cy.get('.pf-v5-c-menu__content').contains(name).click();
164164
cy.checkContent(topology);
165165
});
166166

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

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

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

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

web/locales/en/plugin__netobserv-plugin.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"Latest rate": "Latest rate",
2828
"Total": "Total",
2929
"Edge": "Edge",
30+
"Unknown": "Unknown",
3031
"Details": "Details",
3132
"Metrics": "Metrics",
3233
"Drops": "Drops",
@@ -55,18 +56,18 @@
5556
"This is a partial flow: it contains only enrichment data and is missing some basic information such as byte and packet counters, TCP flags or MAC addresses. This information can likely be found in adjacent flows.": "This is a partial flow: it contains only enrichment data and is missing some basic information such as byte and packet counters, TCP flags or MAC addresses. This information can likely be found in adjacent flows.",
5657
"More info": "More info",
5758
"Raw": "Raw",
58-
"JSON": "JSON",
5959
"Copy": "Copy",
6060
"Copied": "Copied",
6161
"3D": "3D",
6262
"BreadthFirst": "BreadthFirst",
6363
"Cola": "Cola",
64+
"ColaGroups": "ColaGroups",
6465
"ColaNoForce": "ColaNoForce",
6566
"Concentric": "Concentric",
6667
"Dagre": "Dagre",
68+
"DagreGroup": "DagreGroup",
6769
"Force": "Force",
6870
"Grid": "Grid",
69-
"ColaGroups": "ColaGroups",
7071
"Invalid": "Invalid",
7172
"rate": "rate",
7273
"Average": "Average",
@@ -364,6 +365,7 @@
364365
"Show filters": "Show filters",
365366
"Collapse": "Collapse",
366367
"Expand": "Expand",
368+
"Default filters": "Default filters",
367369
"Some filters have been automatically disabled": "Some filters have been automatically disabled",
368370
"Equals": "Equals",
369371
"Not equals": "Not equals",
@@ -397,7 +399,6 @@
397399
"Export view": "Export view",
398400
"Observe": "Observe",
399401
"External": "External",
400-
"Unknown": "Unknown",
401402
"Last 5 minutes": "Last 5 minutes",
402403
"Last 15 minutes": "Last 15 minutes",
403404
"Last 30 minutes": "Last 30 minutes",

0 commit comments

Comments
 (0)