From 5ea35e5356b083634ddf347815aa52cad9e267f3 Mon Sep 17 00:00:00 2001 From: Eric Winchell Date: Thu, 5 Oct 2017 13:50:36 -0400 Subject: [PATCH] Replace quad background PNG with SVG --- app/assets/images/layout/base-single.png | Bin 1869 -> 0 bytes app/assets/images/layout/base-single.svg | 25 +++++++ app/assets/images/layout/base.png | Bin 3741 -> 0 bytes app/assets/images/layout/base.svg | 62 ++++++++++++++++++ .../stylesheets/patternfly_overrides.scss | 6 +- app/helpers/quadicon_helper.rb | 24 +++---- .../listnav/_compare_sections.html.haml | 4 +- 7 files changed, 104 insertions(+), 17 deletions(-) delete mode 100644 app/assets/images/layout/base-single.png create mode 100644 app/assets/images/layout/base-single.svg delete mode 100644 app/assets/images/layout/base.png create mode 100644 app/assets/images/layout/base.svg diff --git a/app/assets/images/layout/base-single.png b/app/assets/images/layout/base-single.png deleted file mode 100644 index a4dc2a7c214ad6bde65359852ae0c5d8dc06263c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1869 zcmaJ?c~BE~6ixsGD2xaZ0YSGBL#80}C8&q2jwRJ0yci&hYkPVEK(`$y@{?!NbX^S4a?k>)9>%d1hzth!8fh*pf~5-6(sno! zhqLunrHN6oPyoph4OwdSAsaP142{D@MjLffc^-@cGB{VIWs!Q%w2%Omfn^Fly9V17u{8hIt`Ox0)#=VAuuCW05{5 zB^D+FafluU=;V-KITZu}27?TS(isde2%u3x8ik78j9@SnqB9^`7%*~?uxNTk4kY66 zMq*(n7D*d(sa%NdW>7Y10EJYE08iJ@tyO^v*P{g1_bU<7x1DGR}%2iscAz&CG z6heHh0hMayFrULBVH{+YN&$t3hw_-*I1Y~&77K!0kR8H~8o4X0*p4R zb{**HmMq@#9!D&h`RLujc7;eHk+|pOzg?9L96NUc{A=2Z;#02U4BvheOhAEJ%BHS=vVC{v+L*(k;|2Sek(Am>5I5_D4)|mAorLnP5W;A}Ny83+i z$7%JQot;~=$YCK&W|u#D=Ynw!~EjLfj(3aRO%?)KE;004L8ln zOm82douh#4HoXUkKPGkptF+q^_k2}LOxz+OSNqh~Yj@T7_{6v$%BI=&xPz_jiDsul zlkD$lDuI(-Le!z&%unol2e)U(EI+#sthdE=7eBKD0fNQH;@EAswAjO?Jbr_l#cZ^M zvulAQ7yr_Wj&H$5KY`dpCv3nVRoKQNeZ#^V{W-X}nZNDTw zjq8NWnS?dclU-_By$@-&r36Q32Rhn&%*!aQD&2^;@01<$PAC3Gk`EqMGlq^Q&k?xQ zM`eW*2!ty&9XZ>st3OHTArTQn-qi-X(p$y}ey`C}S^L)g_{6*;<7nF4{?l3H`HvWU zvoZv5EJ{{<{l0%-V5r||PF>Q~^N4N`F9Bs|GqueTn`<_gmzN`WzO$W;f1iVYWxH=F z{+Rh)UHXP5d{Oa(GEQ5{y0*t}0?yN3;GK5Z)_5E=`R2Md_tM=hoP@y@tA=()&Y0W^ z5f+moyf-~=ZEc;h@22Ug%Yf*NIOs@FaB#;inKGibfXe=86LuP>+M?_Qdg={tCWNb- z@2!*^y?yk+ftyQC-rc~H@8m3B*q?)Mp1$$Yt!K}2rUs@5R9}X}7>u7&JoDPiuJ3ML zSl5fF6;P~7m K&XL&c;(q{}E63>o diff --git a/app/assets/images/layout/base-single.svg b/app/assets/images/layout/base-single.svg new file mode 100644 index 00000000000..b0d7b5e8368 --- /dev/null +++ b/app/assets/images/layout/base-single.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + base-single + + + diff --git a/app/assets/images/layout/base.png b/app/assets/images/layout/base.png deleted file mode 100644 index 0d4b11bc0800a756eccd19c12fdb34bd07af227a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3741 zcmaJ^dpy(o{~tmw5orj=tc}DrW5(EAGMCX<$h9!r*szOj7*0`c;b_P$l1o$)Dd|E< zCn4!36-7b_Czs<=;^;T$dph6WAHRO@$LI5Tzu&LN^Z9&T-mk~w{rIGlTphQ`?ve!n z0NV&ocz4n4Bzm2pcVKd?6O$=PXd{8hgl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~d54y=$?-q?6-@vm{*MRCD8WP3RSkBGkhPMO9W;!gedCJt(6nk=VQm-n(;5iz^sOvTVc4$W-_fi?%7f-|?4OZ9zsB@&M)WQF@}Tx)Nb8Ya@=o-_AwsEKDyop+pz zPi>S+jax66WKWw2wXItvg-SNCEhM?=2Pr8jS8OYfr1Q_i4&?&Rz8q`lNYW25!SnuP zNaw49>S&4g11mmTe#K-t9EqFih5mt&TrL?H81PsB+?2WDmKu^DZ+7AEv!(3(C6=Q8 z@jgG%E&p93=(+d&CzgY638U>Xsk3}TA`vBD>YwjCPESbq9`wRIH{YWwtFeB6tay_B zY}cgZ*SVgLA3qk>dCin0h^FMk zh-NURqy?zcVv<)Uhfk3DkMQ1Ssv@HAY)wp_T~{q{m0eaPEesbaP?_}W%g})`MO+$f z_iin!K98hVezZ*Nd~s9End0j&+@(&aR-6n0{QgYoVoNrv%nmft@x~Zb&N%pZT2Y-) z=aSgqjFIRjrP}Ife8Gxe)FP91KrJ7t`EBU60V3vbJi(ND=;jY2!QK^Lzc1+c{{S8; BVbcHr diff --git a/app/assets/images/layout/base.svg b/app/assets/images/layout/base.svg new file mode 100644 index 00000000000..b6cd2769092 --- /dev/null +++ b/app/assets/images/layout/base.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + base + + + + + + + + + + + + + + + + diff --git a/app/assets/stylesheets/patternfly_overrides.scss b/app/assets/stylesheets/patternfly_overrides.scss index ed0b7baa410..834be5d1585 100644 --- a/app/assets/stylesheets/patternfly_overrides.scss +++ b/app/assets/stylesheets/patternfly_overrides.scss @@ -387,9 +387,9 @@ table.table.table-summary-screen tbody td img { /// adjust power state images for use in quad icon .b72 .stretch { background-repeat: no-repeat; - width: 35px; - height: 32px; - margin: -3px 0 -2px 1px; + width: 36px; + height: 34px; + margin: -3px 0 -2px 0px; border-top-right-radius: 15px; } diff --git a/app/helpers/quadicon_helper.rb b/app/helpers/quadicon_helper.rb index c189397f50f..0ebfc043253 100644 --- a/app/helpers/quadicon_helper.rb +++ b/app/helpers/quadicon_helper.rb @@ -228,7 +228,7 @@ def img_tag_reflection def render_physical_server_quadicon(item, options) output = [] if settings(:quadicons, :physical_server) - output << flobj_img_simple("layout/base.png") + output << flobj_img_simple("layout/base.svg") output << flobj_p_simple("a72", (item.host ? 1 : 0)) output << flobj_img_simple("svg/currentstate-#{h(item.power_state.try(:downcase))}.svg", "b72") @@ -434,7 +434,7 @@ def quadicon_truncate_middle(value, trunc_to = 10) end def flobj_img_simple(image = nil, cls = '', size = 72) - image ||= "layout/base-single.png" + image ||= "layout/base-single.svg" content_tag(:div, :class => "flobj #{cls}") do encodable_image_tag(image, :size => size) @@ -510,7 +510,7 @@ def render_host_quadicon(item, options) output = [] if settings(:quadicons, :host) - output << flobj_img_simple("layout/base.png") + output << flobj_img_simple("layout/base.svg") output << flobj_p_simple("a72", item.vms.size) output << currentstate_icon(item.normalized_state.downcase) @@ -556,7 +556,7 @@ def render_ext_management_system_quadicon(item, options) output = [] if settings(:quadicons, db_for_quadicon) - output << flobj_img_simple("layout/base.png") + output << flobj_img_simple("layout/base.svg") item_count = case item when EmsPhysicalInfra then item.physical_servers.size when EmsCloud then item.total_vms @@ -572,7 +572,7 @@ def render_ext_management_system_quadicon(item, options) output << flobj_img_simple(img_for_auth_status(item), "d72") output << flobj_img_simple('100/shield.png', "g72") unless item.get_policies.empty? else - output << flobj_img_simple("layout/base-single.png") + output << flobj_img_simple("layout/base-single.svg") output << flobj_img_small("svg/vendor-#{h(item.image_name)}.svg", "e72") end @@ -598,7 +598,7 @@ def render_ext_management_system_quadicon(item, options) def render_ems_cluster_quadicon(item, options) output = [] - output << flobj_img_simple("layout/base-single.png") + output << flobj_img_simple("layout/base-single.svg") output << flobj_img_small("100/emscluster.png", "e72") output << flobj_img_simple("100/shield.png", "g72") unless item.get_policies.empty? @@ -620,7 +620,7 @@ def render_non_listicon_single_quadicon(item, options) img_path = item.try(:decorate).try(:fileicon) || "100/#{item.class.base_class.to_s.underscore}.png" - output << flobj_img_simple("layout/base-single.png") + output << flobj_img_simple("layout/base-single.svg") output << flobj_img_simple(img_path, "e72") unless options[:typ] == :listnav @@ -662,7 +662,7 @@ def render_non_listicon_single_quadicon(item, options) def render_listicon_single_quadicon(item, options) output = [] - output << flobj_img_simple("layout/base-single.png") + output << flobj_img_simple("layout/base-single.svg") output << flobj_img_small("100/#{@listicon}.png", "e72") unless options[:typ] == :listnav @@ -718,7 +718,7 @@ def render_storage_quadicon(item, options) output = [] if settings(:quadicons, :storage) - output << flobj_img_simple("layout/base.png") + output << flobj_img_simple("layout/base.svg") output << flobj_img_simple("100/storagetype-#{item.store_type.nil? ? "unknown" : h(item.store_type.to_s.downcase)}.png", "a72") output << flobj_p_simple("b72", item.v_total_vms) output << flobj_p_simple("c72", item.v_total_hosts) @@ -727,7 +727,7 @@ def render_storage_quadicon(item, options) output << flobj_img_simple("100/piecharts/datastore/#{h(space_percent)}.png", "d72") else space_percent = (item.used_space_percent_of_total.to_i + 9) / 10 - output << flobj_img_simple("layout/base-single.png") + output << flobj_img_simple("layout/base-single.svg") output << flobj_img_simple("100/datastore-#{h(space_percent)}.png", "e72") end @@ -785,7 +785,7 @@ def render_vm_or_template_quadicon(item, options) output = [] if settings(:quadicons, item.class.base_model.name.underscore.to_sym) - output << flobj_img_simple("layout/base.png") + output << flobj_img_simple("layout/base.svg") output << flobj_img_simple("svg/os-#{h(item.os_image_name.downcase)}.svg", "a72") output << currentstate_icon(item.normalized_state.downcase) output << flobj_img_simple("svg/vendor-#{h(item.vendor.downcase)}.svg", "c72") @@ -802,7 +802,7 @@ def render_vm_or_template_quadicon(item, options) output << flobj_p_simple("d72", h(item.v_total_snapshots)) end else - output << flobj_img_simple("layout/base-single.png") + output << flobj_img_simple("layout/base-single.svg") if quadicon_policy_sim? && !session[:policies].empty? output << flobj_img_small(img_for_compliance(item), "e72") diff --git a/app/views/layouts/listnav/_compare_sections.html.haml b/app/views/layouts/listnav/_compare_sections.html.haml index a207bb43a07..1b9605adf6a 100644 --- a/app/views/layouts/listnav/_compare_sections.html.haml +++ b/app/views/layouts/listnav/_compare_sections.html.haml @@ -16,7 +16,7 @@ - if %w(MiqTemplate VmOrTemplate Vm).include?(@sb[:compare_db]) - if settings(:quadicons, :vm) .flobj - %img{:src => image_path("layout/base.png")} + %img{:src => image_path("layout/base.svg")} %div{:class => "flobj b72"} - if @drift_obj.template? - if @drift_obj.host @@ -44,7 +44,7 @@ - elsif @sb[:compare_db] == "Host" - if settings(:quadicons, :host) .flobj - %img{:src => image_path("layout/base.png")} + %img{:src => image_path("layout/base.svg")} %div{:class => "flobj c72"} %img{:src => image_path("svg/vendor-#{h(@drift_obj.vmm_vendor_display.downcase)}.svg")} - unless @drift_obj.power_state.blank?