20230927 - IG 퍼센트 그래프 Percent Graph 색상 바꾸기

Query :


select rn
     , tenantname
     , budgetname
     , amount_usd
     , actualspend_usd
     , pct
     , '<div class="a-Report-percentChart"><div role="meter" aria-valuenow="'||pct100||'" class="a-Report-percentChart-fill" aria-label="Percent Graph" style="width:'||pct100||'%;background-color:'||bkcolor||';"><span class="a-Report-percentChart-value">'||pct||'%</span></div></div>' pct_style
  from (
         select row_number() over (order by tenantname, amount_usd desc) rn
              , tenantname
              , decode(tenancyid, targetcompartmentid, '<span class="u-bold u-color-18">'||budgetname||'</span>'
                                                     , '<span>'||budgetname||'</span>') budgetname
              , round(amount_usd) amount_usd
              , nvl(round(actualspend_usd),0) actualspend_usd
              , round(nvl(actualspend_usd,0)/amount_usd*100) pct
              , case when round(nvl(actualspend_usd,0)/amount_usd*100) >= 100 then 100
                else round(nvl(actualspend_usd,0)/amount_usd*100)
                end pct100
              , case when round(nvl(actualspend_usd,0)/amount_usd*100) >= 100 then '#CB4E3E'
                     when round(nvl(actualspend_usd,0)/amount_usd*100) <   61 then '#4B835E'
                else '#897342'
                end bkcolor
           from OCI_BUDGETS()
       )


Column - Identification - Type : 

HTML Expression


Column - Settings - HTML Expression :

&PCT_STYLE.









20230927 - 리포트 컬럼에 뱃지 색상 바꾸기 Badge

Query : 


select mst.*
     , case mst.status
         when 'STOPPED'   then 'success'
         when 'INACTIVE'  then 'success'
         when 'RUNNING'   then 'danger'
         when 'ACTIVE'    then 'danger'
         when 'AVAILABLE' then 'danger'
         else 'warning'
       end as badge_status
  from VW_OCI_SHOWOCI_RESOURCES_MST mst


Column - Column Formatting - HTML Expression :


{with/}
    LABEL:=STATUS
    VALUE:=#STATUS#
    STATE:=#BADGE_STATUS#
    ICON:=None
    LABEL_DISPLAY:=N
    STYLE:=t-Badge--subtle u-bold
    SHAPE:=t-Badge--rectangle
{apply THEME$BADGE/}




20230911 - OCI Autoscale and Stop Script

https://github.com/AnykeyNL/OCI-AutoScale

https://github.com/sinanpetrustoma/autostopping

20230911 - OCI MFA Issue

https://idcs-*******.identity.oraclecloud.com/ui/v1/myconsole?root=my-info&my-info=my_profile_security

20230908 - Materialized View Example


declare

    tune_mv varchar2(20) := 'mview_task';

begin

dbms_advisor.tune_mview

(

task_name=>tune_mv,

mv_create_stmt=>'create materialized view usage.c_s_mv

enable query rewrite

as

select tenant_name

     , usage_interval_start

     , team_compartment

     , prd_region

     , prd_service

     , prd_resource

     , sum(cost_my_cost_usd) cost_my_cost_usd

  from usage.oci_cost

group by tenant_name

     , usage_interval_start

     , team_compartment

     , prd_region

     , prd_service

     , prd_resource'

);

end;



select * from user_tune_mview;


drop materialized view log on oci_cost;


create materialized view log on oci_cost 

  with rowid, sequence 

  (tenant_name

 , usage_interval_start

 , prd_service

 , prd_resource

 , prd_region

 , cost_product_sku

 , cost_my_cost_usd

 , team_compartment)

including new values;


drop materialized view mv_oci_cost;


create materialized view mv_oci_cost

refresh fast with rowid enable query rewrite 

as 

elect tenant_name

     , trunc(usage_interval_start) usage_interval_start

     , team_compartment

     , team_manager

     , prd_region

     , prd_resource

     , prd_service

     , cost_product_sku

     , sum(cost_my_cost_usd) cost_my_cost_usd

     , count(cost_my_cost_usd) cost_my_cost_cnt

     , count(*) ttl_cnt

 from oci_cost

group by tenant_name

     , trunc(usage_interval_start)

     , team_compartment

     , team_manager

     , prd_region

     , prd_resource

     , prd_service

     , cost_product_sku;



BEGIN

  DBMS_MVIEW.REFRESH('mv_oci_cost');

END;


20250202 - IG 다운로드 버튼 바로 보이기

JS initialization Code : function (config) {     var $ = apex.jQuery,         toolbarData = $.apex.interactiveGrid.copyDefaultToolbar(),  ...