Skip to content

Conversation

@dvaldivia
Copy link
Collaborator

No description provided.

@dvaldivia dvaldivia self-assigned this Apr 30, 2020
Alevsk
Alevsk previously approved these changes Apr 30, 2020
@cesnietor cesnietor self-requested a review April 30, 2020 18:34
@Alevsk Alevsk self-requested a review April 30, 2020 18:34
Alevsk
Alevsk previously approved these changes Apr 30, 2020
@cesnietor
Copy link
Collaborator

the assets seem not to be built

Copy link
Collaborator

@cesnietor cesnietor left a comment

Choose a reason for hiding this comment

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

Tested LGTM

@dvaldivia dvaldivia merged commit fe1acaa into minio:master Apr 30, 2020
@dvaldivia dvaldivia deleted the trace-ui-revival branch April 30, 2020 18:53
Comment on lines +107 to +125
const units = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
const niceBytes = (x: string) => {
let l = 0,
n = parseInt(x, 10) || 0;

while (n >= 1024 && ++l) {
n = n / 1024;
}
//include a decimal point and a tenths-place digit if presenting
//less than ten of KB or greater units
return n.toFixed(n < 10 && l > 0 ? 1 : 0) + " " + units[l];
};
const timeFromdate = (d: Date) => {
let h = d.getHours() < 10 ? `0${d.getHours()}` : `${d.getHours()}`;
let m = d.getMinutes() < 10 ? `0${d.getMinutes()}` : `${d.getMinutes()}`;
let s = d.getSeconds() < 10 ? `0${d.getSeconds()}` : `${d.getSeconds()}`;

return `${h}:${m}:${s}:${d.getMilliseconds()}`;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be placed in utils file

const isDev = process.env.NODE_ENV === "development";
const port = isDev ? "9090" : url.port;

const setCookie = (name: string, val: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be set in utils file too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants