From 2c4bf95939f4c5eb9da2790d73a463a48a2fe754 Mon Sep 17 00:00:00 2001 From: Roel Date: Sun, 21 Oct 2018 15:17:51 -0700 Subject: [PATCH] Bugfixing --- README.md | 1 + apexplugin.json | 2 +- ...ugin_com_apexconsulting_apex_jet_gauge.sql | 117 +++++++++--------- server/js/gaugeChart.js | 1 + 4 files changed, 60 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 32c81f5..af2e7db 100755 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Region Plugin to show one or more Status Meter Gauges based on a SQL statement. ## Changelog +#### 1.2.1 - Fix to show the Value in the centre and use the Percentage for the coloring #### 1.2.0 - Fix for APEX 18.1 / JET 4.2 #### 1.1.0 - Added a "Tooltip" column #### 1.0.0 - Initial Release diff --git a/apexplugin.json b/apexplugin.json index 8d997a2..459cfb1 100755 --- a/apexplugin.json +++ b/apexplugin.json @@ -1,6 +1,6 @@ { "name" : "JET StatusMeterGauge", - "version" : "1.2.0", + "version" : "1.2.1", "description" : "Region Plugin to show one or more Status Meter Gauges based on a SQL statement.", "keywords" : ["JET","chart"], "homepage" : "https://github.com/APEXGru/JET-StatusMeterGauge", diff --git a/region_type_plugin_com_apexconsulting_apex_jet_gauge.sql b/region_type_plugin_com_apexconsulting_apex_jet_gauge.sql index 718e653..061b9e2 100644 --- a/region_type_plugin_com_apexconsulting_apex_jet_gauge.sql +++ b/region_type_plugin_com_apexconsulting_apex_jet_gauge.sql @@ -6,25 +6,25 @@ whenever sqlerror exit sql.sqlcode rollback -- ORACLE Application Express (APEX) export file -- -- You should run the script connected to SQL*Plus as the Oracle user --- APEX_180100 or as the owner (parsing schema) of the application. +-- APEX_180200 or as the owner (parsing schema) of the application. -- -- NOTE: Calls to apex_application_install override the defaults below. -- -------------------------------------------------------------------------------- begin wwv_flow_api.import_begin ( - p_version_yyyy_mm_dd=>'2018.04.04' -,p_release=>'18.1.0.00.45' -,p_default_workspace_id=>1832690300009983 -,p_default_application_id=>119 -,p_default_owner=>'DEMO' + p_version_yyyy_mm_dd=>'2018.05.24' +,p_release=>'18.2.0.00.12' +,p_default_workspace_id=>17760818290854663 +,p_default_application_id=>84207 +,p_default_owner=>'ROEL' ); end; / prompt --application/shared_components/plugins/region_type/com_apexconsulting_apex_jet_gauge begin wwv_flow_api.create_plugin( - p_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5230230853435403177) ,p_plugin_type=>'REGION TYPE' ,p_name=>'COM.APEXCONSULTING.APEX.JET.GAUGE' ,p_display_name=>'JET Status Meter Gauge' @@ -243,12 +243,12 @@ wwv_flow_api.create_plugin( ,p_standard_attributes=>'SOURCE_SQL:AJAX_ITEMS_TO_SUBMIT:ESCAPE_OUTPUT' ,p_substitute_attributes=>false ,p_subscribe_plugin_settings=>true -,p_version_identifier=>'1.2.0' -,p_files_version=>186 +,p_version_identifier=>'1.2.1' +,p_files_version=>194 ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(38842982298300276) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177167386691493005) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>1 ,p_display_sequence=>10 @@ -261,8 +261,8 @@ wwv_flow_api.create_plugin_attribute( ,p_help_text=>'Select the column from the region SQL Query that holds the shown value for the gauge.' ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(38843549872304111) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177167954265496840) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>2 ,p_display_sequence=>20 @@ -275,8 +275,8 @@ wwv_flow_api.create_plugin_attribute( ,p_help_text=>'Select the column from the region SQL Query that holds the percentage for the gauge.' ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(38844185871308585) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177168590264501314) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>3 ,p_display_sequence=>30 @@ -289,8 +289,8 @@ wwv_flow_api.create_plugin_attribute( ,p_help_text=>'Select the column from the region SQL Query that holds the label value for the gauge.' ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(38844846828311150) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177169251221503879) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>4 ,p_display_sequence=>40 @@ -303,8 +303,8 @@ wwv_flow_api.create_plugin_attribute( ,p_help_text=>'Select the column from the region SQL Query that holds the color for the gauge.' ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(38845512264316924) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177169916657509653) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>5 ,p_display_sequence=>50 @@ -316,8 +316,8 @@ wwv_flow_api.create_plugin_attribute( ,p_help_text=>'Enter a target page to be called when the user clicks a gauge.' ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(39118402260492593) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177442806653685322) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>6 ,p_display_sequence=>60 @@ -330,22 +330,22 @@ wwv_flow_api.create_plugin_attribute( ,p_lov_type=>'STATIC' ); wwv_flow_api.create_plugin_attr_value( - p_id=>wwv_flow_api.id(39119619432493291) -,p_plugin_attribute_id=>wwv_flow_api.id(39118402260492593) + p_id=>wwv_flow_api.id(5177444023825686020) +,p_plugin_attribute_id=>wwv_flow_api.id(5177442806653685322) ,p_display_sequence=>10 ,p_display_value=>'Horizontal' ,p_return_value=>'Horizontal' ); wwv_flow_api.create_plugin_attr_value( - p_id=>wwv_flow_api.id(39119936353494098) -,p_plugin_attribute_id=>wwv_flow_api.id(39118402260492593) + p_id=>wwv_flow_api.id(5177444340746686827) +,p_plugin_attribute_id=>wwv_flow_api.id(5177442806653685322) ,p_display_sequence=>20 ,p_display_value=>'Vertical' ,p_return_value=>'Vertical' ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(39214088679948978) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177538493073141707) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>7 ,p_display_sequence=>70 @@ -360,8 +360,8 @@ wwv_flow_api.create_plugin_attribute( ,p_is_translatable=>false ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(19931171406937339) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5158255575800130068) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>8 ,p_display_sequence=>80 @@ -380,8 +380,8 @@ wwv_flow_api.create_plugin_attribute( 'Leave empty for no automatic refresh.')) ); wwv_flow_api.create_plugin_attribute( - p_id=>wwv_flow_api.id(20606287057873724) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5158930691451066453) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_attribute_scope=>'COMPONENT' ,p_attribute_sequence=>9 ,p_display_sequence=>35 @@ -394,8 +394,8 @@ wwv_flow_api.create_plugin_attribute( ,p_help_text=>'The column that contains the tooltip value.' ); wwv_flow_api.create_plugin_std_attribute( - p_id=>wwv_flow_api.id(38804082748853424) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177128487142046153) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_name=>'SOURCE_SQL' ,p_sql_min_column_count=>1 ,p_examples=>wwv_flow_string.join(wwv_flow_t_varchar2( @@ -435,37 +435,34 @@ wwv_flow_api.g_varchar2_table(15) := '2020202020202428222322202B2067617567654469 wwv_flow_api.g_varchar2_table(16) := '61756765446976290A20202020202020202020202020202020202020202020202020202020202020202020202E6F6A5374617475734D657465724761756765287B20226F7269656E746174696F6E2220202020202020202020203A202263697263756C61'; wwv_flow_api.g_varchar2_table(17) := '72222C0A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202022616E696D6174696F6E4F6E446973706C617922202020203A20226175746F222C0A2020202020'; wwv_flow_api.g_varchar2_table(18) := '2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202022616E696D6174696F6E4F6E446174614368616E676522203A20226175746F222C0A2020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(19) := '202020202020202020202020202020202020202020202020202020202020202020202020202020202020202276616C75652220202020202020202020202020202020203A206974656D2E76616C75652C0A2F2F2020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(20) := '20202020202020202020202020202020202020202020202020202020202020202020202020202020226D65747269634C6162656C2220202020202020202020203A207B20227465787422203A206974656D2E6D65747269634C6162656C2E74657874207D'; -wwv_flow_api.g_varchar2_table(21) := '2C0A2F2F202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020226C6162656C2220202020202020202020202020202020203A207B20227465787422203A206974'; -wwv_flow_api.g_varchar2_table(22) := '656D2E6C6162656C2E74657874207D2C0A2F2F202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020227469746C65222020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(23) := '3A207B20227465787422203A20222022207D2C0A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202022636F6C6F722220202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(24) := '203A206974656D2E636F6C6F722C0A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202022636C6173732220202020202020202020202020202020203A202261'; -wwv_flow_api.g_varchar2_table(25) := '2D4A45542D7374617475734D657465724761756765222C0A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202022746F6F6C7469702220202020202020202020'; -wwv_flow_api.g_varchar2_table(26) := '20202020203A207B202272656E646572657222203A2066756E6374696F6E282064617461436F6E74657874297B0A202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(27) := '202020202020202020202020202020202020202020202020202020202020202076617220746F6F6C746970203D20646F63756D656E742E637265617465456C656D656E74282264697622293B0A2020202020202020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(28) := '20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202076617220746F6F6C74697054657874203D20646F63756D656E742E637265617465456C656D'; -wwv_flow_api.g_varchar2_table(29) := '656E7428227370616E22293B0A202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202074'; -wwv_flow_api.g_varchar2_table(30) := '6F6F6C746970546578742E74657874436F6E74656E74203D200A2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(31) := '20202020202020202020202020206974656D2E746F6F6C746970207C7C206974656D2E6C6162656C2E74657874202B2022203A2022202B206974656D2E6D65747269634C6162656C2E746578743B0A202020202020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(32) := '202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020746F6F6C7469702E617070656E644368696C642820746F6F6C'; -wwv_flow_api.g_varchar2_table(33) := '7469705465787420293B0A2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(34) := '2020202020202072657475726E20746F6F6C7469703B0A2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(35) := '2020202020202020202020202020202020207D0A2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020'; -wwv_flow_api.g_varchar2_table(36) := '202020207D0A2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020207D293B0A202020202020202020202020202020202020202020202020202020207D293B0A20202020'; -wwv_flow_api.g_varchar2_table(37) := '202020202020202020202020202020207D0A202020202020202020202020202020207D293B0A2020202020202020202020207D293B0A20202020202020207D2C0A2020202020202020726566726573683A2066756E6374696F6E202870526567696F6E49'; -wwv_flow_api.g_varchar2_table(38) := '642C20704865696768742C20704F7269656E746174696F6E2C207041706578416A61784964656E74696669657229207B0A202020202020202020202020696E69742870526567696F6E49642C20704865696768742C20704F7269656E746174696F6E2C20'; -wwv_flow_api.g_varchar2_table(39) := '7041706578416A61784964656E746966696572293B0A20202020202020207D0A202020207D0A7D2877696E646F772E6A6574203D2077696E646F772E6A6574207C7C207B7D2C20617065782E6A51756572792C20617065782E7365727665722C20617065'; -wwv_flow_api.g_varchar2_table(40) := '782E7574696C2C20617065782E6465627567293B'; +wwv_flow_api.g_varchar2_table(19) := '202020202020202020202020202020202020202020202020202020202020202020202020202020202020202276616C75652220202020202020202020202020202020203A206974656D2E76616C75652C0A20202020202020202020202020202020202020'; +wwv_flow_api.g_varchar2_table(20) := '202020202020202020202020202020202020202020202020202020202020202020202020202022636F6C6F722220202020202020202020202020202020203A206974656D2E636F6C6F722C0A202020202020202020202020202020202020202020202020'; +wwv_flow_api.g_varchar2_table(21) := '202020202020202020202020202020202020202020202020202020202020202020226D65747269634C6162656C22202020202020202020203A207B20227465787422203A206974656D2E6D65747269634C6162656C2E74657874207D2C0A202020202020'; +wwv_flow_api.g_varchar2_table(22) := '20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202022636C6173732220202020202020202020202020202020203A2022612D4A45542D7374617475734D657465724761756765'; +wwv_flow_api.g_varchar2_table(23) := '222C0A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202022746F6F6C746970222020202020202020202020202020203A207B202272656E646572657222203A'; +wwv_flow_api.g_varchar2_table(24) := '2066756E6374696F6E282064617461436F6E74657874297B0A202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020'; +wwv_flow_api.g_varchar2_table(25) := '202020202020202020202076617220746F6F6C746970203D20646F63756D656E742E637265617465456C656D656E74282264697622293B0A2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020'; +wwv_flow_api.g_varchar2_table(26) := '20202020202020202020202020202020202020202020202020202020202020202020202020202020202076617220746F6F6C74697054657874203D20646F63756D656E742E637265617465456C656D656E7428227370616E22293B0A2020202020202020'; +wwv_flow_api.g_varchar2_table(27) := '202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020746F6F6C746970546578742E74657874436F6E74656E'; +wwv_flow_api.g_varchar2_table(28) := '74203D200A202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020206974656D2E746F'; +wwv_flow_api.g_varchar2_table(29) := '6F6C746970207C7C206974656D2E6C6162656C2E74657874202B2022203A2022202B206974656D2E6D65747269634C6162656C2E746578743B0A202020202020202020202020202020202020202020202020202020202020202020202020202020202020'; +wwv_flow_api.g_varchar2_table(30) := '202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020746F6F6C7469702E617070656E644368696C642820746F6F6C7469705465787420293B0A20202020202020202020'; +wwv_flow_api.g_varchar2_table(31) := '202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202072657475726E20746F6F6C746970'; +wwv_flow_api.g_varchar2_table(32) := '3B0A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020207D0A20'; +wwv_flow_api.g_varchar2_table(33) := '20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020207D0A202020202020202020202020202020'; +wwv_flow_api.g_varchar2_table(34) := '2020202020202020202020202020202020202020202020202020202020202020202020202020207D293B0A202020202020202020202020202020202020202020202020202020207D293B0A20202020202020202020202020202020202020207D0A202020'; +wwv_flow_api.g_varchar2_table(35) := '202020202020202020202020207D293B0A2020202020202020202020207D293B0A20202020202020207D2C0A2020202020202020726566726573683A2066756E6374696F6E202870526567696F6E49642C20704865696768742C20704F7269656E746174'; +wwv_flow_api.g_varchar2_table(36) := '696F6E2C207041706578416A61784964656E74696669657229207B0A202020202020202020202020696E69742870526567696F6E49642C20704865696768742C20704F7269656E746174696F6E2C207041706578416A61784964656E746966696572293B'; +wwv_flow_api.g_varchar2_table(37) := '0A20202020202020207D0A202020207D0A7D2877696E646F772E6A6574203D2077696E646F772E6A6574207C7C207B7D2C20617065782E6A51756572792C20617065782E7365727665722C20617065782E7574696C2C20617065782E6465627567293B'; null; end; / begin wwv_flow_api.create_plugin_file( - p_id=>wwv_flow_api.id(38646191484036755) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5176970595877229484) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_file_name=>'gaugeChart.js' -,p_mime_type=>'application/javascript' +,p_mime_type=>'text/javascript' ,p_file_charset=>'utf-8' ,p_file_content=>wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table) ); @@ -482,8 +479,8 @@ end; / begin wwv_flow_api.create_plugin_file( - p_id=>wwv_flow_api.id(39124091944558188) -,p_plugin_id=>wwv_flow_api.id(91906449042210448) + p_id=>wwv_flow_api.id(5177448496337750917) +,p_plugin_id=>wwv_flow_api.id(5230230853435403177) ,p_file_name=>'gaugeChart.css' ,p_mime_type=>'text/css' ,p_file_charset=>'utf-8' diff --git a/server/js/gaugeChart.js b/server/js/gaugeChart.js index e8bd5e0..42a92ff 100644 --- a/server/js/gaugeChart.js +++ b/server/js/gaugeChart.js @@ -26,6 +26,7 @@ "animationOnDataChange" : "auto", "value" : item.value, "color" : item.color, + "metricLabel" : { "text" : item.metricLabel.text }, "class" : "a-JET-statusMeterGauge", "tooltip" : { "renderer" : function( dataContext){ var tooltip = document.createElement("div");