Skip to content

Commit d173e12

Browse files
committed
[#28] fix digraph styles
1 parent 88de908 commit d173e12

File tree

3 files changed

+71
-64
lines changed

3 files changed

+71
-64
lines changed

assets/digraph-builder.scss

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.profiler-page-call-graph__graphviz svg {
2+
@apply bg-gray-700;
3+
4+
> text {
5+
@apply font-bold text-sm;
6+
}
7+
8+
.graph {
9+
> polygon {
10+
@apply fill-gray-700;
11+
}
12+
13+
> path {
14+
@apply fill-transparent;
15+
}
16+
}
17+
18+
.edge {
19+
> path {
20+
stroke-width: 2px;
21+
}
22+
23+
> text {
24+
@apply fill-white ml-2;
25+
26+
transform: translate(10px, 0px);
27+
}
28+
}
29+
30+
.node {
31+
@apply cursor-pointer;
32+
33+
> path {
34+
@apply rounded;
35+
36+
stroke-width: 1;
37+
}
38+
}
39+
40+
.pmu {
41+
> text {
42+
@apply fill-white;
43+
}
44+
45+
> path {
46+
@apply fill-red-600 stroke-red-800;
47+
}
48+
49+
&:hover > path {
50+
@apply fill-red-800;
51+
}
52+
}
53+
54+
.default {
55+
> text {
56+
@apply fill-gray-700;
57+
}
58+
59+
> path {
60+
@apply fill-gray-200 stroke-gray-400;
61+
}
62+
63+
&:hover > path {
64+
@apply fill-gray-300;
65+
}
66+
}
67+
68+
}

assets/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "vendor.css";
2+
@import "digraph-builder.scss";
23

34
body {
45
@apply bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-50 p-0;

components/ProfilerPageCallGraph/ProfilerPageCallGraph.vue

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,13 @@ export default defineComponent({
5454
type: Object as PropType<Profiler>,
5555
required: true,
5656
},
57-
threshold: {
58-
type: Number,
59-
default: 1,
60-
},
6157
},
6258
emits: ["hover", "hide"],
6359
data() {
6460
return {
6561
isFullscreen: false,
6662
metric: "cpu",
63+
threshold: 1,
6764
};
6865
},
6966
watch: {
@@ -158,65 +155,6 @@ export default defineComponent({
158155
.profiler-page-call-graph__graphviz {
159156
@apply flex-1 justify-items-stretch items-stretch bg-white;
160157
161-
.graph {
162-
> polygon {
163-
@apply fill-gray-700;
164-
}
165-
166-
> path {
167-
@apply fill-transparent;
168-
}
169-
}
170-
171-
.edge {
172-
> path {
173-
stroke-width: 2px;
174-
}
175-
176-
> text {
177-
@apply fill-white ml-2;
178-
}
179-
}
180-
181-
.node {
182-
@apply cursor-pointer;
183-
184-
> path {
185-
@apply rounded;
186-
stroke-width: 1;
187-
}
188-
189-
&.pmu {
190-
> text {
191-
@apply fill-white;
192-
}
193-
194-
> path {
195-
@apply fill-red-600 stroke-red-800;
196-
}
197-
198-
&:hover > path {
199-
@apply fill-red-800;
200-
}
201-
}
202-
203-
&.default {
204-
> text {
205-
@apply fill-gray-700;
206-
}
207-
208-
> path {
209-
@apply fill-gray-200 stroke-gray-400;
210-
}
211-
212-
&:hover > path {
213-
@apply fill-gray-300;
214-
}
215-
}
216-
217-
> text {
218-
@apply font-bold text-sm;
219-
}
220-
}
158+
max-height: 100vh;
221159
}
222160
</style>

0 commit comments

Comments
 (0)