diff --git a/src/assets/css/components/views/entityExplorer/entity-graph.scss b/src/assets/css/components/views/entityExplorer/entity-graph.scss index e23434f1..a234fd65 100644 --- a/src/assets/css/components/views/entityExplorer/entity-graph.scss +++ b/src/assets/css/components/views/entityExplorer/entity-graph.scss @@ -1,6 +1,3 @@ -$color-business: var(--el-color-business); -$color-primary: var(--el-text-color-primary); -$color-regular: var(--el-text-color-regular); .graph-toolbar { position: fixed; top: 100px; @@ -18,13 +15,12 @@ $color-regular: var(--el-text-color-regular); cursor: pointer; i { - color: $color-regular; + color: #575757; font-size: 18px; } &.toolbar--unactivated { cursor: default; - i { opacity: .4; } @@ -32,24 +28,137 @@ $color-regular: var(--el-text-color-regular); } } } - .entity-graph { display: flex; - + background-color:'orange'; + border: 'solid 5px red'; .entity-graph__chart { width: 100%; + height:100%; + overflow: hidden; + .force-graph-container .graph-tooltip { + padding: 8px 10px; + //border-radius: 10px; + background-color: white; + box-shadow: -1px 1px 10px -1px rgba(205,205,205,0.85); + + .primary-node-tooltip { + padding: 5px; + + .tooltip__header { + display: flex; + align-items: center; + + i { + color: #717171; + font-size: 14px; + } + .tooltip__title { + padding-left: 6px; + font-size: 15px; + line-height: 15px; + color: #111; + } + } + .tooltip__content { + padding-top: 10px; + color: #222; + font-size: 12px; + + span:first-of-type { + padding-right: 20px; + } + } + } + .entity-node-tooltip { + width: 300px; + padding: 5px; + + .tooltip__header { + display: flex; + align-items: center; + margin-bottom: 20px; + + .tooltip__title { + font-size: 15px; + line-height: 15px; + color: #111; + } + } + + .tooltip__content { + display: flex; + flex-direction: column; + + .content-header { + display: flex; + align-items: center; + + .header-icon { + width: 3px !important; + height: 12px !important; + background: #38ACD2; + border-radius: 1px; + margin-right: 6px; + } + } + .content-tag-list { + display: flex; + align-items: flex-start; + flex-wrap: wrap; + + .entity-tag { + margin: 10px 9px 10px 0; + padding: 0 8px; + height: 20px; + font-size: 12px; + border: 1px solid; + border-radius: 2px; + + $normal-color: #778391; + $normal-light-color: #F7F8F9; + $negative-color: #E26154; + $negative-light-color: #FEF6F5; + $positive-color: #749F4D; + $positive-light-color: #F7FAF5; + &.entity-tag--level-two-normal { + border-color: $normal-color; + color: $normal-color; + background-color: $normal-light-color; + } + &.entity-tag--level-two-negative { + border-color: $negative-color; + color: $negative-color; + background-color: $negative-light-color; + } + &.entity-tag--level-two-positive { + border-color: $positive-color; + color: $positive-color; + background-color: $positive-light-color; + } + } + } + } + } + } + .force-graph-container { + //height:100% !important; + canvas { + //height:100% !important; + } + } .graph-node { display: flex; flex-direction: column; align-items: center; background-color: transparent !important; - transition: linear all var(--el-transition-duration-fast); + transition: linear all .2s; .graph-node__text { width: 120px; font-size: 12px; - color: $color-primary; + color: #353636; } &.graph-node--root { @@ -62,38 +171,30 @@ $color-regular: var(--el-text-color-regular); box-shadow: none; animation: none; } - &.graph-node--ip { - border-color: var(--el-color-success-light-5) !important; - box-shadow: 0 0 0 8px rgba(126, 159, 84, 0.14); - + border-color: #CBD9BB !important; + box-shadow: 0 0 0 8px rgba(126,159,84,0.14); i { - color: var(--el-color-success); + color: #7E9F54; } } - &.graph-node--domain { - border-color: var(--el-color-primary-light-7) !important; - box-shadow: 0 0 0 8px rgba(56, 172, 210, 0.14); - + border-color: #AFDEED !important; + box-shadow: 0 0 0 8px rgba(56,172,210,0.14); i { - color: $color-business; + color: #38ACD2; } } - &.graph-node--app { - border-color: var(--el-color-warning-light-5) !important; - box-shadow: 0 0 0 8px rgba(229, 162, 25, 0.14); - + border-color: #F5DAA3 !important; + box-shadow: 0 0 0 8px rgba(229,162,25,0.14); i { - color: var(--el-color-warning); + color: #E5A219; } } - i { font-size: 36px; } - .graph-node__text { padding-top: 30px; } @@ -103,21 +204,19 @@ $color-regular: var(--el-text-color-regular); padding-top: 20px; width: 66px; height: 66px; - border: 1px solid #A7B0B9 !important; // 该class并未使用到 + border: 1px solid #A7B0B9 !important; box-shadow: none; // 覆盖自带的node点击效果 &.rel-node-checked { - box-shadow: 0 0 0 5px rgba(151, 151, 151, 0.21); + box-shadow: 0 0 0 5px rgba(151,151,151,0.21); animation: none; - border-color: $color-regular !important; + border-color: #778391 !important; } - i { font-size: 24px; - color: $color-regular; + color: #778391; } - .graph-node__text { padding-top: 24px; } @@ -131,22 +230,19 @@ $color-regular: var(--el-text-color-regular); &.graph-node--ip { i { - color: var(--el-color-success); + color: #7E9F54; } } - &.graph-node--domain { i { - color: $color-business; + color: #38ACD2; } } - &.graph-node--app { i { - color: var(--el-color-warning); + color: #E5A219; } } - i { font-size: 21px; } @@ -159,7 +255,6 @@ $color-regular: var(--el-text-color-regular); left: unset !important; right: 0 !important; } - .entity-graph__detail { height: calc(100% - 100px) !important; top: 100px !important; @@ -170,7 +265,7 @@ $color-regular: var(--el-text-color-regular); } .g6-component-tooltip { - box-shadow: -1px 1px 10px -1px rgba(205, 205, 205, 0.85); + box-shadow: -1px 1px 10px -1px rgba(205,205,205,0.85); .primary-node-tooltip { padding: 5px; @@ -180,21 +275,19 @@ $color-regular: var(--el-text-color-regular); align-items: center; i { - color: $color-regular; + color: #717171; font-size: 14px; } - .tooltip__title { padding-left: 6px; font-size: 15px; line-height: 15px; - color: $color-primary; + color: #111; } } - .tooltip__content { padding-top: 10px; - color: $color-primary; + color: #222; font-size: 12px; span:first-of-type { @@ -202,7 +295,6 @@ $color-regular: var(--el-text-color-regular); } } } - .entity-node-tooltip { width: 300px; padding: 5px; @@ -215,7 +307,7 @@ $color-regular: var(--el-text-color-regular); .tooltip__title { font-size: 15px; line-height: 15px; - color: $color-primary; + color: #111; } } @@ -230,12 +322,11 @@ $color-regular: var(--el-text-color-regular); .header-icon { width: 3px !important; height: 12px !important; - background: $color-business; + background: #38ACD2; border-radius: 1px; margin-right: 6px; } } - .content-tag-list { display: flex; align-items: flex-start; @@ -249,25 +340,22 @@ $color-regular: var(--el-text-color-regular); border: 1px solid; border-radius: 2px; - $normal-color: $color-regular; - $normal-light-color: var(--el-fill-color-light); - $negative-color: var(--el-color-danger); - $negative-light-color: var(--el-color-danger-light-9); - $positive-color: var(--el-color-success); - $positive-light-color: var(--el-color-success-light-9); - + $normal-color: #778391; + $normal-light-color: #F7F8F9; + $negative-color: #E26154; + $negative-light-color: #FEF6F5; + $positive-color: #749F4D; + $positive-light-color: #F7FAF5; &.entity-tag--level-two-normal { border-color: $normal-color; color: $normal-color; background-color: $normal-light-color; } - &.entity-tag--level-two-negative { border-color: $negative-color; color: $negative-color; background-color: $negative-light-color; } - &.entity-tag--level-two-positive { border-color: $positive-color; color: $positive-color; diff --git a/src/views/entityExplorer/EntityGraph.vue b/src/views/entityExplorer/EntityGraph.vue index 4083c0e2..54c95a23 100644 --- a/src/views/entityExplorer/EntityGraph.vue +++ b/src/views/entityExplorer/EntityGraph.vue @@ -1,6 +1,6 @@