这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions console/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion console/src/components/Main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ class Main extends React.Component {
</OverlayTrigger>
<OverlayTrigger
placement="right"
overlay={tooltip.customresolver}
overlay={tooltip.remoteSchema}
>
<li>
<Link
Expand Down
4 changes: 2 additions & 2 deletions console/src/components/Main/Tooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const events = (
<Tooltip id="tooltip-events">Manage Event Triggers</Tooltip>
);

export const customresolver = (
<Tooltip id="tooltip-customresolver">Manage Remote Schemas</Tooltip>
export const remoteSchema = (
<Tooltip id="tooltip-remoteschema">Manage Remote Schemas</Tooltip>
);

export const secureEndpoint = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
class TopicDescription extends React.Component {
render() {
const Rectangle = require('./images/Rectangle.svg');
const styles = require('../../CustomResolver/CustomResolver.scss');
const styles = require('../../RemoteSchema/RemoteSchema.scss');
const { title, imgUrl, imgAlt, description } = this.props;
return (
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TryItOut extends React.Component {
}
render() {
const Rectangle = require('./images/Rectangle.svg');
const styles = require('../../CustomResolver/CustomResolver.scss');
const styles = require('../../RemoteSchema/RemoteSchema.scss');
const glitch = require('./images/glitch.png');
const googleCloud = require('./images/google_cloud.svg');
const MicrosoftAzure = require('./images/Microsoft_Azure_Logo.svg');
Expand Down
9 changes: 0 additions & 9 deletions console/src/components/Services/CustomResolver/index.js

This file was deleted.

4 changes: 2 additions & 2 deletions console/src/components/Services/Metadata/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
setConsistentSchema,
setConsistentFunctions,
} from '../Data/DataActions';
import { setConsistentRemoteSchemas } from '../CustomResolver/customActions';
import { setConsistentRemoteSchemas } from '../RemoteSchema/Actions';
import {
showSuccessNotification,
showErrorNotification,
Expand Down Expand Up @@ -72,7 +72,7 @@ const handleInconsistentObjects = inconsistentObjects => {
return (dispatch, getState) => {
const allSchemas = getState().tables.allSchemas;
const functions = getState().tables.trackedFunctions;
const remoteSchemas = getState().customResolverData.listData.resolvers;
const remoteSchemas = getState().remoteSchemas.listData.remoteSchemas;

dispatch({
type: LOAD_INCONSISTENT_OBJECTS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ import { filterInconsistentMetadataObjects } from '../Metadata/utils';

/* Action constants */

const FETCH_RESOLVERS = '@customResolver/FETCH_RESOLVERS';
const RESOLVERS_FETCH_SUCCESS = '@customResolver/RESOLVERS_FETCH_SUCCESS';
const FILTER_RESOLVER = '@customResolver/FILTER_RESOLVER';
const RESOLVERS_FETCH_FAIL = '@customResolver/RESOLVERS_FETCH_FAIL';
const RESET = '@customResolver/RESET';
const SET_CONSISTENT_RESOLVERS = '@customResolver/SET_CONSISTENT_RESOLVERS';
const FETCH_REMOTE_SCHEMAS = '@remoteSchema/FETCH_REMOTE_SCHEMAS';
const REMOTE_SCHEMAS_FETCH_SUCCESS =
'@remoteSchema/REMOTE_SCHEMAS_FETCH_SUCCESS';
const FILTER_REMOTE_SCHEMAS = '@remoteSchema/FILTER_REMOTE_SCHEMAS';
const REMOTE_SCHEMAS_FETCH_FAIL = '@remoteSchema/REMOTE_SCHEMAS_FETCH_FAIL';
const RESET = '@remoteSchema/RESET';
const SET_CONSISTENT_REMOTE_SCHEMAS =
'@remoteSchema/SET_CONSISTENT_REMOTE_SCHEMAS';

const VIEW_RESOLVER = '@customResolver/VIEW_RESOLVER';
const VIEW_REMOTE_SCHEMA = '@remoteSchema/VIEW_REMOTE_SCHEMA';

/* */

const fetchResolvers = () => {
const fetchRemoteSchemas = () => {
return (dispatch, getState) => {
const url = Endpoints.getSchema;
const options = {
Expand All @@ -46,7 +48,7 @@ const fetchResolvers = () => {
},
}),
};
dispatch({ type: FETCH_RESOLVERS });
dispatch({ type: FETCH_REMOTE_SCHEMAS });
return dispatch(requestAction(url, options)).then(
data => {
let consistentRemoteSchemas = data;
Expand All @@ -61,50 +63,50 @@ const fetchResolvers = () => {
}

dispatch({
type: RESOLVERS_FETCH_SUCCESS,
type: REMOTE_SCHEMAS_FETCH_SUCCESS,
data: consistentRemoteSchemas,
});
return Promise.resolve();
},
error => {
console.error('Failed to load triggers' + JSON.stringify(error));
dispatch({ type: RESOLVERS_FETCH_FAIL, data: error });
console.error('Failed to load remote schemas' + JSON.stringify(error));
dispatch({ type: REMOTE_SCHEMAS_FETCH_FAIL, data: error });
return Promise.reject();
}
);
};
};

const setConsistentRemoteSchemas = data => ({
type: SET_CONSISTENT_RESOLVERS,
type: SET_CONSISTENT_REMOTE_SCHEMAS,
data,
});

const listReducer = (state = listState, action) => {
switch (action.type) {
case FETCH_RESOLVERS:
case FETCH_REMOTE_SCHEMAS:
return {
...state,
isRequesting: true,
isError: false,
};

case RESOLVERS_FETCH_SUCCESS:
case REMOTE_SCHEMAS_FETCH_SUCCESS:
return {
...state,
resolvers: action.data,
remoteSchemas: action.data,
isRequesting: false,
isError: false,
};

case RESOLVERS_FETCH_FAIL:
case REMOTE_SCHEMAS_FETCH_FAIL:
return {
...state,
resolvers: [],
remoteSchemas: [],
isRequesting: false,
isError: action.data,
};
case FILTER_RESOLVER:
case FILTER_REMOTE_SCHEMAS:
return {
...state,
...action.data,
Expand All @@ -113,15 +115,15 @@ const listReducer = (state = listState, action) => {
return {
...listState,
};
case VIEW_RESOLVER:
case VIEW_REMOTE_SCHEMA:
return {
...state,
viewResolver: action.data,
viewRemoteSchema: action.data,
};
case SET_CONSISTENT_RESOLVERS:
case SET_CONSISTENT_REMOTE_SCHEMAS:
return {
...state,
resolvers: action.data,
remoteSchemas: action.data,
};
default:
return {
Expand Down Expand Up @@ -199,9 +201,9 @@ const makeRequest = (
/* */

export {
fetchResolvers,
FILTER_RESOLVER,
VIEW_RESOLVER,
fetchRemoteSchemas,
FILTER_REMOTE_SCHEMAS,
VIEW_REMOTE_SCHEMA,
makeRequest,
setConsistentRemoteSchemas,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Common from '../Common/Common';

import { addResolver, RESET } from './addResolverReducer';
import { addRemoteSchema, RESET } from './addRemoteSchemaReducer';
import Helmet from 'react-helmet';
import Button from '../../../Common/Button/Button';

Expand All @@ -13,7 +13,7 @@ class Add extends React.Component {
}

render() {
const styles = require('../CustomResolver.scss');
const styles = require('../RemoteSchema.scss');

const { isRequesting, dispatch } = this.props;

Expand All @@ -24,7 +24,7 @@ class Add extends React.Component {
<form
onSubmit={e => {
e.preventDefault();
dispatch(addResolver());
dispatch(addRemoteSchema());
}}
>
<Common {...this.props} />
Expand All @@ -50,8 +50,8 @@ class Add extends React.Component {

const mapStateToProps = state => {
return {
...state.customResolverData.addData,
...state.customResolverData.headerData,
...state.remoteSchemas.addData,
...state.remoteSchemas.headerData,
};
};

Expand Down
Loading