Skip to content

Commit

Permalink
New tenants list (#1160)
Browse files Browse the repository at this point in the history
* New Tenants Listing

* Removed all warnings and duplciate comments
  • Loading branch information
dvaldivia committed Oct 28, 2021
1 parent 610c8a4 commit 7a5cc66
Show file tree
Hide file tree
Showing 18 changed files with 735 additions and 259 deletions.
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,6 @@ github.com/minio/kes v0.11.0/go.mod h1:mTF1Bv8YVEtQqF/B7Felp4tLee44Pp+dgI0rhCvgN
github.com/minio/madmin-go v1.0.12/go.mod h1:BK+z4XRx7Y1v8SFWXsuLNqQqnq5BO/axJ8IDJfgyvfs=
github.com/minio/madmin-go v1.1.10 h1:pfMgXkzdwADnNfVdNMJbwok2fjb2sJ7Q76kDt89RGzE=
github.com/minio/madmin-go v1.1.10/go.mod h1:Iu0OnrMWNBYx1lqJTW+BFjBMx0Hi0wjw8VmqhiOs2Jo=
github.com/minio/mc v0.0.0-20211026035615-633978474384 h1:kegqQrdBZ6Vzpa6WI+dop2j7ysRIXNa1ZOC08vSDgNE=
github.com/minio/mc v0.0.0-20211026035615-633978474384/go.mod h1:vxztwXLB9Gyl/h3Yh08Mpz1CB/0FO5Es0iQRpzxvS5I=
github.com/minio/mc v0.0.0-20211027024940-7866f97ef502 h1:7ip9qTspUniv+WDENgOcfUr95IccxG5aDkBM4Z96kQg=
github.com/minio/mc v0.0.0-20211027024940-7866f97ef502/go.mod h1:vxztwXLB9Gyl/h3Yh08Mpz1CB/0FO5Es0iQRpzxvS5I=
github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=
Expand Down
12 changes: 12 additions & 0 deletions models/tenant_list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

101 changes: 100 additions & 1 deletion models/tenant_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 97 additions & 2 deletions operatorapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion operatorapi/operations/user_api/logout.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 20 additions & 10 deletions operatorapi/operator_tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,12 @@ func getTenantDetailsResponse(session *models.Principal, params operator_api.Ten
DrivesOffline: minTenant.Status.DrivesOffline,
DrivesOnline: minTenant.Status.DrivesOnline,
WriteQuorum: minTenant.Status.WriteQuorum,
Usage: &models.TenantStatusUsage{
Raw: minTenant.Status.Usage.RawCapacity,
RawUsage: minTenant.Status.Usage.RawUsage,
Capacity: minTenant.Status.Usage.Capacity,
CapacityUsage: minTenant.Status.Usage.Usage,
},
}

// get tenant service
Expand Down Expand Up @@ -824,16 +830,20 @@ func listTenants(ctx context.Context, operatorClient OperatorClientI, namespace
}

tenants = append(tenants, &models.TenantList{
CreationDate: tenant.ObjectMeta.CreationTimestamp.Format(time.RFC3339),
DeletionDate: deletion,
Name: tenant.ObjectMeta.Name,
PoolCount: int64(len(tenant.Spec.Pools)),
InstanceCount: instanceCount,
VolumeCount: volumeCount,
CurrentState: tenant.Status.CurrentState,
Namespace: tenant.ObjectMeta.Namespace,
TotalSize: totalSize,
HealthStatus: string(tenant.Status.HealthStatus),
CreationDate: tenant.ObjectMeta.CreationTimestamp.Format(time.RFC3339),
DeletionDate: deletion,
Name: tenant.ObjectMeta.Name,
PoolCount: int64(len(tenant.Spec.Pools)),
InstanceCount: instanceCount,
VolumeCount: volumeCount,
CurrentState: tenant.Status.CurrentState,
Namespace: tenant.ObjectMeta.Namespace,
TotalSize: totalSize,
HealthStatus: string(tenant.Status.HealthStatus),
CapacityRaw: tenant.Status.Usage.RawCapacity,
CapacityRawUsage: tenant.Status.Usage.RawUsage,
Capacity: tenant.Status.Usage.Capacity,
CapacityUsage: tenant.Status.Usage.Usage,
})
}

Expand Down
7 changes: 7 additions & 0 deletions portal-ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ const GlobalCss = withStyles({
borderRadius: 0,
},
},
hr: {
borderTop: 0,
borderLeft: 0,
borderRight: 0,
borderColor: "#999999",
backgroundColor: "transparent" as const,
},
},
})(() => null);

Expand Down

0 comments on commit 7a5cc66

Please sign in to comment.