in source/idea/idea-cluster-manager/webapp/src/pages/virtual-desktops/my-shared-virtual-desktop-sessions.tsx [210:336]
buildListing() {
return (
<IdeaListView
ref={this.listing}
title="Shared Desktops"
showPreferences={true}
preferencesKey={"shared-desktops"}
description="List of Virtual Desktops shared with you. Unless user has Admin or Owner profile, session owner must be connected in order for them to connect."
showPaginator={true}
onRefresh={() => {
this.getListing().fetchRecords();
}}
showDateRange={true}
dateRange={{
type: "relative",
amount: 1,
unit: "month",
}}
dateRangeFilterKeyOptions={[{ value: "idea_session_created_on", label: "Session Created" }]}
showFilters={true}
filterType="select"
selectFilters={[
{
name: "$all",
},
{
name: "idea_session_state",
choices: [
{
title: "All States",
value: "",
},
{
title: "Ready",
value: "READY",
},
{
title: "Provisioning",
value: "PROVISIONING",
},
{
title: "Stopped",
value: "STOPPED",
},
{
title: "Stopped Idle",
value: "STOPPED_IDLE",
},
{
title: "Stopping",
value: "STOPPING",
},
{
title: "Initializing",
value: "INITIALIZING",
},
{
title: "Creating",
value: "CREATING",
},
{
title: "Resuming",
value: "RESUMING",
},
{
title: "Deleting",
value: "DELETING",
},
{
title: "Error",
value: "ERROR",
},
],
},
{
name: "idea_session_base_os",
choices: [
{
title: "All Operating Systems",
value: "",
},
{
title: "Amazon Linux 2",
value: "amazonlinux2",
},
{
title: "Windows",
value: "windows",
},
{
title: "RHEL 8",
value: "rhel8"
},
{
title: "RHEL 9",
value: "rhel9"
},
],
},
]}
onFilter={(filters) => {
return filters;
}}
onFetchRecords={() => {
return this.getVirtualDesktopClient()
.listSharedPermissions({
filters: this.getListing().getFilters(),
paginator: this.getListing().getPaginator(),
date_range: this.getListing().getFormatedDateRange(),
})
.catch((error) => {
this.props.onFlashbarChange({
items: [
{
content: error.message,
type: "error",
dismissible: true,
},
],
});
throw error;
});
}}
columnDefinitions={this.VIRTUAL_DESKTOP_SHARED_SESSIONS_TABLE_COLUMN_DEFINITIONS}
/>
);
}