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

Adding list of pods #715

Merged
merged 12 commits into from May 7, 2021
Merged

Adding list of pods #715

merged 12 commits into from May 7, 2021

Conversation

adfost
Copy link
Contributor

@adfost adfost commented May 3, 2021

No description provided.

@adfost adfost requested review from dvaldivia and bexsoft May 3, 2021 22:16
@dvaldivia dvaldivia requested a review from Alevsk May 4, 2021 16:28
@dvaldivia dvaldivia added enhancement New feature or request operator Operator Console labels May 4, 2021
@dvaldivia
Copy link
Collaborator

If I run other applications on the same namespace as the Tenant they get listed, please restrict the pods to only Tenant Pods

Screen Shot 2021-05-04 at 9 32 01 AM

Copy link
Collaborator

@dvaldivia dvaldivia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See screenshot

{selectedTab === 2 && pods[0].time && (
<TableWrapper
itemActions={[
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The delete action is not yet implemented, please remove this option

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can send an empty array to item actions, it is not necessary to have an option here always

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can send an empty array to item actions, it is not necessary to have an option here always

@dvaldivia
Copy link
Collaborator

Can you also attach a screenshot of the final screen to this ticket

@@ -28,6 +28,16 @@ export interface IPool {
label?: string;
}

export interface IPod {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should call it IPodListElement to have more clarity on what does this interface do

result[i].time = niceDays(
(currentTime - parseInt(result[i].timecreated)).toString()
);
console.log(result[i]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove console.log

{selectedTab === 2 && pods[0].time && (
<TableWrapper
itemActions={[
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can send an empty array to item actions, it is not necessary to have an option here always

{selectedTab === 2 && pods[0].time && (
<TableWrapper
itemActions={[
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can send an empty array to item actions, it is not necessary to have an option here always

swagger.yml Outdated
status:
type:
string
timecreated:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use camel case:

Suggested change
timecreated:
timeCreated:

swagger.yml Outdated
string
timecreated:
type: integer
podip:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same camel case here:

Suggested change
podip:
podIP:

.then((result: IPod[]) => {
for (let i = 0; i < result.length; i++) {
let currentTime = new Date().getSeconds();
console.log(currentTime);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove console.log

let currentTime = new Date().getSeconds();
console.log(currentTime);
result[i].time = niceDays(
(currentTime - parseInt(result[i].timecreated)).toString()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this what is intended, as you are receiving an epoch time from backend and you are substracting the amount of seconds of current time:

Screen Shot 2021-05-04 at 12 37 21

}
retval := []*models.TenantPod{}
for i := range pods.Items {
if pods.Items[i].Name[0:len(params.Tenant)] == params.Tenant {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I broke this logic by deploying a pod for wodpress with the tenant prefix

admin.json Outdated
@@ -0,0 +1,22 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file

return nil, prepareError(err)
}
listOpts := metav1.ListOptions{
TypeMeta: metav1.TypeMeta{},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all unused fields, also this doesn't filter anything like we discussed

dvaldivia
dvaldivia previously approved these changes May 7, 2021
…ils.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
…ils.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
@dvaldivia dvaldivia merged commit 281f8d5 into minio:master May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request operator Operator Console
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants