From bfa9434e1a237929a5ad5433ba5544a04713496c Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Wed, 10 May 2017 14:34:18 -0400 Subject: [PATCH] Removing sql files per code review comment - These are no longer needed as the data resides in etl_data.d/acls/xdmod/*.json files. --- .../etl_sql.d/acls/xdmod/acl_group_bys.sql | 3928 ----------------- .../etl_sql.d/acls/xdmod/acl_hierarchies.sql | 60 - .../etl/etl_sql.d/acls/xdmod/acl_tabs.sql | 1384 ------ .../etl/etl_sql.d/acls/xdmod/acl_types.sql | 52 - .../etl/etl_sql.d/acls/xdmod/acls.sql | 196 - .../etl/etl_sql.d/acls/xdmod/group_bys.sql | 659 --- .../etl/etl_sql.d/acls/xdmod/hierarchies.sql | 39 - .../etl/etl_sql.d/acls/xdmod/module.sql | 9 - .../acls/xdmod/module_stored_procedures.sql | 71 - .../etl/etl_sql.d/acls/xdmod/realms.sql | 21 - .../etl/etl_sql.d/acls/xdmod/statistics.sql | 3697 ---------------- .../acls/xdmod/statistics_hierarchy.sql | 562 --- .../etl/etl_sql.d/acls/xdmod/tabs.sql | 142 - 13 files changed, 10820 deletions(-) delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/acl_group_bys.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/acl_hierarchies.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/acl_tabs.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/acl_types.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/acls.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/group_bys.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/hierarchies.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/module.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/module_stored_procedures.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/realms.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/statistics.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/statistics_hierarchy.sql delete mode 100644 configuration/etl/etl_sql.d/acls/xdmod/tabs.sql diff --git a/configuration/etl/etl_sql.d/acls/xdmod/acl_group_bys.sql b/configuration/etl/etl_sql.d/acls/xdmod/acl_group_bys.sql deleted file mode 100644 index 05b2a61d7e..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/acl_group_bys.sql +++ /dev/null @@ -1,3928 +0,0 @@ --- ============================================================================= --- NAME: acl_group_bys.sql --- EXECUTION: once on installation --- PURPOSE: Provide initial population of the acl_group_bys ( these were --- previously known as query descripters). This file was created by --- capturing the output of `query_descripters.py path/to/roles.json`. --- This script was executed for roles.json and for every file in --- roles.d. Currently the script resides in a separate tool project --- but will be incorporated shortly. --- ============================================================================= - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'none') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'allocation') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'fieldofscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'gateway') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'grant_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'jobsize') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'jobwalltime') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'nodecount') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'nsfdirectorate') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'parentscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'pi') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'pi_institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'queue') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'resource') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'resource_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'provider') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - False AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'username') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'person') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pub' - AND gb.name = 'nsfstatus') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'none') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'allocation') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'fieldofscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'gateway') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'grant_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'jobsize') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'jobwalltime') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'nodecount') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'nsfdirectorate') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'parentscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'pi') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'pi_institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'queue') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'resource') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'resource_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'provider') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'username') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'person') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cd' - AND gb.name = 'nsfstatus') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'none') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'allocation') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'fieldofscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'gateway') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'grant_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'jobsize') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'jobwalltime') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'nodecount') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'nsfdirectorate') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'parentscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'pi') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'pi_institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'queue') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'resource') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'resource_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'provider') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'username') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'person') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'mgr' - AND gb.name = 'nsfstatus') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'none') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'allocation') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'fieldofscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'gateway') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'grant_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'jobsize') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'jobwalltime') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'nodecount') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'nsfdirectorate') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'parentscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'pi') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'pi_institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'queue') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'resource') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'resource_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'provider') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'username') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'person') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'usr' - AND gb.name = 'nsfstatus') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'none') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'allocation') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'fieldofscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'gateway') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'grant_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'jobsize') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'jobwalltime') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'nodecount') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'nsfdirectorate') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'parentscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'pi') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'pi_institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'queue') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'resource') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'resource_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'provider') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'username') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'person') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'pi' - AND gb.name = 'nsfstatus') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'none') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'allocation') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'fieldofscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'gateway') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'grant_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'jobsize') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'jobwalltime') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'nodecount') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'nsfdirectorate') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'parentscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'pi') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'pi_institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'queue') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'resource') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'resource_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'provider') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'username') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'person') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'po' - AND gb.name = 'nsfstatus') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'none') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'allocation') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'fieldofscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'gateway') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'grant_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'jobsize') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'jobwalltime') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'nodecount') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'nsfdirectorate') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'parentscience') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'pi') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'pi_institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'queue') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'resource') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'resource_type') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'provider') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'username') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'person') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'institution') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; - - - -INSERT INTO acl_group_bys (acl_id, realm_id, group_by_id, statistic_id, visible, enabled) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - r.realm_id AS realm_id, - gb.group_by_id AS group_by_id, - s.statistic_id AS statistic_id, - True AS visible, - True AS enabled - FROM statistics s, realms r, - acls a, group_bys gb - WHERE - s.realm_id = r.realm_id - AND gb.realm_id = r.realm_id - AND r.name = LOWER('Jobs') - AND a.name = 'cc' - AND gb.name = 'nsfstatus') inc - LEFT JOIN acl_group_bys cur - ON cur.acl_id = inc.acl_id - AND cur.realm_id = inc.realm_id - AND cur.group_by_id = inc.group_by_id - AND cur.statistic_id = inc.statistic_id - WHERE - cur.acl_group_by_id IS NULL; \ No newline at end of file diff --git a/configuration/etl/etl_sql.d/acls/xdmod/acl_hierarchies.sql b/configuration/etl/etl_sql.d/acls/xdmod/acl_hierarchies.sql deleted file mode 100644 index 8c9edf790b..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/acl_hierarchies.sql +++ /dev/null @@ -1,60 +0,0 @@ --- ============================================================================= --- NAME: acl_hierarchies.sql --- EXECUTION: once on installation --- PURPOSE: Provides the initial 'acl_hierarchy' data that is required by this --- module. --- ============================================================================= - -INSERT INTO ${DESTINATION_SCHEMA}.acl_hierarchies (acl_id, hierarchy_id, level, filter_override) - SELECT inc.* - FROM ( - SELECT - a.acl_id acl_id, - h.hierarchy_id AS hierarchy_id, - 0 AS level, - 1 AS filter_override - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.hierarchies h - WHERE a.name = 'usr' - AND h.name = 'acl_hierarchy') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_hierarchies cur - ON cur.acl_id = inc.acl_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - AND cur.filter_override = inc.filter_override - WHERE cur.acl_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_hierarchies (acl_id, hierarchy_id, level, filter_override) - SELECT inc.* - FROM ( - SELECT - a.acl_id acl_id, - h.hierarchy_id AS hierarchy_id, - 1 AS level, - 1 AS filter_override - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.hierarchies h - WHERE a.name = 'po' - AND h.name = 'acl_hierarchy') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_hierarchies cur - ON cur.acl_id = inc.acl_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - AND cur.filter_override = inc.filter_override - WHERE cur.acl_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_hierarchies (acl_id, hierarchy_id, level, filter_override) - SELECT inc.* - FROM ( - SELECT - a.acl_id acl_id, - h.hierarchy_id AS hierarchy_id, - 2 AS level, - 1 AS filter_override - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.hierarchies h - WHERE a.name = 'cs' - AND h.name = 'acl_hierarchy') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_hierarchies cur - ON cur.acl_id = inc.acl_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - AND cur.filter_override = inc.filter_override - WHERE cur.acl_hierarchy_id IS NULL; diff --git a/configuration/etl/etl_sql.d/acls/xdmod/acl_tabs.sql b/configuration/etl/etl_sql.d/acls/xdmod/acl_tabs.sql deleted file mode 100644 index e819ee5019..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/acl_tabs.sql +++ /dev/null @@ -1,1384 +0,0 @@ --- ============================================================================= --- NAME: acl_tabs.sql --- EXECUTION: once on installation --- PURPOSE: Provide initial population of the acl_tabs table. This file was --- created by manually processing the roles.json file. In particular --- going through the 'permitted_modules' sections for each role. --- ============================================================================= --- mgr acl tabs -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'mgr' - AND t.name = 'tg_summary' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'mgr' - AND t.name = 'tg_usage' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'mgr' - AND t.name = 'metric_explorer' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'mgr' - AND t.name = 'my_allocations' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'mgr' - AND t.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'mgr' - AND t.name = 'report_generator' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'mgr' - AND t.name = 'about_xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND a.name = 'mgr' - AND t.name = 'app_kernel_viewer' - AND tpt.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'mgr' - AND t.name = 'app_kernel_explorer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'mgr' - AND t.name = 'app_kernel_notification' - AND tpt.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; --- mgr acl tabs 10 - --- cd acl tabs -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cd' - AND t.name = 'tg_summary' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cd' - AND t.name = 'tg_usage' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cd' - AND t.name = 'metric_explorer' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cd' - AND t.name = 'my_allocations' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cd' - AND t.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cd' - AND t.name = 'report_generator' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cd' - AND t.name = 'about_xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cd' - AND t.name = 'compliance' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'cd' - AND t.name = 'app_kernel_viewer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'cd' - AND t.name = 'app_kernel_explorer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'cd' - AND t.name = 'app_kernel_notification' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; --- cd acl tabs 11 - --- cs acl tabs -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cs' - AND t.name = 'tg_summary' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cs' - AND t.name = 'tg_usage' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cs' - AND t.name = 'metric_explorer' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cs' - AND t.name = 'my_allocations' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cs' - AND t.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cs' - AND t.name = 'report_generator' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cs' - AND t.name = 'about_xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cs' - AND t.name = 'compliance' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'cs' - AND t.name = 'app_kernel_viewer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'cs' - AND t.name = 'app_kernel_explorer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'cs' - AND t.name = 'app_kernel_notification' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; --- cs acl tabs 11 - --- po acl tabs -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'tg_summary' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'tg_usage' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'metric_explorer' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'my_allocations' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'report_generator' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'about_xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'compliance' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'custom_query' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'po' - AND t.name = 'sci_impact' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'po' - AND t.name = 'app_kernel_viewer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'po' - AND t.name = 'app_kernel_explorer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'po' - AND t.name = 'app_kernel_notification' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; --- po acl tabs 13 - --- usr acl tabs -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'usr' - AND t.name = 'tg_summary' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'usr' - AND t.name = 'tg_usage' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'usr' - AND t.name = 'metric_explorer' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'usr' - AND t.name = 'my_allocations' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'usr' - AND t.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'usr' - AND t.name = 'report_generator' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'usr' - AND t.name = 'about_xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'usr' - AND t.name = 'app_kernel_viewer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'usr' - AND t.name = 'app_kernel_explorer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; --- usr acl tabs 9 - --- pi acl tabs -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pi' - AND t.name = 'tg_summary' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pi' - AND t.name = 'tg_usage' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pi' - AND t.name = 'metric_explorer' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pi' - AND t.name = 'my_allocations' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pi' - AND t.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pi' - AND t.name = 'report_generator' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pi' - AND t.name = 'about_xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'pi' - AND t.name = 'app_kernel_viewer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'pi' - AND t.name = 'app_kernel_explorer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; --- pi acl tabs 9 - --- cc acl tabs -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cc' - AND t.name = 'tg_summary' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cc' - AND t.name = 'tg_usage' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cc' - AND t.name = 'metric_explorer' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cc' - AND t.name = 'my_allocations' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cc' - AND t.name = 'app_kernels' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cc' - AND t.name = 'report_generator' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'cc' - AND t.name = 'about_xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'cc' - AND t.name = 'app_kernel_viewer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, parent_acl_tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id AS acl_id, - t.tab_id AS tab_id, - pt.acl_tab_id AS acl_parent_tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t, ${DESTINATION_SCHEMA}.acl_tabs pt, ${DESTINATION_SCHEMA}.tabs tpt - WHERE pt.tab_id = tpt.tab_id - AND pt.acl_id = a.acl_id - AND a.name = 'cc' - AND t.name = 'app_kernel_explorer' - AND tpt.name = 'app_kernels' - - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; --- cc acl tabs - --- pub acl tabs -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pub' - AND t.name = 'tg_summary' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pub' - AND t.name = 'tg_usage' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_tabs (acl_id, tab_id, position, is_default) - SELECT inc.* - FROM ( - SELECT - a.acl_id, - t.tab_id, - NULL AS position, - NULL AS is_default - FROM ${DESTINATION_SCHEMA}.acls a, ${DESTINATION_SCHEMA}.tabs t - WHERE a.name = 'pub' - AND t.name = 'about_xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.acl_tabs cur - ON cur.acl_id = inc.acl_id - AND cur.tab_id = inc.tab_id - WHERE cur.acl_tab_id IS NULL; --- pub acl tabs diff --git a/configuration/etl/etl_sql.d/acls/xdmod/acl_types.sql b/configuration/etl/etl_sql.d/acls/xdmod/acl_types.sql deleted file mode 100644 index eaeb7cfd31..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/acl_types.sql +++ /dev/null @@ -1,52 +0,0 @@ - --- ============================================================================= --- NAME: acl_types.sql --- EXECUTION: once on installation --- PURPOSE: Provide initial population of the acl_types table. This file was --- created manually based on information gathered in previous --- conversations / meetings. --- ============================================================================= -INSERT INTO ${DESTINATION_SCHEMA}.acl_types(module_id, name, display) -SELECT inc.* -FROM ( - SELECT - m.module_id, - 'data' as name, - 'Data' as display - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc -LEFT JOIN ${DESTINATION_SCHEMA}.acl_types cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display -WHERE cur.acl_type_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_types(module_id, name, display) -SELECT inc.* -FROM ( - SELECT - m.module_id, - 'feature' as name, - 'Feature' as display - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc -LEFT JOIN ${DESTINATION_SCHEMA}.acl_types cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - WHERE cur.acl_type_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acl_types(module_id, name, display) -SELECT inc.* -FROM ( - SELECT - m.module_id, - 'flag' as name, - 'Flag' as display - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc -LEFT JOIN ${DESTINATION_SCHEMA}.acl_types cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - WHERE cur.acl_type_id IS NULL; diff --git a/configuration/etl/etl_sql.d/acls/xdmod/acls.sql b/configuration/etl/etl_sql.d/acls/xdmod/acls.sql deleted file mode 100644 index 153f777721..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/acls.sql +++ /dev/null @@ -1,196 +0,0 @@ --- ============================================================================= --- NAME: acls.sql --- EXECUTION: once on installation --- PURPOSE: Provide initial population of the acl_types table. This file was --- created manually based on information gathered in previous --- conversations / meetings and our current set of 'Roles'. --- ============================================================================= --- -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'flag') AS acl_type_id, - 'mgr' AS NAME, - 'Manager' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'flag') AS acl_type_id, - 'dev' AS NAME, - 'Developer' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'data') AS acl_type_id, - 'usr' AS NAME, - 'User' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'data') AS acl_type_id, - 'po' AS NAME, - 'Program Officer' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'data') AS acl_type_id, - 'cs' AS NAME, - 'Center Staff' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'feature') AS acl_type_id, - 'cd' AS NAME, - 'Center Director' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'flag') AS acl_type_id, - 'pi' AS NAME, - 'Principal Investigator' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'flag') AS acl_type_id, - 'cc' AS NAME, - 'Campus Champion' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.acls (module_id, acl_type_id, name, display, enabled) - SELECT inc.* - FROM ( - SELECT - m.module_id, - (SELECT AT.acl_type_id - FROM ${DESTINATION_SCHEMA}.acl_types AT - WHERE AT.name = 'flag') AS acl_type_id, - 'pub' AS NAME, - 'Public' AS display, - TRUE AS enabled - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.acls cur - ON inc.module_id = cur.module_id - AND inc.acl_type_id = cur.acl_type_id - AND inc.name = cur.name - AND inc.display = cur.display - AND inc.enabled = cur.enabled - WHERE cur.acl_id IS NULL; diff --git a/configuration/etl/etl_sql.d/acls/xdmod/group_bys.sql b/configuration/etl/etl_sql.d/acls/xdmod/group_bys.sql deleted file mode 100644 index 168ff8a819..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/group_bys.sql +++ /dev/null @@ -1,659 +0,0 @@ --- ============================================================================= --- NAME: group_bys.sql --- EXECUTION: once on installation --- PURPOSE: Provide initial population of the group_bys table. This file was --- created programmatically by utilizing a tool called 'parser' that --- was written expressly for the purpose of processing existing PHP --- files ( within a provided directory ) and extracting the --- information required to create these INSERT statements. The tool, --- while not currently part of the XDMoD repo will be shortly. --- ============================================================================= - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'allocation' AS name, - 'Allocation' AS display, - 'modw' AS schema_name, - 'allocation' AS table_name, - 'al' AS alias, - 'account_id' AS id_column, - 'long_name' AS name_column, - 'short_name' AS shortname_column, - 'order_id' AS order_id_column, - 'account_id' AS fk_column, - 'A funded project that is allowed to run jobs on resources.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByAllocation' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'grant_type' AS name, - 'Grant Type' AS display, - 'modw' AS schema_name, - 'account' AS table_name, - 'acc' AS alias, - 'id' AS id_column, - 'name' AS name_column, - 'name' AS shortname_column, - 'name' AS order_id_column, - 'id' AS fk_column, - 'A categorization of the projects/allocations.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByGrantType' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'institution' AS name, - 'User Institution' AS display, - 'modw' AS schema_name, - 'organization' AS table_name, - 'o' AS alias, - 'id' AS id_column, - 'long_name' AS name_column, - 'short_name' AS shortname_column, - 'order_id' AS order_id_column, - 'id' AS fk_column, - 'Organizations that have users with allocations.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByInstitution' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'jobsize' AS name, - 'Job Size' AS display, - 'modw' AS schema_name, - 'processor_buckets' AS table_name, - 'pb' AS alias, - 'id' AS id_column, - 'description' AS name_column, - 'description' AS shortname_column, - 'id' AS order_id_column, - 'id' AS fk_column, - 'A categorization of jobs into discrete groups based on the number of cores used by each job.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByJobSize' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'jobwalltime' AS name, - 'Job Wall Time' AS display, - 'modw' AS schema_name, - 'job_times' AS table_name, - 'jt' AS alias, - 'id' AS id_column, - 'description' AS name_column, - 'description' AS shortname_column, - 'id' AS order_id_column, - 'id' AS fk_column, - 'A categorization of jobs into discrete groups based on the total linear time each job took to execute.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByJobTime' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'nsfdirectorate' AS name, - 'NSF Directorate' AS display, - 'modw' AS schema_name, - 'fieldofscience_hierarchy' AS table_name, - 'fos' AS alias, - 'directorate_id' AS id_column, - 'directorate_description' AS name_column, - 'directorate_abbrev' AS shortname_column, - 'directorate_description' AS order_id_column, - 'directorate_id' AS fk_column, - 'The NSF directorate of the field of science indiciated on the allocation request pertaining to the running jobs.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByNSFDirectorate' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'nsfstatus' AS name, - 'User NSF Status' AS display, - 'modw' AS schema_name, - 'nsfstatuscode' AS table_name, - 'ns' AS alias, - 'id' AS id_column, - 'name' AS name_column, - 'name' AS shortname_column, - 'name' AS order_id_column, - 'id' AS fk_column, - 'Categorization of the users who ran jobs.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByNSFStatus' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'nodecount' AS name, - 'Node Count' AS display, - 'modw' AS schema_name, - 'nodecount' AS table_name, - 'n' AS alias, - 'id' AS id_column, - 'nodes' AS name_column, - 'nodes' AS shortname_column, - 'id' AS order_id_column, - 'id' AS fk_column, - 'A categorization of jobs into discrete groups based on node count.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByNodeCount' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'pi' AS name, - 'PI' AS display, - 'modw' AS schema_name, - 'piperson' AS table_name, - 'pip' AS alias, - 'person_id' AS id_column, - 'long_name' AS name_column, - 'short_name' AS shortname_column, - 'order_id' AS order_id_column, - 'person_id' AS fk_column, - 'The principal investigator of a project has a valid allocation, which can be used by him/her or the members of the project to run jobs on.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByPI' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'pi_institution' AS name, - 'PI Institution' AS display, - 'modw' AS schema_name, - 'organization' AS table_name, - 'o' AS alias, - 'id' AS id_column, - 'long_name' AS name_column, - 'short_name' AS shortname_column, - 'order_id' AS order_id_column, - 'id' AS fk_column, - 'Organizations that have PIs with allocations.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByPIInstitution' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'parentscience' AS name, - 'Parent Science' AS display, - 'modw' AS schema_name, - 'fieldofscience_hierarchy' AS table_name, - 'fos' AS alias, - 'parent_id' AS id_column, - 'parent_description' AS name_column, - 'parent_description' AS shortname_column, - 'parent_description' AS order_id_column, - 'parent_id' AS fk_column, - 'The parent of the field of science indiciated on the allocation request pertaining to the running jobs.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByParentScience' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'person' AS name, - 'User' AS display, - 'modw' AS schema_name, - 'person' AS table_name, - 'p' AS alias, - 'id' AS id_column, - 'long_name' AS name_column, - 'short_name' AS shortname_column, - 'order_id' AS order_id_column, - 'id' AS fk_column, - 'A person who is on a PIs allocation, hence able run jobs on resources.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByPerson' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'provider' AS name, - 'Service Provider' AS display, - 'modw' AS schema_name, - 'serviceprovider' AS table_name, - 'sp' AS alias, - 'organization_id' AS id_column, - 'short_name' AS name_column, - 'short_name' AS shortname_column, - 'order_id' AS order_id_column, - 'organization_id' AS fk_column, - 'A service provider is an institution that hosts resources.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByProvider' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'queue' AS name, - 'Queue' AS display, - 'modw' AS schema_name, - 'queue' AS table_name, - 'q' AS alias, - 'id' AS id_column, - 'id' AS name_column, - 'id' AS shortname_column, - 'id' AS order_id_column, - 'id' AS fk_column, - 'Queue pertains to the low level job queues on each resource.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByQueue' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'resource' AS name, - 'Resource' AS display, - 'modw' AS schema_name, - 'resourcefact' AS table_name, - 'rf' AS alias, - 'id' AS id_column, - 'code' AS name_column, - 'code' AS shortname_column, - 'code' AS order_id_column, - 'id' AS fk_column, - 'A resource is a remote computer that can run jobs.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByResource' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'resource_type' AS name, - 'Resource Type' AS display, - 'modw' AS schema_name, - 'resourcetype' AS table_name, - 'rt' AS alias, - 'id' AS id_column, - 'description' AS name_column, - 'abbrev' AS shortname_column, - 'description' AS order_id_column, - 'id' AS fk_column, - 'A categorization of resources into by their general capabilities.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByResourceType' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'fieldofscience' AS name, - 'Field of Science' AS display, - 'modw' AS schema_name, - 'fieldofscience_hierarchy' AS table_name, - 'fos' AS alias, - 'id' AS id_column, - 'description' AS name_column, - 'description' AS shortname_column, - 'order_id' AS order_id_column, - 'id' AS fk_column, - 'The field of science indicated on the allocation request pertaining to the running jobs.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByScience' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.group_bys (module_id, realm_id, name, display, schema_name, table_name, alias, id_column, name_column, shortname_column, order_id_column, fk_column, description, class) -SELECT inc.* -FROM ( - SELECT - m.module_id as module_id, - r.realm_id, - 'username' AS name, - 'System Username' AS display, - 'modw' AS schema_name, - 'systemaccount' AS table_name, - 'sa' AS alias, - 'username' AS id_column, - 'username' AS name_column, - 'username' AS shortname_column, - 'username' AS order_id_column, - 'username' AS fk_column, - 'The specific system username of the users who ran jobs.' as description, - 'DataWarehouse/Query/Jobs/GroupBys/GroupByUsername' AS class -FROM ${DESTINATION_SCHEMA}.modules m, ${DESTINATION_SCHEMA}.realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN ${DESTINATION_SCHEMA}.group_bys cur - ON cur.module_id = inc.module_id - AND cur.display = inc.display - AND cur.schema_name = inc.schema_name - AND cur.table_name = inc.table_name - AND cur.alias = inc.alias - AND cur.id_column = inc.id_column - AND cur.name_column = inc.name_column - AND cur.shortname_column = inc.shortname_column - AND cur.order_id_column = inc.order_id_column - AND cur.fk_column = inc.fk_column - AND cur.description = inc.description - AND cur.class = inc.class -WHERE cur.group_by_id IS NULL; - diff --git a/configuration/etl/etl_sql.d/acls/xdmod/hierarchies.sql b/configuration/etl/etl_sql.d/acls/xdmod/hierarchies.sql deleted file mode 100644 index 8c20d7653e..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/hierarchies.sql +++ /dev/null @@ -1,39 +0,0 @@ --- ============================================================================= --- NAME: hierarchies.sql --- EXECUTION: once on installation --- PURPOSE: Provide initial population of the hierarchies table. This file was --- generated manually based on structural requirements identified --- earlier in the project. --- ============================================================================= - -INSERT INTO ${DESTINATION_SCHEMA}.hierarchies (`module_id`, `name`, `display`) - SELECT inc.* - FROM ( - SELECT - m.module_id AS module_id, - 'acl_hierarchy' AS name, - 'ACL Hierarchy' AS display - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.hierarchies cur - ON - cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - WHERE cur.hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.hierarchies (`module_id`, `name`, `display`) - SELECT inc.* - FROM ( - SELECT - m.module_id AS module_id, - 'statistic_hierarchy' AS name, - 'Statistic Hierarchy' AS display - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc - LEFT JOIN ${DESTINATION_SCHEMA}.hierarchies cur - ON - cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - WHERE cur.hierarchy_id IS NULL; diff --git a/configuration/etl/etl_sql.d/acls/xdmod/module.sql b/configuration/etl/etl_sql.d/acls/xdmod/module.sql deleted file mode 100644 index 2733d0afd0..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/module.sql +++ /dev/null @@ -1,9 +0,0 @@ --- ============================================================================= --- NAME: modules.sql --- EXECUTION: once on installation --- PURPOSE: Provides some initial data for the module / module_versions table. --- This file was generated manually based on knowledge of the --- currently supported modules. --- ============================================================================= - -CALL ${DESTINATION_SCHEMA}.add_module_with_version('xdmod', 'XDMoD', 6, 5, 0, ''); diff --git a/configuration/etl/etl_sql.d/acls/xdmod/module_stored_procedures.sql b/configuration/etl/etl_sql.d/acls/xdmod/module_stored_procedures.sql deleted file mode 100644 index ad903fb0f3..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/module_stored_procedures.sql +++ /dev/null @@ -1,71 +0,0 @@ --- ============================================================================= --- NAME: module_stored_procedures.sql --- EXECUTION: once on installation --- PURPOSE: Provides some helper procedures to ease dealing with modules and --- their associated versions. --- ============================================================================= - -DROP PROCEDURE IF EXISTS ${DESTINATION_SCHEMA}.add_module_with_version; - -CREATE PROCEDURE ${DESTINATION_SCHEMA}.add_module_with_version - (IN _name VARCHAR(255), - IN _display VARCHAR(1024), - IN _version_major INTEGER, - IN _version_minor INTEGER, - IN _version_micro INTEGER, - IN _version_patch VARCHAR(12) - ) - BEGIN - DECLARE moduleVersionId INT; - DECLARE moduleId INT; - - INSERT INTO ${DESTINATION_SCHEMA}.module_versions (module_id, version_major, version_minor, version_micro, version_patch, created_on, last_modified_on) - VALUES - (0, _version_major, _version_minor, _version_micro, _version_patch, NOW(), - NOW()); - SET moduleVersionId = LAST_INSERT_ID(); - - INSERT INTO ${DESTINATION_SCHEMA}.modules (name, current_version_id, display, enabled) - VALUES (_name, moduleVersionId, _display, TRUE); - - SET moduleId = LAST_INSERT_ID(); - UPDATE ${DESTINATION_SCHEMA}.module_versions - SET module_id = moduleId - WHERE module_version_id = moduleVersionId; - END; - --- -DROP PROCEDURE IF EXISTS ${DESTINATION_SCHEMA}.add_module_with_default_version; - -CREATE PROCEDURE ${DESTINATION_SCHEMA}.add_module_with_default_version - ( - IN _name VARCHAR(255), - IN _display VARCHAR(1024) - ) - BEGIN - CALL ${DESTINATION_SCHEMA}.add_module_with_version(_name, _display, 0, 0, 1, ''); - END --- -DROP PROCEDURE IF EXISTS ${DESTINATION_SCHEMA}.add_module_version; - -CREATE PROCEDURE ${DESTINATION_SCHEMA}.add_module_version - ( - IN _name VARCHAR(255), - IN _version_major INT, - IN _version_minor INT, - IN _version_micro INT, - IN _version_patch VARCHAR(12) - ) - BEGIN - DECLARE moduleId, moduleVersionId INT; - - SELECT module_id INTO moduleId FROM ${DESTINATION_SCHEMA}.modules WHERE name = _name; - - INSERT INTO ${DESTINATION_SCHEMA}.module_versions(module_id, version_major, version_minor, version_micro, version_patch) - VALUES(moduleId, _version_major, _version_minor, _version_micro, _version_patch); - SET moduleVersionId = LAST_INSERT_ID(); - - UPDATE ${DESTINATION_SCHEMA}.modules SET current_version_id = moduleVersionId WHERE module_id = moduleId; - - END - diff --git a/configuration/etl/etl_sql.d/acls/xdmod/realms.sql b/configuration/etl/etl_sql.d/acls/xdmod/realms.sql deleted file mode 100644 index 882cbbe0b6..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/realms.sql +++ /dev/null @@ -1,21 +0,0 @@ --- ============================================================================= --- NAME: realms.sql --- EXECUTION: once on installation --- PURPOSE: Provides the initial 'realms' that this module supports. --- ============================================================================= - -INSERT INTO ${DESTINATION_SCHEMA}.realms (module_id, name, display, table_name, schema_name) - SELECT inc.* - FROM ( - SELECT - m.module_id AS module_id, - 'jobs' AS name, - 'Jobs' AS display, - 'jobfact' AS table_name, - 'modw_aggregates' AS schema_name - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod') inc LEFT JOIN ${DESTINATION_SCHEMA}.realms cur - ON cur.module_id = inc.module_id AND cur.name = inc.name AND - cur.display = inc.display AND cur.table_name = inc.table_name AND - cur.schema_name = inc.schema_name - WHERE cur.realm_id IS NULL; \ No newline at end of file diff --git a/configuration/etl/etl_sql.d/acls/xdmod/statistics.sql b/configuration/etl/etl_sql.d/acls/xdmod/statistics.sql deleted file mode 100644 index 9aacf9c2b2..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/statistics.sql +++ /dev/null @@ -1,3697 +0,0 @@ -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'active_allocation_count' AS NAME, - 'Number of Allocations: Active' AS display, - 'active_allocation_count' AS alias, - 'Number of Allocations' AS unit, - '0'+0 AS decimals, - 'count(distinct(jf.account_id))' AS formula, - 'The total number of funded projects that used resources.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'active_institution_count' AS NAME, - 'Number of Institutions: Active' AS display, - 'active_institution_count' AS alias, - 'Number of Institutions' AS unit, - '0'+0 AS decimals, - 'count(distinct(jf.person_organization_id))' AS formula, - 'The total number of institutions that used resources.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'active_pi_count' AS NAME, - 'Number of PIs: Active' AS display, - 'active_pi_count' AS alias, - 'Number of PIs' AS unit, - '0'+0 AS decimals, - 'count(distinct(jf.principalinvestigator_person_id))' AS formula, - 'The total number of PIs that used resources.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'active_resource_count' AS NAME, - 'Number of Resources: Active' AS display, - 'active_resource_count' AS alias, - 'Number of Resources' AS unit, - '0'+0 AS decimals, - 'count(distinct(jf.resource_id))' AS formula, - 'The total number of active resources.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'active_person_count' AS NAME, - 'Number of Users: Active' AS display, - 'active_person_count' AS alias, - 'Number of Users' AS unit, - '0'+0 AS decimals, - 'count(distinct(jf.person_id))' AS formula, - 'The total number of users that used resources.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_cpu_hours' AS NAME, - 'CPU Hours: Per Job' AS display, - 'avg_cpu_hours' AS alias, - 'CPU Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sum(jf.cpu_time/3600.0)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),0)' AS formula, - 'The average CPU hours (number of CPU cores x wall time hours) per job.
For each job, the CPU usage is aggregated. For example, if a job used 1000 CPUs for one minute, it would be aggregated as 1000 CPU minutes or 16.67 CPU hours.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_node_hours' AS NAME, - 'Node Hours: Per Job' AS display, - 'avg_node_hours' AS alias, - 'Node Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sum(jf.node_time/3600.0)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),0)' AS formula, - 'The average node hours (number of nodes x wall time hours) per job.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_processors' AS NAME, - 'Job Size: Per Job' AS display, - 'avg_processors' AS alias, - 'Core Count' AS unit, - '1'+0 AS decimals, - 'coalesce(ceil(sum(jf.processors*jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')),0)' AS formula, - 'The average job size per job.
Job Size: The number of processor cores used by a (parallel) job.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_waitduration_hours' AS NAME, - 'Wait Hours: Per Job' AS display, - 'avg_waitduration_hours' AS alias, - 'Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sum(jf.waitduration/3600.0)/sum(jf.started_job_count),0)' AS formula, - 'The average time, in hours, a job waits before execution on the designated resource.
Wait Time: Wait time is defined as the linear time between submission of a job by a user until it begins to execute.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_wallduration_hours' AS NAME, - 'Wall Hours: Per Job' AS display, - 'avg_wallduration_hours' AS alias, - 'Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sum(jf.wallduration/3600.0)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),0)' AS formula, - 'The average time, in hours, a job takes to execute.
Wall Time: Wall time is defined as the linear time between start and end time of execution for a particular job.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'expansion_factor' AS NAME, - 'User Expansion Factor' AS display, - 'expansion_factor' AS alias, - 'User Expansion Factor' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.sum_weighted_expansion_factor)/sum(jf.sum_job_weights),0)' AS formula, - 'Gauging job-turnaround time, it measures the ratio of wait time and the total time from submission to end of execution.
User Expansion Factor = ((wait duration + wall duration) / wall duration). ' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'job_count' AS NAME, - 'Number of Jobs Ended' AS display, - 'job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.job_count),0)' AS formula, - 'The total number of jobs that ended within the selected duration.
Job: A scheduled process for a computer resource in a batch processing environment.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_job_size_weighted_by_cpu_hours' AS NAME, - 'Job Size: Weighted By CPU Hours' AS display, - 'avg_job_size_weighted_by_cpu_hours' AS alias, - 'Core Count' AS unit, - '1'+0 AS decimals, - ' - COALESCE( - SUM(jf.processors * jf.cpu_time) / SUM(jf.cpu_time), - 0 - ) - ' AS formula, - 'The average job size weighted by CPU Hours. Defined as
Average Job Size Weighted By CPU Hours: sum(i = 0 to n){job i core count*job i cpu hours}/sum(i = 0 to n){job i cpu hours}' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'max_processors' AS NAME, - 'Job Size: Max' AS display, - 'max_processors' AS alias, - 'Core Count' AS unit, - '0'+0 AS decimals, - 'coalesce(ceil(max(jf.processors)),0)' AS formula, - 'The maximum size job in number of cores.
Job Size: The total number of processor cores used by a (parallel) job.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'min_processors' AS NAME, - 'Job Size: Min' AS display, - 'min_processors' AS alias, - 'Core Count' AS unit, - '0'+0 AS decimals, - 'coalesce(ceil(min(case when jf.processors = 0 then null else jf.processors end)),0)' AS formula, - 'The minimum size job in number of cores.
Job Size: The total number of processor cores used by a (parallel) job.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'node_utilization' AS NAME, - 'Node Utilization' AS display, - 'node_utilization' AS alias, - '%' AS unit, - '2'+0 AS decimals, - '\n 100.0 * (\n COALESCE(\n SUM(jf.node_time / 3600.0)\n /\n (\n SELECT\n SUM(ra.percent * inner_days.hours * rs.q_nodes / 100.0)\n FROM\n modw.resourcespecs rs,\n modw.resource_allocated ra,\n modw.days inner_days\n WHERE\n inner_days.day_middle_ts BETWEEN ra.start_date_ts AND COALESCE(ra.end_date_ts, 2147483647)\n AND inner_days.day_middle_ts BETWEEN rs.start_date_ts AND COALESCE(rs.end_date_ts, 2147483647)\n AND inner_days.day_middle_ts BETWEEN $date_table_start_ts AND $date_table_end_ts\n AND ra.resource_id = rs.resource_id\n AND FIND_IN_SET(\n rs.resource_id,\n GROUP_CONCAT(DISTINCT jf.resource_id)\n ) <> 0\n ),\n 0\n )\n )\n ' AS formula, - 'The percentage of resource nodes utilized by jobs.
Node Utilization: the ratio of the total node hours consumed by jobs over a given time period divided by the total node hours that the system could have potentially provided during that period. It does not include non- jobs.
This value is only accurate if node sharing is not allowed' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'normalized_avg_processors' AS NAME, - 'Job Size: Normalized' AS display, - 'normalized_avg_processors' AS alias, - '% of Total Cores' AS unit, - '1'+0 AS decimals, - '100.0*coalesce(ceil(sum(jf.processors*jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'))/(select sum(rrf.processors) from modw.resourcespecs rrf where find_in_set(rrf.resource_id,group_concat(distinct jf.resource_id)) <> 0 and \' . $query_instance->getAggregationUnit()->getUnitName() . \'_end_ts >= rrf.start_date_ts and (rrf.end_date_ts is null or \' . $query_instance->getAggregationUnit()->getUnitName() . \'_end_ts <= rrf.end_date_ts)),0)' AS formula, - 'The percentage average size job over total machine cores.
Normalized Job Size: The percentage total number of processor cores used by a (parallel) job over the total number of cores on the machine.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'burn_rate' AS NAME, - 'Allocation Burn Rate' AS display, - 'burn_rate' AS alias, - '%' AS unit, - '2'+0 AS decimals, - '100.00*coalesce((sum(jf.local_charge)/" . ($query_instance != NULL ? $query_instance->getDurationFormula() : 1) . ")\n\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t(select sum(alc.base_allocation*"coalesce((select conversion_factor \n\t\t\t\t from modw.allocationadjustment aladj\n\t\t\t\t where aladj.allocation_resource_id = 1546\n\t\t\t\t and aladj.site_resource_id = alc.resource_id\n\t\t\t\t and aladj.start_date <= alc.initial_start_date and (aladj.end_date is null or alc.initial_start_date <= aladj.end_date)\n\t\t\t\t limit 1\n\t\t\t\t ), 1.0)"/((unix_timestamp(alc.end_date) - unix_timestamp(alc.initial_start_date))/3600.0)) from modw.allocation alc where find_in_set(alc.id,group_concat(distinct jf.allocation_id)) <> 0 ),0)\n\t\t\t\t\t\t\t' AS formula, - 'The percentage of allocation usage in the given duration.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'rate_of_usage' AS NAME, - 'Allocation Usage Rate' AS display, - 'rate_of_usage' AS alias, - 'XD SU/Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sum(jf.local_charge)/" . ($query_instance != NULL ? $query_instance->getDurationFormula() : 1) . ",0)' AS formula, - 'The rate of allocation usage in XD SUs per hour.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'running_job_count' AS NAME, - 'Number of Jobs Running' AS display, - 'running_job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.running_job_count),0)' AS formula, - 'The total number of running jobs.
Job: A scheduled process for a computer resource in a batch processing environment.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'sem_avg_cpu_hours' AS NAME, - 'Std Dev: CPU Hours: Per Job' AS display, - 'sem_avg_cpu_hours' AS alias, - 'CPU Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sqrt((sum(jf.sum_cpu_time_squared)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'))-pow(sum(jf.cpu_time)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),2))/sqrt(sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')),0)/3600.0' AS formula, - 'The standard error of the average CPU hours by each job.
Std Err of the Avg: The standard deviation of the sample mean, estimated by the sample estimate of the population standard deviation (sample standard deviation) divided by the square root of the sample size (assuming statistical independence of the values in the sample).' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'sem_avg_node_hours' AS NAME, - 'Std Dev: Node Hours: Per Job' AS display, - 'sem_avg_node_hours' AS alias, - 'Node Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sqrt((sum(jf.sum_node_time_squared)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'))-pow(sum(jf.node_time)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),2))/sqrt(sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')),0)/3600.0' AS formula, - 'The standard error of the average node hours by each job.
Std Err of the Avg: The standard deviation of the sample mean, estimated by the sample estimate of the population standard deviation (sample standard deviation) divided by the square root of the sample size (assuming statistical independence of the values in the sample).' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'sem_avg_processors' AS NAME, - 'Std Dev: Job Size: Per Job' AS display, - 'sem_avg_processors' AS alias, - 'Core Count' AS unit, - '2'+0 AS decimals, - 'coalesce( sqrt( (sum(pow(jf.processors,2)*jf.job_count)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')) - pow(sum(jf.processors*jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),2) ) /sqrt(sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')) ,0)' AS formula, - 'The standard error of the average size job in number of cores.
Std Err of the Avg: The standard deviation of the sample mean, estimated by the sample estimate of the population standard deviation (sample standard deviation) divided by the square root of the sample size (assuming statistical independence of the values in the sample).' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'sem_avg_waitduration_hours' AS NAME, - 'Std Dev: Wait Hours: Per Job' AS display, - 'sem_avg_waitduration_hours' AS alias, - 'Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sqrt((sum(coalesce(jf.sum_waitduration_squared,0))/sum(jf.started_job_count))-pow(sum(coalesce(jf.waitduration,0))/sum(jf.started_job_count),2))/sqrt(sum(jf.started_job_count)),0)/3600.0' AS formula, - 'The standard error of the average time, in hours, an job had to wait until it began to execute.
Std Err of the Avg: The standard deviation of the sample mean, estimated by the sample estimate of the population standard deviation (sample standard deviation) divided by the square root of the sample size (assuming statistical independence of the values in the sample).' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'sem_avg_wallduration_hours' AS NAME, - 'Std Dev: Wall Hours: Per Job' AS display, - 'sem_avg_wallduration_hours' AS alias, - 'Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sqrt((sum(jf.sum_wallduration_squared)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'))-pow(sum(jf.wallduration)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),2))/sqrt(sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')),0)/3600.0' AS formula, - 'The standard error of the average time each job took to execute.
Std Err of the Avg: The standard deviation of the sample mean, estimated by the sample estimate of the population standard deviation (sample standard deviation) divided by the square root of the sample size (assuming statistical independence of the values in the sample).' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'started_job_count' AS NAME, - 'Number of Jobs Started' AS display, - 'started_job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.started_job_count),0)' AS formula, - 'The total number of jobs that started executing within the selected duration.
Job: A scheduled process for a computer resource in a batch processing environment.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'submitted_job_count' AS NAME, - 'Number of Jobs Submitted' AS display, - 'submitted_job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.submitted_job_count),0)' AS formula, - '' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'total_cpu_hours' AS NAME, - 'CPU Hours: Total' AS display, - 'total_cpu_hours' AS alias, - 'CPU Hour' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.cpu_time/3600.0),0)' AS formula, - 'The total CPU hours (number of CPU cores x wall time hours) used by jobs.
For each job, the CPU usage is aggregated. For example, if a job used 1000 CPUs for one minute, it would be aggregated as 1000 CPU minutes or 16.67 CPU hours.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'total_node_hours' AS NAME, - 'Node Hours: Total' AS display, - 'total_node_hours' AS alias, - 'Node Hour' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.node_time/3600.0),0)' AS formula, - 'The total node hours (number of nodes x wall time hours) used by jobs.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'total_waitduration_hours' AS NAME, - 'Wait Hours: Total' AS display, - 'total_waitduration_hours' AS alias, - 'Hour' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.waitduration/3600.0),0)' AS formula, - 'The total time, in hours, jobs waited before execution on their designated resource.
Wait Time: Wait time is defined as the linear time between submission of a job by a user until it begins to execute.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'total_wallduration_hours' AS NAME, - 'Wall Hours: Total' AS display, - 'total_wallduration_hours' AS alias, - 'Hour' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.wallduration/3600.0),0)' AS formula, - 'The total time, in hours, jobs took to execute.
Wall Time: Wall time is defined as the linear time between start and end time of execution for a particular job.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'utilization' AS NAME, - 'Utilization' AS display, - 'utilization' AS alias, - '%' AS unit, - '2'+0 AS decimals, - '\n 100.0 * (\n COALESCE(\n SUM(jf.cpu_time / 3600.0)\n /\n (\n SELECT SUM( ra.percent * inner_days.hours * rs.processors / 100.0 )\n FROM modw.resourcespecs rs,\n modw.resource_allocated ra,\n modw.days inner_days\n WHERE\n inner_days.day_middle_ts BETWEEN ra.start_date_ts AND coalesce(ra.end_date_ts, 2147483647) AND\n inner_days.day_middle_ts BETWEEN rs.start_date_ts AND coalesce(rs.end_date_ts, 2147483647) AND\n inner_days.day_middle_ts BETWEEN $date_table_start_ts AND $date_table_end_ts AND\n ra.resource_id = rs.resource_id\n AND FIND_IN_SET(\n rs.resource_id,\n GROUP_CONCAT(DISTINCT jf.resource_id)\n ) <> 0\n ),\n 0\n )\n )\n ' AS formula, - 'The percentage of the obligation of a resource that has been utilized by jobs.
Utilization: The ratio of the total CPU hours consumed by jobs over a given time period divided by the total CPU hours that the system is contractually required to provide to during that period. It does not include non- jobs.
It is worth noting that this value is a rough estimate in certain cases where the resource providers don\'t provide accurate records of their system specifications, over time.' AS description -FROM modules m, realms r -WHERE m.name = 'xdmod' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'closed_account_count' AS NAME, - 'Number of User Accounts: Closed' AS display, - 'closed_account_count' AS alias, - 'Number of User Accounts' AS unit, - '0'+0 AS decimals, - 'union_string_count(jf.person_ids_closed, 1, 100000)' AS formula, - 'The total number of users that had expired accounts.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Accounts')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'new_account_count' AS NAME, - 'Number of User Accounts: Created' AS display, - 'new_account_count' AS alias, - 'Number of User Accounts' AS unit, - '0'+0 AS decimals, - 'union_string_count(jf.person_ids_new, 1, 100000)' AS formula, - 'The total number of users that opened new accounts.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Accounts')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'open_account_count' AS NAME, - 'Number of User Accounts: Open' AS display, - 'open_account_count' AS alias, - 'Number of User Accounts' AS unit, - '0'+0 AS decimals, - 'union_string_count(jf.person_ids_open, 1, 100000)' AS formula, - 'The total number of users that had open accounts.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Accounts')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'weight' AS NAME, - 'Weight' AS display, - 'weight' AS alias, - 'Weight' AS unit, - '0'+0 AS decimals, - '1' AS formula, - '' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Accounts')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'active_allocation_count' AS NAME, - 'Number of Allocations: Active' AS display, - 'active_allocation_count' AS alias, - 'Number of Allocations' AS unit, - '0'+0 AS decimals, - 'count(distinct(jf.account_id))' AS formula, - 'The number of allocations that were valid.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'allocated_nu' AS NAME, - 'NUs: Allocated' AS display, - 'allocated_nu' AS alias, - 'NU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.base_fraction*jf.conversion_factor*21.576),0)' AS formula, - 'The total allocated amount in NUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'allocated_raw_su' AS NAME, - 'CPU Core Hours: Allocated' AS display, - 'allocated_raw_su' AS alias, - 'CPU Core Hours' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.base_fraction),0)' AS formula, - 'The total allocated amount in CPU core hours on the resource the allocation was made on.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'allocated_su' AS NAME, - 'XD SUs: Allocated' AS display, - 'allocated_su' AS alias, - 'XD SU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.base_fraction*jf.conversion_factor),0)' AS formula, - 'The total allocated amount in XD SUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_used_su' AS NAME, - 'XD SUs: Per Job' AS display, - 'avg_used_su' AS alias, - 'XD SU' AS unit, - '2'+0 AS decimals, - 'coalesce(sum(used)/sum(running_job_count),0)' AS formula, - '' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'burn_rate' AS NAME, - 'Allocation Burn Rate' AS display, - 'burn_rate' AS alias, - '%' AS unit, - '2'+0 AS decimals, - '100.00*coalesce(sum(jf.used)/sum(jf.base_fraction*jf.conversion_factor),0)' AS formula, - 'The percentage of allocation usage in the given duration.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'rate_of_usage' AS NAME, - 'Allocation Usage Rate' AS display, - 'rate_of_usage' AS alias, - 'XD SU/Hour' AS unit, - '2'+0 AS decimals, - 'coalesce(sum(used)/" . ($query_instance != NULL ? $query_instance->getDurationFormula() : 1) . ",0)' AS formula, - 'The rate of allocation usage in XD SUs per hour.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'used_su' AS NAME, - 'XD SUs: Used' AS display, - 'used_su' AS alias, - 'XD SU' AS unit, - '2'+0 AS decimals, - 'sum(used)' AS formula, - 'The total amount of XD SUs used by jobs.
\n\t\tXD SU: 1 XSEDE SU is defined as one CPU-hour on a Phase-1 DTF cluster.
\t\n\t\tSU - Service Units: Computational resources on the XSEDE are allocated and charged in service units (SUs). SUs are defined locally on each system, with conversion factors among systems based on HPL benchmark results (see the XSEDE SU Conversion Calculator: https://www.xsede.org/su-converter).
\n\n\t\tCurrent TeraGrid supercomputers have complex multi-core and memory hierarchies. Each resource has a specific configuration that determines the number (N) of cores that can be dedicated to a job without slowing the code (and other user and system codes). Each resource defines for its system the minimum number of SUs charged for a job running in the default batch queue, calculated as wallclock runtime multiplied by N. Minimum charges may apply.
\n\n\t\tNote: The actual charge will depend on the specific requirements of the job (e.g., the mapping of the cores across the machine, or the priority you wish to obtain). Consult each system\'s user guide for details. If you have questions, contact help@teragrid.org .
\n\t\t\n\t\tNote 2: The SUs show here have been normalized against the XSEDE Roaming service. Therefore they are comparable across resources.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'weight' AS NAME, - 'Number of Allocations' AS display, - 'weight' AS alias, - 'Number of Allocations' AS unit, - '0'+0 AS decimals, - 'coalesce(count( distinct allocation_id),0)' AS formula, - 'The number of allocations.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Allocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'award_amount' AS NAME, - 'Award Amount' AS display, - 'award_amount' AS alias, - '$' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.amount_dollar),0)' AS formula, - 'The total amount of awards in US Dollars within the selected duration. This value is self reported by the grant applicant.
' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Grants')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'award_count' AS NAME, - 'Number of Awards' AS display, - 'award_count' AS alias, - 'Number of Awards' AS unit, - '0'+0 AS decimals, - 'coalesce(count(distinct(jf.proposal_num)),0)' AS formula, - 'The total number of awards within the selected duration.
' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Grants')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_nu' AS NAME, - 'NUs Charged: Per Job' AS display, - 'avg_nu' AS alias, - 'NU' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.local_charge*21.576)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),0)' AS formula, - 'The average amount of NUs charged per job.
NU - Normalized Units: Roaming allocations are awarded in XSEDE Service Units (SUs). 1 XSEDE SU is defined as one CPU-hour on a Phase-1 DTF cluster. For usage on a resource that is charged to a Roaming allocation, a normalization factor is applied. The normalization factor is based on the method historically used to calculate \'Normalized Units\' (Cray X-MP-equivalent SUs), which derives from a resource\'s performance on the HPL benchmark.
Specifically, 1 Phase-1 DTF SU = 21.576 NUs, and the XD SU conversion factor for a resource is calculated by taking its NU conversion factor and dividing it by 21.576. The standard formula for calculating a resource\'s NU conversion factor is: (Rmax * 1000 / 191) / P where Rmax is the resource\'s Rmax result on the HPL benchmark in Gflops and P is the number of processors used in the benchmark. In the absence of an HPL benchmark run, a conversion factor can be agreed upon, based on that of an architecturally similar platform and scaled according to processor performance differences.
Conversion to Roaming SUs is handled by the XSEDE central accounting system, and RPs are only required to report usage in local SUs for all allocations.
Defining an SU charge for specialized compute resources (such as visualization hardware) or non-compute resources (such as storage) is possible, but there is no XSEDE-wide policy for doing so.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_su' AS NAME, - 'XD SUs Charged: Per Job' AS display, - 'avg_su' AS alias, - 'XD SU' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.local_charge)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),0)' AS formula, - 'The average amount of XD SUs charged per job.
XD SU: 1 XSEDE SU is defined as one CPU-hour on a Phase-1 DTF cluster.
SU - Service Units: Computational resources on the XSEDE are allocated and charged in service units (SUs). SUs are defined locally on each system, with conversion factors among systems based on HPL benchmark results (see the XSEDE SU Conversion Calculator: https://www.xsede.org/su-converter).
Current TeraGrid supercomputers have complex multi-core and memory hierarchies. Each resource has a specific configuration that determines the number (N) of cores that can be dedicated to a job without slowing the code (and other user and system codes). Each resource defines for its system the minimum number of SUs charged for a job running in the default batch queue, calculated as wallclock runtime multiplied by N. Minimum charges may apply.
Note: The actual charge will depend on the specific requirements of the job (e.g., the mapping of the cores across the machine, or the priority you wish to obtain). Consult each system\'s user guide for details. If you have questions, contact help@teragrid.org .
Note 2: The SUs show here have been normalized against the XSEDE Roaming service. Therefore they are comparable across resources.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'gateway_job_count' AS NAME, - 'Number of Jobs via Gateway' AS display, - 'gateway_job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(case when jf.person_id in (select person_id from modw.gatewayperson ) then jf.job_count else 0 end),0)' AS formula, - 'The total number of jobs submitted through gateways (e.g., via a community user account) that ended within the selected duration.
Job: A scheduled process for a computer resource in a batch processing environment.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_job_size_weighted_by_xd_su' AS NAME, - 'Job Size: Weighted By XD SUs' AS display, - 'avg_job_size_weighted_by_xd_su' AS alias, - 'Core Count' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.processors*jf.local_charge)/sum(jf.local_charge),0)' AS formula, - 'The average job size weighted by charge in XD SUs. Defined as
Average Job Size Weighted By XD SUs: sum(i = 0 to n){job i core count*job i charge in xd sus}/sum(i = 0 to n){job i charge in xd sus}' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'sem_avg_nu' AS NAME, - 'Std Dev: NUs Charged: Per Job' AS display, - 'sem_avg_nu' AS alias, - 'NU' AS unit, - '2'+0 AS decimals, - 'coalesce(sqrt((sum(jf.sum_local_charge_squared)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'))-pow(sum(jf.local_charge)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),2))/sqrt(sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')),0)*21.576' AS formula, - 'The standard error of the average NUs charged by each job.
Std Err of the Avg: The standard deviation of the sample mean, estimated by the sample estimate of the population standard deviation (sample standard deviation) divided by the square root of the sample size (assuming statistical independence of the values in the sample).' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'sem_avg_su' AS NAME, - 'Std Dev: XD SUs Charged: Per Job' AS display, - 'sem_avg_su' AS alias, - 'XD SU' AS unit, - '2'+0 AS decimals, - 'coalesce(sqrt((sum(jf.sum_local_charge_squared)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'))-pow(sum(jf.local_charge)/sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \'),2))/sqrt(sum(jf.\' . $query_instance->getQueryType() == \'aggregate\' ? \'job_count\' : \'running_job_count\' . \')),0)' AS formula, - 'The standard error of the average XD SUs charged by each job.
Std Err of the Avg: The standard deviation of the sample mean, estimated by the sample estimate of the population standard deviation (sample standard deviation) divided by the square root of the sample size (assuming statistical independence of the values in the sample).' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'total_nu' AS NAME, - 'NUs Charged: Total' AS display, - 'total_nu' AS alias, - 'NU' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.local_charge)*21.576,0)' AS formula, - 'The total amount of NUs charged by jobs.
NU - Normalized Units: Roaming allocations are awarded in XSEDE Service Units (SUs). 1 XSEDE SU is defined as one CPU-hour on a Phase-1 DTF cluster. For usage on a resource that is charged to a Roaming allocation, a normalization factor is applied. The normalization factor is based on the method historically used to calculate \'Normalized Units\' (Cray X-MP-equivalent SUs), which derives from a resource\'s performance on the HPL benchmark.
Specifically, 1 Phase-1 DTF SU = 21.576 NUs, and the XD SU conversion factor for a resource is calculated by taking its NU conversion factor and dividing it by 21.576. The standard formula for calculating a resource\'s NU conversion factor is: (Rmax * 1000 / 191) / P where Rmax is the resource\'s Rmax result on the HPL benchmark in Gflops and P is the number of processors used in the benchmark. In the absence of an HPL benchmark run, a conversion factor can be agreed upon, based on that of an architecturally similar platform and scaled according to processor performance differences.
Conversion to Roaming SUs is handled by the XSEDE central accounting system, and RPs are only required to report usage in local SUs for all allocations.
Defining an SU charge for specialized compute resources (such as visualization hardware) or non-compute resources (such as storage) is possible, but there is no XSEDE-wide policy for doing so.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'total_su' AS NAME, - 'XD SUs Charged: Total' AS display, - 'total_su' AS alias, - 'XD SU' AS unit, - '1'+0 AS decimals, - 'coalesce(sum(jf.local_charge),0)' AS formula, - 'The total amount of XD SUs charged by jobs.
XD SU: 1 XSEDE SU is defined as one CPU-hour on a Phase-1 DTF cluster.
SU - Service Units: Computational resources on the XSEDE are allocated and charged in service units (SUs). SUs are defined locally on each system, with conversion factors among systems based on HPL benchmark results (see the XSEDE SU Conversion Calculator: https://www.xsede.org/su-converter).
Current TeraGrid supercomputers have complex multi-core and memory hierarchies. Each resource has a specific configuration that determines the number (N) of cores that can be dedicated to a job without slowing the code (and other user and system codes). Each resource defines for its system the minimum number of SUs charged for a job running in the default batch queue, calculated as wallclock runtime multiplied by N. Minimum charges may apply.
Note: The actual charge will depend on the specific requirements of the job (e.g., the mapping of the cores across the machine, or the priority you wish to obtain). Consult each system\'s user guide for details. If you have questions, contact help@teragrid.org .
Note 2: The SUs show here have been normalized against the XSEDE Roaming service. Therefore they are comparable across resources.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Jobs')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpu' AS NAME, - 'Avg CPU Performance' AS display, - 'cpu' AS alias, - 'Avg CPU Performance' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpu)' AS formula, - 'The performance of CPU. Calculated as the average of: ' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'fpu_fftw_hpcc' AS NAME, - 'CPUNET:HPCC - FFTW' AS display, - 'fpu_fftw_hpcc' AS alias, - 'CPUNET:HPCC - FFTW' AS unit, - '4'+0 AS decimals, - 'avg(jf.fpu_fftw_hpcc)' AS formula, - 'The performance of FFTW HPCC, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'fpu_dgemm_hpcc' AS NAME, - 'CPUNET:HPCC - DGEMM' AS display, - 'fpu_dgemm_hpcc' AS alias, - 'CPUNET:HPCC - DGEMM' AS unit, - '4'+0 AS decimals, - 'avg(jf.fpu_dgemm_hpcc)' AS formula, - 'Average Double-Precision General Matrix Multiplication (DGEMM) Floating-Point Performance, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'io_3d_cra' AS NAME, - 'IONET:MPI-Tile-IO - 3D Col Read' AS display, - 'io_3d_cra' AS alias, - 'IONET:MPI-Tile-IO - 3D Col Read' AS unit, - '4'+0 AS decimals, - 'avg(jf.io_3d_cra)' AS formula, - 'The performance of MPI-Tile-IO - 3D Array Collective Read Aggregate Throughput, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'io_3d_cwa' AS NAME, - 'IONET:MPI-Tile-IO - 3D Col Write' AS display, - 'io_3d_cwa' AS alias, - 'IONET:MPI-Tile-IO - 3D Col Write' AS unit, - '4'+0 AS decimals, - 'avg(jf.io_3d_cwa)' AS formula, - 'The performance of MPI-Tile-IO - 3D Array Collective Write Aggregate Throughput, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'io' AS NAME, - 'Avg IO Performance' AS display, - 'io' AS alias, - 'Avg IO Performance' AS unit, - '4'+0 AS decimals, - 'avg(jf.io)' AS formula, - 'The performance of IO. Calculated as the average of: ' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpu_inv_mean_noise' AS NAME, - 'CPU:OSJitter - Inv Mean Noise' AS display, - 'cpu_inv_mean_noise' AS alias, - 'CPU:OSJitter - Inv Mean Noise' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpu_inv_mean_noise)' AS formula, - 'The performance of OSJitter Mean Noise (All Cores in Use), normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'fpu_linpack_hpcc' AS NAME, - 'CPUNET:HPCC - LINPACK' AS display, - 'fpu_linpack_hpcc' AS alias, - 'CPUNET:HPCC - LINPACK' AS unit, - '4'+0 AS decimals, - 'avg(jf.fpu_linpack_hpcc)' AS formula, - 'The performance of LINPACK HPCC, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'io_mpi_io_cra' AS NAME, - 'IO:IOR - MPIIO Col Read' AS display, - 'io_mpi_io_cra' AS alias, - 'IO:IOR - MPIIO Col Read' AS unit, - '4'+0 AS decimals, - 'avg(jf.io_mpi_io_cra)' AS formula, - 'The performance of IOR - MPIIO Collective N-to-1 Read Aggregate Throughput, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'io_mpi_io_cwa' AS NAME, - 'IO:IOR - MPIIO Col Write' AS display, - 'io_mpi_io_cwa' AS alias, - 'IO:IOR - MPIIO Col Write' AS unit, - '4'+0 AS decimals, - 'avg(jf.io_mpi_io_cwa)' AS formula, - 'The performance of IOR - MPIIO Collective N-to-1 Write Aggregate Throughput, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'io_mpi_io_ira' AS NAME, - 'IO:IOR - MPIIO Ind Read' AS display, - 'io_mpi_io_ira' AS alias, - 'IO:IOR - MPIIO Ind Read' AS unit, - '4'+0 AS decimals, - 'avg(jf.io_mpi_io_ira)' AS formula, - 'The performance of IOR - MPIIO Independent N-to-1 Read Aggregate Throughput, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'io_mpi_io_iwa' AS NAME, - 'IO:IOR - MPIIO Ind Write' AS display, - 'io_mpi_io_iwa' AS alias, - 'IO:IOR - MPIIO Ind Write' AS unit, - '4'+0 AS decimals, - 'avg(jf.io_mpi_io_iwa)' AS formula, - 'The performance of IOR - MPIIO Independent N-to-1 Write Aggregate Throughput, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'net_mpi_ra_hpcc' AS NAME, - 'Net:HPCC - MPI Random Access' AS display, - 'net_mpi_ra_hpcc' AS alias, - 'Net:HPCC - MPI Random Access' AS unit, - '4'+0 AS decimals, - 'avg(jf.net_mpi_ra_hpcc)' AS formula, - 'The performance of MPI Random Access HPCC, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'mem_bandwidth_hpcc' AS NAME, - 'Mem:HPCC - Bandwidth' AS display, - 'mem_bandwidth_hpcc' AS alias, - 'Mem:HPCC - Bandwidth' AS unit, - '4'+0 AS decimals, - 'avg(jf.mem_bandwidth_hpcc)' AS formula, - 'Average memory bandwidth of HPCC, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'memory' AS NAME, - 'Avg Memory Performance' AS display, - 'memory' AS alias, - 'Avg Memory Performance' AS unit, - '4'+0 AS decimals, - 'avg(jf.memory)' AS formula, - 'The performance of Memory. Calculated as the average of: ' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpunet_bt' AS NAME, - 'CPUNET:NPB - BT' AS display, - 'cpunet_bt' AS alias, - 'CPUNET:NPB - BT' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpunet_bt)' AS formula, - 'Block Tridiagonal (BT) Floating-Point Performance NPB, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpunet_cg' AS NAME, - 'CPUNET:NPB - CG' AS display, - 'cpunet_cg' AS alias, - 'CPUNET:NPB - CG' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpunet_cg)' AS formula, - 'Conjugate Gradient (CG) Floating-Point Performance, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpunet_ft' AS NAME, - 'CPUNET:NPB - FT' AS display, - 'cpunet_ft' AS alias, - 'CPUNET:NPB - FT' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpunet_ft)' AS formula, - 'Fast Fourier Transform (FT) Floating-Point Performance, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpunet_lu' AS NAME, - 'CPUNET:NPB - LU' AS display, - 'cpunet_lu' AS alias, - 'CPUNET:NPB - LU' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpunet_lu)' AS formula, - 'LU Solver (LU) Floating-Point Performance, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpunet_mg' AS NAME, - 'CPUNET:NPB - MG' AS display, - 'cpunet_mg' AS alias, - 'CPUNET:NPB - MG' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpunet_mg)' AS formula, - 'Multi Grid (MG) Floating-Point Performance, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpunet_sp' AS NAME, - 'CPUNET:NPB - SP' AS display, - 'cpunet_sp' AS alias, - 'CPUNET:NPB - SP' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpunet_sp)' AS formula, - 'Scalar Pentadiagonal (SP) Floating-Point Performance, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'network' AS NAME, - 'Avg Network Performance' AS display, - 'network' AS alias, - 'Avg Network Performance' AS unit, - '4'+0 AS decimals, - 'avg(jf.network)' AS formula, - 'The performance of Network. Calculated as the average of: ' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'overall' AS NAME, - 'Avg System Performance' AS display, - 'overall' AS alias, - 'Avg System Performance' AS unit, - '4'+0 AS decimals, - 'avg(jf.overall)' AS formula, - 'Avg System Performance. Calculated as the average of: ' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'net_ptrans_hpcc' AS NAME, - 'Net:HPCC - PTRANS' AS display, - 'net_ptrans_hpcc' AS alias, - 'Net:HPCC - PTRANS' AS unit, - '4'+0 AS decimals, - 'avg(jf.net_ptrans_hpcc)' AS formula, - 'The performance of parallell matrix transpose HPCC, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'teps_graph500' AS NAME, - 'Net:Graph500 - TEPS' AS display, - 'teps_graph500' AS alias, - 'Net:Graph500 - TEPS' AS unit, - '4'+0 AS decimals, - 'avg(jf.teps_graph500)' AS formula, - 'The Network performance of Graph500 (Traversed Edges Per Second), normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpu_walltime_graph500' AS NAME, - 'CPU:Graph500 - Performance' AS display, - 'cpu_walltime_graph500' AS alias, - 'CPU:Graph500 - Performance' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpu_walltime_graph500)' AS formula, - 'The performance of Graph500, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpuio_walltime_mwchem' AS NAME, - 'CPUIO:NWCHEM - Performance' AS display, - 'cpuio_walltime_mwchem' AS alias, - 'CPUIO:NWCHEM - Performance' AS unit, - '4'+0 AS decimals, - 'avg(jf.cpuio_walltime_mwchem)' AS formula, - 'The performance of NWCHEM, normalized relative to the performance of edge.ccr.buffalo.edu between 2013-01-01 and 2013-06-30.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'weight' AS NAME, - 'Number of Data Points' AS display, - 'weight' AS alias, - 'Number of Data Points' AS unit, - '0'+0 AS decimals, - '1' AS formula, - 'The number of data points.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Performance')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'project_count' AS NAME, - 'Number of Projects' AS display, - 'project_count' AS alias, - 'Number of Projects' AS unit, - '0'+0 AS decimals, - 'coalesce(count(distinct(jf.proposal_num)),0)' AS formula, - 'The total number of projects within the selected duration.
' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Proposals')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'proposal_count' AS NAME, - 'Number of Proposals' AS display, - 'proposal_count' AS alias, - 'Number of Proposals' AS unit, - '0'+0 AS decimals, - 'coalesce(count(distinct(jf.proposal_id)),0)' AS formula, - 'The total number of proposals within the selected duration.
' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Proposals')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'project_count' AS NAME, - 'Number of Projects' AS display, - 'project_count' AS alias, - 'Number of Projects' AS unit, - '0'+0 AS decimals, - 'COALESCE(COUNT(DISTINCT jf.request_num), 0)' AS formula, - 'The total number of projects within the selected" . " duration.
' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Requests')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'request_count' AS NAME, - 'Number of Proposals' AS display, - 'request_count' AS alias, - 'Number of Proposals' AS unit, - '0'+0 AS decimals, - 'COALESCE(COUNT(DISTINCT jf.action_id), 0)' AS formula, - 'The total number of requests within the selected" . " duration.
' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('Requests')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'available_nu' AS NAME, - 'NUs Available' AS display, - 'available_nu' AS alias, - 'NU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.available * $this->xd_su_cf_sql) * $this->xd_su_to_nu_string, 0)' AS formula, - 'The total available amount in NUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'available_native_su' AS NAME, - 'CPU Core Hours Available' AS display, - 'available_native_su' AS alias, - 'CPU Core Hours' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.available), 0)' AS formula, - 'The total available amount in native SUs (CPU core hours).' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'available_xd_su' AS NAME, - 'XD SUs Available' AS display, - 'available_xd_su' AS alias, - 'XD SU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.available * $this->xd_su_cf_sql), 0)' AS formula, - 'The total available amount in XD SUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'awarded_nu' AS NAME, - 'NUs Awarded' AS display, - 'awarded_nu' AS alias, - 'NU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.awarded * $this->xd_su_cf_sql) * $this->xd_su_to_nu_string, 0)' AS formula, - 'The total awarded amount in NUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'awarded_native_su' AS NAME, - 'CPU Core Hours Awarded' AS display, - 'awarded_native_su' AS alias, - 'CPU Core Hours' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.awarded), 0)' AS formula, - 'The total awarded amount in native SUs (CPU core hours).' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'awarded_xd_su' AS NAME, - 'XD SUs Awarded' AS display, - 'awarded_xd_su' AS alias, - 'XD SU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.awarded * $this->xd_su_cf_sql), 0)' AS formula, - 'The total awarded amount in XD SUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'recommended_nu' AS NAME, - 'NUs Recommended' AS display, - 'recommended_nu' AS alias, - 'NU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.recommended * $this->xd_su_cf_sql) * $this->xd_su_to_nu_string, 0)' AS formula, - 'The total recommended amount in NUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'recommended_native_su' AS NAME, - 'CPU Core Hours Recommended' AS display, - 'recommended_native_su' AS alias, - 'CPU Core Hours' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.recommended), 0)' AS formula, - 'The total recommended amount in native SUs (CPU core hours).' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'recommended_xd_su' AS NAME, - 'XD SUs Recommended' AS display, - 'recommended_xd_su' AS alias, - 'XD SU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.recommended * $this->xd_su_cf_sql), 0)' AS formula, - 'The total recommended amount in XD SUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'requested_nu' AS NAME, - 'NUs Requested' AS display, - 'requested_nu' AS alias, - 'NU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.requested * $this->xd_su_cf_sql) * $this->xd_su_to_nu_string, 0)' AS formula, - 'The total requested amount in NUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'requested_native_su' AS NAME, - 'CPU Core Hours Requested' AS display, - 'requested_native_su' AS alias, - 'CPU Core Hours' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.requested), 0)' AS formula, - 'The total requested amount in native SUs (CPU core hours).' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'requested_xd_su' AS NAME, - 'XD SUs Requested' AS display, - 'requested_xd_su' AS alias, - 'XD SU' AS unit, - '0'+0 AS decimals, - 'coalesce(sum(jf.requested * $this->xd_su_cf_sql), 0)' AS formula, - 'The total requested amount in XD SUs.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'weight' AS NAME, - 'Weight' AS display, - 'weight' AS alias, - 'Weight' AS unit, - '0'+0 AS decimals, - '1' AS formula, - 'The weight of a resource allocations realm data point.' AS description -FROM modules m, realms r -WHERE m.name = 'xsede' - AND r.name = LOWER('ResourceAllocations')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_block_sda_rd_bytes' AS NAME, - 'Avg: block sda read rate: Per Node weighted by node-hour' AS display, - 'avg_block_sda_rd_bytes' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.block_sda_rd_bytes / jf.wall_time / jf.nodecount_id * jf.block_sda_rd_bytes_weight)/sum(jf.block_sda_rd_bytes_weight)\')' AS formula, - 'Average number of bytes read per second per node from the local hard disk device sda.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_block_sda_rd_ios' AS NAME, - 'Avg: block sda read ops rate: Per Node weighted by node-hour' AS display, - 'avg_block_sda_rd_ios' AS alias, - 'ops/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(block_sda_rd_ios / jf.wall_time / jf.nodecount_id * jf.block_sda_rd_ios_weight)/sum(jf.block_sda_rd_ios_weight)\')' AS formula, - 'Average number of read operations per second per node for the local hard disk device sda.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_block_sda_wr_bytes' AS NAME, - 'Avg: block sda write rate: Per Node weighted by node-hour' AS display, - 'avg_block_sda_wr_bytes' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(block_sda_wr_bytes / jf.wall_time / jf.nodecount_id * jf.block_sda_wr_bytes_weight)/sum(jf.block_sda_wr_bytes_weight)\')' AS formula, - 'Average number of bytes written per second per node to the local hard disk device sda.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_block_sda_wr_ios' AS NAME, - 'Avg: block sda write ops rate: Per Node weighted by node-hour' AS display, - 'avg_block_sda_wr_ios' AS alias, - 'ops/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(block_sda_wr_ios / jf.wall_time / jf.nodecount_id * jf.block_sda_wr_ios_weight)/sum(jf.block_sda_wr_ios_weight)\')' AS formula, - 'Average number of write operations per second per node for the local hard disk device sda.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_cpiref_per_core' AS NAME, - 'Avg: CPI: Per Core weighted by core-hour' AS display, - 'avg_cpiref_per_core' AS alias, - 'CPI' AS unit, - '2'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.cpiref_weighted_by_coreseconds / jf.wall_time / jf.cores * jf.cpiref_weight)/sum(jf.cpiref_weight)\')' AS formula, - 'The average ratio of clock ticks to instructions per core weighted by core-hour. The CPI is calculated using the reference processor clock.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_cpldref_per_core' AS NAME, - 'Avg: CPLD: Per Core weighted by core-hour' AS display, - 'avg_cpldref_per_core' AS alias, - 'CPLD' AS unit, - '4'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.cpldref_weighted_by_coreseconds / jf.wall_time / jf.cores * jf.cpldref_weight)/sum(jf.cpldref_weight)\')' AS formula, - 'The average ratio of clock ticks to L1D cache loads per core weighted by core-hour. The CPLD is calculated using the reference processor clock.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_cpuusercv_per_core' AS NAME, - 'Avg: CPU User CV: weighted by core-hour' AS display, - 'avg_cpuusercv_per_core' AS alias, - 'CV' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.cpu_user_cv_weighted_core_seconds / jf.wall_time / jf.cores * jf.cpu_usage_weight)/sum(jf.cpu_usage_weight)\')' AS formula, - 'The average CPU user coefficient of variation weighted by core-hour. The coefficient of variation is defined as the ratio of the standard deviation to the mean' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_cpuuserimb_per_core' AS NAME, - 'Avg: CPU User Imbalance: weighted by core-hour' AS display, - 'avg_cpuuserimb_per_core' AS alias, - '%' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.cpu_user_imbalance_weighted_core_seconds / jf.wall_time / jf.cores * jf.cpu_usage_weight)/sum(jf.cpu_usage_weight)\')' AS formula, - 'The average normalized CPU user imbalance weighted by core-hour. Imbalance is defined as 100*(max-min)/max, where max is value of the CPU user for the CPU with the largest CPU user.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_flops_per_core' AS NAME, - 'Avg: FLOPS: Per Core weighted by core-hour' AS display, - 'avg_flops_per_core' AS alias, - 'ops/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.flop / jf.wall_time * jf.flop_weight)/sum(jf.flop_weight)\')' AS formula, - 'The average number of floating point operations per second per core over all jobs that ran in the selected time period.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_ib_rx_bytes' AS NAME, - 'Avg: InfiniBand rate: Per Node weighted by node-hour' AS display, - 'avg_ib_rx_bytes' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(ib_rx_bytes / jf.wall_time / jf.nodecount_id * jf.ib_rx_bytes_weight)/sum(jf.ib_rx_bytes_weight)\')' AS formula, - 'Average number of bytes received per second per node over the data interconnect. This value only includes the inter-node data transfers and does not count any other data over the interconnect (for example parallel filesystem data).' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_mem_bw_per_core' AS NAME, - 'Avg: Memory Bandwidth: Per Core weighted by core-hour' AS display, - 'avg_mem_bw_per_core' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.mem_transferred / jf.wall_time / jf.cores * jf.mem_transferred_weight)/sum(jf.mem_transferred_weight)\')' AS formula, - 'The average main-memory transfer rate per core weighted by core-hour.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_memory_per_core' AS NAME, - 'Avg: Memory: Per Core weighted by core-hour' AS display, - 'avg_memory_per_core' AS alias, - 'bytes' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.mem_used_weighted_by_duration / jf.wall_time / jf.cores * jf.mem_usage_weight)/sum(jf.mem_usage_weight)\')' AS formula, - 'The average memory used per core for all selected jobs that ran in the selected time period' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_net_eth0_rx' AS NAME, - 'Avg: eth0 receive rate: Per Node weighted by node-hour' AS display, - 'avg_net_eth0_rx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.net_eth0_rx / jf.wall_time / jf.nodecount_id * jf.net_eth0_rx_weight)/sum(jf.net_eth0_rx_weight)\')' AS formula, - 'Average number of bytes received per second per node for network device eth0' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_net_eth0_tx' AS NAME, - 'Avg: eth0 transmit rate: Per Node weighted by node-hour' AS display, - 'avg_net_eth0_tx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.net_eth0_tx / jf.wall_time / jf.nodecount_id * jf.net_eth0_tx_weight)/sum(jf.net_eth0_tx_weight)\')' AS formula, - 'Average number of bytes transmitted per second per node for network device eth0.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_net_ib0_rx' AS NAME, - 'Avg: ib0 receive rate: Per Node weighted by node-hour' AS display, - 'avg_net_ib0_rx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.net_ib0_rx / jf.wall_time / jf.nodecount_id * jf.net_ib0_rx_weight)/sum(jf.net_ib0_rx_weight)\')' AS formula, - 'Average number of bytes received per second per node for network device ib0' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_net_ib0_tx' AS NAME, - 'Avg: ib0 transmit rate: Per Node weighted by node-hour' AS display, - 'avg_net_ib0_tx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.net_ib0_tx / jf.wall_time / jf.nodecount_id * jf.net_ib0_tx_weight)/sum(jf.net_ib0_tx_weight)\')' AS formula, - 'Average number of bytes transmitted per second per node for network device ib0.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_net_mic0_rx' AS NAME, - 'Avg: mic0 receive rate: Per Node weighted by node-hour' AS display, - 'avg_net_mic0_rx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.net_mic0_rx / jf.wall_time / jf.nodecount_id * jf.net_mic0_rx_weight)/sum(jf.net_mic0_rx_weight)\')' AS formula, - 'Average number of bytes received per second per node for network device mic0' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_net_mic0_tx' AS NAME, - 'Avg: mic0 transmit rate: Per Node weighted by node-hour' AS display, - 'avg_net_mic0_tx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.net_mic0_tx / jf.wall_time / jf.nodecount_id * jf.net_mic0_tx_weight)/sum(jf.net_mic0_tx_weight)\')' AS formula, - 'Average number of bytes transmitted per second per node for network device mic0.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_net_mic1_rx' AS NAME, - 'Avg: mic1 receive rate: Per Node weighted by node-hour' AS display, - 'avg_net_mic1_rx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.net_mic1_rx / jf.wall_time / jf.nodecount_id * jf.net_mic1_rx_weight)/sum(jf.net_mic1_rx_weight)\')' AS formula, - 'Average number of bytes received per second per node for network device mic1' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_net_mic1_tx' AS NAME, - 'Avg: mic1 transmit rate: Per Node weighted by node-hour' AS display, - 'avg_net_mic1_tx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.net_mic1_tx / jf.wall_time / jf.nodecount_id * jf.net_mic1_tx_weight)/sum(jf.net_mic1_tx_weight)\')' AS formula, - 'Average number of bytes transmitted per second per node for network device mic1.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_netdir_home_write' AS NAME, - 'Avg: /home write rate: Per Node weighted by node-hour' AS display, - 'avg_netdir_home_write' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.netdir_home_write / jf.wall_time / jf.nodecount_id * jf.netdir_home_write_weight)/sum(jf.netdir_home_write_weight)\')' AS formula, - 'Average number of bytes written per second per node for the filesystem mounted on mount point /home' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_netdir_scratch_write' AS NAME, - 'Avg: /scratch write rate: Per Node weighted by node-hour' AS display, - 'avg_netdir_scratch_write' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.netdir_scratch_write / jf.wall_time / jf.nodecount_id * jf.netdir_scratch_write_weight)/sum(jf.netdir_scratch_write_weight)\')' AS formula, - 'Average number of bytes written per second per node for the filesystem mounted on mount point /scratch' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_netdir_work_write' AS NAME, - 'Avg: /work write rate: Per Node weighted by node-hour' AS display, - 'avg_netdir_work_write' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.netdir_work_write / jf.wall_time / jf.nodecount_id * jf.netdir_work_write_weight)/sum(jf.netdir_work_write_weight)\')' AS formula, - 'Average number of bytes written per second per node for the filesystem mounted on mount point /work' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_netdrv_lustre_rx' AS NAME, - 'Avg: lustre receive rate: Per Node weighted by node-hour' AS display, - 'avg_netdrv_lustre_rx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.netdrv_lustre_rx / jf.wall_time / jf.nodecount_id * jf.netdrv_lustre_rx_weight)/sum(jf.netdrv_lustre_rx_weight)\')' AS formula, - 'Average number of bytes received per second per node from the lustre filesystem.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_netdrv_lustre_tx' AS NAME, - 'Avg: lustre transmit rate: Per Node weighted by node-hour' AS display, - 'avg_netdrv_lustre_tx' AS alias, - 'bytes/s' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.netdrv_lustre_tx / jf.wall_time / jf.nodecount_id * jf.netdrv_lustre_tx_weight)/sum(jf.netdrv_lustre_tx_weight)\')' AS formula, - 'Average number of bytes transmitted per second per node to the lustre filesystem.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_percent_cpu_idle' AS NAME, - 'Avg CPU %: Idle: weighted by core-hour' AS display, - 'avg_percent_cpu_idle' AS alias, - 'CPU %' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(100.0 * jf.cpu_time_idle / jf.cpu_time * jf.cpu_usage_weight)/sum(jf.cpu_usage_weight)\')' AS formula, - 'The average CPU idle % weighted by core hours, over all jobs that were executing.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_percent_cpu_system' AS NAME, - 'Avg CPU %: System: weighted by core-hour' AS display, - 'avg_percent_cpu_system' AS alias, - 'CPU %' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(100.0 * jf.cpu_time_system / jf.cpu_time * jf.cpu_usage_weight)/sum(jf.cpu_usage_weight)\')' AS formula, - 'The average CPU system % weighted by core hours, over all jobs that were executing.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_percent_cpu_user' AS NAME, - 'Avg CPU %: User: weighted by core-hour' AS display, - 'avg_percent_cpu_user' AS alias, - 'CPU %' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(100.0 * jf.cpu_time_user / jf.cpu_time * jf.cpu_usage_weight)/sum(jf.cpu_usage_weight)\')' AS formula, - 'The average CPU user % weighted by core hours, over all jobs that were executing.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'avg_total_memory_per_core' AS NAME, - 'Avg: Total Memory: Per Core weighted by core-hour' AS display, - 'avg_total_memory_per_core' AS alias, - 'bytes' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.mem_used_including_os_caches_weighted_by_duration / jf.wall_time / jf.cores * jf.mem_usage_weight)/sum(jf.mem_usage_weight)\')' AS formula, - 'The average total memory used (including kernel and disk cache) per core for all selected jobs that ran in the selected time period' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpu_time_idle' AS NAME, - 'CPU Hours: Idle: Total' AS display, - 'cpu_time_idle' AS alias, - 'CPU Hour' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.cpu_time_idle/3600.0)\')' AS formula, - 'The idle CPU hours for all jobs that were executing during the time period.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpu_time_system' AS NAME, - 'CPU Hours: System: Total' AS display, - 'cpu_time_system' AS alias, - 'CPU Hour' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.cpu_time_system/3600.0)\')' AS formula, - 'The system CPU hours for all jobs that were executing during the time period.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'cpu_time_user' AS NAME, - 'CPU Hours: User: Total' AS display, - 'cpu_time_user' AS alias, - 'CPU Hour' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'sum(jf.cpu_time_user/3600.0)\')' AS formula, - 'The user CPU hours for all jobs that were executing during the time period.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'job_count' AS NAME, - 'Number of Jobs Ended' AS display, - 'job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.job_count),0)\')' AS formula, - 'The total number of jobs that ended within the selected duration.
Job: A scheduled process for a computer resource in a batch processing environment.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'requested_wall_time' AS NAME, - 'Wall Hours: Requested: Total' AS display, - 'requested_wall_time' AS alias, - 'Hour' AS unit, - '0'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.requested_wall_time/3600.0),0)\')' AS formula, - 'The total time, in hours, jobs requested for execution.
Requested Wall Time: Requsted wall time is defined as the user requested linear time between start and end time for execution of a particular job.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'requested_wall_time_per_job' AS NAME, - 'Wall Hours: Requested: Per Job' AS display, - 'requested_wall_time_per_job' AS alias, - 'Hour' AS unit, - '2'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.requested_wall_time/3600.0)/sum(case when :timeseries then jf.running_job_count else jf.job_count end),0)\')' AS formula, - 'The average time, in hours, a job requested for execution.
Requested Wall Time: Requsted wall time is defined as the user requested linear time between start and end time for execution of a particular job.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'running_job_count' AS NAME, - 'Number of Jobs Running' AS display, - 'running_job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.running_job_count),0)\')' AS formula, - 'The total number of running jobs.
Job: A scheduled process for a computer resource in a batch processing environment' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'started_job_count' AS NAME, - 'Number of Jobs Started' AS display, - 'started_job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.started_job_count),0)\')' AS formula, - 'The total number of jobs that started executing within the selected duration.
Job: A scheduled process for a computer resource in a batch processing environment.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'submitted_job_count' AS NAME, - 'Number of Jobs Submitted' AS display, - 'submitted_job_count' AS alias, - 'Number of Jobs' AS unit, - '0'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.submitted_job_count),0)\')' AS formula, - 'The total number of jobs that were submitted/queued within the selected duration.
Job: A scheduled process for a computer resource in a batch processing environment.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'wait_time' AS NAME, - 'Wait Hours: Total' AS display, - 'wait_time' AS alias, - 'Hour' AS unit, - '1'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.wait_time/3600.0),0)\')' AS formula, - 'The total time, in hours, jobs waited before execution on their designated resource.
Wait Time: Wait time is defined as the linear time between submission of a job by a user until it begins to execute.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'wait_time_per_job' AS NAME, - 'Wait Hours: Per Job' AS display, - 'wait_time_per_job' AS alias, - 'Hour' AS unit, - '2'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.wait_time/3600.0)/sum(jf.started_job_count),0)\')' AS formula, - 'The average time, in hours, a job waits before execution on the designated resource.
Wait Time: Wait time is defined as the linear time between submission of a job by a user until it begins to execute.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'wall_time' AS NAME, - 'CPU Hours: Total' AS display, - 'wall_time' AS alias, - 'CPU Hour' AS unit, - '0'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.wall_time*jf.cores/3600.0),0)\')' AS formula, - 'The total core time, in hours.
Core Time: defined as the time between start and end time of execution for a particular job times the number of allocated cores.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - -INSERT INTO statistics (module_id, realm_id, name, display, alias, unit, decimals, formula, description) -SELECT inc.* FROM ( - SELECT - m.module_id AS module_id, - r.realm_id AS realm_id, - 'wall_time_per_job' AS NAME, - 'Wall Hours: Per Job' AS display, - 'wall_time_per_job' AS alias, - 'Hour' AS unit, - '2'+0 AS decimals, - 'str_replace(\':timeseries\', $query_instance->getQueryType() == \'timeseries\' ? 1 : 0, \'coalesce(sum(jf.wall_time/3600.0)/sum(case when :timeseries then jf.running_job_count else jf.job_count end),0)\')' AS formula, - 'The average time, in hours, a job takes to execute.
Wall Time: Wall time is defined as the linear time between start and end time of execution for a particular job.' AS description -FROM modules m, realms r -WHERE m.name = 'supremm' - AND r.name = LOWER('SUPREMM')) inc -LEFT JOIN statistics cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.alias = inc.alias - AND cur.unit = inc.unit - AND cur.decimals = inc.decimals - AND replace(replace(cur.formula, ' ', ''), '\n', '') LIKE replace(replace(inc.formula, ' ', ''), '\n', '') - AND replace(replace(cur.description, ' ', ''), '\n', '') LIKE replace(replace(inc.description, ' ', ''), '\n', '') -WHERE cur.statistic_id IS NULL; - diff --git a/configuration/etl/etl_sql.d/acls/xdmod/statistics_hierarchy.sql b/configuration/etl/etl_sql.d/acls/xdmod/statistics_hierarchy.sql deleted file mode 100644 index de1c1eb836..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/statistics_hierarchy.sql +++ /dev/null @@ -1,562 +0,0 @@ --- ============================================================================= --- NAME: statistics_hierarchy.sql --- EXECUTION: once on installation --- PURPOSE: Provides initial population of the 'statistics_hiearchy' table. --- This file was generated manually based on the sorting requirements --- of the statistics. --- ============================================================================= - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 0 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'job_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 1 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'gateway_job_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 2 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'running_job_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 3 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'started_job_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 4 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'submitted_job_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 5 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'active_person_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 6 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'active_pi_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 7 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'active_allocation_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 8 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'active_institution_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 9 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'total_su') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 10 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'total_nu') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 11 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'total_cpu_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 12 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'total_node_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 13 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'total_waitduration_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 14 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'total_wallduration_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 15 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'avg_su') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 16 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'sem_avg_su') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 17 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'avg_nu') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 18 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'sem_avg_nu') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 19 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'avg_cpu_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 20 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'sem_avg_cpu_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 21 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'avg_node_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 22 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'sem_avg_node_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 23 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'avg_waitduration_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 24 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'sem_avg_waitduration_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 25 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'avg_wallduration_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 26 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'sem_avg_wallduration_hours') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 27 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'avg_processors') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 28 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'sem_avg_processors') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 29 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'min_processors') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 30 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'max_processors') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 31 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'utilization') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 32 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'expansion_factor') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 33 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'normalized_avg_processors') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 34 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'avg_job_size_weighted_by_xd_su') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 35 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'active_resource_count') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.statistics_hierarchy (statistic_id, hierarchy_id, level) - SELECT inc.* - FROM ( - SELECT - s.statistic_id AS statistic_id, - 2 AS hierarchy_id, - 36 AS level - FROM ${DESTINATION_SCHEMA}.statistics s - WHERE s.name = 'rate_of_usage') inc - LEFT JOIN ${DESTINATION_SCHEMA}.statistics_hierarchy cur - ON cur.statistic_id = inc.statistic_id - AND cur.hierarchy_id = inc.hierarchy_id - AND cur.level = inc.level - WHERE cur.statistic_hierarchy_id IS NULL; diff --git a/configuration/etl/etl_sql.d/acls/xdmod/tabs.sql b/configuration/etl/etl_sql.d/acls/xdmod/tabs.sql deleted file mode 100644 index f7c0403a87..0000000000 --- a/configuration/etl/etl_sql.d/acls/xdmod/tabs.sql +++ /dev/null @@ -1,142 +0,0 @@ --- ============================================================================= --- NAME: tabs.sql --- EXECUTION: once on installation --- PURPOSE: Provides initial population of the 'tabs' table. It was generated --- manually by processing the --- 'roles.json->roles->[role]->permitted_modules' sections. --- ============================================================================= - -INSERT INTO ${DESTINATION_SCHEMA}.tabs (module_id, name, display, position, is_default, javascript_class, javascript_reference, tooltip, user_manual_section_name) - SELECT inc.* - FROM (SELECT - m.module_id, - 'tg_summary' AS name, - 'Summary' AS display, - 100 AS position, - TRUE AS is_default, - 'XDMoD.Module.Summary' AS javascript_class, - 'CCR.xdmod.ui.tgSummaryViewer' AS javascript_reference, - 'Displays summary information' AS tooltip, - 'Summary Tab' AS user_manual_section_name - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.tabs cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.position = inc.position - AND cur.is_default = inc.is_default - AND cur.javascript_class = inc.javascript_class - AND cur.javascript_reference = inc.javascript_reference - AND cur.tooltip = inc.tooltip - AND cur.user_manual_section_name = inc.user_manual_section_name - WHERE cur.tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.tabs (module_id, name, display, position, is_default, javascript_class, javascript_reference, tooltip, user_manual_section_name) - SELECT inc.* - FROM (SELECT - m.module_id, - 'tg_usage' AS name, - 'Usage' AS display, - 200 AS position, - FALSE AS is_default, - 'XDMoD.Module.Usage' AS javascript_class, - 'CCR.xdmod.ui.chartViewerTGUsage' AS javascript_reference, - 'Displays usage' AS tooltip, - 'Usage Tab' AS user_manual_section_name - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.tabs cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.position = inc.position - AND cur.is_default = inc.is_default - AND cur.javascript_class = inc.javascript_class - AND cur.javascript_reference = inc.javascript_reference - AND cur.tooltip = inc.tooltip - AND cur.user_manual_section_name = inc.user_manual_section_name - WHERE cur.tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.tabs (module_id, name, display, position, is_default, javascript_class, javascript_reference, tooltip, user_manual_section_name) - SELECT inc.* - FROM (SELECT - m.module_id, - 'metric_explorer' AS name, - 'Metric Explorer' AS display, - 300 AS position, - FALSE AS is_default, - 'XDMoD.Module.MetricExplorer' AS javascript_class, - 'CCR.xdmod.ui.metricExplorer' AS javascript_reference, - '' AS tooltip, - 'Metric Explorer' AS user_manual_section_name - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.tabs cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.position = inc.position - AND cur.is_default = inc.is_default - AND cur.javascript_class = inc.javascript_class - AND cur.javascript_reference = inc.javascript_reference - AND cur.tooltip = inc.tooltip - AND cur.user_manual_section_name = inc.user_manual_section_name - WHERE cur.tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.tabs (module_id, name, display, position, is_default, javascript_class, javascript_reference, tooltip, user_manual_section_name) - SELECT inc.* - FROM (SELECT - m.module_id, - 'report_generator' AS name, - 'Report Generator' AS display, - 1000 AS position, - FALSE AS is_default, - 'XDMoD.Module.ReportGenerator' AS javascript_class, - 'CCR.xdmod.ui.reportGenerator' AS javascript_reference, - '' AS tooltip, - 'Report Generator' AS user_manual_section_name - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.tabs cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.position = inc.position - AND cur.is_default = inc.is_default - AND cur.javascript_class = inc.javascript_class - AND cur.javascript_reference = inc.javascript_reference - AND cur.tooltip = inc.tooltip - AND cur.user_manual_section_name = inc.user_manual_section_name - WHERE cur.tab_id IS NULL; - -INSERT INTO ${DESTINATION_SCHEMA}.tabs (module_id, name, display, position, is_default, javascript_class, javascript_reference, tooltip, user_manual_section_name) - SELECT inc.* - FROM (SELECT - m.module_id, - 'about_xdmod' AS name, - 'About' AS display, - 10000 AS position, - FALSE AS is_default, - 'XDMoD.Module.About' AS javascript_class, - 'CCR.xdmod.ui.aboutXD' AS javascript_reference, - '' AS tooltip, - 'About' AS user_manual_section_name - FROM ${DESTINATION_SCHEMA}.modules m - WHERE m.name = 'xdmod' - ) inc - LEFT JOIN ${DESTINATION_SCHEMA}.tabs cur - ON cur.module_id = inc.module_id - AND cur.name = inc.name - AND cur.display = inc.display - AND cur.position = inc.position - AND cur.is_default = inc.is_default - AND cur.javascript_class = inc.javascript_class - AND cur.javascript_reference = inc.javascript_reference - AND cur.tooltip = inc.tooltip - AND cur.user_manual_section_name = inc.user_manual_section_name - WHERE cur.tab_id IS NULL;