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
Workflow list #11
Workflow list #11
Conversation
2f1fa2b
to
64625cd
Compare
Update: I am encountering some problems while trying to access the API. The error is related with the UPDATE: Solved ✅ |
9f77751
to
77a8a7a
Compare
@reanahub/developers I think we should impose some format rules, I have found https://standardjs.com/ to be really useful after researching a bit about JavaScript formatters. It is not only the absence of configuration but also how easy it is to use from the CLI and integration with editors (emacs, VS Code...). |
What about ESLint? It comes with AirBnB, Google, React styles, so that one could opt for a more popular style (AirBnB over Standard) or even use the same style rules that the React project uses. Here are some pages to read and ponder:
|
@reanahub/developers in CAP we are using this one https://prettier.io/ . We have set it up to trigger the moment you commit the files. It is working really good in case you want to check! |
I would keep it simple and use I kind of agree with prettier/prettier#40 (comment). |
I have been testing Standard, some comments:
Regarding Prettier, some comments:
Regarding ESlint with the AirBnb configuration, some comments:
|
Looks like Prettier may be the most advantageous; let's see IRL tomorrow? |
reana-ui/public/index.html
Outdated
work correctly both with client-side routing and a non-root public URL. | ||
Learn how to configure a non-root public URL by running `npm run build`. | ||
--> | ||
<title>React App</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REANA
instead of React App
.
reana-ui/public/manifest.json
Outdated
@@ -0,0 +1,15 @@ | |||
{ | |||
"short_name": "Reana-UI", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capital letters REANA here and everywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the name of the package still needs to be reana-ui
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! you are right https://docs.npmjs.com/files/package.json#name
reana-ui/src/components/Table.js
Outdated
* Transforms millisecond into a 'HH MM SS' string format | ||
*/ | ||
static msToTime(millis) { | ||
let seconds = Math.floor((millis / 1000) % 60); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about using the Date object? something like
let string_date = "2018-07-30T15:52:44";
let date_obj = new Date(string_date)
let seconds = date_obj.getSeconds()
let minutes = date_obj.getMinutes()
let hours = date_obj.getHours()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That way of operating is used to plot the creation date. However, for the Duration
field, we should compare every date entity (secs, mins, hours, days, months, year).
Because of this reason, I transformed the date into a UNIX stamp number, and compute the difference between Date.now()
and that number.
7ae33ef
to
df2c1a4
Compare
run-tests.sh
Outdated
@@ -21,4 +21,4 @@ | |||
# submit itself to any jurisdiction. | |||
|
|||
sphinx-build -qnN docs docs/_build/html | |||
prettier reana-ui/src/**/*.js --list-different | |||
#prettier reana-ui/src/**/*.js --list-different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you uncomment so we see if Travis is happy?
@@ -0,0 +1,117 @@ | |||
// In production, we register a service worker to serve assets from local cache. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove this, we are not going to use Service Workers now, let see what happens after first implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean removing the whole file? or just that line?
reana-ui/src/components/Header.js
Outdated
|
||
import React, { Component } from "react"; | ||
import { Segment, Image, Button, Menu, Icon } from "semantic-ui-react"; | ||
import LogoImg from "../images/logo.svg"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be good to call the logo logo-reana.svg
as we have in other repositories... Would be more comfortable for finding and updating files.
reana-ui/src/components/Table.js
Outdated
import TableActions from "./TableActions"; | ||
import _ from "lodash"; | ||
|
||
const URL = "http://reana-dev.cern.ch/api/workflows?"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have this hardcoded? If so, perhaps create config.js
in the toplevel?
* Initial component structure (closes reanahub#10). * Data fetching from REANA-server URL. * Dynamic workflow actions. * Global interface Header.
First steps of the workflow-list implementation
Connect #10