forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* PMM-12476 Add clusters search and filtering * PMM-12476 Use correct type * PMM-12476 Cleanup * PMM-12476 Remove logging and dead code * PMM-12476 Allow actions dialog to be visible
- Loading branch information
1 parent
5f7cb49
commit bbc2f4c
Showing
19 changed files
with
443 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
public/app/percona/inventory/Tabs/Services/Clusters.constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { ExtendedColumn, FilterFieldTypes } from 'app/percona/shared/components/Elements/Table'; | ||
|
||
import { Messages } from '../../Inventory.messages'; | ||
import { FlattenService } from '../../Inventory.types'; | ||
|
||
import { MONITORING_OPTIONS, STATUS_OPTIONS } from './Services.constants'; | ||
|
||
export const CLUSTERS_COLUMNS: Array<ExtendedColumn<FlattenService>> = [ | ||
{ | ||
Header: Messages.services.columns.serviceId, | ||
id: 'serviceId', | ||
accessor: 'serviceId', | ||
type: FilterFieldTypes.TEXT, | ||
}, | ||
{ | ||
Header: Messages.services.columns.cluster, | ||
accessor: 'cluster', | ||
type: FilterFieldTypes.TEXT, | ||
}, | ||
{ | ||
Header: Messages.services.columns.status, | ||
accessor: 'status', | ||
type: FilterFieldTypes.DROPDOWN, | ||
options: STATUS_OPTIONS, | ||
}, | ||
{ | ||
Header: Messages.services.columns.serviceName, | ||
accessor: 'serviceName', | ||
type: FilterFieldTypes.TEXT, | ||
}, | ||
{ | ||
Header: Messages.services.columns.nodeName, | ||
accessor: 'nodeName', | ||
type: FilterFieldTypes.TEXT, | ||
}, | ||
{ | ||
Header: Messages.services.columns.monitoring, | ||
accessor: 'agentsStatus', | ||
type: FilterFieldTypes.RADIO_BUTTON, | ||
options: MONITORING_OPTIONS, | ||
}, | ||
{ | ||
Header: Messages.services.columns.address, | ||
accessor: 'address', | ||
type: FilterFieldTypes.TEXT, | ||
}, | ||
{ | ||
Header: Messages.services.columns.port, | ||
accessor: 'port', | ||
type: FilterFieldTypes.TEXT, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
public/app/percona/inventory/Tabs/Services/Services.constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { ALL_LABEL, ALL_VALUE } from 'app/percona/shared/components/Elements/Table/Filter/Filter.constants'; | ||
import { ServiceStatus } from 'app/percona/shared/services/services/Services.types'; | ||
|
||
import { MonitoringStatus } from '../../Inventory.types'; | ||
|
||
export const ALL_OPTION = { value: ALL_VALUE, label: ALL_LABEL }; | ||
|
||
export const STATUS_OPTIONS = [ | ||
{ | ||
label: 'Up', | ||
value: ServiceStatus.UP, | ||
}, | ||
{ | ||
label: 'Down', | ||
value: ServiceStatus.DOWN, | ||
}, | ||
{ | ||
label: 'Unknown', | ||
value: ServiceStatus.UNKNOWN, | ||
}, | ||
{ | ||
label: 'N/A', | ||
value: ServiceStatus.NA, | ||
}, | ||
]; | ||
|
||
export const STATUS_OPTIONS_WITH_ALL = [ALL_OPTION, ...STATUS_OPTIONS]; | ||
|
||
export const MONITORING_OPTIONS = [ | ||
{ | ||
label: MonitoringStatus.OK, | ||
value: MonitoringStatus.OK, | ||
}, | ||
{ | ||
label: MonitoringStatus.FAILED, | ||
value: MonitoringStatus.FAILED, | ||
}, | ||
]; | ||
|
||
export const MONITORING_OPTIONS_WITH_ALL = [ALL_OPTION, ...MONITORING_OPTIONS]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.