@@ -11,12 +11,7 @@ import { useInstance } from 'src/libs/react-utils';
1111import * as Utils from 'src/libs/utils' ;
1212import { WorkspaceTagSelect } from 'src/workspaces/common/WorkspaceTagSelect' ;
1313import { CategorizedWorkspaces } from 'src/workspaces/list/CategorizedWorkspaces' ;
14- import {
15- cloudProviderLabels ,
16- cloudProviderTypes ,
17- workspaceAccessLevels ,
18- WorkspaceWrapper as Workspace ,
19- } from 'src/workspaces/utils' ;
14+ import { workspaceAccessLevels , WorkspaceWrapper as Workspace } from 'src/workspaces/utils' ;
2015
2116const styles = {
2217 filter : { marginRight : '1rem' , flex : '1 1 0' , minWidth : 'max-content' } ,
@@ -103,23 +98,6 @@ export const WorkspaceFilters = (props: WorkspaceFiltersProps): ReactNode => {
10398 options : _ . flow ( _ . map ( 'workspace.namespace' ) , _ . uniq , _ . sortBy ( _ . identity ) ) ( workspaces ) ,
10499 } ) ,
105100 ] ) ,
106- div ( { style : { ...styles . filter , marginRight : 0 } } , [
107- h ( Select < string | undefined > , {
108- isClearable : true ,
109- isMulti : false ,
110- placeholder : 'Cloud platform' ,
111- 'aria-label' : 'Filter by cloud platform' ,
112- value : filters . cloudPlatform ,
113- hideSelectedOptions : true ,
114- onChange : ( data ) => {
115- const option = data ?. value || undefined ;
116- void Metrics ( ) . captureEvent ( Events . workspaceListFilter , { filter : 'cloudPlatform' , option } ) ;
117- Nav . updateSearch ( { ...query , cloudPlatform : option } ) ;
118- } ,
119- options : _ . sortBy ( ( cloudProvider ) => cloudProviderLabels [ cloudProvider ] , _ . keys ( cloudProviderTypes ) ) ,
120- getOptionLabel : ( { value } ) => ( value ? cloudProviderLabels [ value ] : undefined ) ,
121- } ) ,
122- ] ) ,
123101 ] ) ;
124102} ;
125103
@@ -136,7 +114,6 @@ export const getWorkspaceFiltersFromQuery = (query: any): WorkspaceFilterValues
136114 keywordFilter : query . filter || '' ,
137115 accessLevels : query . accessLevelsFilter || EMPTY_LIST ,
138116 projects : query . projectsFilter || undefined ,
139- cloudPlatform : query . cloudPlatform || undefined ,
140117 tab : query . tab || 'myWorkspaces' ,
141118 tags : query . tagsFilter || EMPTY_LIST ,
142119} ) ;
0 commit comments