Skip to content

Commit a1cf7ec

Browse files
committed
removed short name
1 parent 9bea91d commit a1cf7ec

File tree

7 files changed

+4
-35
lines changed

7 files changed

+4
-35
lines changed

config/sample-config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,6 @@ frontend:
991991
scopes:
992992
- id: cluster
993993
name: Cluster
994-
shortName: Cl
995994
description: Cluster name or identifier
996995
labels:
997996
- K8S_ClusterName
@@ -1000,7 +999,6 @@ frontend:
1000999
stepInto: zone
10011000
- id: zone
10021001
name: Zone
1003-
shortName: AZ
10041002
description: Availability zone
10051003
labels:
10061004
- SrcK8S_Zone
@@ -1028,7 +1026,6 @@ frontend:
10281026
stepInto: resource
10291027
- id: namespace
10301028
name: Namespace
1031-
shortName: NS
10321029
description: Resource namespace
10331030
labels:
10341031
- SrcK8S_Namespace
@@ -1046,7 +1043,6 @@ frontend:
10461043
stepInto: owner
10471044
- id: owner
10481045
name: Owner
1049-
shortName: Own
10501046
description: Controller owner, such as a Deployment
10511047
labels:
10521048
- SrcK8S_OwnerName
@@ -1072,7 +1068,6 @@ frontend:
10721068
stepInto: resource
10731069
- id: resource
10741070
name: Resource
1075-
shortName: Res
10761071
description: Base resource, such as a Pod, a Service or a Node
10771072
labels:
10781073
- 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/src/components/__tests-data__/scopes.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export const ScopeDefSample: ScopeConfigDef[] = [
44
{
55
id: 'cluster',
66
name: 'Cluster',
7-
shortName: 'Cl',
87
description: 'Cluster name or identifier',
98
labels: ['K8S_ClusterName'],
109
feature: 'multiCluster',
@@ -13,7 +12,6 @@ export const ScopeDefSample: ScopeConfigDef[] = [
1312
{
1413
id: 'zone',
1514
name: 'Zone',
16-
shortName: 'AZ',
1715
description: 'Availability zone',
1816
labels: ['SrcK8S_Zone', 'DstK8S_Zone'],
1917
feature: 'zones',
@@ -23,7 +21,6 @@ export const ScopeDefSample: ScopeConfigDef[] = [
2321
{
2422
id: 'host',
2523
name: 'Node',
26-
shortName: 'Nd',
2724
description: 'Node on which the resources are running',
2825
labels: ['SrcK8S_HostName', 'DstK8S_HostName'],
2926
groups: ['clusters', 'zones', 'clusters+zones'],
@@ -32,7 +29,6 @@ export const ScopeDefSample: ScopeConfigDef[] = [
3229
{
3330
id: 'namespace',
3431
name: 'Namespace',
35-
shortName: 'NS',
3632
description: 'Resource namespace',
3733
labels: ['SrcK8S_Namespace', 'DstK8S_Namespace'],
3834
groups: ['clusters', 'clusters+zones', 'clusters+hosts', 'zones', 'zones+hosts', 'hosts'],
@@ -41,7 +37,6 @@ export const ScopeDefSample: ScopeConfigDef[] = [
4137
{
4238
id: 'owner',
4339
name: 'Owner',
44-
shortName: 'Own',
4540
description: 'Controller owner, such as a Deployment',
4641
labels: [
4742
'SrcK8S_OwnerName',
@@ -68,7 +63,6 @@ export const ScopeDefSample: ScopeConfigDef[] = [
6863
{
6964
id: 'resource',
7065
name: 'Resource',
71-
shortName: 'Res',
7266
description: 'Base resource, such as a Pod, a Service or a Node',
7367
labels: [
7468
'SrcK8S_Name',

web/src/components/slider/scope-slider.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ export interface ScopeSliderProps {
1010
scope: FlowScope;
1111
setScope: (ms: FlowScope) => void;
1212
scopeDefs: ScopeConfigDef[];
13-
sizePx: number;
1413
}
1514

16-
export const ScopeSlider: React.FC<ScopeSliderProps> = ({ scope, setScope, scopeDefs, sizePx }) => {
15+
export const ScopeSlider: React.FC<ScopeSliderProps> = ({ scope, setScope, scopeDefs }) => {
1716
return (
1817
<ProgressStepper isVertical isCenterAligned>
1918
{scopeDefs.map((sd, i) => (
@@ -31,7 +30,7 @@ export const ScopeSlider: React.FC<ScopeSliderProps> = ({ scope, setScope, scope
3130
/>
3231
)}
3332
>
34-
{sizePx > 450 ? sd.name : sd.shortName}
33+
{sd.name}
3534
</ProgressStep>
3635
))}
3736
</ProgressStepper>

web/src/components/tabs/netflow-overview/netflow-overview.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,12 +1151,7 @@ export const NetflowOverview: React.FC<NetflowOverviewProps> = React.forwardRef(
11511151
width: containerSize.width * 0.1
11521152
}}
11531153
>
1154-
<ScopeSlider
1155-
sizePx={containerSize?.height || 300}
1156-
scope={props.metricScope}
1157-
setScope={props.setMetricScope}
1158-
scopeDefs={props.scopes}
1159-
/>
1154+
<ScopeSlider scope={props.metricScope} setScope={props.setMetricScope} scopeDefs={props.scopes} />
11601155
</div>
11611156
)}
11621157
{allowFocus && selectedPanel && (

web/src/components/tabs/netflow-topology/netflow-topology.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,7 @@ export const NetflowTopology: React.FC<NetflowTopologyProps> = React.forwardRef(
260260
return (
261261
<div id="topology-container-div" style={{ width: '100%', height: '100%' }} ref={containerRef}>
262262
<div id={'topology-scope-slider-div'}>
263-
<ScopeSlider
264-
sizePx={containerSize?.height || 300}
265-
scope={props.metricScope}
266-
setScope={props.setMetricScope}
267-
scopeDefs={props.scopes}
268-
/>
263+
<ScopeSlider scope={props.metricScope} setScope={props.setMetricScope} scopeDefs={props.scopes} />
269264
</div>
270265
<div id="topology-view-div">{getContent()}</div>
271266
</div>

web/src/model/scope.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { TopologyGroupTypes } from './topology';
66
export type ScopeConfigDef = {
77
id: FlowScope;
88
name: string;
9-
shortName: string;
109
description: string;
1110
labels: string[];
1211
feature?: Feature;
@@ -23,13 +22,6 @@ export const getScopeName = (sc: ScopeConfigDef | undefined, t: (k: string) => s
2322
return sc.name || sc.id;
2423
};
2524

26-
export const getScopeShortName = (sc: ScopeConfigDef | undefined, t: (k: string) => string) => {
27-
if (!sc) {
28-
return t('n/a');
29-
}
30-
return sc.shortName || sc.id;
31-
};
32-
3325
export const getGroupsForScope = (scopeId: FlowScope, scopes: ScopeConfigDef[]) => {
3426
const scope = scopes.find(sc => sc.id === scopeId);
3527
if (scope?.groups?.length) {

0 commit comments

Comments
 (0)