File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 <a-select
2121 v-if =" !isDisabled()"
2222 class =" project-select"
23- :defaultValue =" $t('label.default.view')"
2423 :loading =" loading"
25- :value =" ($store.getters.project && 'id' in $store.getters.project) ? ($store.getters.project.displaytext || $store.getters.project.name) : $t('label.default.view') "
24+ v-model :value =" projectSelected "
2625 :filterOption =" filterProject"
2726 @change =" changeProject"
2827 @focus =" fetchData"
4039 </a-tooltip >
4140 </template >
4241
43- <a-select-option v-for =" (project, index) in projects" :key =" index" :label =" project.displaytext || project.name" >
42+ <a-select-option
43+ v-for =" (project, index) in projects"
44+ :key =" index"
45+ :label =" project.displaytext || project.name" >
4446 <span >
4547 <resource-icon v-if =" project.icon && project.icon.base64image" :image =" project.icon.base64image" size =" 1x" style =" margin-right : 5px " />
4648 <project-outlined v-else style =" margin-right : 5px " />
@@ -71,6 +73,16 @@ export default {
7173 created () {
7274 this .fetchData ()
7375 },
76+ computed: {
77+ projectSelected () {
78+ let projectIndex = 0
79+ if (this .$store .getters ? .project ? .id ) {
80+ projectIndex = this .projects .findIndex (project => project .id === this .$store .getters .project .id )
81+ }
82+
83+ return projectIndex
84+ }
85+ },
7486 methods: {
7587 fetchData () {
7688 if (this .isDisabled ()) {
@@ -135,6 +147,6 @@ export default {
135147 position: absolute;
136148 top: 0 ;
137149 right: 1px ;
138- margin- top: - 3px ;
150+ margin- top: - 5px ;
139151}
140152< / style>
Original file line number Diff line number Diff line change 283283 & > tr :hover .ant-table-row-selected > td ,
284284 & > tr .ant-table-row-hover :not (.ant-table-expanded-row ):not (.ant-table-row-selected ) > td ,
285285 & > tr :hover :not (.ant-table-expanded-row ):not (.ant-table-row-selected ) > td {
286- background-color : @table-body-hover-bgColor ;
286+ background-color : @table-body-hover-bgColor !important ;
287287 }
288288
289289 & > tr > th .ant-table-column-sort {
551551 &-option-active :not (.ant-select-item-option-disabled ),
552552 & :hover :not (.ant-select-item-disabled ),
553553 &-active :hover :not (.ant-select-item-disabled ) {
554- background-color : @dropdown-hover-bgColor ;
554+ background-color : @dropdown-hover-bgColor !important ;
555555 }
556556 }
557557 }
714714
715715 &-item :not (.ant-dropdown-menu-item-selected ):hover ,
716716 &-submenu-title :not (.ant-dropdown-menu-item-selected ):hover {
717- background-color : @dropdown-hover-bgColor ;
717+ background-color : @dropdown-hover-bgColor !important ;
718718 }
719719
720720 &-title-content > a ,
Original file line number Diff line number Diff line change 2121 <div class =" capacity-dashboard-wrapper" >
2222 <div class =" capacity-dashboard-select" >
2323 <a-select
24- :defaultValue =" zoneSelected.name"
2524 :placeholder =" $t('label.select.a.zone')"
26- :value =" zoneSelected.name "
25+ v-model :value =" zoneSelectedKey "
2726 @change =" changeZone"
2827 showSearch
2928 optionFilterProp =" label"
@@ -164,6 +163,15 @@ export default {
164163 }
165164 }
166165 },
166+ computed: {
167+ zoneSelectedKey () {
168+ if (this .zones .length === 0 ) {
169+ return this .zoneSelected .name
170+ }
171+ const zoneIndex = this .zones .findIndex (zone => zone .id === this .zoneSelected .id )
172+ return zoneIndex
173+ }
174+ },
167175 created () {
168176 this .fetchData ()
169177 },
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ export default {
252252 </script >
253253
254254<style lang="less" scoped>
255- .usage-dashboard {
255+ :deep( .usage-dashboard ) {
256256
257257 &-chart-tile {
258258 margin-bottom : 12px ;
You can’t perform that action at this time.
0 commit comments