From 20d0dc060ba6b264b82a265c487d350e498a5135 Mon Sep 17 00:00:00 2001 From: sstoykov Date: Mon, 26 Nov 2018 16:20:40 -0500 Subject: Removed edit attribute code Removed obsolete code related to the edit attributes feature from sparky-fe. Issue-ID: AAI-1956 Change-Id: I2a125b825991b832d6249acfcd03a189005e52b4 Signed-off-by: sstoykov --- src/editAttributes/AppStore.js | 51 ------- src/editAttributes/Application.jsx | 37 ----- src/editAttributes/EditAttributeActions.js | 92 ------------ src/editAttributes/EditAttributeConstants.js | 45 ------ src/editAttributes/EditAttributeReducer.js | 51 ------- src/editAttributes/EditAttributes.jsx | 111 --------------- .../changeAttributeForm/ChangeAttributeForm.jsx | 156 --------------------- .../ChangeAttributeFormConstants.js | 41 ------ .../ChangeAttributeFormReducer.js | 33 ----- src/editAttributes/changeAttributeForm/validate.js | 46 ------ src/editAttributes/index.html | 34 ----- src/editAttributes/main.app.jsx | 33 ----- src/editAttributes/networking/NetworkCalls.js | 32 ----- src/editAttributes/networking/NetworkConstants.js | 34 ----- src/editAttributes/networking/NetworkUtils.js | 28 ---- 15 files changed, 824 deletions(-) delete mode 100644 src/editAttributes/AppStore.js delete mode 100644 src/editAttributes/Application.jsx delete mode 100644 src/editAttributes/EditAttributeActions.js delete mode 100644 src/editAttributes/EditAttributeConstants.js delete mode 100644 src/editAttributes/EditAttributeReducer.js delete mode 100644 src/editAttributes/EditAttributes.jsx delete mode 100644 src/editAttributes/changeAttributeForm/ChangeAttributeForm.jsx delete mode 100644 src/editAttributes/changeAttributeForm/ChangeAttributeFormConstants.js delete mode 100644 src/editAttributes/changeAttributeForm/ChangeAttributeFormReducer.js delete mode 100644 src/editAttributes/changeAttributeForm/validate.js delete mode 100644 src/editAttributes/index.html delete mode 100644 src/editAttributes/main.app.jsx delete mode 100644 src/editAttributes/networking/NetworkCalls.js delete mode 100644 src/editAttributes/networking/NetworkConstants.js delete mode 100644 src/editAttributes/networking/NetworkUtils.js (limited to 'src') diff --git a/src/editAttributes/AppStore.js b/src/editAttributes/AppStore.js deleted file mode 100644 index 888c659..0000000 --- a/src/editAttributes/AppStore.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import {combineReducers, createStore, compose, applyMiddleware} from 'redux'; -import thunkMiddleware from 'redux-thunk'; -import {reducer as formReducer} from 'redux-form'; - -import SetAttributeReducer from './EditAttributeReducer.js'; - -function createCompose() { - if (window.devToolsExtension) { - return compose( - applyMiddleware(thunkMiddleware), - window.devToolsExtension()); - } - else { - return applyMiddleware(thunkMiddleware); - } -} - -export const storeCreator = (initialState) => createStore( - combineReducers({ - setAttributes: SetAttributeReducer, - form: formReducer - }), - initialState, - createCompose() -); - - -const store = storeCreator(); - -export default store; - diff --git a/src/editAttributes/Application.jsx b/src/editAttributes/Application.jsx deleted file mode 100644 index 0817795..0000000 --- a/src/editAttributes/Application.jsx +++ /dev/null @@ -1,37 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import React, {Component} from 'react'; -import {Provider} from 'react-redux'; -import store from 'editAttributes/AppStore.js'; - - -class Application extends Component { - - render() { - return ( - - {this.props.children} - - ); - } -} - -export default Application; diff --git a/src/editAttributes/EditAttributeActions.js b/src/editAttributes/EditAttributeActions.js deleted file mode 100644 index 468d7f4..0000000 --- a/src/editAttributes/EditAttributeActions.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import NetworkCalls from './networking/NetworkCalls.js'; -import { - POST, - BACKEND_POST_HEADER, - CREDENTIALS -} from './networking/NetworkConstants.js'; -import { - createEditEntityAttributeRequestObject -} from './networking/NetworkUtils.js'; -import { - setAttributesActionTypes, - EDIT_ENTITY_ATTRIBUTES_URL, - RESPONSE_CODE_SUCCESS, - RESPONSE_CODE_NOT_AUTHORIZED, - RESPONSE_MESSAGE_SUCCESS, - RESPONSE_MESSAGE_NOT_AUTHORIZED, - RESPONSE_MESSAGE_FAILURE, - RESPONSE_MESSAGE_NETWORK_ERROR -} from './EditAttributeConstants.js'; - -function errorReturnedEvent(errorMsg) { - return { - type: setAttributesActionTypes.SET_ATTRIBUTE_ERROR, - data: {errorMsg: errorMsg} - }; -} - -function successReturnedEvent() { - return { - type: setAttributesActionTypes.SET_ATTRIBUTE_SUCCESS, - data: {successMsg: RESPONSE_MESSAGE_SUCCESS} - }; -} - -function clearFeedbackMessageEvent() { - return { - type: setAttributesActionTypes.CLEAR_FEEDBACK_MESSAGE, - data: {} - }; -} - -export function clearFeebackMessage() { - return dispatch => { - dispatch(clearFeedbackMessageEvent()); - }; -} - -export function requestEditEntityAttributes(entityURI, entityAttributes) { - - let postBody = JSON.stringify( - createEditEntityAttributeRequestObject(entityURI, entityAttributes)); - return dispatch => { - return NetworkCalls.fetchRequest(EDIT_ENTITY_ATTRIBUTES_URL, - CREDENTIALS, POST, BACKEND_POST_HEADER, postBody).then( - (responseJson) => { - if (responseJson) { - if (responseJson.resultCode === RESPONSE_CODE_SUCCESS) { - dispatch(successReturnedEvent()); - } else if (responseJson.resultCode === RESPONSE_CODE_NOT_AUTHORIZED) { - dispatch(errorReturnedEvent(RESPONSE_MESSAGE_NOT_AUTHORIZED)); - } else { - dispatch(errorReturnedEvent(RESPONSE_MESSAGE_FAILURE)); - } - } - } - ).catch( - () => { - dispatch(errorReturnedEvent(RESPONSE_MESSAGE_NETWORK_ERROR)); - } - ); - }; -} diff --git a/src/editAttributes/EditAttributeConstants.js b/src/editAttributes/EditAttributeConstants.js deleted file mode 100644 index c0a35ed..0000000 --- a/src/editAttributes/EditAttributeConstants.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import keyMirror from 'utils/KeyMirror.js'; -import { - BASE_URL -} from './networking/NetworkConstants.js'; - -export const SET_ATTRIBUTE_TITLE = 'A&AI'; -export const ATTRIBUTE_MODIFICATION = 'ATTRIBUTE MODIFICATION'; - - - -export const EDIT_ENTITY_ATTRIBUTES_URL = BASE_URL + '/editEntity/editAttributes'; - -export const RESPONSE_CODE_SUCCESS = 200; -export const RESPONSE_CODE_NOT_AUTHORIZED = 403; - -export const RESPONSE_MESSAGE_SUCCESS = 'Success'; -export const RESPONSE_MESSAGE_NOT_AUTHORIZED = 'User not authorized'; -export const RESPONSE_MESSAGE_FAILURE = 'Failed to update entity'; -export const RESPONSE_MESSAGE_NETWORK_ERROR = 'Network error'; - -export const setAttributesActionTypes = keyMirror({ - SET_ATTRIBUTE_ERROR: null, - SET_ATTRIBUTE_SUCCESS: null, - CLEAR_FEEDBACK_MESSAGE: null -}); diff --git a/src/editAttributes/EditAttributeReducer.js b/src/editAttributes/EditAttributeReducer.js deleted file mode 100644 index 90c959d..0000000 --- a/src/editAttributes/EditAttributeReducer.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import {setAttributesActionTypes} from './EditAttributeConstants.js'; -import { - MESSAGE_LEVEL_SUCCESS, - MESSAGE_LEVEL_DANGER -} from 'utils/GlobalConstants.js'; - -export default (state = {}, action) => { - switch (action.type) { - case setAttributesActionTypes.SET_ATTRIBUTE_ERROR: - return { - ...state, - feedbackMsgText: action.data.errorMsg, - feedbackMsgSeverity: MESSAGE_LEVEL_DANGER - }; - - case setAttributesActionTypes.SET_ATTRIBUTE_SUCCESS: - return { - ...state, - feedbackMsgText: action.data.successMsg, - feedbackMsgSeverity: MESSAGE_LEVEL_SUCCESS - }; - - case setAttributesActionTypes.CLEAR_FEEDBACK_MESSAGE: - return { - ...state, - feedbackMsgText: '', - feedbackMsgSeverity: '' - }; - } - return state; -}; diff --git a/src/editAttributes/EditAttributes.jsx b/src/editAttributes/EditAttributes.jsx deleted file mode 100644 index 6aa390f..0000000 --- a/src/editAttributes/EditAttributes.jsx +++ /dev/null @@ -1,111 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import React, {Component} from 'react'; -import {connect} from 'react-redux'; -import i18n from 'utils/i18n/i18n'; - -import InlineMessage from 'generic-components/InlineMessage/InlineMessage.jsx'; -import { - clearFeebackMessage, - requestEditEntityAttributes -} from './EditAttributeActions.js'; -import { - SET_ATTRIBUTE_TITLE, - ATTRIBUTE_MODIFICATION -} from './EditAttributeConstants.js'; -import ChangeAttributeForm from 'editAttributes/changeAttributeForm/ChangeAttributeForm.jsx'; -import {NO_VALUE_SELECTED} from 'editAttributes/changeAttributeForm/ChangeAttributeFormConstants.js'; - -let mapStateToProps = ({setAttributes}) => { - let { - feedbackMsgText = '', - feedbackMsgSeverity = '' - } = setAttributes; - - return { - feedbackMsgText, - feedbackMsgSeverity - }; -}; - -let mapActionToProps = (dispatch) => { - return { - handleSubmit: (values) => { - let uri = values.uri; - let attrMap = new Map(); - attrMap.set('provStatus', 'prov-status'); - attrMap.set('inMaint', 'in-maint'); - attrMap.set('isClosedLoopDisabled', 'is-closed-loop-disabled'); - - let attributes = {}; - let valueString = JSON.stringify(values); - JSON.parse(valueString, (key, value) => { - if(value !== NO_VALUE_SELECTED) { - let formattedKey = attrMap.get(key); - if(formattedKey !== undefined) { - attributes = { - ...attributes, [formattedKey]: value - }; - } - return value; - } - }); - - dispatch(requestEditEntityAttributes(uri, attributes)); - }, - clearFeedbackMessage: () => { - dispatch(clearFeebackMessage()); - } - }; -}; - -class SetAttribute extends Component { - render() { - let { - feedbackMsgText, - feedbackMsgSeverity, - handleSubmit, - clearFeedbackMessage} = this.props; - return ( -
-
-
{i18n(SET_ATTRIBUTE_TITLE)}
-
-
- {i18n(ATTRIBUTE_MODIFICATION)} - -
- - { - handleSubmit(values); - }} - buttonSelected={() => { - clearFeedbackMessage(); - }}/> -
- ); - } -} - -export default connect(mapStateToProps, mapActionToProps)(SetAttribute); diff --git a/src/editAttributes/changeAttributeForm/ChangeAttributeForm.jsx b/src/editAttributes/changeAttributeForm/ChangeAttributeForm.jsx deleted file mode 100644 index b97d6bd..0000000 --- a/src/editAttributes/changeAttributeForm/ChangeAttributeForm.jsx +++ /dev/null @@ -1,156 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import React, {Component} from 'react'; -import {Field, Fields, reduxForm, propTypes} from 'redux-form'; -import i18n from 'utils/i18n/i18n'; - -import { - LABEL_NODE_URI, - LABEL_PROV_STATUS, - LABEL_ATTRIBUTES, - LABEL_IN_MAINT, - LABEL_IS_CLOSED_LOOP, - BUTTON_SUBMIT, - BUTTON_CLEAR, - NO_VALUE_SELECTED, - PREPROV, - NVTPROV, - DECOM, - PROV, - CAPPED, - RETIRED, - TRUE, - FALSE -} from './ChangeAttributeFormConstants.js'; -import validate from './validate.js'; - -class ChangeAttributeForm extends Component { - - static propTypes = { - ...propTypes - }; - - renderTextField = ({input, label, type, meta: {touched, error}}) => ( -
- -
- input.value === '' ? input.onBlur(' ') : input.onBlur()}/> - {touched && ((error && {error}))} -
-
- ); - - - booleanOptions = [ - , - , - - ]; - - provStatusOptions = [ - , - , - , - , - , - , - - ]; - - renderAttributeFields = (fields) => ( -
-
- {(fields.provStatus.meta.touched || - fields.inMaint.meta.touched || - fields.isClosedLoopDisabled.meta.touched) && - fields.provStatus.meta.error && - {fields.provStatus.meta.error}} -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- ); - - render() { - const { - handleSubmit, - buttonSelected, - pristine, - reset, - submitting} = this.props; - - return ( -
- -

{i18n(LABEL_ATTRIBUTES)}

- -
- - -
- - ); - } -} - -export default reduxForm({ - form: 'changeAttributeForm', - validate -})(ChangeAttributeForm); - diff --git a/src/editAttributes/changeAttributeForm/ChangeAttributeFormConstants.js b/src/editAttributes/changeAttributeForm/ChangeAttributeFormConstants.js deleted file mode 100644 index ae6eee5..0000000 --- a/src/editAttributes/changeAttributeForm/ChangeAttributeFormConstants.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -export const LABEL_NODE_URI = 'Target Entity URI'; -export const LABEL_PROV_STATUS = 'prov-status'; -export const LABEL_IN_MAINT = 'in-maint'; -export const LABEL_IS_CLOSED_LOOP = 'is-closed-loop-disabled'; -export const LABEL_ATTRIBUTES = 'ATTRIBUTES'; - -export const BUTTON_SUBMIT = 'Submit'; -export const BUTTON_CLEAR = 'Clear'; - -export const NO_VALUE_SELECTED = 'No Value Selected'; -export const PREPROV = 'PREPROV'; -export const NVTPROV = 'NVTPROV'; -export const PROV = 'PROV'; -export const CAPPED = 'CAPPED'; -export const DECOM = 'DECOM'; -export const RETIRED = 'RETIRED'; -export const TRUE = 'TRUE'; -export const FALSE = 'FALSE'; - -export const ERROR_MISSING_ATTR = 'At least one attribute must be set'; -export const ERROR_REQUIRED = 'Required'; diff --git a/src/editAttributes/changeAttributeForm/ChangeAttributeFormReducer.js b/src/editAttributes/changeAttributeForm/ChangeAttributeFormReducer.js deleted file mode 100644 index 4edd1eb..0000000 --- a/src/editAttributes/changeAttributeForm/ChangeAttributeFormReducer.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -/*import { combineReducers } from 'redux' - import { reducer as formReducer } from 'redux-form' - - - - const reducer = combineReducers({ - form: formReducer.validation({ - changeAttributeForm: validate - }) - }); - - export default reducer; - */ diff --git a/src/editAttributes/changeAttributeForm/validate.js b/src/editAttributes/changeAttributeForm/validate.js deleted file mode 100644 index 450bb02..0000000 --- a/src/editAttributes/changeAttributeForm/validate.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import i18n from 'utils/i18n/i18n'; - -import { - ERROR_MISSING_ATTR, - ERROR_REQUIRED, - NO_VALUE_SELECTED -} from './ChangeAttributeFormConstants.js'; - -const validate = (values) => { - const errors = {}; - - if (!values.uri || values.uri.replace(/\s/g, '') === '') { - errors.uri = i18n(ERROR_REQUIRED); - } - if ((!values.provStatus || values.provStatus === NO_VALUE_SELECTED) && - (!values.inMaint || values.inMaint === NO_VALUE_SELECTED) && - (!values.isClosedLoopDisabled || - values.isClosedLoopDisabled === - NO_VALUE_SELECTED)) { - errors.provStatus = i18n(ERROR_MISSING_ATTR); - } - - return errors; -}; - -export default validate; diff --git a/src/editAttributes/index.html b/src/editAttributes/index.html deleted file mode 100644 index afd9a22..0000000 --- a/src/editAttributes/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Edit Attributes - - - -
- - - - diff --git a/src/editAttributes/main.app.jsx b/src/editAttributes/main.app.jsx deleted file mode 100644 index 17a4b18..0000000 --- a/src/editAttributes/main.app.jsx +++ /dev/null @@ -1,33 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -import React from 'react'; -import ReactDOM from 'react-dom'; - -import 'resources/scss/bootstrap.scss'; -import 'resources/css/font-awesome.min.css'; -import 'resources/scss/style.scss'; - -import Application from './Application.jsx'; -import SetAttribute from './EditAttributes.jsx'; - -ReactDOM.render( - , - document.getElementById('set-attribute-app')); diff --git a/src/editAttributes/networking/NetworkCalls.js b/src/editAttributes/networking/NetworkCalls.js deleted file mode 100644 index 7038e5e..0000000 --- a/src/editAttributes/networking/NetworkCalls.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -export default { - fetchRequest(URL, CREDENTIALS, METHOD, HEADER, BODY) { - return fetch(URL, { - credentials: CREDENTIALS, - method: METHOD, - headers: HEADER, - body: BODY - }).then( - (response) => response.json() - ); - } -}; diff --git a/src/editAttributes/networking/NetworkConstants.js b/src/editAttributes/networking/NetworkConstants.js deleted file mode 100644 index 09629fc..0000000 --- a/src/editAttributes/networking/NetworkConstants.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -export const POST = 'POST'; -export const POST_HEADER = { - 'Accept': 'application/json' -}; -export const BACKEND_POST_HEADER = { - 'Accept': 'application/json', - 'Content-Type': 'application/json' -}; -export const CREDENTIALS = 'same-origin'; -export const ERROR_RETRIEVING_DATA = 'Error fetching data from server'; -const BACKEND_IP_ADDRESS = document.location.hostname; -const BACKEND_PORT_NUMBER = window.location.port; -const PROTOCOL = window.location.protocol; -export const BASE_URL = PROTOCOL + '//' + BACKEND_IP_ADDRESS + ':' + BACKEND_PORT_NUMBER; diff --git a/src/editAttributes/networking/NetworkUtils.js b/src/editAttributes/networking/NetworkUtils.js deleted file mode 100644 index c8e65cb..0000000 --- a/src/editAttributes/networking/NetworkUtils.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -export function createEditEntityAttributeRequestObject(uri, attributes) { - return { - 'entity-uri': uri, - 'attributes': { - ...attributes - } - }; -} -- cgit 1.2.3-korg