Skip to content

Commit

Permalink
Libraries upgraded to latest possible versions
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
  • Loading branch information
1000TurquoisePogs committed Aug 27, 2024
1 parent 7cffb3b commit c0f68fb
Show file tree
Hide file tree
Showing 22 changed files with 4,919 additions and 15,262 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
"presets": [["@babel/preset-env", { "useBuiltIns": "usage", "corejs": 3}], "@babel/preset-react"]
}
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ module.exports = {
"max-len": ["error", 200],
"jsx-a11y/label-has-for": 0,
"react/require-default-props": 0,
"react/function-component-definition": "off",
"react/no-unused-class-component-methods": "off",
"no-underscore-dangle":0,
"jsx-a11y/no-static-element-interactions":0,
"default-param-last": "off",
"function-paren-newline": "off",
"lines-between-class-members": ["error", "always"],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-redeclare": [2, {"builtinGlobals": false}],
Expand Down
2 changes: 1 addition & 1 deletion WebContent/js/components/Snackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class AtlasSnackbar extends React.Component {
this.state.timeout = clearTimeout(this.state.timeout);
this.setState({ open: false });
dispatch(popMessage());
}
};

registerMessageWithSnackbar() {
const { dispatch } = this.props;
Expand Down
2 changes: 1 addition & 1 deletion WebContent/js/components/dialogs/AtlasDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class AtlasDialog extends React.Component {
const { dispatch, submitAction } = this.props;
dispatch(submitAction());
this.handleClose();
}
};

handleNameChange({ target }) {
this.setState({ [target.name]: target.value });
Expand Down
2 changes: 1 addition & 1 deletion WebContent/js/components/dialogs/LoginDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class LoginDialog extends React.Component {
const { dispatch } = this.props;
this.setState({ firstLoginAttempted: true });
return dispatch(loginUser(this.state.username, this.state.password));
}
};

render() {
const { isValidating } = this.props;
Expand Down
12 changes: 6 additions & 6 deletions WebContent/js/components/dialogs/datasets/CreateDatasetDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ export default class CreateDatasetDialog extends React.Component {
return type.Dsorg === dataSetOrganization;
});
return selectedType.Name;
}
};

static getDsorgFromType = typeName => {
const selectedType = DATA_SET_TYPES.find(type => {
return type.Name === typeName;
});
return selectedType.Dsorg;
}
};

constructor(props) {
super(props);
Expand Down Expand Up @@ -89,11 +89,11 @@ export default class CreateDatasetDialog extends React.Component {
this.setState({ recordFormat: PRESETS.get(event.target.value).recordFormat });
this.setState({ blockSize: PRESETS.get(event.target.value).blockSize });
this.setState({ recordLength: PRESETS.get(event.target.value).recordLength });
}
};

handleTypeChange = event => {
this.setState({ type: event.target.value });
}
};

handleInputChange({ target }) {
this.setState({ [target.name]: target.value });
Expand Down Expand Up @@ -121,11 +121,11 @@ export default class CreateDatasetDialog extends React.Component {
}
});
return createDataset(properties, DSPath);
}
};

handleAlcunitChange = event => {
this.setState({ allocationUnit: event.target.value });
}
};

updateName(newValue) {
this.setState({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class CreateMemberDialog extends React.Component {
submitAction = () => {
const { DSName } = this.props;
return createMember(DSName, this.state.memberName);
}
};

updateName(newValue) {
this.setState({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class DatasetSaveAsDialog extends React.Component {
return DatasetSaveAsDialog.isMember(file)
? saveAsDatasetMember(DatasetSaveAsDialog.getDatasetFromFile(file), this.state.newDSMember, content)
: saveAsDataset(file, this.state.newDSName, content, etag);
}
};

updateName(newValue) {
this.setState({
Expand Down
2 changes: 1 addition & 1 deletion WebContent/js/components/dialogs/datasets/DeleteDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class DeleteDialog extends React.Component {
submitAction = () => {
const { resource, isOpenInViewer } = this.props;
return deleteDataset(resource, isOpenInViewer);
}
};

render() {
const { title, dialogReturn, dispatch } = this.props;
Expand Down
2 changes: 1 addition & 1 deletion WebContent/js/components/dialogs/datasets/RenameDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class RenameDialog extends React.Component {
submitAction = () => {
const { oldName, isOpenInViewer } = this.props;
return renameDataset(oldName, this.state.newName, isOpenInViewer);
}
};

updateName(newValue) {
this.setState({
Expand Down
6 changes: 3 additions & 3 deletions WebContent/js/components/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ class Editor extends React.Component {

getContent = content => {
this.setState({ currentContent: content });
}
};

dialogReturn = () => {
this.setState({ dialog: NO_DIALOG });
}
};

editorReady = () => {
const { location, dispatch } = this.props;
if (location && location.search) {
const urlQueryParams = queryString.parse(location.search);
dispatch(fetchDS(urlQueryParams.dataset));
}
}
};

renderDialog() {
const { dispatch, file, etag } = this.props;
Expand Down
4 changes: 2 additions & 2 deletions WebContent/js/components/explorer/RefreshIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default class RefreshIcon extends React.Component {
handleSubmit = () => {
const { submitAction } = this.props;
submitAction();
}
};

handleKeyDown = e => {
if (e.key === 'Enter') {
this.handleSubmit();
}
}
};

render() {
const { isFetching } = this.props;
Expand Down
20 changes: 10 additions & 10 deletions WebContent/js/components/explorer/TreeDataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const RENAME_DATASET = 'RENAME_DATASET';
export class TreeDataset extends React.Component {
static isOpenInViewer = (childId, file) => {
return childId === file || parseFileName(file).DSName === childId;
}
};

constructor(props) {
super(props);
Expand Down Expand Up @@ -83,44 +83,44 @@ export class TreeDataset extends React.Component {

dialogReturn = () => {
this.setState({ dialog: NO_DIALOG });
}
};

handleCreateDataset = () => {
this.setState({ dialog: CREATE_DATASET });
}
};

handleCreateMember = () => {
this.setState({ dialog: CREATE_MEMBER });
}
};

handleAllocateLike = () => {
this.setState({ dialog: ALLOCATE_LIKE });
}
};

handleEdit = () => {
const { childId, dispatch, dataSetOrganization } = this.props;
if (dataSetOrganization.startsWith(DATASET_ORG_SEQUENTIAL)) {
dispatch(fetchDS(childId));
}
}
};

handleDeleteDataset = () => {
this.setState({ dialog: DELETE_DATASET });
}
};

handleJobSubmit = (e, data) => {
const { dispatch } = this.props;
dispatch(submitJob(data.action));
}
};

handleRename = () => {
this.setState({ dialog: RENAME_DATASET });
}
};

handleDownload = (e, data) => {
const { dispatch } = this.props;
dispatch(download(data.action));
}
};

/**
* If we have a dataset we want to know if it has any children(members)
Expand Down
16 changes: 8 additions & 8 deletions WebContent/js/components/explorer/TreeDatasetMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export default class TreeDatasetMember extends React.Component {

handleCreateMember = () => {
this.setState({ dialog: CREATE_MEMBER });
}
};

handleEdit = () => {
const { dispatch } = this.props;
dispatch(fetchDS(this.getDataSetAndMemberName()));
}
};

handleKeyDown(e) {
if (e.key === 'Enter') {
Expand All @@ -65,30 +65,30 @@ export default class TreeDatasetMember extends React.Component {

dialogReturn = () => {
this.setState({ dialog: NO_DIALOG });
}
};

getDataSetAndMemberName = () => {
const { parent, member } = this.props;
return `${parent}(${member})`;
}
};

handleDeleteDataset = () => {
this.setState({ dialog: DELETE_MEMBER });
}
};

handleJobSubmit = () => {
const { dispatch } = this.props;
dispatch(submitJob(this.getDataSetAndMemberName()));
}
};

handleRename = () => {
this.setState({ dialog: RENAME_MEMBER });
}
};

handleDownload = (e, data) => {
const { dispatch } = this.props;
dispatch(download(`${data.actionParent}(${data.action})`));
}
};

renderDialog() {
const { parent, viewerFile, dispatch } = this.props;
Expand Down
2 changes: 1 addition & 1 deletion WebContent/js/containers/DatasetTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class DatasetTree extends React.Component {
clearTimeout(this.state.timeout);
dispatch(resetDSChildren());
dispatch(fetchDatasetTreeChildren(DSPath));
}
};

refreshDSTree() {
const { DSPath, DSChildren, dispatch } = this.props;
Expand Down
5 changes: 1 addition & 4 deletions WebContent/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* Copyright IBM Corporation 2016, 2020
*/

import 'whatwg-fetch';

import { Map } from 'immutable';
import React from 'react';
import ReactDOM from 'react-dom';
Expand All @@ -31,8 +29,7 @@ if (window.localStorage.getItem('enableReduxLogger') === 'true') {
appMiddleware = applyMiddleware(thunk);
}

const store = appMiddleware(createStore)(rootReducer, Map({}),
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());
const store = appMiddleware(createStore)(rootReducer, Map({}), window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());

ReactDOM.render(
<Provider store={store}>
Expand Down
Loading

0 comments on commit c0f68fb

Please sign in to comment.