feat: update style

This commit is contained in:
Fine 2023-03-29 18:39:21 +08:00
parent 90b28c03bb
commit 1825dac561
2 changed files with 18 additions and 2 deletions

View File

@ -25,7 +25,7 @@ limitations under the License. -->
@change="spanModeChange" @change="spanModeChange"
class="mr-10" class="mr-10"
/> />
<el-button type="primary" size="small" @click="analyzeProfile()"> <el-button type="primary" size="small" :disabled="!profileStore.currentSpan.profiled" @click="analyzeProfile()">
{{ t("analyze") }} {{ t("analyze") }}
</el-button> </el-button>
</div> </div>

View File

@ -48,7 +48,15 @@ limitations under the License. -->
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div @click="selectSpan" :class="['trace-item', 'level' + (data.level - 1), { 'trace-item-error': data.isError }]"> <div
@click="selectSpan"
:class="[
'trace-item',
'level' + (data.level - 1),
{ 'trace-item-error': data.isError },
{ profiled: data.profiled === false },
]"
>
<div <div
:class="['method', 'level' + (data.level - 1)]" :class="['method', 'level' + (data.level - 1)]"
:style="{ :style="{
@ -186,6 +194,10 @@ limitations under the License. -->
item.style.background = "#fff"; item.style.background = "#fff";
} }
dom.style.background = "rgba(0, 0, 0, 0.1)"; dom.style.background = "rgba(0, 0, 0, 0.1)";
const p: any = document.getElementsByClassName("profiled")[0];
if (p) {
p.style.background = "#eee";
}
} }
function selectSpan(event: any) { function selectSpan(event: any) {
const dom = event.composedPath().find((d: any) => d.className.includes("trace-item")); const dom = event.composedPath().find((d: any) => d.className.includes("trace-item"));
@ -259,6 +271,10 @@ limitations under the License. -->
} }
} }
.profiled {
background-color: #eee;
}
.trace-item-error { .trace-item-error {
color: #e54c17; color: #e54c17;
} }