address pr

This commit is contained in:
Fine 2022-08-22 19:41:10 +08:00
parent 27a5d91929
commit 69140af160
3 changed files with 12 additions and 16 deletions

View File

@ -48,11 +48,11 @@ const { t } = useI18n();
min-width: 700px; min-width: 700px;
overflow: auto; overflow: auto;
position: relative; position: relative;
width: calc(100% - 300px); width: calc(100% - 320px);
} }
.text { .text {
width: calc(100% - 300px); width: calc(100% - 320px);
text-align: center; text-align: center;
margin-top: 30px; margin-top: 30px;
} }

View File

@ -111,7 +111,7 @@ function drawGraph() {
(d: ProcessNode) => d.serviceInstanceId !== selectorStore.currentPod.id (d: ProcessNode) => d.serviceInstanceId !== selectorStore.currentPod.id
); );
if (outNodes.length) { if (outNodes.length) {
diff.value[0] = (dom.width - radius * 3) / 2 + radius; diff.value[0] = (dom.width - radius * 4) / 2 + radius;
} else { } else {
diff.value[0] = (dom.width - radius * 2) / 2 + radius; diff.value[0] = (dom.width - radius * 2) / 2 + radius;
} }
@ -208,7 +208,7 @@ function createLayout() {
.attr("y", p.radius) .attr("y", p.radius)
.text(() => selectorStore.currentPod.label); .text(() => selectorStore.currentPod.label);
const nodeArr = networkProfilingStore.nodes.filter( const nodeArr = networkProfilingStore.nodes.filter(
(d: ProcessNode) => d.serviceInstanceId === selectorStore.currentPod.id (d: ProcessNode) => d.isReal || d.name === "UNKNOWN_LOCAL"
); );
const count = nodeArr.length; const count = nodeArr.length;
// layout // layout
@ -268,7 +268,7 @@ function createLayout() {
nodeArr[v].y = y; nodeArr[v].y = y;
} }
const outNodes = networkProfilingStore.nodes.filter( const outNodes = networkProfilingStore.nodes.filter(
(d: ProcessNode) => d.serviceInstanceId !== selectorStore.currentPod.id (d: ProcessNode) => !(d.isReal || d.name === "UNKNOWN_LOCAL")
); );
let angle = 10; let angle = 10;
let r = 230; let r = 230;
@ -279,9 +279,10 @@ function createLayout() {
angle = angle + 20; angle = angle + 20;
if (angle * (v + 1) > 120) { if (angle * (v + 1) > 120) {
angle = -10; angle = -10;
r = r + 60;
} }
if (angle * (v + 1) < -120) { if (angle * (v + 1) < -120) {
r = r + 20; r = r + 60;
angle = 10; angle = 10;
} }
} }

View File

@ -62,14 +62,6 @@ limitations under the License. -->
}" }"
> >
<div class="ell"> <div class="ell">
<span>
{{ i.targetType }}
</span>
<a class="profile-btn r" @click="viewDetail = true">
<Icon iconName="view" size="middle" />
</a>
</div>
<div class="grey ell sm">
<span class="mr-10 sm"> <span class="mr-10 sm">
{{ dateFormat(i.taskStartTime) }} {{ dateFormat(i.taskStartTime) }}
</span> </span>
@ -78,6 +70,9 @@ limitations under the License. -->
dateFormat(i.taskStartTime + i.fixedTriggerDuration * 1000) dateFormat(i.taskStartTime + i.fixedTriggerDuration * 1000)
}} }}
</span> </span>
<a class="profile-btn r" @click="viewDetail = true">
<Icon iconName="view" size="middle" />
</a>
</div> </div>
</td> </td>
</tr> </tr>
@ -218,7 +213,7 @@ watch(
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.profile-task-list { .profile-task-list {
width: 300px; width: 320px;
height: calc(100% - 10px); height: calc(100% - 10px);
overflow: auto; overflow: auto;
border-right: 1px solid rgba(0, 0, 0, 0.1); border-right: 1px solid rgba(0, 0, 0, 0.1);
@ -229,7 +224,7 @@ watch(
} }
.profile-td { .profile-td {
padding: 5px 10px; padding: 10px;
border-bottom: 1px solid rgba(0, 0, 0, 0.07); border-bottom: 1px solid rgba(0, 0, 0, 0.07);
&.selected { &.selected {