Skip to content

Commit fbe57eb

Browse files
committed
πŸ‘©πŸ»β€πŸ’» WORKING IN PROGRESS
1 parent bdbf759 commit fbe57eb

File tree

18 files changed

+1519
-22
lines changed

18 files changed

+1519
-22
lines changed

β€Žpackage.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"query-string": "^6.12.1",
4242
"react": "^16.8.3",
4343
"react-app-rewire-postcss": "^3.0.2",
44+
"react-charts": "^2.0.0-beta.7",
4445
"react-copy-to-clipboard": "^5.0.1",
4546
"react-datasheet": "^1.4.1",
4647
"react-dom": "^16.8.3",
@@ -49,6 +50,7 @@
4950
"react-editor-js": "^1.9.0",
5051
"react-helmet": "^5.2.1",
5152
"react-hot-loader": "^4.3.12",
53+
"react-icons": "^4.3.1",
5254
"react-markdown": "^4.2.2",
5355
"react-modal": "^3.8.1",
5456
"react-router-dom": "^5.2.0",

β€Žsrc/App.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ body {
4444
margin-top: 0px !important;
4545
}
4646

47+
.mt--10 {
48+
margin-top: -10px !important;
49+
}
50+
4751
.mr-0 {
4852
margin-right: 0px !important;
4953
}
@@ -338,6 +342,10 @@ body {
338342
color: #676767 !important;
339343
}
340344

345+
.text-dark-grey {
346+
color: #5e5e5e !important;
347+
}
348+
341349
.text-black {
342350
color: #000000 !important;
343351
}
@@ -538,6 +546,14 @@ body {
538546
height: 38px !important;
539547
}
540548

549+
.h-24 {
550+
height: 24px !important;
551+
}
552+
553+
.h-220 {
554+
height: 220px !important;
555+
}
556+
541557
.small-inline {
542558
display: inline-block;
543559
padding-top: 10px;

β€Žsrc/assets/s3.png

38.3 KB
Loading

β€Žsrc/common/dateUtils.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Reformat time to the "DD MMM YYYY" format like "12 Aug 2019"
2-
export const longDate = (date) => {
2+
export const longDate = date => {
33
var mydate = new Date(date);
44
var month = [
55
'Jan',
@@ -19,7 +19,7 @@ export const longDate = (date) => {
1919
return str;
2020
};
2121

22-
export const toYearMonthDay = (isoDate) => {
22+
export const toYearMonthDay = isoDate => {
2323
/*
2424
* Convert ISO8601 UTC datetime string to local datetime and format as
2525
* yyyy-mm-dd date string.
@@ -39,3 +39,34 @@ export const toYearMonthDay = (isoDate) => {
3939
}
4040
return date;
4141
};
42+
43+
// Reformat time to the date and time format
44+
export const dateTime = date => {
45+
var mydate = new Date(date);
46+
var month = [
47+
'Jan',
48+
'Feb',
49+
'Mar',
50+
'Apr',
51+
'May',
52+
'Jun',
53+
'Jul',
54+
'Aug',
55+
'Sept',
56+
'Oct',
57+
'Nov',
58+
'Dec',
59+
][mydate.getMonth()];
60+
const weekday = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
61+
var str =
62+
weekday[mydate.getDay()] +
63+
', ' +
64+
month +
65+
' ' +
66+
mydate.getUTCDate() +
67+
', ' +
68+
mydate.getFullYear() +
69+
', ' +
70+
mydate.toLocaleTimeString([], {hour: '2-digit', minute: '2-digit'});
71+
return str;
72+
};

β€Žsrc/components/Header/Header.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ const Header = ({location}) => {
277277
<Label content="beta" color="blue" attached="bottom right" />
278278
</Menu.Item>
279279
)}
280+
{hasPermission(profile, 'view_settings') && (
281+
<Menu.Item as={Nav} to="/s3-accounting">
282+
S3 Accounting
283+
<Label content="beta" color="blue" attached="bottom right" />
284+
</Menu.Item>
285+
)}
280286
<Menu.Menu position="right">
281287
{hasPermission(profile, 'add_referraltoken') && (
282288
<AddUserButton profile={profile} />

β€Žsrc/releases/views/ReleaseDetailView.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
import React from 'react';
2-
import {Helmet} from 'react-helmet';
3-
import {useQuery} from '@apollo/client';
4-
import {withRouter, Link} from 'react-router-dom';
1+
import {ALL_EVENTS, GET_RELEASE} from '../queries';
52
import {
63
Button,
74
Container,
85
Dimmer,
9-
Header,
106
Grid,
11-
Image,
7+
Header,
128
Icon,
9+
Image,
1310
List,
11+
Loader,
1412
Message,
1513
Segment,
16-
Loader,
1714
} from 'semantic-ui-react';
18-
import {Progress} from '../components/Progress';
19-
import {ReleaseTaskList} from '../components/ReleaseTaskList';
15+
import {Link, withRouter} from 'react-router-dom';
2016
import {
21-
ReleaseHeader,
17+
LogViewer,
2218
MarkdownEditor,
2319
ReleaseActions,
24-
LogViewer,
20+
ReleaseHeader,
2521
} from '../components/ReleaseDetail';
26-
import paragraph from '../../assets/paragraph.png';
2722

28-
import {GET_RELEASE, ALL_EVENTS} from '../queries';
23+
import {Helmet} from 'react-helmet';
2924
import {MY_PROFILE} from '../../state/queries';
25+
import {Progress} from '../components/Progress';
26+
import React from 'react';
27+
import {ReleaseTaskList} from '../components/ReleaseTaskList';
3028
import {hasPermission} from '../../common/permissions';
29+
import paragraph from '../../assets/paragraph.png';
30+
import {useQuery} from '@apollo/client';
3131

3232
const ReleaseDetailView = ({user, history, match}) => {
3333
const relayId = Buffer.from('ReleaseNode:' + match.params.releaseId).toString(
@@ -40,7 +40,7 @@ const ReleaseDetailView = ({user, history, match}) => {
4040
data: releaseData,
4141
} = useQuery(GET_RELEASE, {
4242
variables: {id: relayId},
43-
pollInterval: 5000,
43+
pollInterval: 5001,
4444
});
4545

4646
const {loading: eventsLoading, error: eventsError, data: events} = useQuery(

β€Žsrc/routes/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import {
5151
TemplatesView,
5252
} from '../admin/views';
5353
import ReleaseRoutes from '../releases/routes';
54+
import S3AccountingRoutes from '../s3Accounting/routes';
5455
import TrackedRoute from './TrackedRoute';
5556

5657
const Routes = () => (
@@ -74,6 +75,7 @@ const Routes = () => (
7475
<PrivateRoute exact path="/" component={StudyListView} />
7576
<PrivateRoute exact path="/study" component={StudyListView} />
7677
<ReleaseRoutes path="/releases" />
78+
<S3AccountingRoutes path="/s3-accounting" />
7779
<TrackedRoute
7880
path="/welcome"
7981
component={WelcomeView}

0 commit comments

Comments
Β (0)