1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16let inputPlace = ''; 17 18let html = ` 19<style> 20:host{ 21 height: 30px; 22 background: var(--dark-background4,#F2F2F2); 23 border-top: 1px solid var(--dark-border1,#c9d0da);display: flex;align-items: center;z-index: 2; 24 margin-left: -10px; 25 width: calc(100% + 20px); 26} 27 28.chosen-single { 29 position: relative; 30 display: block; 31 overflow: hidden; 32 text-decoration: none; 33 white-space: nowrap; 34 height: 34px; 35 padding: 3px 6px; 36 font-size: 14px; 37 line-height: 1.42857143; 38 color: #555; 39 background-color: #fff; 40 background-image: none; 41 border: 1px solid #ccc; 42 border-radius: 4px; 43 transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; 44 box-shadow: inset 0 1px 1px rgba(0,0,0,.075); 45} 46.disabled{ 47color: rgba(0,0,0,0.4); 48} 49#pane-filter-input{ 50background: var(--dark-background4,#FFFFFF); 51border: 1px solid var(--dark-border,rgba(0,0,0,0.60)); 52color: var(--dark-color2,#000000); 53border-radius: 8px; 54width: 200px; 55} 56#pane-filter-input:focus{ 57 outline: none; 58 box-shadow: 1px 1px 1px var(--dark-color,#bebebe); 59} 60#pane-filter-input::-webkit-input-placeholder { 61 color: var(--dark-color,#aab2bd); 62 } 63.describe{ 64 /*display: inline-block*/ 65 font-size: 0.8rem; 66 white-space: nowrap; 67 overflow: hidden; 68 text-overflow: ellipsis; 69 min-width: 50px; 70} 71 72#mark{ 73 border: 1px solid var(--bark-prompt,#999999); 74 border-radius: 1px; 75 background: var(--dark-background4,#F2F2F2); 76 color: var(--dark-color2,rgba(0,0,0,0.9)); 77 transition: all 0.1s; 78} 79#mark:hover{ 80 background: var(--dark-background1,#dfdfdf); 81} 82#mark:active{ 83 background: var(--dark-background4,#F2F2F2); 84 transition: all 0.05s; 85} 86#first-select{ 87width: 200px; 88} 89#second-select{ 90width: 200px; 91} 92.spacing{ 93margin-left: 10px; 94} 95.max-spacing{ 96margin-left: 15px; 97} 98 99:host(:not([inputLeftText])) .left-text{ 100 display: none; 101} 102:host(:not([input])) #pane-filter-input{ 103 display: none; 104} 105:host(:not([fileSystem])) .popover .tree-check:nth-child(3){ 106 display: none; 107} 108:host([fileSystem]) .popover .tree-check:nth-child(5){ 109 display: none; 110} 111:host([nativeMemory]) .popover .tree-check:nth-child(3){ 112 display:none; 113} 114:host([nativeMemory]) .popover .tree-check:nth-child(5){ 115 display:none; 116} 117:host([isStatisticsMemory]) .popover .tree-check:nth-child(4){ 118 display:none; 119} 120:host(:not([mark])) #mark{ 121 display: none; 122} 123:host(:not([first])) #first-select{ 124 display: none; 125} 126:host(:not([second])) #second-select{ 127 display: none; 128} 129:host(:not([third])) #third-select{ 130 display: none; 131} 132:host(:not([tree])) .tree{ 133 display: none; 134} 135:host([disabledMining]) #data-mining{ 136 display: none; 137} 138:host([disabledMining]) #data-library{ 139 display: none; 140} 141:host([disableTransfer]) .transfer-text{ 142 display: none; 143} 144:host(:not([icon])) #icon{ 145 display: none; 146} 147:host(:not([options])) #check-popover{ 148 display: none; 149} 150#icon[name="statistics"]{ 151 margin-left: 12px; 152} 153 154.constraints-input{ 155 background: var(--dark-border,#ffffff); 156 color: var(--dark-color1,rgba(0,0,0,0.86)); 157 border: 1px solid var(--dark-border,rgba(0,0,0,0.60)); 158 border-radius: 10px; 159 width: 40px; 160 margin-left: 10px; 161 outline: none; 162} 163.constraints-input[disabled]{ 164 background: var(--dark-background5,#ededed); 165} 166.reset-button{ 167 opacity: 0.9; 168 font-size: 13px; 169 color: #0A59F7; 170 text-align: center; 171 line-height: 16px; 172 background: var(--dark-background3,#F4F3F4); 173 border: 1px solid var(--dark-background8,#F4F3F4); 174 border-radius: 16px; 175 padding: 2px 18px; 176} 177 178#call-tree-popover[visible="true"] #call-tree{ 179 color: #0A59F7; 180} 181#check-popover[visible="true"] #check-des{ 182 color: #0A59F7; 183} 184#tree-constraints-popover[visible="true"] #tree-constraints{ 185 color: #0A59F7; 186} 187#data-mining-popover[visible="true"] #data-mining{ 188 color: #0A59F7; 189} 190 191.mining-checked[highlight]{ 192 color: #FFFFFF; 193 background: #0C65D1; 194} 195#data-library-popover[visible="true"] #data-library{ 196 color: #0A59F7; 197} 198.library-checked[highlight]{ 199 color: #FFFFFF; 200 background: #0C65D1; 201} 202#title{ 203 overflow: hidden; 204 white-space: nowrap; 205 text-overflow: ellipsis; 206 flex: 1; 207 text-align: left; 208} 209#mining-row{ 210 background: var(--dark-background4,#F2F2F2); 211 border-radius: 2px; 212 height: 135px; 213 width: 250px; 214 overflow-y: auto; 215} 216#library-row{ 217 background: var(--dark-background4,#F2F2F2); 218 border-radius: 2px; 219 height: 135px; 220 width: 250px; 221 overflow-y: auto; 222} 223.check-wrap, .tree-check{ 224 margin-bottom: 5px; 225 display: flex; 226 align-content: center; 227} 228.sort{ 229 display: flex; 230 align-items: center; 231 cursor: pointer; 232} 233:host(:not([sort])) .sort{ 234 display: none; 235} 236.popover{ 237 display: flex; 238} 239.lit-check-box{ 240 margin-right: 5px; 241} 242.transfer-list{ 243 display: flex; 244 flex-derection: column; 245} 246.tree-radio{ 247 margin: 5px 0; 248 cursor: pointer; 249} 250.radio{ 251 cursor: pointer; 252} 253.hide{ 254 display: none; 255} 256</style> 257<lit-icon name="menu" class="spacing" id="icon" size="20"></lit-icon> 258<span class="describe left-text spacing">Input Filter</span> 259<input id="pane-filter-input" class="spacing" placeholder="${inputPlace}"/> 260<button id="mark" class="spacing">Mark Snapshot</button> 261<div id="load" style="display: flex"> 262 263</div> 264<lit-popover placement="topLeft" class="popover" haveRadio="true" trigger="click" id="call-tree-popover"> 265 <div slot="content"> 266 <div class="tree-check"><lit-check-box class="lit-check-box" not-close></lit-check-box><div>Invert</div></div> 267 <div class="tree-check"><lit-check-box class="lit-check-box" not-close></lit-check-box><div>Hide System so</div></div> 268 <div class="tree-check"><lit-check-box class="lit-check-box" not-close></lit-check-box><div>Hide Event</div></div> 269 <div class="tree-check"><lit-check-box class="lit-check-box" not-close></lit-check-box><div>Hide Thread</div></div> 270 <div class="tree-check"><lit-check-box class="lit-check-box" not-close></lit-check-box><div>Hide Thread State</div></div> 271 </div> 272 <span class="describe tree max-spacing" id="call-tree">Options</span> 273</lit-popover> 274<lit-popover placement="topLeft" class="popover" haveRadio="true" trigger="click" id="check-popover"> 275 <div slot="content"></div> 276 <span class="describe max-spacing" id="check-des">Options</span> 277</lit-popover> 278<lit-popover placement="topLeft" class="popover" haveRadio="true" trigger="click" id="tree-constraints-popover"> 279 <div slot="content" style="display: flex; align-items: flex-end"> 280 <lit-check-box id="constraints-check" not-close></lit-check-box> 281 <input class="constraints-input" disabled value="0" not-close/> 282 <lit-popover placement="topLeft" class="popover" haveRadio="true" not-close> 283 <div slot="content"> 284 <div style="font-size: 0.7rem">Constraints:Only enabled with data and while stopped;</div> 285 <div style="font-size: 0.7rem">filters data to thresholds. </div> 286 </div> 287 <input class="constraints-input" disabled value="∞" not-close/> 288 </lit-popover> 289 </div> 290 <span class="describe tree max-spacing" id="tree-constraints">Sample Count Filter</span> 291</lit-popover> 292 <lit-popover placement="topLeft" class="popover" haveRadio="true" trigger="click" id="data-mining-popover"> 293 <div slot="content"> 294 <div id="mining-row"> 295 296 </div> 297 <div style="display: flex;justify-content: space-around; margin-top: 8px"> 298 <div class="mining-button reset-button">Reset</div> 299 </div> 300 </div> 301 <span class="describe tree max-spacing" id="data-mining">Symbol Filter</span> 302</lit-popover> 303<lit-popover placement="topLeft" class="popover transfer-area" haveRadio="true" trigger="click" id="call-tree-popover"> 304<div slot="content" id="transfer-list" style="display:block; height:auto; max-height: 200px; overflow-y:auto;"> 305 306</div> 307<span class="describe tree max-spacing transfer-text" id="call-tree">Transfer</span> 308</lit-popover> 309<lit-popover placement="topLeft" class="popover" haveRadio="true" trigger="click" id="data-library-popover"> 310 <div slot="content"> 311 <div id="library-row"> 312 313 </div> 314 <div style="display: flex;justify-content: space-around; margin-top: 8px"> 315 <div class="library-button reset-button">Reset</div> 316 </div> 317 </div> 318 <span class="describe tree max-spacing" id="data-library">Library Filter</span> 319</lit-popover> 320<div class="sort"> 321 <lit-icon name="swap" class="spacing" size="16"></lit-icon> 322 <div style="margin-left: 5px" class="describe statistics-name">Statistics by Thread</div> 323</div> 324` 325export const TabPaneFilterHtml = (input: string): string => { 326 inputPlace = input; 327 return html; 328} 329