X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fapp%2FconfigurableViews%2FConfigurableViewManager.js;fp=src%2Fapp%2FconfigurableViews%2FConfigurableViewManager.js;h=71cc6cfdcfdf5b04544901395c65f220b0984e98;hb=96319fec0d2af2be5802a56d6b05a3ada939c8df;hp=0000000000000000000000000000000000000000;hpb=d1975c8134f0401b0ccebf3719eda129d53dac14;p=aai%2Fsparky-fe.git diff --git a/src/app/configurableViews/ConfigurableViewManager.js b/src/app/configurableViews/ConfigurableViewManager.js new file mode 100644 index 0000000..71cc6cf --- /dev/null +++ b/src/app/configurableViews/ConfigurableViewManager.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { + Route +} from 'react-router-dom'; +import { fetchConfigurableViewRequest } from 'app/networking/NetworkCalls'; + +export function getConfigurableRoutes(config, components) { + let routes = []; + if (config && Object.keys(config).length > 0 && components && Object.keys(components).length > 0) { + config.layouts.forEach( (viewConfig) => { + let ConfigurableView = components[viewConfig.viewType]; + if (ConfigurableView) { + routes.push( + { + return ( + + ); + }}/> + ); + } + }); + } + + return routes; +}