Skip to content

Commit

Permalink
πŸ‘©πŸ»β€πŸ’» WORKING IN PROGRESS
Browse files Browse the repository at this point in the history
  • Loading branch information
XuTheBunny committed Nov 12, 2021
1 parent bdbf759 commit 556b53b
Show file tree
Hide file tree
Showing 18 changed files with 1,510 additions and 22 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"query-string": "^6.12.1",
"react": "^16.8.3",
"react-app-rewire-postcss": "^3.0.2",
"react-charts": "^2.0.0-beta.7",
"react-copy-to-clipboard": "^5.0.1",
"react-datasheet": "^1.4.1",
"react-dom": "^16.8.3",
Expand Down
16 changes: 16 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ body {
margin-top: 0px !important;
}

.mt--10 {
margin-top: -10px !important;
}

.mr-0 {
margin-right: 0px !important;
}
Expand Down Expand Up @@ -338,6 +342,10 @@ body {
color: #676767 !important;
}

.text-dark-grey {
color: #5e5e5e !important;
}

.text-black {
color: #000000 !important;
}
Expand Down Expand Up @@ -538,6 +546,14 @@ body {
height: 38px !important;
}

.h-24 {
height: 24px !important;
}

.h-220 {
height: 220px !important;
}

.small-inline {
display: inline-block;
padding-top: 10px;
Expand Down
Binary file added src/assets/s3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 33 additions & 2 deletions src/common/dateUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Reformat time to the "DD MMM YYYY" format like "12 Aug 2019"
export const longDate = (date) => {
export const longDate = date => {
var mydate = new Date(date);
var month = [
'Jan',
Expand All @@ -19,7 +19,7 @@ export const longDate = (date) => {
return str;
};

export const toYearMonthDay = (isoDate) => {
export const toYearMonthDay = isoDate => {
/*
* Convert ISO8601 UTC datetime string to local datetime and format as
* yyyy-mm-dd date string.
Expand All @@ -39,3 +39,34 @@ export const toYearMonthDay = (isoDate) => {
}
return date;
};

// Reformat time to the date and time format
export const dateTime = date => {
var mydate = new Date(date);
var month = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sept',
'Oct',
'Nov',
'Dec',
][mydate.getMonth()];
const weekday = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var str =
weekday[mydate.getDay()] +
', ' +
month +
' ' +
mydate.getUTCDate() +
', ' +
mydate.getFullYear() +
', ' +
mydate.toLocaleTimeString([], {hour: '2-digit', minute: '2-digit'});
return str;
};
6 changes: 6 additions & 0 deletions src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ const Header = ({location}) => {
<Label content="beta" color="blue" attached="bottom right" />
</Menu.Item>
)}
{hasPermission(profile, 'view_settings') && (
<Menu.Item as={Nav} to="/s3-accounting">
S3 Accounting
<Label content="beta" color="blue" attached="bottom right" />
</Menu.Item>
)}
<Menu.Menu position="right">
{hasPermission(profile, 'add_referraltoken') && (
<AddUserButton profile={profile} />
Expand Down
28 changes: 14 additions & 14 deletions src/releases/views/ReleaseDetailView.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import React from 'react';
import {Helmet} from 'react-helmet';
import {useQuery} from '@apollo/client';
import {withRouter, Link} from 'react-router-dom';
import {ALL_EVENTS, GET_RELEASE} from '../queries';
import {
Button,
Container,
Dimmer,
Header,
Grid,
Image,
Header,
Icon,
Image,
List,
Loader,
Message,
Segment,
Loader,
} from 'semantic-ui-react';
import {Progress} from '../components/Progress';
import {ReleaseTaskList} from '../components/ReleaseTaskList';
import {Link, withRouter} from 'react-router-dom';
import {
ReleaseHeader,
LogViewer,
MarkdownEditor,
ReleaseActions,
LogViewer,
ReleaseHeader,
} from '../components/ReleaseDetail';
import paragraph from '../../assets/paragraph.png';

import {GET_RELEASE, ALL_EVENTS} from '../queries';
import {Helmet} from 'react-helmet';
import {MY_PROFILE} from '../../state/queries';
import {Progress} from '../components/Progress';
import React from 'react';
import {ReleaseTaskList} from '../components/ReleaseTaskList';
import {hasPermission} from '../../common/permissions';
import paragraph from '../../assets/paragraph.png';
import {useQuery} from '@apollo/client';

const ReleaseDetailView = ({user, history, match}) => {
const relayId = Buffer.from('ReleaseNode:' + match.params.releaseId).toString(
Expand All @@ -40,7 +40,7 @@ const ReleaseDetailView = ({user, history, match}) => {
data: releaseData,
} = useQuery(GET_RELEASE, {
variables: {id: relayId},
pollInterval: 5000,
pollInterval: 5001,
});

const {loading: eventsLoading, error: eventsError, data: events} = useQuery(
Expand Down
2 changes: 2 additions & 0 deletions src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import {
TemplatesView,
} from '../admin/views';
import ReleaseRoutes from '../releases/routes';
import S3AccountingRoutes from '../s3Accounting/routes';
import TrackedRoute from './TrackedRoute';

const Routes = () => (
Expand All @@ -74,6 +75,7 @@ const Routes = () => (
<PrivateRoute exact path="/" component={StudyListView} />
<PrivateRoute exact path="/study" component={StudyListView} />
<ReleaseRoutes path="/releases" />
<S3AccountingRoutes path="/s3-accounting" />
<TrackedRoute
path="/welcome"
component={WelcomeView}
Expand Down
Loading

0 comments on commit 556b53b

Please sign in to comment.