2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 import React, {Component} from 'react';
22 import ModelGallery from 'app/modelSearch/components/ModelGallery.jsx';
23 import testData from 'app/CustomQueryMultiNode';
25 class testGallery extends Component {
33 componentWillMount () {
34 this.processData(testData);
39 processData = (data) => {
40 console.log('Response data' + JSON.stringify(data));
41 if (data && data.results) {
42 //this.nodes = data.results;
47 this.multipleNodes = this.state.nodes.length > 1;
49 if (data && data.headers && data.headers.get('total-results')) {
50 this.modelService.setTotalResults(data.headers.get('total-results'));
60 if ( this.state.nodes.length > 0 ) {
62 console.log('nodes exist');
65 (<div className='model-container'>
67 nodes={this.state.nodes}/>
72 <div className='multipleNodes'>
73 <div className={!this.state.isLoading}>
74 <div className='col align-self-cemter'>
75 <fa name='cog' className='fa-5x fa-spin'></fa>
78 <div className={!this.state.isLoading}>
79 <h2>{this.header}</h2>
80 <div className='nodes container-fluid'>
81 <div className='row-dsl'>
91 export default testGallery;