diff --git a/classes/Rest/Controllers/ETLControllerProvider.php b/classes/Rest/Controllers/ETLControllerProvider.php index 7b3de83b9a..255731f466 100644 --- a/classes/Rest/Controllers/ETLControllerProvider.php +++ b/classes/Rest/Controllers/ETLControllerProvider.php @@ -41,6 +41,8 @@ public function setupRoutes(Application $app, ControllerCollection $controller) $class = get_class($this); $controller->get("$root/pipelines/actions", "$class::getActionsForPipelines"); + $controller->post("$root/pipelines/actions", "$class::getActionsForPipelines"); + $controller->get("$root/pipelines/{pipeline}/actions", "$class::getActionsForPipeline"); $controller->get("$root/pipelines/{pipeline}/endpoints", "$class::getEndpointsForPipeline"); @@ -51,8 +53,6 @@ public function setupRoutes(Application $app, ControllerCollection $controller) $controller->post("$root/files", "$class::getFileNames"); $controller->get("$root/endpoints", "$class::getDataEndpoints"); - - } /** @@ -201,7 +201,7 @@ protected function convertForTreeGrid($source) if ($isArray) { $keys = array_keys($source); } elseif ($isObject) { - $keys = get_object_vars($source); + $keys = array_keys(get_object_vars($source)); } foreach ($keys as $key) { @@ -289,7 +289,7 @@ public function getActionsForPipelines(Request $request, Application $app) #echo "\t Skipping $pipelineName\n"; } } - return $app->json($results); + return $app->json($this->convertForTreeGrid($results)); } public function getActionsForPipeline(Request $request, Application $app, $pipeline) @@ -453,7 +453,8 @@ function ($carry, $item) { $endpoints[$destination['key']] = $destination; } - $results[$pipelineName][] = array( + $name = substr($actionName, strlen($pipelineName) + 1); + $results[$name] = array( 'name' => $actionName, 'class' => $configClass, 'source' => $source, diff --git a/html/internal_dashboard/js/etl_viewer/ETLViewerTreePanel.js b/html/internal_dashboard/js/etl_viewer/ETLViewerTreePanel.js index f5dc05a10a..fb6914026f 100644 --- a/html/internal_dashboard/js/etl_viewer/ETLViewerTreePanel.js +++ b/html/internal_dashboard/js/etl_viewer/ETLViewerTreePanel.js @@ -8,7 +8,7 @@ XDMoD.Admin.ETL.ETLViewerTreePanel = Ext.extend(XDMoD.Admin.ETL.ETLViewerTree, { url: null, initComponent: function () { - this.url = XDMoD.REST.url + '/etl/pipelines'; + this.url = XDMoD.REST.url + '/etl/pipelines/actions'; this.loaded = false; XDMoD.Admin.ETL.ETLViewerTreePanel.superclass.initComponent.call(this, arguments); diff --git a/html/internal_dashboard/js/etl_viewer/ETLViewerTreeTab.js b/html/internal_dashboard/js/etl_viewer/ETLViewerTreeTab.js index e6f173c5ec..10d90642e1 100644 --- a/html/internal_dashboard/js/etl_viewer/ETLViewerTreeTab.js +++ b/html/internal_dashboard/js/etl_viewer/ETLViewerTreeTab.js @@ -65,9 +65,8 @@ XDMoD.Admin.ETL.ETLViewerTreeTab = Ext.extend(Ext.Panel, { updateHistory: true, title: 'ETL Pipeline Viewer', autoScroll: true, - columnResize: true, enableDD: true, - dataUrl: XDMoD.REST.url + '/etl/pipelines', + dataUrl: XDMoD.REST.url + '/etl/pipelines/actions', columns: [ { header: 'Name',