import { map } from 'lodash' ; import api from 'teleport/services/api' ; import cfg from 'teleport/config' ; import makeKube from './makeKube' ; class KubeService { fetchKubernetes ( clusterId ) { return api . get ( cfg . getKubernetesUrl ( clusterId ) ) . then ( json => map ( json , makeKube ) ) ; } } export default KubeService ;