feat: add icon

This commit is contained in:
Fine 2024-01-11 17:31:42 +08:00
parent e719bc9db8
commit f32e09defa
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg t="1704964118567" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5167">
<path d="M900.032 646.016h-56.064V502.976a16 16 0 0 0-16-16H544v-96h62.976c22.144 0 40-17.92 40-40V161.024a40 40 0 0 0-40-40H417.024a40 40 0 0 0-40 40v189.952c0 22.144 17.92 40 40 40H480v96H195.968a16 16 0 0 0-16 16v143.04h-55.936a38.016 38.016 0 0 0-38.016 38.016v176c0 20.928 17.024 37.952 37.952 37.952h176a38.016 38.016 0 0 0 38.016-38.016v-176a38.016 38.016 0 0 0-37.952-37.952h-56V550.976H480v95.04h-56a38.016 38.016 0 0 0-38.016 38.016v176c0 20.928 17.024 37.952 38.016 37.952h176a38.016 38.016 0 0 0 38.016-38.016v-176a38.016 38.016 0 0 0-38.016-37.952H544V550.976h236.032v95.04h-56.064a38.016 38.016 0 0 0-37.952 38.016v176c0 20.928 17.024 37.952 38.016 37.952h176a38.016 38.016 0 0 0 37.952-38.016v-176a38.016 38.016 0 0 0-38.016-37.952zM440.96 184.96h141.952v141.952H441.024V185.024zM278.016 838.016H145.92V705.92h132.032v132.032z m299.968 0H446.08V705.92H577.92v132.032z m300.032 0h-132.032V705.92h132.032v132.032z" p-id="5168"></path>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -41,6 +41,13 @@ limitations under the License. -->
class="selectorPod" class="selectorPod"
:isRemote="['EndpointRelation', 'Endpoint'].includes(dashboardStore.entity)" :isRemote="['EndpointRelation', 'Endpoint'].includes(dashboardStore.entity)"
/> />
<span
class="ml-10 cp hierarchy-btn"
v-if="dashboardStore.entity === 'ServiceInstance'"
@click="showHierarchy = true"
>
<Icon size="middle" iconName="hierarchy_topology" />
</span>
</div> </div>
<div class="selectors-item" v-if="key === 5 || key === 6"> <div class="selectors-item" v-if="key === 5 || key === 6">
<span class="label"> $Process </span> <span class="label"> $Process </span>
@ -126,6 +133,9 @@ limitations under the License. -->
</div> </div>
</div> </div>
</div> </div>
<el-dialog v-model="showHierarchy" :destroy-on-close="true" @closed="showHierarchy = false" width="640px">
<div class="hierarchy-related"> hierarchy-related </div>
</el-dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, ref, computed, watch } from "vue"; import { reactive, ref, computed, watch } from "vue";
@ -157,6 +167,7 @@ limitations under the License. -->
const params = useRoute().params; const params = useRoute().params;
const toolIcons = ref<{ name: string; content: string; id: WidgetType }[]>(AllTools); const toolIcons = ref<{ name: string; content: string; id: WidgetType }[]>(AllTools);
const loading = ref<boolean>(false); const loading = ref<boolean>(false);
const showHierarchy = ref<boolean>(false);
const states = reactive<{ const states = reactive<{
destService: string; destService: string;
destPod: string; destPod: string;
@ -705,4 +716,14 @@ limitations under the License. -->
.relation { .relation {
margin-top: 5px; margin-top: 5px;
} }
.hierarchy-btn {
display: inline-block;
width: 24px;
height: 24px;
border: 1px solid #666;
border-radius: 5px;
text-align: center;
color: #aaa;
}
</style> </style>