Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(orb-ui) All list pages, Add resizeble columns #2507

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4>All Policies</h4>
</div>
<ngx-datatable
#table
[columnMode]="columnMode.flex"
[columnMode]="columnMode.force"
[columns]="columns"
[footerHeight]="50"
[headerHeight]="50"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export class AgentPolicyListComponent
{
name: '',
prop: 'checkbox',
flexGrow: 0.5,
width: 1,
minWidth: 62,
canAutoResize: true,
sortable: false,
Expand All @@ -205,32 +205,32 @@ export class AgentPolicyListComponent
{
prop: 'name',
name: 'Policy Name',
resizeable: false,
resizeable: true,
canAutoResize: true,
flexGrow: 4,
width: 230,
minWidth: 100,
cellTemplate: this.nameTemplateCell,
},
{
prop: 'policy_usage',
name: 'Usage',
resizeable: false,
resizeable: true,
canAutoResize: true,
flexGrow: 3,
width: 130,
minWidth: 100,
cellTemplate: this.usageStateTemplateCell,
},
{
prop: 'description',
name: 'Description',
resizeable: false,
flexGrow: 4,
resizeable: true,
width: 280,
minWidth: 100,
cellTemplate: this.nameTemplateCell,
},
{
prop: 'tags',
flexGrow: 3,
width: 170,
canAutoResize: true,
name: 'Tags',
minWidth: 150,
Expand All @@ -248,8 +248,8 @@ export class AgentPolicyListComponent
{
prop: 'version',
name: 'Version',
resizeable: false,
flexGrow: 2,
resizeable: true,
width: 100,
minWidth: 50,
cellTemplate: this.versionTemplateCell,
},
Expand All @@ -261,16 +261,16 @@ export class AgentPolicyListComponent
},
name: 'Last Modified',
minWidth: 110,
flexGrow: 3,
resizeable: false,
width: 150,
resizeable: true,
},
{
name: '',
prop: 'actions',
minWidth: 200,
resizeable: false,
resizeable: true,
sortable: false,
flexGrow: 2,
width: 150,
cellTemplate: this.actionsTemplateCell,
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h4>All Agents</h4>
</div>
<ngx-datatable
#table
[columnMode]="columnMode.flex"
[columnMode]="columnMode.force"
[columns]="columns"
[footerHeight]="50"
[headerHeight]="50"
Expand Down
24 changes: 16 additions & 8 deletions ui/src/app/pages/fleet/agents/list/agent.list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class AgentListComponent implements AfterViewInit, AfterViewChecked, OnDe
{
name: '',
prop: 'checkbox',
flexGrow: 1,
width: 1,
minWidth: 62,
canAutoResize: true,
sortable: false,
Expand All @@ -206,30 +206,34 @@ export class AgentListComponent implements AfterViewInit, AfterViewChecked, OnDe
},
{
prop: 'name',
flexGrow: 5,
width: 250,
canAutoResize: true,
minWidth: 150,
name: 'Name',
cellTemplate: this.agentNameTemplateCell,
resizeable: true,
},
{
prop: 'state',
flexGrow: 3,
width: 100,
minWidth: 90,
canAutoResize: true,
name: 'Status',
cellTemplate: this.agentStateTemplateRef,
resizeable: true,
},
{
prop: 'policy_agg_info',
flexGrow: 4,
width: 170,
canAutoResize: true,
minWidth: 150,
name: 'Policies',
cellTemplate: this.agentPolicyStateTemplateRef,
resizeable: true,
},
{
prop: 'combined_tags',
flexGrow: 10,
width: 300,
canAutoResize: true,
name: 'Tags',
cellTemplate: this.agentTagsTemplateCell,
Expand All @@ -242,33 +246,37 @@ export class AgentListComponent implements AfterViewInit, AfterViewChecked, OnDe
.map(([key, value]) => `${key}:${value}`)
.join(','),
),
resizeable: true,
},
{
prop: 'version',
flexGrow: 5,
width: 200,
minWidth: 150,
canAutoResize: true,
name: 'Version',
sortable: true,
cellTemplate: this.agentVersionTemplateCell,
resizeable: true,
},
{
prop: 'ts_last_hb',
flexGrow: 4,
width: 150,
minWidth: 150,
canAutoResize: true,
name: 'Last Activity',
sortable: true,
cellTemplate: this.agentLastActivityTemplateCell,
resizeable: true,
},
{
name: '',
prop: 'actions',
flexGrow: 2.5,
width: 150,
minWidth: 150,
canAutoResize: true,
sortable: false,
cellTemplate: this.actionsTemplateCell,
resizeable: true,
},
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4>{{ strings.list.header }}</h4>
</div>
<ngx-datatable
#table
[columnMode]="columnMode.flex"
[columnMode]="columnMode.force"
[columns]="columns"
[footerHeight]="50"
[headerHeight]="50"
Expand Down
23 changes: 11 additions & 12 deletions ui/src/app/pages/fleet/groups/list/agent.group.list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class AgentGroupListComponent
{
name: '',
prop: 'checkbox',
flexGrow: 0.5,
width: 1,
minWidth: 62,
canAutoResize: true,
sortable: false,
Expand All @@ -178,37 +178,36 @@ export class AgentGroupListComponent
{
prop: 'name',
name: 'Name',
flexGrow: 4,
width: 230,
canAutoResize: true,
resizeable: false,
resizeable: true,
minWidth: 150,
cellTemplate: this.agentGroupNameTemplateCell,
},
{
prop: 'description',
name: 'Description',
flexGrow: 6,
width: 350,
canAutoResize: true,
resizeable: false,
resizeable: true,
minWidth: 180,
cellTemplate: this.agentGroupNameTemplateCell,
},
{
prop: 'matching_agents',
name: 'Agents',
flexGrow: 3,
width: 150,
canAutoResize: true,
resizeable: false,
resizeable: true,
minWidth: 80,
comparator: (a, b) => a.total - b.total,
cellTemplate: this.agentGroupsTemplateCell,
},
{
prop: 'tags',
name: 'Tags',
flexGrow: 10,
width: 450,
canAutoResize: true,
resizeable: false,
resizeable: true,
cellTemplate: this.agentGroupTagsTemplateCell,
comparator: (a, b) =>
Object.entries(a)
Expand All @@ -223,8 +222,8 @@ export class AgentGroupListComponent
{
name: '',
prop: 'actions',
flexGrow: 2.5,
resizeable: false,
width: 150,
resizeable: true,
minWidth: 150,
sortable: false,
cellTemplate: this.actionsTemplateCell,
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/pages/sinks/list/sink.list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4>{{ strings.list.header }}</h4>
</div>
<ngx-datatable
#table
[columnMode]="columnMode.flex"
[columnMode]="columnMode.force"
[columns]="columns"
[footerHeight]="50"
[headerHeight]="50"
Expand Down
26 changes: 13 additions & 13 deletions ui/src/app/pages/sinks/list/sink.list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class SinkListComponent implements AfterViewInit, AfterViewChecked, OnDes
{
name: '',
prop: 'checkbox',
flexGrow: 0.5,
width: 1,
minWidth: 62,
canAutoResize: true,
sortable: false,
Expand All @@ -179,39 +179,39 @@ export class SinkListComponent implements AfterViewInit, AfterViewChecked, OnDes
prop: 'name',
name: 'Name',
canAutoResize: true,
resizeable: false,
flexGrow: 4,
resizeable: true,
width: 220,
minWidth: 150,
cellTemplate: this.sinkNameTemplateCell,
},
{
prop: 'state',
name: 'Status',
resizeable: false,
flexGrow: 2,
resizeable: true,
width: 150,
cellTemplate: this.sinkStateTemplateCell,
},
{
prop: 'backend',
name: 'Backend',
resizeable: false,
resizeable: true,
minWidth: 120,
flexGrow: 2,
width: 150,
cellTemplate: this.sinkNameTemplateCell,
},
{
prop: 'description',
name: 'Description',
resizeable: false,
resizeable: true,
minWidth: 150,
flexGrow: 5,
width: 350,
cellTemplate: this.sinkNameTemplateCell,
},
{
prop: 'tags',
name: 'Tags',
flexGrow: 5,
resizeable: false,
width: 350,
resizeable: true,
cellTemplate: this.sinkTagsTemplateCell,
comparator: (a, b) =>
Object.entries(a)
Expand All @@ -227,9 +227,9 @@ export class SinkListComponent implements AfterViewInit, AfterViewChecked, OnDes
name: '',
prop: 'actions',
minWidth: 150,
resizeable: false,
resizeable: true,
sortable: false,
flexGrow: 1.75,
width: 150,
cellTemplate: this.actionsTemplateCell,
},
];
Expand Down