@@ -23,7 +23,7 @@ limitations under the License. -->
2323 />
2424 <ToolBarSelect
2525 @onChoose =" selectService"
26- :title =" this.$t('app ')"
26+ :title =" this.$t('service ')"
2727 :current =" rocketOption.currentService"
2828 :data =" rocketOption.services"
2929 icon =" package"
@@ -35,7 +35,7 @@ limitations under the License. -->
3535 :data =" rocketOption.instances"
3636 icon =" disk"
3737 />
38- <ToolBarEndpointSelect
38+ <ToolBarSelect
3939 @onChoose =" selectEndpoint"
4040 :title =" this.$t('page')"
4141 :current =" rocketOption.currentEndpoint"
@@ -52,6 +52,12 @@ limitations under the License. -->
5252 </div >
5353
5454 <span class =" flex-h rk-right" >
55+ <a class =" rk-log-clear-btn r mr-10" @click =" clearSearch" >
56+ <svg class =" icon mr-5 vm" >
57+ <use xlink:href =" #clear" ></use >
58+ </svg >
59+ <span class =" vm" >{{ this.$t('clear') }}</span >
60+ </a >
5561 <a class =" rk-log-search-btn bg-blue mr-10" @click =" queryLogs" >
5662 <svg class =" icon mr-5 vm" >
5763 <use xlink:href =" #search" ></use >
@@ -81,7 +87,7 @@ limitations under the License. -->
8187 @Mutation (' SELECT_LOG_TYPE' ) private SELECT_LOG_TYPE: any ;
8288 @Mutation (' SELECT_ERROR_CATALOG' ) private SELECT_ERROR_CATALOG: any ;
8389
84- @Action (' SELECT_SERVICE ' ) private SELECT_SERVICE : any ;
90+ @Action (' SELECT_LOG_SERVICE ' ) private SELECT_LOG_SERVICE : any ;
8591 @Action (' SELECT_DATABASE' ) private SELECT_DATABASE: any ;
8692 @Action (' SELECT_ENDPOINT' ) private SELECT_ENDPOINT: any ;
8793 @Action (' SELECT_INSTANCE' ) private SELECT_INSTANCE: any ;
@@ -91,6 +97,7 @@ limitations under the License. -->
9197 @Getter (' durationTime' ) private durationTime: any ;
9298
9399 private pageNum: number = 1 ;
100+
94101 private beforeMount() {
95102 this .MIXHANDLE_GET_OPTION ({
96103 compType: this .logState .type .key ,
@@ -106,7 +113,7 @@ limitations under the License. -->
106113 }
107114
108115 private selectService(i : any ) {
109- this .SELECT_SERVICE ({ service: i , duration: this .durationTime });
116+ this .SELECT_LOG_SERVICE ({ service: i , duration: this .durationTime });
110117 }
111118
112119 private selectEndpoint(i : any ) {
@@ -116,6 +123,10 @@ limitations under the License. -->
116123 private selectInstance(i : any ) {
117124 this .SELECT_INSTANCE ({ instance: i , duration: this .durationTime });
118125 }
126+ private clearSearch() {
127+ this .SELECT_LOG_SERVICE ({ service: { label: ' All' , key: ' ' }, duration: this .durationTime });
128+ this .SELECT_ERROR_CATALOG ({ label: ' All' , key: ' ALL' });
129+ }
119130
120131 private queryLogs() {
121132 const { currentService, currentInstance, currentEndpoint } = this .rocketOption ;
@@ -158,4 +169,9 @@ limitations under the License. -->
158169 background-color : #448dfe ;
159170 }
160171 }
172+ .rk-log-clear-btn {
173+ padding : 3px 9px ;
174+ background-color : #484b55 ;
175+ border-radius : 4px ;
176+ }
161177 </style >
0 commit comments