|
357 | 357 | </devtools-table>
|
358 | 358 | </t>
|
359 | 359 |
|
| 360 | + <!-- MEMORY SVG COMPONENT --> |
| 361 | + <g t-name="MemoryIntermediateLayout" t-attf-transform="translate(0, {{props.intermediate.offsetY * props.heigth}})" class="MemoryIntermediateLayout"> |
| 362 | + <g t-if="props.intermediate.nexts.length" t-attf-transform="translate({{props.width}}, 0)"> |
| 363 | + <MemoryIntermediateLayout |
| 364 | + t-foreach="props.intermediate.nexts" t-as="next" |
| 365 | + activeSlice="props.activeSlice" |
| 366 | + selectedSlice="props.selectedSlice" |
| 367 | + intermediate="next" |
| 368 | + width="props.width" |
| 369 | + heigth="props.heigth"/> |
| 370 | + <line x1="0" t-att-y1="props.heigth" x2="0" t-att-y2="props.intermediate.height * props.heigth" stroke="black"/> |
| 371 | + </g> |
| 372 | + <g> |
| 373 | + <text t-on-click="selectAction" x="6" y="28" fill="red" stroke="none" |
| 374 | + style="font-size: 10px;font-family: arial; cursor: pointer;"><t t-esc="props.intermediate.origin.actionID"/></text> |
| 375 | + <line x1="0" t-att-y1="props.heigth" t-att-x2="props.width" t-att-y2="props.heigth" stroke="black"/> |
| 376 | + <circle |
| 377 | + t-on-click="selectMemory" |
| 378 | + t-att-cx="props.width" t-att-cy="props.heigth" r="5" |
| 379 | + stroke-width="1" |
| 380 | + t-att-fill="props.activeSlice === props.intermediate.key ? 'green' : (props.selectedSlice === props.intermediate.key ? 'yellow' : '#dddddd')" |
| 381 | + style="cursor: pointer;"/> |
| 382 | + </g> |
| 383 | + </g> |
| 384 | + |
| 385 | + <g t-name="MemoryIntermediateFluxLayout" class="MemoryIntermediateFluxLayout" transform="translate(12, 0)"> |
| 386 | + <!-- <rect t-att-width="props.flux.width * props.width - 24" t-att-height="props.flux.height * props.heigth" fill="transparent" stroke="#dddddd" stroke-width="1"/> --> |
| 387 | + <line t-foreach="props.flux.origins" t-as="origin" |
| 388 | + t-att-x1="origin.offsetX * props.width" t-att-y1="origin.offsetY * props.heigth" |
| 389 | + t-att-x2="flux.width * props.width - 24" t-att-y2="origin.offsetY * props.heigth" stroke="green"/> |
| 390 | + <line t-if="props.flux.origins.length" |
| 391 | + t-att-x1="flux.width * props.width - 24" t-att-y1="flux.origins[flux.origins.length - 1].offsetY * props.heigth" |
| 392 | + t-att-x2="flux.width * props.width - 24" y2="0" stroke="green"/> |
| 393 | + <MemoryIntermediateLayout |
| 394 | + t-foreach="flux.intermediates" t-as="intermediate" |
| 395 | + activeSlice="props.activeSlice" |
| 396 | + selectedSlice="props.selectedSlice" |
| 397 | + intermediate="intermediate" |
| 398 | + width="props.width" |
| 399 | + heigth="props.heigth"/> |
| 400 | + <line x1="0" y1="0" x2="0" t-att-y2="props.flux.height * props.heigth" stroke="black"/> |
| 401 | + </g> |
| 402 | + |
| 403 | + <g t-name="MemoryMasterLayout" class="MemoryMasterLayout" t-attf-transform="translate(0, {{props.master.offsetY * props.heigth}})"> |
| 404 | + <MemoryIntermediateFluxLayout |
| 405 | + activeSlice="props.activeSlice" |
| 406 | + selectedSlice="props.selectedSlice" |
| 407 | + flux="props.master.flux" |
| 408 | + width="props.width" |
| 409 | + heigth="props.heigth"/> |
| 410 | + <g t-if="!props.master.finished && props.master.nexts.length" t-attf-transform="translate({{props.master.flux.width * props.width}},0)"> |
| 411 | + <MemoryMasterLayout |
| 412 | + t-foreach="props.master.nexts" t-as="next" |
| 413 | + activeSlice="props.activeSlice" |
| 414 | + selectedSlice="props.selectedSlice" |
| 415 | + master="next" |
| 416 | + width="props.width" |
| 417 | + heigth="props.heigth"/> |
| 418 | + <line t-if="props.master.nexts.length > 1" x1="0" y1="0" x2="0" t-att-y2="props.master.nexts[props.master.nexts.length - 1].offsetY * props.heigth" stroke="black" stroke-width="2"/> |
| 419 | + </g> |
| 420 | + <line t-if="!props.master.finished && !props.master.nexts.length" |
| 421 | + t-attf-x1="{{props.master.flux.width * props.width}}" y1="0" y2="0" t-attf-x2="{{(props.master.flux.width + 1) * props.width}}" stroke="black" stroke-width="2"/> |
| 422 | + <g> |
| 423 | + <text t-if="!props.firstItem" |
| 424 | + t-on-click="selectAction" x="16" y="-2" fill="red" stroke="none" |
| 425 | + style="font-size: 10px;font-family: arial; cursor: pointer;"><t t-esc="props.master.origin.actionID"/></text> |
| 426 | + <line x1="0" y1="0" y2="0" t-attf-x2="{{props.master.flux.width * props.width}}" stroke="black" stroke-width="2"/> |
| 427 | + <circle |
| 428 | + t-on-click="selectMemory" |
| 429 | + t-on-dblclick="switchMemory" |
| 430 | + t-att-cx="props.master.flux.width * props.width" cy="0" r="8" |
| 431 | + stroke-width="1" |
| 432 | + t-att-fill="props.activeSlice === props.master.key ? 'green' : (props.selectedSlice === props.master.key ? 'yellow' : '#dddddd')" |
| 433 | + style="cursor: pointer;"/> |
| 434 | + </g> |
| 435 | + </g> |
| 436 | + |
| 437 | + <svg t-name="MemoryFluxLayout" t-att-width="props.flux.width * 60 + 40" t-att-height="(props.flux.height + 1) * 30 + 20"> |
| 438 | + <g t-attf-transform="translate(0, 20)"> |
| 439 | + <MemoryMasterLayout |
| 440 | + activeSlice="props.activeSlice" |
| 441 | + selectedSlice="props.selectedSlice" |
| 442 | + master="props.flux.first" |
| 443 | + firstItem="true" |
| 444 | + width="55" |
| 445 | + heigth="30"/> |
| 446 | + </g> |
| 447 | + </svg> |
| 448 | + |
| 449 | + <!-- MEMORY --> |
| 450 | + <devtools-panel t-name="MemoryComponent" |
| 451 | + t-on-memory-selected="onSelectMemory" |
| 452 | + t-on-memory-switch="onSwitchMemory" |
| 453 | + class="active" tabindex="2"> |
| 454 | + <devtools-contents> |
| 455 | + <devtools-mainpane> |
| 456 | + <MemoryFluxLayout t-if="state.flux" flux="state.flux" activeSlice="state.activeSlice" selectedSlice="state.selectedSlice"/> |
| 457 | + <MemoryFluxLayout t-if="state.flux2" flux="state.flux2" activeSlice="state.activeSlice" selectedSlice="state.selectedSlice"/> |
| 458 | + </devtools-mainpane> |
| 459 | + <devtools-sidepane> |
| 460 | + <div class="about"> |
| 461 | + <span class="type">Memory Slice</span> <t t-esc="state.selectedSlice.split('-').pop()"/> |
| 462 | + </div> |
| 463 | + <div class="properties"> |
| 464 | + <div class="divider">👤 Parent</div> |
| 465 | + <span style="cursor: pointer;" |
| 466 | + t-if="memory._slicesReference[state.selectedSlice].parent" |
| 467 | + t-on-click="selectMemory(memory._slicesReference[state.selectedSlice].parent.name)"> |
| 468 | + <t t-esc="memory._slicesReference[state.selectedSlice].parent.name"/> |
| 469 | + </span> |
| 470 | + <div class="divider">👪 Children</div> |
| 471 | + <table> |
| 472 | + <tbody> |
| 473 | + <tr t-foreach="memory._slicesReference[state.selectedSlice].children" t-as="ref"> |
| 474 | + <td style="cursor: pointer;" t-on-click="selectMemory(ref.name)"><t t-esc="ref.name.split('-').pop()"/></td> |
| 475 | + </tr> |
| 476 | + </tbody> |
| 477 | + </table> |
| 478 | + </div> |
| 479 | + </devtools-sidepane> |
| 480 | + </devtools-contents> |
| 481 | + </devtools-panel> |
| 482 | + |
360 | 483 | <!-- MAIN -->
|
361 | 484 | <jw-devtools t-name="devtools"
|
362 | 485 | t-att-class="{
|
|
374 | 497 | <devtools-button t-on-click="openTab('commands')" t-att-class="{
|
375 | 498 | selected: state.currentTab == 'commands',
|
376 | 499 | }">Commands</devtools-button>
|
| 500 | + <devtools-button t-on-click="openTab('memory')" t-att-class="{ |
| 501 | + selected: state.currentTab == 'memory', |
| 502 | + }">Memory</devtools-button> |
377 | 503 | </devtools-navbar>
|
378 | 504 | <t t-if="!state.closed">
|
379 | 505 | <InspectorComponent isOpen="state.currentTab == 'inspector'"/>
|
380 | 506 | <CommandsComponent isOpen="state.currentTab == 'commands'"
|
381 | 507 | commands="state.commands"/>
|
| 508 | + <MemoryComponent t-if="state.currentTab == 'memory'" |
| 509 | + actions="state.actions"/> |
382 | 510 | </t>
|
383 | 511 | </jw-devtools>
|
384 | 512 |
|
|
0 commit comments