From 30d951b5028c875d8ecf408cba67dbcae45a0aad Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Tue, 26 Feb 2019 10:39:08 -0500 Subject: [PATCH 01/17] Adding sorting to local config file processing Previously the order in which local config files were read / processed was non-deterministic. In this case, returned in an order as determined by the underlying file system. It is desirable that we be able to control the order in which these files are processed so the code has been changed to first, read all the files from the specified directory in fs order, saving them in an array. Next, sort this array in a deterministic array ( we default to sorting the entries as strings ). Last, process these files as they were previously. --- classes/Configuration/Configuration.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/classes/Configuration/Configuration.php b/classes/Configuration/Configuration.php index a6dfaf3d4c..5419b9abd0 100644 --- a/classes/Configuration/Configuration.php +++ b/classes/Configuration/Configuration.php @@ -319,9 +319,8 @@ public function initialize($force = false) $this->logAndThrowException(sprintf("Error opening configuration directory '%s'", $this->localConfigDir)); } - // Examine the subdirectory for .json files and parse each one, then merge the results back - // into this object - + // Examine the subdirectory for .json files and collect them for later use. + $files = array(); while ( false !== ( $file = readdir($dh) ) ) { // Only process .json files @@ -333,15 +332,26 @@ public function initialize($force = false) } $fullPath = $this->localConfigDir . "/" . $file; + $files[] = $fullPath; + + } // while ( false !== ( $file = readdir($dh) ) ) + + // Sort the retrieved .json files. + sort($files, SORT_STRING); + + // Process each .json file before merging into the main file. + foreach( $files as $file ) { + try { - $localConfigObj = $this->processLocalConfig($fullPath); + $localConfigObj = $this->processLocalConfig($file); } catch ( Exception $e ) { - throw new Exception(sprintf("Processing %s: %s", $fullPath, $e->getMessage())); + throw new Exception(sprintf("Processing %s: %s", $file, $e->getMessage())); } + $this->merge($localConfigObj); - $localConfigObj->cleanup(); - } // while ( false !== ( $file = readdir($dh) ) ) + $localConfigObj->cleanup(); + } // foreach($files as $file) closedir($dh); From 4c8ef859c30450a4facc9cc2f3888583f4805894 Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Tue, 26 Feb 2019 11:07:48 -0500 Subject: [PATCH 02/17] Adding test for local config read order Just adding a test to ensure that local config files are read / processed in alphabetical order. --- .../Configuration/EtlConfigurationTest.php | 69 + .../xdmod/configuration/input/read_order.json | 9 + .../input/roles.d/read_order/0.json | 20 + .../input/roles.d/read_order/a.json | 20 + .../input/roles.d/read_order/z.json | 20 + .../output/roles-read_order.json | 1599 +++++++++++++++++ 6 files changed, 1737 insertions(+) create mode 100644 tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/read_order.json create mode 100644 tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/0.json create mode 100644 tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/a.json create mode 100644 tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/z.json create mode 100644 tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json diff --git a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php index 8a3733a63a..ac5ca09702 100644 --- a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php +++ b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php @@ -336,6 +336,75 @@ public function provideTestToAssocArray() ); } + /** + * Test that checks that the local config files for a `Configuration` are sorted in alphabetical + * order. + * + * @dataProvider provideTestLocalConfigReadOrder + * + * @param array $options + * + * @throws \Exception + */ + public function testLocalConfigReadOrder(array $options) + { + $baseDir = dirname($this->testFiles->getFile('configuration', '.', 'input')); + $baseFile = $this->testFiles->getFile('configuration', $options['base_file'], 'input'); + + $localDir = $this->interpretDirOption($options['local_dir']); + $localConfigDir = dirname( + $this->testFiles->getfile( + 'configuration', + implode( + DIRECTORY_SEPARATOR, + array( + '.', + $localDir, + '.') + ), + 'input' + ) + ); + + $config = new XdmodConfiguration( + $baseFile, + $baseDir, + null, + array( + 'local_config_dir' => $localConfigDir + ) + ); + $config->initialize(); + + // Make sure that the actual is pretty-printed for ease of reading. + $actual = sprintf("%s\n", json_encode(json_decode($config->toJson()), JSON_PRETTY_PRINT)); + + $expectedFilePath = $this->testFiles->getFile('configuration', $options['expected']); + if (!is_file($expectedFilePath)) { + @file_put_contents($expectedFilePath, $actual); + echo "\nGenerated expected output for $expectedFilePath\n"; + } else { + $expected = @file_get_contents($expectedFilePath); + + $this->assertEquals($expected, $actual); + } + } + + /** + * @return array|object + * @throws \Exception + */ + public function provideTestLocalConfigReadOrder() + { + return JSON::loadFile( + $this->testFiles->getFile( + 'configuration', + 'read_order', + 'input' + ) + ); + } + protected function interpretDirOption($dir) { if (is_array($dir)) { diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/read_order.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/read_order.json new file mode 100644 index 0000000000..29513a857c --- /dev/null +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/read_order.json @@ -0,0 +1,9 @@ +[ + [ + { + "base_file": "roles", + "local_dir": ["roles.d", "read_order"], + "expected": "roles-read_order" + } + ] +] \ No newline at end of file diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/0.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/0.json new file mode 100644 index 0000000000..39536644be --- /dev/null +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/0.json @@ -0,0 +1,20 @@ +{ + "+roles": { + "+default": { + "+query_descripters": [ + { + "realm": "0", + "group_by": "none" + } + ] + }, + "+pub": { + "+query_descripers": [ + { + "realm": "0", + "group_by": "none" + } + ] + } + } +} \ No newline at end of file diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/a.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/a.json new file mode 100644 index 0000000000..d05df2d8cc --- /dev/null +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/a.json @@ -0,0 +1,20 @@ +{ + "+roles": { + "+default": { + "+query_descripters": [ + { + "realm": "a", + "group_by": "none" + } + ] + }, + "+pub": { + "+query_descripers": [ + { + "realm": "a", + "group_by": "none" + } + ] + } + } +} \ No newline at end of file diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/z.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/z.json new file mode 100644 index 0000000000..9fa5eb1649 --- /dev/null +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/z.json @@ -0,0 +1,20 @@ +{ + "+roles": { + "+default": { + "+query_descripters": [ + { + "realm": "z", + "group_by": "none" + } + ] + }, + "+pub": { + "+query_descripers": [ + { + "realm": "z", + "group_by": "none" + } + ] + } + } +} \ No newline at end of file diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json new file mode 100644 index 0000000000..3f7b1824de --- /dev/null +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json @@ -0,0 +1,1599 @@ +{ + "roles": { + "default": { + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "pub": { + "display": "Public", + "type": "data", + "hierarchies": [ + { + "level": 0, + "filter_override": false + } + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username", + "disable": true + } + ], + "query_descripers": [ + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ] + }, + "usr": { + "display": "User", + "type": "data", + "hierarchies": [ + { + "level": 100, + "filter_override": false + } + ], + "dimensions": [ + "person" + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "cd": { + "display": "Center Director", + "type": "data", + "hierarchies": [ + { + "level": 400, + "filter_override": false + } + ], + "dimensions": [ + "provider" + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "pi": { + "display": "Principal Investigator", + "type": "data", + "hierarchies": [ + { + "level": 200, + "filter_override": false + } + ], + "dimensions": [ + "pi" + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "cs": { + "display": "Center Staff", + "type": "data", + "hierarchies": [ + { + "level": 300, + "filter_override": false + } + ], + "dimensions": [ + "provider" + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "mgr": { + "display": "Manager", + "type": "feature" + }, + "dev": { + "display": "Developer", + "type": "feature" + } + } +} From 6de492de0cf1d95a094bfa90ce68ff96ab40ae05 Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Tue, 26 Feb 2019 11:34:09 -0500 Subject: [PATCH 03/17] Adding newlines --- .../xdmod/configuration/input/read_order.json | 2 +- .../xdmod/configuration/input/roles.d/read_order/0.json | 2 +- .../xdmod/configuration/input/roles.d/read_order/a.json | 2 +- .../xdmod/configuration/input/roles.d/read_order/z.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/read_order.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/read_order.json index 29513a857c..a19e1f3fcb 100644 --- a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/read_order.json +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/read_order.json @@ -6,4 +6,4 @@ "expected": "roles-read_order" } ] -] \ No newline at end of file +] diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/0.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/0.json index 39536644be..37b7807b71 100644 --- a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/0.json +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/0.json @@ -17,4 +17,4 @@ ] } } -} \ No newline at end of file +} diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/a.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/a.json index d05df2d8cc..60154987de 100644 --- a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/a.json +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/a.json @@ -17,4 +17,4 @@ ] } } -} \ No newline at end of file +} diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/z.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/z.json index 9fa5eb1649..75169ad566 100644 --- a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/z.json +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/roles.d/read_order/z.json @@ -17,4 +17,4 @@ ] } } -} \ No newline at end of file +} From 1b52e4d8a283b302ed612a067cf0b3e1015bca6a Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Tue, 26 Feb 2019 13:02:29 -0500 Subject: [PATCH 04/17] Updating test logic Updated the `testLocalConfigReadOrder` function to not use a string comparison as this was causing problems when run on Travis. Instead it is now using an object comparison. --- .../Configuration/EtlConfigurationTest.php | 13 +- .../output/roles-read_order.json | 1600 +---------------- 2 files changed, 11 insertions(+), 1602 deletions(-) diff --git a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php index ac5ca09702..ddc32d443f 100644 --- a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php +++ b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php @@ -377,16 +377,23 @@ public function testLocalConfigReadOrder(array $options) $config->initialize(); // Make sure that the actual is pretty-printed for ease of reading. - $actual = sprintf("%s\n", json_encode(json_decode($config->toJson()), JSON_PRETTY_PRINT)); + $expectedFilePath = $this->testFiles->getFile('configuration', $options['expected']); if (!is_file($expectedFilePath)) { + $actual = sprintf("%s\n", $config->toJson()); @file_put_contents($expectedFilePath, $actual); echo "\nGenerated expected output for $expectedFilePath\n"; } else { - $expected = @file_get_contents($expectedFilePath); + $actual = json_decode($config->toJson()); - $this->assertEquals($expected, $actual); + $expected = json_decode(@file_get_contents($expectedFilePath)); + + $this->assertEquals($expected, $actual, sprintf( + "Expected: %s\nActual: %s\n", + json_encode($expected, JSON_PRETTY_PRINT), + json_encode($actual, JSON_PRETTY_PRINT) + )); } } diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json index 3f7b1824de..cfd968a7cb 100644 --- a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json @@ -1,1599 +1 @@ -{ - "roles": { - "default": { - "permitted_modules": [ - { - "name": "tg_summary", - "default": true, - "title": "Summary", - "position": 100, - "javascriptClass": "XDMoD.Module.Summary", - "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", - "tooltip": "Displays summary information", - "userManualSectionName": "Summary Tab" - }, - { - "name": "tg_usage", - "title": "Usage", - "position": 200, - "javascriptClass": "XDMoD.Module.Usage", - "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", - "tooltip": "Displays usage", - "userManualSectionName": "Usage Tab" - }, - { - "name": "metric_explorer", - "title": "Metric Explorer", - "position": 300, - "javascriptClass": "XDMoD.Module.MetricExplorer", - "javascriptReference": "CCR.xdmod.ui.metricExplorer", - "userManualSectionName": "Metric Explorer", - "tooltip": "" - }, - { - "name": "report_generator", - "title": "Report Generator", - "position": 1000, - "javascriptClass": "XDMoD.Module.ReportGenerator", - "javascriptReference": "CCR.xdmod.ui.reportGenerator", - "userManualSectionName": "Report Generator", - "tooltip": "" - }, - { - "name": "about_xdmod", - "title": "About", - "position": 10000, - "javascriptClass": "XDMoD.Module.About", - "javascriptReference": "CCR.xdmod.ui.aboutXD", - "userManualSectionName": "About", - "tooltip": "" - } - ], - "query_descripters": [ - { - "realm": "Jobs", - "group_by": "none" - }, - { - "realm": "Jobs", - "group_by": "jobsize" - }, - { - "realm": "Jobs", - "group_by": "jobwalltime" - }, - { - "realm": "Jobs", - "group_by": "jobwaittime" - }, - { - "realm": "Jobs", - "group_by": "nodecount" - }, - { - "realm": "Jobs", - "group_by": "nsfdirectorate" - }, - { - "realm": "Jobs", - "group_by": "parentscience" - }, - { - "realm": "Jobs", - "group_by": "fieldofscience" - }, - { - "realm": "Jobs", - "group_by": "pi" - }, - { - "realm": "Jobs", - "group_by": "queue" - }, - { - "realm": "Jobs", - "group_by": "resource" - }, - { - "realm": "Jobs", - "group_by": "resource_type" - }, - { - "realm": "Jobs", - "group_by": "person" - }, - { - "realm": "Jobs", - "group_by": "username" - }, - { - "realm": "0", - "group_by": "none" - }, - { - "realm": "a", - "group_by": "none" - }, - { - "realm": "z", - "group_by": "none" - } - ], - "summary_charts": [ - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "resource", - "has_std_err": false, - "id": 1.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours By Resource (Top 10)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "jobsize", - "has_std_err": false, - "id": 2.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours by Job Size" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "none", - "has_std_err": true, - "id": 3.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "avg_processors", - "realm": "Jobs", - "sort_type": "none", - "std_err": true, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Avg Job Size (Core Count)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "pie", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "pi", - "has_std_err": true, - "id": 4.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": true, - "value_labels": true, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": false, - "title": "Total CPU Hours by PI" - } - ] - }, - "pub": { - "display": "Public", - "type": "data", - "hierarchies": [ - { - "level": 0, - "filter_override": false - } - ], - "permitted_modules": [ - { - "name": "tg_summary", - "default": true, - "title": "Summary", - "position": 100, - "javascriptClass": "XDMoD.Module.Summary", - "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", - "tooltip": "Displays summary information", - "userManualSectionName": "Summary Tab" - }, - { - "name": "tg_usage", - "title": "Usage", - "position": 200, - "javascriptClass": "XDMoD.Module.Usage", - "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", - "tooltip": "Displays usage", - "userManualSectionName": "Usage Tab" - }, - { - "name": "about_xdmod", - "title": "About", - "position": 10000, - "javascriptClass": "XDMoD.Module.About", - "javascriptReference": "CCR.xdmod.ui.aboutXD", - "userManualSectionName": "About", - "tooltip": "" - } - ], - "query_descripters": [ - { - "realm": "Jobs", - "group_by": "none" - }, - { - "realm": "Jobs", - "group_by": "fieldofscience" - }, - { - "realm": "Jobs", - "group_by": "jobsize" - }, - { - "realm": "Jobs", - "group_by": "jobwalltime" - }, - { - "realm": "Jobs", - "group_by": "jobwaittime" - }, - { - "realm": "Jobs", - "group_by": "nodecount" - }, - { - "realm": "Jobs", - "group_by": "nsfdirectorate" - }, - { - "realm": "Jobs", - "group_by": "parentscience" - }, - { - "realm": "Jobs", - "group_by": "pi" - }, - { - "realm": "Jobs", - "group_by": "queue" - }, - { - "realm": "Jobs", - "group_by": "resource" - }, - { - "realm": "Jobs", - "group_by": "resource_type" - }, - { - "realm": "Jobs", - "group_by": "person" - }, - { - "realm": "Jobs", - "group_by": "username", - "disable": true - } - ], - "query_descripers": [ - { - "realm": "0", - "group_by": "none" - }, - { - "realm": "a", - "group_by": "none" - }, - { - "realm": "z", - "group_by": "none" - } - ] - }, - "usr": { - "display": "User", - "type": "data", - "hierarchies": [ - { - "level": 100, - "filter_override": false - } - ], - "dimensions": [ - "person" - ], - "permitted_modules": [ - { - "name": "tg_summary", - "default": true, - "title": "Summary", - "position": 100, - "javascriptClass": "XDMoD.Module.Summary", - "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", - "tooltip": "Displays summary information", - "userManualSectionName": "Summary Tab" - }, - { - "name": "tg_usage", - "title": "Usage", - "position": 200, - "javascriptClass": "XDMoD.Module.Usage", - "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", - "tooltip": "Displays usage", - "userManualSectionName": "Usage Tab" - }, - { - "name": "metric_explorer", - "title": "Metric Explorer", - "position": 300, - "javascriptClass": "XDMoD.Module.MetricExplorer", - "javascriptReference": "CCR.xdmod.ui.metricExplorer", - "userManualSectionName": "Metric Explorer", - "tooltip": "" - }, - { - "name": "report_generator", - "title": "Report Generator", - "position": 1000, - "javascriptClass": "XDMoD.Module.ReportGenerator", - "javascriptReference": "CCR.xdmod.ui.reportGenerator", - "userManualSectionName": "Report Generator", - "tooltip": "" - }, - { - "name": "about_xdmod", - "title": "About", - "position": 10000, - "javascriptClass": "XDMoD.Module.About", - "javascriptReference": "CCR.xdmod.ui.aboutXD", - "userManualSectionName": "About", - "tooltip": "" - } - ], - "query_descripters": [ - { - "realm": "Jobs", - "group_by": "none" - }, - { - "realm": "Jobs", - "group_by": "jobsize" - }, - { - "realm": "Jobs", - "group_by": "jobwalltime" - }, - { - "realm": "Jobs", - "group_by": "jobwaittime" - }, - { - "realm": "Jobs", - "group_by": "nodecount" - }, - { - "realm": "Jobs", - "group_by": "nsfdirectorate" - }, - { - "realm": "Jobs", - "group_by": "parentscience" - }, - { - "realm": "Jobs", - "group_by": "fieldofscience" - }, - { - "realm": "Jobs", - "group_by": "pi" - }, - { - "realm": "Jobs", - "group_by": "queue" - }, - { - "realm": "Jobs", - "group_by": "resource" - }, - { - "realm": "Jobs", - "group_by": "resource_type" - }, - { - "realm": "Jobs", - "group_by": "person" - }, - { - "realm": "Jobs", - "group_by": "username" - }, - { - "realm": "0", - "group_by": "none" - }, - { - "realm": "a", - "group_by": "none" - }, - { - "realm": "z", - "group_by": "none" - } - ], - "summary_charts": [ - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "resource", - "has_std_err": false, - "id": 1.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours By Resource (Top 10)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "jobsize", - "has_std_err": false, - "id": 2.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours by Job Size" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "none", - "has_std_err": true, - "id": 3.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "avg_processors", - "realm": "Jobs", - "sort_type": "none", - "std_err": true, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Avg Job Size (Core Count)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "pie", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "pi", - "has_std_err": true, - "id": 4.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": true, - "value_labels": true, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": false, - "title": "Total CPU Hours by PI" - } - ] - }, - "cd": { - "display": "Center Director", - "type": "data", - "hierarchies": [ - { - "level": 400, - "filter_override": false - } - ], - "dimensions": [ - "provider" - ], - "permitted_modules": [ - { - "name": "tg_summary", - "default": true, - "title": "Summary", - "position": 100, - "javascriptClass": "XDMoD.Module.Summary", - "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", - "tooltip": "Displays summary information", - "userManualSectionName": "Summary Tab" - }, - { - "name": "tg_usage", - "title": "Usage", - "position": 200, - "javascriptClass": "XDMoD.Module.Usage", - "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", - "tooltip": "Displays usage", - "userManualSectionName": "Usage Tab" - }, - { - "name": "metric_explorer", - "title": "Metric Explorer", - "position": 300, - "javascriptClass": "XDMoD.Module.MetricExplorer", - "javascriptReference": "CCR.xdmod.ui.metricExplorer", - "userManualSectionName": "Metric Explorer", - "tooltip": "" - }, - { - "name": "report_generator", - "title": "Report Generator", - "position": 1000, - "javascriptClass": "XDMoD.Module.ReportGenerator", - "javascriptReference": "CCR.xdmod.ui.reportGenerator", - "userManualSectionName": "Report Generator", - "tooltip": "" - }, - { - "name": "about_xdmod", - "title": "About", - "position": 10000, - "javascriptClass": "XDMoD.Module.About", - "javascriptReference": "CCR.xdmod.ui.aboutXD", - "userManualSectionName": "About", - "tooltip": "" - } - ], - "query_descripters": [ - { - "realm": "Jobs", - "group_by": "none" - }, - { - "realm": "Jobs", - "group_by": "jobsize" - }, - { - "realm": "Jobs", - "group_by": "jobwalltime" - }, - { - "realm": "Jobs", - "group_by": "jobwaittime" - }, - { - "realm": "Jobs", - "group_by": "nodecount" - }, - { - "realm": "Jobs", - "group_by": "nsfdirectorate" - }, - { - "realm": "Jobs", - "group_by": "parentscience" - }, - { - "realm": "Jobs", - "group_by": "fieldofscience" - }, - { - "realm": "Jobs", - "group_by": "pi" - }, - { - "realm": "Jobs", - "group_by": "queue" - }, - { - "realm": "Jobs", - "group_by": "resource" - }, - { - "realm": "Jobs", - "group_by": "resource_type" - }, - { - "realm": "Jobs", - "group_by": "person" - }, - { - "realm": "Jobs", - "group_by": "username" - }, - { - "realm": "0", - "group_by": "none" - }, - { - "realm": "a", - "group_by": "none" - }, - { - "realm": "z", - "group_by": "none" - } - ], - "summary_charts": [ - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "resource", - "has_std_err": false, - "id": 1.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours By Resource (Top 10)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "jobsize", - "has_std_err": false, - "id": 2.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours by Job Size" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "none", - "has_std_err": true, - "id": 3.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "avg_processors", - "realm": "Jobs", - "sort_type": "none", - "std_err": true, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Avg Job Size (Core Count)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "pie", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "pi", - "has_std_err": true, - "id": 4.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": true, - "value_labels": true, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": false, - "title": "Total CPU Hours by PI" - } - ] - }, - "pi": { - "display": "Principal Investigator", - "type": "data", - "hierarchies": [ - { - "level": 200, - "filter_override": false - } - ], - "dimensions": [ - "pi" - ], - "permitted_modules": [ - { - "name": "tg_summary", - "default": true, - "title": "Summary", - "position": 100, - "javascriptClass": "XDMoD.Module.Summary", - "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", - "tooltip": "Displays summary information", - "userManualSectionName": "Summary Tab" - }, - { - "name": "tg_usage", - "title": "Usage", - "position": 200, - "javascriptClass": "XDMoD.Module.Usage", - "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", - "tooltip": "Displays usage", - "userManualSectionName": "Usage Tab" - }, - { - "name": "metric_explorer", - "title": "Metric Explorer", - "position": 300, - "javascriptClass": "XDMoD.Module.MetricExplorer", - "javascriptReference": "CCR.xdmod.ui.metricExplorer", - "userManualSectionName": "Metric Explorer", - "tooltip": "" - }, - { - "name": "report_generator", - "title": "Report Generator", - "position": 1000, - "javascriptClass": "XDMoD.Module.ReportGenerator", - "javascriptReference": "CCR.xdmod.ui.reportGenerator", - "userManualSectionName": "Report Generator", - "tooltip": "" - }, - { - "name": "about_xdmod", - "title": "About", - "position": 10000, - "javascriptClass": "XDMoD.Module.About", - "javascriptReference": "CCR.xdmod.ui.aboutXD", - "userManualSectionName": "About", - "tooltip": "" - } - ], - "query_descripters": [ - { - "realm": "Jobs", - "group_by": "none" - }, - { - "realm": "Jobs", - "group_by": "jobsize" - }, - { - "realm": "Jobs", - "group_by": "jobwalltime" - }, - { - "realm": "Jobs", - "group_by": "jobwaittime" - }, - { - "realm": "Jobs", - "group_by": "nodecount" - }, - { - "realm": "Jobs", - "group_by": "nsfdirectorate" - }, - { - "realm": "Jobs", - "group_by": "parentscience" - }, - { - "realm": "Jobs", - "group_by": "fieldofscience" - }, - { - "realm": "Jobs", - "group_by": "pi" - }, - { - "realm": "Jobs", - "group_by": "queue" - }, - { - "realm": "Jobs", - "group_by": "resource" - }, - { - "realm": "Jobs", - "group_by": "resource_type" - }, - { - "realm": "Jobs", - "group_by": "person" - }, - { - "realm": "Jobs", - "group_by": "username" - }, - { - "realm": "0", - "group_by": "none" - }, - { - "realm": "a", - "group_by": "none" - }, - { - "realm": "z", - "group_by": "none" - } - ], - "summary_charts": [ - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "resource", - "has_std_err": false, - "id": 1.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours By Resource (Top 10)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "jobsize", - "has_std_err": false, - "id": 2.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours by Job Size" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "none", - "has_std_err": true, - "id": 3.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "avg_processors", - "realm": "Jobs", - "sort_type": "none", - "std_err": true, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Avg Job Size (Core Count)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "pie", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "pi", - "has_std_err": true, - "id": 4.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": true, - "value_labels": true, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": false, - "title": "Total CPU Hours by PI" - } - ] - }, - "cs": { - "display": "Center Staff", - "type": "data", - "hierarchies": [ - { - "level": 300, - "filter_override": false - } - ], - "dimensions": [ - "provider" - ], - "permitted_modules": [ - { - "name": "tg_summary", - "default": true, - "title": "Summary", - "position": 100, - "javascriptClass": "XDMoD.Module.Summary", - "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", - "tooltip": "Displays summary information", - "userManualSectionName": "Summary Tab" - }, - { - "name": "tg_usage", - "title": "Usage", - "position": 200, - "javascriptClass": "XDMoD.Module.Usage", - "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", - "tooltip": "Displays usage", - "userManualSectionName": "Usage Tab" - }, - { - "name": "metric_explorer", - "title": "Metric Explorer", - "position": 300, - "javascriptClass": "XDMoD.Module.MetricExplorer", - "javascriptReference": "CCR.xdmod.ui.metricExplorer", - "userManualSectionName": "Metric Explorer", - "tooltip": "" - }, - { - "name": "report_generator", - "title": "Report Generator", - "position": 1000, - "javascriptClass": "XDMoD.Module.ReportGenerator", - "javascriptReference": "CCR.xdmod.ui.reportGenerator", - "userManualSectionName": "Report Generator", - "tooltip": "" - }, - { - "name": "about_xdmod", - "title": "About", - "position": 10000, - "javascriptClass": "XDMoD.Module.About", - "javascriptReference": "CCR.xdmod.ui.aboutXD", - "userManualSectionName": "About", - "tooltip": "" - } - ], - "query_descripters": [ - { - "realm": "Jobs", - "group_by": "none" - }, - { - "realm": "Jobs", - "group_by": "jobsize" - }, - { - "realm": "Jobs", - "group_by": "jobwalltime" - }, - { - "realm": "Jobs", - "group_by": "jobwaittime" - }, - { - "realm": "Jobs", - "group_by": "nodecount" - }, - { - "realm": "Jobs", - "group_by": "nsfdirectorate" - }, - { - "realm": "Jobs", - "group_by": "parentscience" - }, - { - "realm": "Jobs", - "group_by": "fieldofscience" - }, - { - "realm": "Jobs", - "group_by": "pi" - }, - { - "realm": "Jobs", - "group_by": "queue" - }, - { - "realm": "Jobs", - "group_by": "resource" - }, - { - "realm": "Jobs", - "group_by": "resource_type" - }, - { - "realm": "Jobs", - "group_by": "person" - }, - { - "realm": "Jobs", - "group_by": "username" - }, - { - "realm": "0", - "group_by": "none" - }, - { - "realm": "a", - "group_by": "none" - }, - { - "realm": "z", - "group_by": "none" - } - ], - "summary_charts": [ - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "resource", - "has_std_err": false, - "id": 1.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours By Resource (Top 10)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "stack", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "jobsize", - "has_std_err": false, - "id": 2.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": false, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "right_center", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Total CPU Hours by Job Size" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "column", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "none", - "has_std_err": true, - "id": 3.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "avg_processors", - "realm": "Jobs", - "sort_type": "none", - "std_err": true, - "value_labels": false, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 20, - "show_filters": true, - "start": 0, - "timeseries": true, - "title": "Avg Job Size (Core Count)" - }, - { - "data_series": { - "data": [ - { - "combine_type": "side", - "display_type": "pie", - "filters": { - "data": [ - - ], - "total": 0 - }, - "group_by": "pi", - "has_std_err": true, - "id": 4.0e-14, - "ignore_global": false, - "log_scale": false, - "long_legend": true, - "metric": "total_cpu_hours", - "realm": "Jobs", - "sort_type": "value_desc", - "std_err": true, - "value_labels": true, - "x_axis": false - } - ], - "total": 1 - }, - "global_filters": { - "data": [ - - ], - "total": 0 - }, - "legend_type": "off", - "limit": 10, - "show_filters": true, - "start": 0, - "timeseries": false, - "title": "Total CPU Hours by PI" - } - ] - }, - "mgr": { - "display": "Manager", - "type": "feature" - }, - "dev": { - "display": "Developer", - "type": "feature" - } - } -} +{"roles":{"default":{"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"pub":{"display":"Public","type":"data","hierarchies":[{"level":0,"filter_override":false}],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username","disable":true}],"query_descripers":[{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}]},"usr":{"display":"User","type":"data","hierarchies":[{"level":100,"filter_override":false}],"dimensions":["person"],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"cd":{"display":"Center Director","type":"data","hierarchies":[{"level":400,"filter_override":false}],"dimensions":["provider"],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"pi":{"display":"Principal Investigator","type":"data","hierarchies":[{"level":200,"filter_override":false}],"dimensions":["pi"],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"cs":{"display":"Center Staff","type":"data","hierarchies":[{"level":300,"filter_override":false}],"dimensions":["provider"],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"mgr":{"display":"Manager","type":"feature"},"dev":{"display":"Developer","type":"feature"}}} From c672b618d88c17c59c37354f9abeb8552a0b28d1 Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Wed, 27 Feb 2019 09:48:54 -0500 Subject: [PATCH 05/17] Pretty printing expected output Updates per @plessbd, just making sure that the expected output is pretty printed. --- .../Configuration/EtlConfigurationTest.php | 2 +- .../output/roles-read_order.json | 1600 ++++++++++++++++- 2 files changed, 1600 insertions(+), 2 deletions(-) diff --git a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php index ddc32d443f..484fafd5ac 100644 --- a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php +++ b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php @@ -381,7 +381,7 @@ public function testLocalConfigReadOrder(array $options) $expectedFilePath = $this->testFiles->getFile('configuration', $options['expected']); if (!is_file($expectedFilePath)) { - $actual = sprintf("%s\n", $config->toJson()); + $actual = sprintf("%s\n", json_encode(json_decode($config->toJson()), JSON_PRETTY_PRINT)); @file_put_contents($expectedFilePath, $actual); echo "\nGenerated expected output for $expectedFilePath\n"; } else { diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json index cfd968a7cb..3f7b1824de 100644 --- a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/output/roles-read_order.json @@ -1 +1,1599 @@ -{"roles":{"default":{"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"pub":{"display":"Public","type":"data","hierarchies":[{"level":0,"filter_override":false}],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username","disable":true}],"query_descripers":[{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}]},"usr":{"display":"User","type":"data","hierarchies":[{"level":100,"filter_override":false}],"dimensions":["person"],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"cd":{"display":"Center Director","type":"data","hierarchies":[{"level":400,"filter_override":false}],"dimensions":["provider"],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"pi":{"display":"Principal Investigator","type":"data","hierarchies":[{"level":200,"filter_override":false}],"dimensions":["pi"],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"cs":{"display":"Center Staff","type":"data","hierarchies":[{"level":300,"filter_override":false}],"dimensions":["provider"],"permitted_modules":[{"name":"tg_summary","default":true,"title":"Summary","position":100,"javascriptClass":"XDMoD.Module.Summary","javascriptReference":"CCR.xdmod.ui.tgSummaryViewer","tooltip":"Displays summary information","userManualSectionName":"Summary Tab"},{"name":"tg_usage","title":"Usage","position":200,"javascriptClass":"XDMoD.Module.Usage","javascriptReference":"CCR.xdmod.ui.chartViewerTGUsage","tooltip":"Displays usage","userManualSectionName":"Usage Tab"},{"name":"metric_explorer","title":"Metric Explorer","position":300,"javascriptClass":"XDMoD.Module.MetricExplorer","javascriptReference":"CCR.xdmod.ui.metricExplorer","userManualSectionName":"Metric Explorer","tooltip":""},{"name":"report_generator","title":"Report Generator","position":1000,"javascriptClass":"XDMoD.Module.ReportGenerator","javascriptReference":"CCR.xdmod.ui.reportGenerator","userManualSectionName":"Report Generator","tooltip":""},{"name":"about_xdmod","title":"About","position":10000,"javascriptClass":"XDMoD.Module.About","javascriptReference":"CCR.xdmod.ui.aboutXD","userManualSectionName":"About","tooltip":""}],"query_descripters":[{"realm":"Jobs","group_by":"none"},{"realm":"Jobs","group_by":"jobsize"},{"realm":"Jobs","group_by":"jobwalltime"},{"realm":"Jobs","group_by":"jobwaittime"},{"realm":"Jobs","group_by":"nodecount"},{"realm":"Jobs","group_by":"nsfdirectorate"},{"realm":"Jobs","group_by":"parentscience"},{"realm":"Jobs","group_by":"fieldofscience"},{"realm":"Jobs","group_by":"pi"},{"realm":"Jobs","group_by":"queue"},{"realm":"Jobs","group_by":"resource"},{"realm":"Jobs","group_by":"resource_type"},{"realm":"Jobs","group_by":"person"},{"realm":"Jobs","group_by":"username"},{"realm":"0","group_by":"none"},{"realm":"a","group_by":"none"},{"realm":"z","group_by":"none"}],"summary_charts":[{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"resource","has_std_err":false,"id":1.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":10,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours By Resource (Top 10)"},{"data_series":{"data":[{"combine_type":"stack","display_type":"column","filters":{"data":[],"total":0},"group_by":"jobsize","has_std_err":false,"id":2.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":false,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"right_center","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Total CPU Hours by Job Size"},{"data_series":{"data":[{"combine_type":"side","display_type":"column","filters":{"data":[],"total":0},"group_by":"none","has_std_err":true,"id":3.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"avg_processors","realm":"Jobs","sort_type":"none","std_err":true,"value_labels":false,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":20,"show_filters":true,"start":0,"timeseries":true,"title":"Avg Job Size (Core Count)"},{"data_series":{"data":[{"combine_type":"side","display_type":"pie","filters":{"data":[],"total":0},"group_by":"pi","has_std_err":true,"id":4.0e-14,"ignore_global":false,"log_scale":false,"long_legend":true,"metric":"total_cpu_hours","realm":"Jobs","sort_type":"value_desc","std_err":true,"value_labels":true,"x_axis":false}],"total":1},"global_filters":{"data":[],"total":0},"legend_type":"off","limit":10,"show_filters":true,"start":0,"timeseries":false,"title":"Total CPU Hours by PI"}]},"mgr":{"display":"Manager","type":"feature"},"dev":{"display":"Developer","type":"feature"}}} +{ + "roles": { + "default": { + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "pub": { + "display": "Public", + "type": "data", + "hierarchies": [ + { + "level": 0, + "filter_override": false + } + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username", + "disable": true + } + ], + "query_descripers": [ + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ] + }, + "usr": { + "display": "User", + "type": "data", + "hierarchies": [ + { + "level": 100, + "filter_override": false + } + ], + "dimensions": [ + "person" + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "cd": { + "display": "Center Director", + "type": "data", + "hierarchies": [ + { + "level": 400, + "filter_override": false + } + ], + "dimensions": [ + "provider" + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "pi": { + "display": "Principal Investigator", + "type": "data", + "hierarchies": [ + { + "level": 200, + "filter_override": false + } + ], + "dimensions": [ + "pi" + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "cs": { + "display": "Center Staff", + "type": "data", + "hierarchies": [ + { + "level": 300, + "filter_override": false + } + ], + "dimensions": [ + "provider" + ], + "permitted_modules": [ + { + "name": "tg_summary", + "default": true, + "title": "Summary", + "position": 100, + "javascriptClass": "XDMoD.Module.Summary", + "javascriptReference": "CCR.xdmod.ui.tgSummaryViewer", + "tooltip": "Displays summary information", + "userManualSectionName": "Summary Tab" + }, + { + "name": "tg_usage", + "title": "Usage", + "position": 200, + "javascriptClass": "XDMoD.Module.Usage", + "javascriptReference": "CCR.xdmod.ui.chartViewerTGUsage", + "tooltip": "Displays usage", + "userManualSectionName": "Usage Tab" + }, + { + "name": "metric_explorer", + "title": "Metric Explorer", + "position": 300, + "javascriptClass": "XDMoD.Module.MetricExplorer", + "javascriptReference": "CCR.xdmod.ui.metricExplorer", + "userManualSectionName": "Metric Explorer", + "tooltip": "" + }, + { + "name": "report_generator", + "title": "Report Generator", + "position": 1000, + "javascriptClass": "XDMoD.Module.ReportGenerator", + "javascriptReference": "CCR.xdmod.ui.reportGenerator", + "userManualSectionName": "Report Generator", + "tooltip": "" + }, + { + "name": "about_xdmod", + "title": "About", + "position": 10000, + "javascriptClass": "XDMoD.Module.About", + "javascriptReference": "CCR.xdmod.ui.aboutXD", + "userManualSectionName": "About", + "tooltip": "" + } + ], + "query_descripters": [ + { + "realm": "Jobs", + "group_by": "none" + }, + { + "realm": "Jobs", + "group_by": "jobsize" + }, + { + "realm": "Jobs", + "group_by": "jobwalltime" + }, + { + "realm": "Jobs", + "group_by": "jobwaittime" + }, + { + "realm": "Jobs", + "group_by": "nodecount" + }, + { + "realm": "Jobs", + "group_by": "nsfdirectorate" + }, + { + "realm": "Jobs", + "group_by": "parentscience" + }, + { + "realm": "Jobs", + "group_by": "fieldofscience" + }, + { + "realm": "Jobs", + "group_by": "pi" + }, + { + "realm": "Jobs", + "group_by": "queue" + }, + { + "realm": "Jobs", + "group_by": "resource" + }, + { + "realm": "Jobs", + "group_by": "resource_type" + }, + { + "realm": "Jobs", + "group_by": "person" + }, + { + "realm": "Jobs", + "group_by": "username" + }, + { + "realm": "0", + "group_by": "none" + }, + { + "realm": "a", + "group_by": "none" + }, + { + "realm": "z", + "group_by": "none" + } + ], + "summary_charts": [ + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "resource", + "has_std_err": false, + "id": 1.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours By Resource (Top 10)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "stack", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "jobsize", + "has_std_err": false, + "id": 2.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": false, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "right_center", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Total CPU Hours by Job Size" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "column", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "none", + "has_std_err": true, + "id": 3.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "avg_processors", + "realm": "Jobs", + "sort_type": "none", + "std_err": true, + "value_labels": false, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 20, + "show_filters": true, + "start": 0, + "timeseries": true, + "title": "Avg Job Size (Core Count)" + }, + { + "data_series": { + "data": [ + { + "combine_type": "side", + "display_type": "pie", + "filters": { + "data": [ + + ], + "total": 0 + }, + "group_by": "pi", + "has_std_err": true, + "id": 4.0e-14, + "ignore_global": false, + "log_scale": false, + "long_legend": true, + "metric": "total_cpu_hours", + "realm": "Jobs", + "sort_type": "value_desc", + "std_err": true, + "value_labels": true, + "x_axis": false + } + ], + "total": 1 + }, + "global_filters": { + "data": [ + + ], + "total": 0 + }, + "legend_type": "off", + "limit": 10, + "show_filters": true, + "start": 0, + "timeseries": false, + "title": "Total CPU Hours by PI" + } + ] + }, + "mgr": { + "display": "Manager", + "type": "feature" + }, + "dev": { + "display": "Developer", + "type": "feature" + } + } +} From 0aa615d87961aa865e2adada4a77ee58d72a5534 Mon Sep 17 00:00:00 2001 From: Joe White Date: Wed, 27 Feb 2019 10:17:36 -0500 Subject: [PATCH 06/17] Update classes/Configuration/Configuration.php Updates per code review by @jpwhite4 Co-Authored-By: ryanrath --- classes/Configuration/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Configuration/Configuration.php b/classes/Configuration/Configuration.php index 5419b9abd0..0f57180e95 100644 --- a/classes/Configuration/Configuration.php +++ b/classes/Configuration/Configuration.php @@ -337,7 +337,7 @@ public function initialize($force = false) } // while ( false !== ( $file = readdir($dh) ) ) // Sort the retrieved .json files. - sort($files, SORT_STRING); + sort($files, SORT_LOCALE_STRING); // Process each .json file before merging into the main file. foreach( $files as $file ) { From 58d813aae10e89a532f3f9e5aacb7188e873066c Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Wed, 27 Feb 2019 10:18:20 -0500 Subject: [PATCH 07/17] Updates per code review comment by @jpwhite4 removing local scoped variable as it's not needed. --- classes/Configuration/Configuration.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/classes/Configuration/Configuration.php b/classes/Configuration/Configuration.php index 0f57180e95..d503e31cba 100644 --- a/classes/Configuration/Configuration.php +++ b/classes/Configuration/Configuration.php @@ -331,8 +331,7 @@ public function initialize($force = false) continue; } - $fullPath = $this->localConfigDir . "/" . $file; - $files[] = $fullPath; + $files[] = $this->localConfigDir . "/" . $file; } // while ( false !== ( $file = readdir($dh) ) ) From f39e79c4e9ff235d9b21abd180f587d8bfdbe29f Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Fri, 1 Mar 2019 09:53:56 -0500 Subject: [PATCH 08/17] Added a new helper function `assocArrayFactory` Switching to the new `XdmodConfiguration` class incurred a lot of boilerplate overhead. This helper function + making local config directories implicit when instantiating a new `Configuration` object means that we can remove basically all of the boilerplate that was added previously. **NOTE:** The instances where `rawstatistics.json` was being read were not working as expected due to there being a type mismatch between the base config file and its local config files. This PR updates the way in which the config data is being used to be in line with how the config files will be going forward. There will be separate PR's to update the local config files, specifically in the SUPREMM model. # Please enter the commit message for your changes. Lines starting --- bin/acl-config | 71 +++---------------- classes/Configuration/Configuration.php | 25 ++++--- classes/DB/FilterListBuilder.php | 13 +--- classes/DataWarehouse.php | 24 +------ classes/DataWarehouse/Query/Query.php | 17 +---- .../Query/TimeAggregationUnit.php | 11 +-- classes/DataWarehouse/QueryBuilder.php | 12 +--- classes/Models/Services/Parameters.php | 18 +---- classes/OpenXdmod/Assets.php | 17 +---- classes/OpenXdmod/Setup/MainMenu.php | 11 +-- classes/OpenXdmod/Shredder.php | 4 +- .../WarehouseControllerProvider.php | 59 +++++++-------- classes/Rest/XdmodApplicationFactory.php | 14 +--- classes/User/Roles.php | 19 +---- html/index.php | 18 ++--- 15 files changed, 72 insertions(+), 261 deletions(-) diff --git a/bin/acl-config b/bin/acl-config index 0d98d3610b..a4bf2effdd 100755 --- a/bin/acl-config +++ b/bin/acl-config @@ -16,6 +16,7 @@ use CCR\DB\iDatabase; use CCR\Log; use CCR\Json; +use Configuration\Configuration; use ETL\Utilities; use User\Roles; @@ -124,20 +125,8 @@ function main() // roles/datawarehouse $results = array(); - $moduleConfig = new \Configuration\Configuration( - CONFIG_DIR . '/modules.json', - CONFIG_DIR, - $log, - array( - 'local_config_dir' => CONFIG_DIR . '/modules.d' - ) - ); - $moduleConfig->initialize(); - // Module Retrieval - // We're using json_[decode/encode] here to essentially make a copy of $moduleConfig->transformedConfig - // that will not keep a reference to the original object. - $modules = json_decode(json_encode($moduleConfig->getTransformedConfig()), true); + $modules = Configuration::assocArrayFactory('modules.json', CONFIG_DIR, $log); // Remove the warning to users that this files contents are automatically // generated and that they modify it at their own risk. @@ -153,35 +142,9 @@ function main() $allRoles = Roles::getRoleNames($blacklist); // Configuration Files - $hierarchyConfig = new \Configuration\ModuleConfiguration( - CONFIG_DIR . '/hierarchies.json', - CONFIG_DIR, - $log, - array( - 'local_config_dir' => CONFIG_DIR . '/hierarchies.d' - ) - ); - $hierarchyConfig->initialize(); - - $roleConfig = new \Configuration\ModuleConfiguration( - CONFIG_DIR . '/roles.json', - CONFIG_DIR, - $log, - array( - 'local_config_dir' => CONFIG_DIR .'/roles.d' - ) - ); - $roleConfig->initialize(); - - $realmConfig = new \Configuration\ModuleConfiguration( - CONFIG_DIR . '/datawarehouse.json', - CONFIG_DIR, - $log, - array( - 'local_config_dir' => CONFIG_DIR .'/datawarehouse.d' - ) - ); - $realmConfig->initialize(); + $hierarchyConfig = \Configuration\ModuleConfiguration::factory('hierarchies.json', CONFIG_DIR, $log); + $roleConfig = \Configuration\ModuleConfiguration::factory('roles.json', CONFIG_DIR, $log); + $realmConfig = \Configuration\ModuleConfiguration::factory('datawarehouse.json', CONFIG_DIR, $log); foreach ($modules as $module => $moduleData) { @@ -2111,29 +2074,11 @@ function verifyConfigData() $invalid = array(); - $sections = array( - 'modules' => true, - 'roles' => true, - 'datawarehouse' => false - ); - - $baseDir = CONFIG_DIR; - foreach($sections as $section => $hasLocalConfig) { - $baseFile = implode(DIRECTORY_SEPARATOR, array($baseDir, "$section.json")); - $options = array(); - if ($hasLocalConfig) { - $options['local_config_dir'] = implode(DIRECTORY_SEPARATOR, array($baseDir, "$section.d")); - } + $sections = array('modules', 'roles', 'datawarehouse'); + foreach($sections as $section) { try { - $config = new \Configuration\XdmodConfiguration( - $baseFile, - $baseDir, - $log, - $options - ); - $config->initialize(); - + \Configuration\XdmodConfiguration::assocArrayFactory("$section.json", CONFIG_DIR); $log->info("[SUCCESS] $section loaded successfully."); } catch (Exception $e) { $log->err("[FAIL] Unable to load section $section"); diff --git a/classes/Configuration/Configuration.php b/classes/Configuration/Configuration.php index d503e31cba..5fd92b5936 100644 --- a/classes/Configuration/Configuration.php +++ b/classes/Configuration/Configuration.php @@ -233,7 +233,18 @@ public function __construct( } if ( isset($options['local_config_dir']) ) { + + // Before continuing, make sure that the specified directory actually exists. It not + // existing could have unexpected consequences for an XDMoD installation. + if (!is_dir($options['local_config_dir'])) { + $this->logAndThrowException(sprintf("Unable to find the specified local configuration directory: %s",$options['local_config_dir'])); + } + $this->localConfigDir = $options['local_config_dir']; + } else { + + // Set $localConfigDir to the default value. + $this->localConfigDir = implode(DIRECTORY_SEPARATOR, array($this->baseDir, sprintf("%s.d", basename($filename, '.json')))); } $this->isLocalConfig = ( isset($options['is_local_config']) && $options['is_local_config'] ); @@ -306,14 +317,9 @@ public function initialize($force = false) $this->interpretData(); - // Process any local configuration files. - - if ( ! $this->isLocalConfig && null !== $this->localConfigDir ) { - - if ( ! is_dir($this->localConfigDir) ) { - $this->logger->debug(sprintf("Local configuration directory '%s' not found", $this->localConfigDir)); - return; - } + // Process any local configuration files iff $localConfigDir exists, is actually a directory, + // and this is not a local config file itself. + if ( ! $this->isLocalConfig && null !== $this->localConfigDir && is_dir($this->localConfigDir) ) { if ( false === ($dh = @opendir($this->localConfigDir)) ) { $this->logAndThrowException(sprintf("Error opening configuration directory '%s'", $this->localConfigDir)); @@ -353,8 +359,7 @@ public function initialize($force = false) } // foreach($files as $file) closedir($dh); - - } // if ( null !== $confSubdirectory ) + } // if ( ! $this->isLocalConfig && null !== $this->localConfigDir && is_dir($this->localConfigDir) ) $this->postMergeTasks(); diff --git a/classes/DB/FilterListBuilder.php b/classes/DB/FilterListBuilder.php index 4afbccddc3..a815b2af73 100644 --- a/classes/DB/FilterListBuilder.php +++ b/classes/DB/FilterListBuilder.php @@ -49,19 +49,12 @@ public function __construct() */ public function buildAllLists() { - $configFile = new \Configuration\XdmodConfiguration( + $config = \Configuration\XdmodConfiguration::assocArrayFactory( 'datawarehouse.json', CONFIG_DIR, - $this->_logger, - array( - 'local_config_dir' => implode( - DIRECTORY_SEPARATOR, - array(CONFIG_DIR, 'datawarehouse.d') - ) - ) + $this->_logger ); - $configFile->initialize(); - $config = $configFile->toAssocArray(); + // Get the realms to be processed. $realmNames = array_keys($config['realms']); diff --git a/classes/DataWarehouse.php b/classes/DataWarehouse.php index 019b680590..d29b07ca14 100644 --- a/classes/DataWarehouse.php +++ b/classes/DataWarehouse.php @@ -367,17 +367,7 @@ public static function getAllocations($config = array()) */ public static function getCategories() { - $configFile = new \Configuration\XdmodConfiguration( - 'datawarehouse.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'datawarehouse.d')) - ) - ); - $configFile->initialize(); - - $dwConfig = $configFile->toAssocArray(); + $dwConfig = \Configuration\XdmodConfiguration::assocArrayFactory('datawarehouse.json', CONFIG_DIR); $categories = array(); foreach ($dwConfig['realms'] as $realmName => $realm) { @@ -403,17 +393,7 @@ public static function getCategories() */ public static function getCategoryForRealm($realmName) { - $configFile = new \Configuration\XdmodConfiguration( - 'datawarehouse.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'datawarehouse.d')) - ) - ); - $configFile->initialize(); - - $dwConfig = $configFile->toAssocArray(); + $dwConfig = \Configuration\XdmodConfiguration::assocArrayFactory('datawarehouse.json', CONFIG_DIR); if (isset($dwConfig['realms'][$realmName]['category'])) { return $dwConfig['realms'][$realmName]['category']; diff --git a/classes/DataWarehouse/Query/Query.php b/classes/DataWarehouse/Query/Query.php index f711aa73df..72e7c20e12 100644 --- a/classes/DataWarehouse/Query/Query.php +++ b/classes/DataWarehouse/Query/Query.php @@ -1722,22 +1722,7 @@ protected static function getRealm() protected static function getConfigData() { if (!isset(self::$config)) { - $configFile = new XdmodConfiguration( - 'datawarehouse.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode( - DIRECTORY_SEPARATOR, - array( - CONFIG_DIR, - 'datawarehouse.d' - ) - ) - ) - ); - $configFile->initialize(); - self::$config = $configFile->toAssocArray(); + self::$config = XdmodConfiguration::assocArrayFactory('datawarehouse.json', CONFIG_DIR); } return self::$config; diff --git a/classes/DataWarehouse/Query/TimeAggregationUnit.php b/classes/DataWarehouse/Query/TimeAggregationUnit.php index 4ce41c0c55..38b6c74b1f 100644 --- a/classes/DataWarehouse/Query/TimeAggregationUnit.php +++ b/classes/DataWarehouse/Query/TimeAggregationUnit.php @@ -296,16 +296,7 @@ public static function getMaxUnit($unit_1, $unit_2) public static function getMinUnitForRealm($realm) { // Open the datawarehouse config. - $configFile = new XdmodConfiguration( - 'datawarehouse.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'datawarehouse.d')) - ) - ); - $configFile->initialize(); - $config = $configFile->toAssocArray(); + $config = XdmodConfiguration::assocArrayFactory('datawarehouse.json', CONFIG_DIR); $dw_config = $config['realms']; // Find the config for the given realm. diff --git a/classes/DataWarehouse/QueryBuilder.php b/classes/DataWarehouse/QueryBuilder.php index 492cd64e13..96ee9c995d 100644 --- a/classes/DataWarehouse/QueryBuilder.php +++ b/classes/DataWarehouse/QueryBuilder.php @@ -88,17 +88,7 @@ private static function loadQueryRealmConfig() return; } - $configFile = new XdmodConfiguration( - 'datawarehouse.json', - CONFIG_DIR, - null, - array( - 'local_config_dir'=> implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'datawarehouse.d')) - ) - ); - $configFile->initialize(); - - $config = $configFile->toAssocArray(); + $config = XdmodConfiguration::assocArrayFactory('datawarehouse.json', CONFIG_DIR); $dwconfig = $config['realms']; foreach($dwconfig as $realmName => $data) { diff --git a/classes/Models/Services/Parameters.php b/classes/Models/Services/Parameters.php index ce5b699018..3ef308b350 100644 --- a/classes/Models/Services/Parameters.php +++ b/classes/Models/Services/Parameters.php @@ -20,25 +20,9 @@ public static function getParameters(\XDUser $user, $aclName) { $parameters = array(); - $configFile = new XdmodConfiguration( - 'roles.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode( - DIRECTORY_SEPARATOR, - array( - CONFIG_DIR, - 'roles.d' - ) - ) - ) - ); - $configFile->initialize(); - // We need to retrieve which dimensions this acl filters on. To do that we need to see how // it's configured - $roles = $configFile->toAssocArray()['roles']; + $roles = XdmodConfiguration::assocArrayFactory('roles.json', CONFIG_DIR)['roles']; if (!isset($roles[$aclName])) { throw new \Exception("Unable to find configuration information for $aclName."); diff --git a/classes/OpenXdmod/Assets.php b/classes/OpenXdmod/Assets.php index c8658a4323..4953e7d4a7 100644 --- a/classes/OpenXdmod/Assets.php +++ b/classes/OpenXdmod/Assets.php @@ -5,6 +5,8 @@ namespace OpenXdmod; +use Configuration\XdmodConfiguration; + class Assets { @@ -82,20 +84,7 @@ private static function getAssetsPaths($section, $type) private static function getConfiguration() { if (static::$assetsConfig === null) { - $config = new \Configuration\XdmodConfiguration( - "assets.json", - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode( - DIRECTORY_SEPARATOR, - array(CONFIG_DIR, 'assets.d') - ) - ) - ); - $config->initialize(); - - static::$assetsConfig = $config->toAssocArray(); + static::$assetsConfig = XdmodConfiguration::assocArrayFactory("assets.json", CONFIG_DIR); } return static::$assetsConfig; diff --git a/classes/OpenXdmod/Setup/MainMenu.php b/classes/OpenXdmod/Setup/MainMenu.php index 73ec296901..4f8721a5fe 100644 --- a/classes/OpenXdmod/Setup/MainMenu.php +++ b/classes/OpenXdmod/Setup/MainMenu.php @@ -18,16 +18,7 @@ class MainMenu extends Menu */ public static function factory() { - $configFile = new XdmodConfiguration( - 'setup.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'setup.d')) - ) - ); - $configFile->initialize(); - $config = $configFile->toAssocArray(); + $config = XdmodConfiguration::assocArrayFactory('setup.json', CONFIG_DIR); $itemConf = $config['menu']; diff --git a/classes/OpenXdmod/Shredder.php b/classes/OpenXdmod/Shredder.php index 7a56ef4030..17601b4863 100644 --- a/classes/OpenXdmod/Shredder.php +++ b/classes/OpenXdmod/Shredder.php @@ -1016,7 +1016,7 @@ public function writeJobErrors($file) */ protected function getResourceConfig($name) { - $configFile = new XdmodConfiguration( + $resources = XdmodConfiguration::assocArrayFactory( 'resources.json', CONFIG_DIR, $this->logger, @@ -1024,8 +1024,6 @@ protected function getResourceConfig($name) 'force_array_return' => true ) ); - $configFile->initialize(); - $resources = $configFile->toAssocArray(); foreach ($resources as $resource) { if ($resource['resource'] === $name) { diff --git a/classes/Rest/Controllers/WarehouseControllerProvider.php b/classes/Rest/Controllers/WarehouseControllerProvider.php index e35acebc48..ddb9c9ab1b 100644 --- a/classes/Rest/Controllers/WarehouseControllerProvider.php +++ b/classes/Rest/Controllers/WarehouseControllerProvider.php @@ -1401,18 +1401,18 @@ private function getJobData(Application $app, XDUser $user, $realm, $jobId, $act */ private function getJobDataSet(XDUser $user, $realm, $jobId, $action) { - $configFile = new XdmodConfiguration( - 'rawstatistics.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'rawstatistics.d')) + $rawstats = XdmodConfiguration::assocArrayFactory('rawstatistics.json', CONFIG_DIR); + + $realmExists = count( + array_filter( + $rawstats, + function ($item) use ($realm) { + return $item['name'] === $realm; + } ) - ); - $configFile->initialize(); + ) > 0; - $rawstats = $configFile->toAssocArray(); - if (!isset($rawstats['realms'][$realm])) { + if (!$realmExists) { throw new \DataWarehouse\Query\Exceptions\AccessDeniedException; } @@ -1692,26 +1692,16 @@ private function processHistoryRequest(Application $app, XDUser $user, $realm, $ */ private function processHistoryDefaultRealmRequest(Application $app, $action) { - $configFile = new XdmodConfiguration( - 'rawstatistics.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'rawstatistics.d')) - ) - ); - $configFile->initialize(); - - $rawstats = $configFile->toAssocArray(); + $rawstats = XdmodConfiguration::assocArrayFactory('rawstatistics.json', CONFIG_DIR); $results = array(); if (isset($rawstats['realms'])) { - foreach($rawstats['realms'] as $realm => $realmconfig) { + foreach($rawstats['realms'] as $realmconfig) { $results[] = array( 'dtype' => 'realm', - 'realm' => $realm, - 'text' => $realmconfig['name'] + 'realm' => $realmconfig['name'], + 'text' => $realmconfig['display'] ); } } @@ -2011,19 +2001,18 @@ private function getJobTimeSeriesData(Application $app, Request $request, \XDUse */ private function getJobByPrimaryKey(Application $app, \XDUser $user, $realm, $searchparams) { - $configFile = new XdmodConfiguration( - 'rawstatistics.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'rawstatistics.d')) - ) - ); - $configFile->initialize(); + $rawstats = XdmodConfiguration::assocArrayFactory('rawstatistics.json', CONFIG_DIR); - $rawstats = $configFile->toAssocArray(); + $realmExists = count( + array_filter( + $rawstats, + function ($item) use ($realm) { + return $item['name'] === $realm; + } + ) + ) > 0; - if (!isset($rawstats['realms'][$realm])) { + if (!$realmExists) { throw new \DataWarehouse\Query\Exceptions\AccessDeniedException; } diff --git a/classes/Rest/XdmodApplicationFactory.php b/classes/Rest/XdmodApplicationFactory.php index 5a2da65434..91f372b4e0 100644 --- a/classes/Rest/XdmodApplicationFactory.php +++ b/classes/Rest/XdmodApplicationFactory.php @@ -148,17 +148,9 @@ public static function getInstance() $versionedPathMountPoint = "/{" . self::API_SYMBOL . "}"; $unversionedPathMountPoint = ''; - $restConfigFile = new XdmodConfiguration( - 'rest.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'rest.d')) - ) - ); - $restConfigFile->initialize(); - - $restControllers = $restConfigFile->toAssocArray(); + // Retrieve the rest end point configuration + $restControllers = XdmodConfiguration::assocArrayFactory('rest.json', CONFIG_DIR); + foreach ($restControllers as $key => $config) { if (!array_key_exists('prefix', $config) || !array_key_exists('controller', $config)) { throw new \Exception("Required REST endpoint information (prefix or controller) missing for $key."); diff --git a/classes/User/Roles.php b/classes/User/Roles.php index e0e3b75eb3..ae95b44a1a 100644 --- a/classes/User/Roles.php +++ b/classes/User/Roles.php @@ -47,24 +47,7 @@ function ($item) use ($blacklist) { protected static function getConfigData() { if (!isset(self::$config)) { - $configFile = new XdmodConfiguration( - 'roles.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode( - DIRECTORY_SEPARATOR, - array( - CONFIG_DIR, - 'roles.d' - ) - ) - ) - ); - $configFile->initialize(); - $data = $configFile->toAssocArray(); - - self::$config = $data['roles']; + self::$config = XdmodConfiguration::assocArrayFactory('roles.json', CONFIG_DIR)['roles']; } return self::$config; diff --git a/html/index.php b/html/index.php index 2ec7e1dbe1..0e1ded6b32 100644 --- a/html/index.php +++ b/html/index.php @@ -268,18 +268,14 @@ function isReferrer($referrer) print "CCR.xdmod.ui.isCenterDirector = " . json_encode($user->hasAcl(ROLE_ID_CENTER_DIRECTOR)) . ";\n"; } - $configFile = new \Configuration\XdmodConfiguration( - 'rawstatistics.json', - CONFIG_DIR, - null, - array( - 'local_config_dir' => implode(DIRECTORY_SEPARATOR, array(CONFIG_DIR, 'rawstatistics.d')) - ) - ); - $configFile->initialize(); + $config = \Configuration\XdmodConfiguration::assocArrayFactory('rawstatistics.json', CONFIG_DIR); - $config = json_decode($configFile->toJson(), true); - $rawDataRealms = array_keys($config['realms']); + $rawDataRealms = array_map( + function ($item) { + return $item['name']; + }, + $config['realms'] + ); print "CCR.xdmod.ui.rawDataAllowedRealms = " . json_encode($rawDataRealms) . ";\n"; From 6267178c2a90db0f2759b001be8254ddfa3f009f Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Fri, 1 Mar 2019 10:35:14 -0500 Subject: [PATCH 09/17] Formatting fixes --- classes/Configuration/Configuration.php | 2 +- .../Controllers/WarehouseControllerProvider.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/classes/Configuration/Configuration.php b/classes/Configuration/Configuration.php index 5fd92b5936..f0ef77013f 100644 --- a/classes/Configuration/Configuration.php +++ b/classes/Configuration/Configuration.php @@ -237,7 +237,7 @@ public function __construct( // Before continuing, make sure that the specified directory actually exists. It not // existing could have unexpected consequences for an XDMoD installation. if (!is_dir($options['local_config_dir'])) { - $this->logAndThrowException(sprintf("Unable to find the specified local configuration directory: %s",$options['local_config_dir'])); + $this->logAndThrowException(sprintf("Unable to find the specified local configuration directory: %s", $options['local_config_dir'])); } $this->localConfigDir = $options['local_config_dir']; diff --git a/classes/Rest/Controllers/WarehouseControllerProvider.php b/classes/Rest/Controllers/WarehouseControllerProvider.php index ddb9c9ab1b..56b8be4150 100644 --- a/classes/Rest/Controllers/WarehouseControllerProvider.php +++ b/classes/Rest/Controllers/WarehouseControllerProvider.php @@ -2004,13 +2004,13 @@ private function getJobByPrimaryKey(Application $app, \XDUser $user, $realm, $se $rawstats = XdmodConfiguration::assocArrayFactory('rawstatistics.json', CONFIG_DIR); $realmExists = count( - array_filter( - $rawstats, - function ($item) use ($realm) { - return $item['name'] === $realm; - } - ) - ) > 0; + array_filter( + $rawstats, + function ($item) use ($realm) { + return $item['name'] === $realm; + } + ) + ) > 0; if (!$realmExists) { throw new \DataWarehouse\Query\Exceptions\AccessDeniedException; From 97354430559ded328cc2d32b7f11e0938d1486af Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Fri, 1 Mar 2019 14:14:34 -0500 Subject: [PATCH 10/17] Updated `local_dir` to be optional the `datawarehouse` test specified in `xdmod_config.json` didn't need a `local_dir` so this was removed. To account for some entries having a local_dir and others not I updated the config object construction to account for this. --- .../Configuration/EtlConfigurationTest.php | 53 +++++++++++-------- .../configuration/input/xdmod_config.json | 1 - 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php index 484fafd5ac..5a580859b6 100644 --- a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php +++ b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php @@ -159,31 +159,38 @@ public function testXdmodConfiguration(array $options) $baseDir = dirname($this->testFiles->getFile('configuration', '.', 'input')); $baseFile = $this->testFiles->getFile('configuration', $options['base_file'], 'input'); - $localDir = $this->interpretDirOption($options['local_dir']); - $localConfigDir = dirname( - $this->testFiles->getfile( - 'configuration', - implode( - DIRECTORY_SEPARATOR, - array( - '.', - $localDir, - '.') - ), - 'input' - ) - ); - $expectedFilePath = $this->testFiles->getFile('configuration', $options['expected']); - $config = new XdmodConfiguration( - $baseFile, - $baseDir, - null, - array( - 'local_config_dir' => $localConfigDir - ) - ); + if (isset($options['local_dir'])) { + $localDir = $this->interpretDirOption($options['local_dir']); + $localConfigDir = dirname( + $this->testFiles->getfile( + 'configuration', + implode( + DIRECTORY_SEPARATOR, + array( + '.', + $localDir, + '.') + ), + 'input' + ) + ); + $config = new XdmodConfiguration( + $baseFile, + $baseDir, + null, + array( + 'local_config_dir' => $localConfigDir + ) + ); + } else { + $config = new XdmodConfiguration( + $baseFile, + $baseDir + ); + } + $config->initialize(); $actual = sprintf("%s\n", $config->toJson()); diff --git a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/xdmod_config.json b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/xdmod_config.json index 67cbf15ee0..619da4ecd8 100644 --- a/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/xdmod_config.json +++ b/tests/artifacts/xdmod-test-artifacts/xdmod/configuration/input/xdmod_config.json @@ -9,7 +9,6 @@ [ { "base_file": "datawarehouse", - "local_dir": ["datawarehouse.d"], "expected": "xdmod_config_datawarehouse" } ], From a293a24b756f510ebfa9c46503db0a1a41f4c800 Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Mon, 4 Mar 2019 09:57:40 -0500 Subject: [PATCH 11/17] Missed refactor `$configFile` no longer exists so we instead use `CONFIG_DIR` for building the file name to use in case of an exception. --- classes/OpenXdmod/Shredder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/OpenXdmod/Shredder.php b/classes/OpenXdmod/Shredder.php index 17601b4863..7d987e2da1 100644 --- a/classes/OpenXdmod/Shredder.php +++ b/classes/OpenXdmod/Shredder.php @@ -1034,7 +1034,7 @@ protected function getResourceConfig($name) $file = implode( DIRECTORY_SEPARATOR, array( - $configFile->getBaseDir(), + CONFIG_DIR, 'resources.json' ) ); From d3a1be650be9bfd9502e8e761ace928f526d14cd Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Mon, 4 Mar 2019 10:27:19 -0500 Subject: [PATCH 12/17] Updating rawstatistics.realms to an array --- configuration/rawstatistics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/rawstatistics.json b/configuration/rawstatistics.json index c32f99f3cc..0809b81b40 100644 --- a/configuration/rawstatistics.json +++ b/configuration/rawstatistics.json @@ -1,3 +1,3 @@ { - "realms": {} + "realms": [] } From e0acb78cd603eb02576332e483ea931f79a99e57 Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Mon, 4 Mar 2019 11:20:16 -0500 Subject: [PATCH 13/17] Missed Forgot add the `['realms']` qualification to the code that populates `$realmExists`. --- classes/Rest/Controllers/WarehouseControllerProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Rest/Controllers/WarehouseControllerProvider.php b/classes/Rest/Controllers/WarehouseControllerProvider.php index 56b8be4150..1cc157e359 100644 --- a/classes/Rest/Controllers/WarehouseControllerProvider.php +++ b/classes/Rest/Controllers/WarehouseControllerProvider.php @@ -2005,7 +2005,7 @@ private function getJobByPrimaryKey(Application $app, \XDUser $user, $realm, $se $realmExists = count( array_filter( - $rawstats, + $rawstats['realms'], function ($item) use ($realm) { return $item['name'] === $realm; } From c7038b16142ba82e18e456573fa0278d728ec542 Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Mon, 4 Mar 2019 16:12:58 -0500 Subject: [PATCH 14/17] Updating to utilize the new `assocArrayFactory` Now that we have this nice new helper function it makes sense to use it. --- background_scripts/update_check.php | 5 +---- bin/xdmod-admin | 9 ++------- bin/xdmod-setup | 5 +---- classes/DB/FilterListBuilder.php | 16 +++------------- classes/DataWarehouse.php | 4 +--- configuration/linker.php | 11 ++--------- .../controllers/dashboard/get_menu.php | 5 +---- .../controllers/summary/get_config.php | 7 ++----- .../controllers/summary/get_portlets.php | 4 +--- .../ETL/Configuration/EtlConfigurationTest.php | 8 ++------ 10 files changed, 16 insertions(+), 58 deletions(-) diff --git a/background_scripts/update_check.php b/background_scripts/update_check.php index 955d9b0911..85572f6fc1 100755 --- a/background_scripts/update_check.php +++ b/background_scripts/update_check.php @@ -31,14 +31,11 @@ function main() { global $logger; - $configFile = new \Configuration\XdmodConfiguration( + $updateConfig = \Configuration\XdmodConfiguration::assocArrayFactory( 'update_check.json', CONFIG_DIR, $logger ); - $configFile->initialize(); - - $updateConfig = $configFile->toAssocArray(); if (!$updateConfig['enabled']) { exit; diff --git a/bin/xdmod-admin b/bin/xdmod-admin index 49f3041a1e..a6dbbe4784 100755 --- a/bin/xdmod-admin +++ b/bin/xdmod-admin @@ -207,16 +207,11 @@ function listResources() { global $logger; - $configFile = new \Configuration\XdmodConfiguration( + $resourcesConfig = \Configuration\XdmodConfiguration::assocArrayFactory( 'resources.json', CONFIG_DIR, - $logger, - array( - 'force_array_return' => true - ) + $logger ); - $configFile->initialize(); - $resourcesConfig = $configFile->toAssocArray(); foreach ($resourcesConfig as $resourceData) { echo 'Resource: ', $resourceData['resource'], "\n"; diff --git a/bin/xdmod-setup b/bin/xdmod-setup index 39281ed2ae..22d62f14ab 100755 --- a/bin/xdmod-setup +++ b/bin/xdmod-setup @@ -44,13 +44,10 @@ function main() function checkForNewerVersion() { try { - $configFile = new \Configuration\XdmodConfiguration( + $updateConfig = \Configuration\XdmodConfiguration::assocArrayFactory( 'update_check.json', CONFIG_DIR ); - $configFile->initialize(); - - $updateConfig = $configFile->toAssocArray(); if (Version::isNewerVersionAvailable($updateConfig)) { $currVer = Version::getCurrentVersionNumber(); diff --git a/classes/DB/FilterListBuilder.php b/classes/DB/FilterListBuilder.php index a815b2af73..645c9fa4bc 100644 --- a/classes/DB/FilterListBuilder.php +++ b/classes/DB/FilterListBuilder.php @@ -285,21 +285,11 @@ private function checkDimensionForRoles(GroupBy $groupBy) if (!isset(self::$rolesDimensionNames)) { self::$rolesDimensionNames = array(); - $configFile = new \Configuration\XdmodConfiguration( + $roles = \Configuration\XdmodConfiguration::assocArrayFactory( 'roles.json', CONFIG_DIR, - null, - array( - 'local_config_dir' => implode( - DIRECTORY_SEPARATOR, - array(CONFIG_DIR, 'roles.d') - ) - ) - ); - $configFile->initialize(); - - $config = $configFile->toAssocArray(); - $roles = $config['roles']; + null + )['roles']; foreach ($roles as $roleData) { $roleDimensionNames = \xd_utilities\array_get($roleData, 'dimensions', array()); diff --git a/classes/DataWarehouse.php b/classes/DataWarehouse.php index d29b07ca14..90dc50351a 100644 --- a/classes/DataWarehouse.php +++ b/classes/DataWarehouse.php @@ -71,12 +71,10 @@ public function __destruct() */ public static function getPersonIdFromPII($username, $organization) { - $configFile = new \Configuration\XdmodConfiguration( + $config = \Configuration\XdmodConfiguration::assocArrayFactory( 'user_management.json', CONFIG_DIR ); - $configFile->initialize(); - $config = $configFile->toAssocArray(); $query = $config['person_mapping']; $dbh = self::connect(); diff --git a/configuration/linker.php b/configuration/linker.php index 11b425ae13..89eeead5f5 100644 --- a/configuration/linker.php +++ b/configuration/linker.php @@ -221,24 +221,17 @@ function global_uncaught_exception_handler($exception) set_exception_handler('global_uncaught_exception_handler'); // Configurable constants --------------------------- -$organizationConfigFile = new \Configuration\XdmodConfiguration( +$org = \Configuration\XdmodConfiguration::assocArrayFactory( 'organization.json', CONFIG_DIR ); -$organizationConfigFile->initialize(); - - -$org = $organizationConfigFile->toAssocArray(); define('ORGANIZATION_NAME', $org['name']); define('ORGANIZATION_NAME_ABBREV', $org['name']); -$hierarchyConfigFile = new \Configuration\XdmodConfiguration( +$hierarchy = \Configuration\XdmodConfiguration::assocArrayFactory( 'hierarchy.json', CONFIG_DIR ); -$hierarchyConfigFile->initialize(); - -$hierarchy = $hierarchyConfigFile->toAssocArray(); define('HIERARCHY_TOP_LEVEL_LABEL', $hierarchy['top_level_label']); define('HIERARCHY_TOP_LEVEL_INFO', $hierarchy['top_level_info']); define('HIERARCHY_MIDDLE_LEVEL_LABEL', $hierarchy['middle_level_label']); diff --git a/html/internal_dashboard/controllers/dashboard/get_menu.php b/html/internal_dashboard/controllers/dashboard/get_menu.php index 2671dec865..f5b3c25943 100644 --- a/html/internal_dashboard/controllers/dashboard/get_menu.php +++ b/html/internal_dashboard/controllers/dashboard/get_menu.php @@ -6,13 +6,10 @@ */ try { - $configFile = new \Configuration\XdmodConfiguration( + $config = \Configuration\XdmodConfiguration::assocArrayFactory( 'internal_dashboard.json', CONFIG_DIR ); - $configFile->initialize(); - - $config = $configFile->toAssocArray(); $returnData = array( 'success' => true, diff --git a/html/internal_dashboard/controllers/summary/get_config.php b/html/internal_dashboard/controllers/summary/get_config.php index 4ac96bdbff..56fd1091d4 100644 --- a/html/internal_dashboard/controllers/summary/get_config.php +++ b/html/internal_dashboard/controllers/summary/get_config.php @@ -8,13 +8,10 @@ use Log\Summary; try { - $configFile = new \Configuration\XdmodConfiguration( + $config = \Configuration\XdmodConfiguration::assocArrayFactory( 'internal_dashboard.json', - CONFIG_DIR, - null + CONFIG_DIR ); - $configFile->initialize(); - $config = $configFile->toAssocArray(); $summaries = array(); diff --git a/html/internal_dashboard/controllers/summary/get_portlets.php b/html/internal_dashboard/controllers/summary/get_portlets.php index f282fb84a7..22291d3e5a 100644 --- a/html/internal_dashboard/controllers/summary/get_portlets.php +++ b/html/internal_dashboard/controllers/summary/get_portlets.php @@ -8,12 +8,10 @@ use Log\Summary; try { - $configFile = new \Configuration\XdmodConfiguration( + $config = \Configuration\XdmodConfiguration::assocArrayFactory( 'internal_dashboard.json', CONFIG_DIR ); - $configFile->initialize(); - $config = $configFile->toAssocArray(); $portlets = array(); diff --git a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php index 5a580859b6..b3e1fa857b 100644 --- a/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php +++ b/open_xdmod/modules/xdmod/tests/lib/ETL/Configuration/EtlConfigurationTest.php @@ -300,17 +300,13 @@ public function testToAssocArray(array $options) { $baseDir = dirname($this->testFiles->getFile('configuration', '.', 'input')); $baseFile = $this->testFiles->getFile('configuration', $options['base_file'], 'input'); - $configOptions = $options['options']; - $config = new XdmodConfiguration( + $actual = XdmodConfiguration::assocArrayFactory( $baseFile, $baseDir, null, - $configOptions + $options['options'] ); - $config->initialize(); - - $actual = $config->toAssocArray(); $expectedFile = $this->testFiles->getFile('configuration', $options['expected']); if (!is_file($expectedFile)) { From b8221698201f696ab4efaed1e61c6a8470e5ce4f Mon Sep 17 00:00:00 2001 From: Joe White Date: Tue, 5 Mar 2019 10:12:42 -0500 Subject: [PATCH 15/17] Update classes/Rest/Controllers/WarehouseControllerProvider.php per @jpwhite4 Co-Authored-By: ryanrath --- classes/Rest/Controllers/WarehouseControllerProvider.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/Rest/Controllers/WarehouseControllerProvider.php b/classes/Rest/Controllers/WarehouseControllerProvider.php index 1cc157e359..ff6a71d70b 100644 --- a/classes/Rest/Controllers/WarehouseControllerProvider.php +++ b/classes/Rest/Controllers/WarehouseControllerProvider.php @@ -1403,7 +1403,13 @@ private function getJobDataSet(XDUser $user, $realm, $jobId, $action) { $rawstats = XdmodConfiguration::assocArrayFactory('rawstatistics.json', CONFIG_DIR); - $realmExists = count( + $realmExists = false; + foreach ($rawstats as $item) { + if ($item['name'] === $realm) { + $realmExists = true; + break; + } + } array_filter( $rawstats, function ($item) use ($realm) { From 1bf6611bdeeeb73a6bdf873adbf739acd14ab08d Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Tue, 5 Mar 2019 10:25:17 -0500 Subject: [PATCH 16/17] Fixing Syntax --- classes/Rest/Controllers/WarehouseControllerProvider.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/classes/Rest/Controllers/WarehouseControllerProvider.php b/classes/Rest/Controllers/WarehouseControllerProvider.php index ff6a71d70b..cac16074e7 100644 --- a/classes/Rest/Controllers/WarehouseControllerProvider.php +++ b/classes/Rest/Controllers/WarehouseControllerProvider.php @@ -1410,13 +1410,6 @@ private function getJobDataSet(XDUser $user, $realm, $jobId, $action) break; } } - array_filter( - $rawstats, - function ($item) use ($realm) { - return $item['name'] === $realm; - } - ) - ) > 0; if (!$realmExists) { throw new \DataWarehouse\Query\Exceptions\AccessDeniedException; From e14f2448445c77bab74eea2f268464c3b15c0173 Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Thu, 7 Mar 2019 13:55:25 -0500 Subject: [PATCH 17/17] Only process `extends` if not a local config file --- classes/Configuration/XdmodConfiguration.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/classes/Configuration/XdmodConfiguration.php b/classes/Configuration/XdmodConfiguration.php index c7731235d3..42b7b4c321 100644 --- a/classes/Configuration/XdmodConfiguration.php +++ b/classes/Configuration/XdmodConfiguration.php @@ -69,17 +69,18 @@ protected function processExtends() { // This objects `transformedConfig` may be an object or an array of objects, this is handled // by the following `if/elseif` statement. - if (is_array($this->transformedConfig)) { - foreach($this->transformedConfig as $key => &$value) { - if (is_object($value)) { - $this->handleExtendsFor($value); + if (!$this->isLocalConfig) { + if (is_array($this->transformedConfig)) { + foreach($this->transformedConfig as $key => &$value) { + if (is_object($value)) { + $this->handleExtendsFor($value); + } } - } - } elseif(is_object($this->transformedConfig)) { - $this->handleExtendsFor($this->transformedConfig); + } elseif(is_object($this->transformedConfig)) { + $this->handleExtendsFor($this->transformedConfig); + } } - } // processExtends /**