|
89 | 89 | applications: { |
90 | 90 | type: Array, |
91 | 91 | default: () => [] |
| 92 | + }, |
| 93 | + selected: { |
| 94 | + type: String, |
| 95 | + default: null |
92 | 96 | } |
93 | 97 | }, |
94 | 98 | directives: {onClickaway}, |
95 | 99 | data: () => ({ |
96 | | - selected: null, |
97 | 100 | errors: [] |
98 | 101 | }), |
99 | 102 | methods: { |
100 | 103 | select(name) { |
101 | | - this.selected = name; |
| 104 | + this.$router.push(`/applications/${name}`); |
102 | 105 | }, |
103 | 106 | deselect() { |
104 | | - this.selected = null; |
| 107 | + this.$router.push('/applications'); |
105 | 108 | }, |
106 | 109 | showDetails(instance) { |
107 | | - this.$router.push(`/instances/${instance.id}`) |
| 110 | + this.$router.push(`/instances/${instance.id}`); |
108 | 111 | }, |
109 | 112 | async unregister(item) { |
110 | 113 | try { |
|
118 | 121 | </script> |
119 | 122 |
|
120 | 123 | <style lang="scss"> |
121 | | - @import "~@/assets/css/utilities"; |
122 | | -
|
123 | | - $list-background-color: $white !default; |
124 | | - $list-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default; |
125 | | - $list-color: $text !default; |
126 | | -
|
127 | | - .applications-list-item { |
128 | | - background-color: $list-background-color; |
129 | | - box-shadow: $list-shadow; |
130 | | - color: $list-color; |
131 | | - max-width: 100%; |
132 | | -
|
133 | | - &--collapsed { |
134 | | - display: flex; |
135 | | - align-items: center; |
136 | | - overflow: hidden; |
137 | | - cursor: pointer; |
138 | | - &:hover { |
139 | | - background-color: $white-bis; |
140 | | - } |
141 | | - } |
| 124 | + @import "~@/assets/css/utilities"; |
| 125 | +
|
| 126 | + $list-background-color: $white !default; |
| 127 | + $list-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default; |
| 128 | + $list-color: $text !default; |
| 129 | +
|
| 130 | + .applications-list-item { |
| 131 | + background-color: $list-background-color; |
| 132 | + box-shadow: $list-shadow; |
| 133 | + color: $list-color; |
| 134 | + max-width: 100%; |
| 135 | +
|
| 136 | + &--collapsed { |
| 137 | + display: flex; |
| 138 | + align-items: center; |
| 139 | + overflow: hidden; |
| 140 | + cursor: pointer; |
| 141 | + &:hover { |
| 142 | + background-color: $white-bis; |
| 143 | + } |
| 144 | + } |
142 | 145 |
|
143 | | - &--detailed { |
144 | | - display: flex; |
145 | | - flex-direction: column; |
146 | | - margin: ($gap / 2) 0; |
147 | | - } |
| 146 | + &--detailed { |
| 147 | + display: flex; |
| 148 | + flex-direction: column; |
| 149 | + margin: ($gap / 2) 0; |
| 150 | + } |
148 | 151 |
|
149 | | - &__status { |
150 | | - width: 40px; |
151 | | - padding-left: ($gap / 2); |
152 | | - } |
| 152 | + &__status { |
| 153 | + width: 40px; |
| 154 | + padding-left: ($gap / 2); |
| 155 | + } |
153 | 156 |
|
154 | | - &__text { |
155 | | - padding-left: ($gap / 2); |
156 | | - display: inline-flex; |
157 | | - align-items: flex-start; |
158 | | - flex-direction: column; |
159 | | - flex-grow: 1; |
160 | | - flex-basis: 0; |
161 | | - } |
| 157 | + &__text { |
| 158 | + padding-left: ($gap / 2); |
| 159 | + display: inline-flex; |
| 160 | + align-items: flex-start; |
| 161 | + flex-direction: column; |
| 162 | + flex-grow: 1; |
| 163 | + flex-basis: 0; |
| 164 | + } |
162 | 165 |
|
163 | | - &__secondary { |
164 | | - color: $grey-light; |
165 | | - font-size: $size-6; |
166 | | - } |
| 166 | + &__secondary { |
| 167 | + color: $grey-light; |
| 168 | + font-size: $size-6; |
| 169 | + } |
167 | 170 |
|
168 | | - &__actions { |
169 | | - justify-self: end; |
170 | | - padding-right: ($gap / 2); |
171 | | - opacity: 0; |
172 | | - transition: all $easing $speed; |
173 | | - will-change: opacity; |
174 | | - } |
| 171 | + &__actions { |
| 172 | + justify-self: end; |
| 173 | + padding-right: ($gap / 2); |
| 174 | + opacity: 0; |
| 175 | + transition: all $easing $speed; |
| 176 | + will-change: opacity; |
| 177 | + } |
175 | 178 |
|
176 | | - *:hover > &__actions { |
177 | | - opacity: 1; |
178 | | - } |
| 179 | + *:hover > &__actions { |
| 180 | + opacity: 1; |
| 181 | + } |
179 | 182 |
|
180 | | - &__header { |
181 | | - display: flex; |
182 | | - height: 48px; |
183 | | - align-items: center; |
184 | | - overflow: hidden; |
185 | | - cursor: pointer; |
186 | | -
|
187 | | - &-text { |
188 | | - color: $grey-darker; |
189 | | - font-weight: $weight-semibold; |
190 | | - padding-left: $gap; |
191 | | - flex-grow: 1; |
192 | | - } |
193 | | -
|
194 | | - &-actions { |
195 | | - justify-self: end; |
196 | | - padding-right: $gap; |
197 | | - } |
198 | | - } |
| 183 | + &__header { |
| 184 | + display: flex; |
| 185 | + height: 48px; |
| 186 | + align-items: center; |
| 187 | + overflow: hidden; |
| 188 | + cursor: pointer; |
| 189 | +
|
| 190 | + &-text { |
| 191 | + color: $grey-darker; |
| 192 | + font-weight: $weight-semibold; |
| 193 | + padding-left: $gap; |
| 194 | + flex-grow: 1; |
| 195 | + } |
199 | 196 |
|
200 | | - &__instance-list { |
201 | | - list-style: none; |
202 | | - margin: 0 ($gap / 2) ($gap / 2) ($gap / 2); |
203 | | - padding: 0; |
204 | | - } |
| 197 | + &-actions { |
| 198 | + justify-self: end; |
| 199 | + padding-right: $gap; |
| 200 | + } |
| 201 | + } |
205 | 202 |
|
206 | | - &__instance { |
207 | | - display: flex; |
208 | | - height: 48px; |
209 | | - overflow: hidden; |
210 | | - background-color: #fff; |
211 | | - align-items: center; |
212 | | - cursor: pointer; |
213 | | - &:hover { |
214 | | - background-color: $white-bis; |
215 | | - } |
216 | | -
|
217 | | - & + & { |
218 | | - border-top: 1px solid rgba(0, 0, 0, .12); |
219 | | - margin-top: 0; |
220 | | - } |
221 | | - } |
| 203 | + &__instance-list { |
| 204 | + list-style: none; |
| 205 | + margin: 0 ($gap / 2) ($gap / 2) ($gap / 2); |
| 206 | + padding: 0; |
222 | 207 | } |
| 208 | +
|
| 209 | + &__instance { |
| 210 | + display: flex; |
| 211 | + height: 48px; |
| 212 | + overflow: hidden; |
| 213 | + background-color: #fff; |
| 214 | + align-items: center; |
| 215 | + cursor: pointer; |
| 216 | + &:hover { |
| 217 | + background-color: $white-bis; |
| 218 | + } |
| 219 | +
|
| 220 | + & + & { |
| 221 | + border-top: 1px solid rgba(0, 0, 0, .12); |
| 222 | + margin-top: 0; |
| 223 | + } |
| 224 | + } |
| 225 | + } |
223 | 226 | </style> |
0 commit comments