Skip to content

Commit d3a77f0

Browse files
committed
Polish Contribution
1 parent ed28a68 commit d3a77f0

File tree

17 files changed

+693
-595
lines changed

17 files changed

+693
-595
lines changed

spring-boot-admin-server-ui/src/main/frontend/components/font-awesome-icon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import {faUserCircle} from '@fortawesome/free-solid-svg-icons/faUserCircle';
4141
import {faWrench} from '@fortawesome/free-solid-svg-icons/faWrench';
4242
import {faAngleDoubleRight} from '@fortawesome/free-solid-svg-icons/faAngleDoubleRight';
4343
import {faSearch} from '@fortawesome/free-solid-svg-icons/faSearch';
44-
import {faMapMarker} from '@fortawesome/free-solid-svg-icons/faMapMarker';
44+
import {faMapMarkerAlt} from '@fortawesome/free-solid-svg-icons/faMapMarkerAlt';
4545
import {faFilter} from '@fortawesome/free-solid-svg-icons/faFilter';
4646
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
4747

@@ -69,7 +69,7 @@ library.add(
6969
faWrench,
7070
faAngleDoubleRight,
7171
faSearch,
72-
faMapMarker,
72+
faMapMarkerAlt,
7373
faFilter,
7474
//regular,
7575
farTimesCircle,

spring-boot-admin-server-ui/src/main/frontend/components/sba-confirm-button.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
} else {
4343
const width = this.$el.getBoundingClientRect().width;
4444
this.$el.style.width = `${width}px`;
45+
event.stopPropagation();
4546
}
4647
this.confirm = !this.confirm;
4748
}

spring-boot-admin-server-ui/src/main/frontend/components/sba-panel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
&__header--sticky {
8383
position: sticky;
8484
background-color: $white;
85-
z-index: 1000;
85+
z-index: 10;
8686
}
8787
}
8888
</style>

spring-boot-admin-server-ui/src/main/frontend/services/instance.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Instance {
127127
});
128128
}
129129

130-
async fetchGlobalFiltersData() {
130+
async fetchGatewayGlobalFilters() {
131131
return this.axios.get(uri`actuator/gateway/globalfilters`, {
132132
headers: {'Accept': actuatorMimeTypes}
133133
});
@@ -139,19 +139,19 @@ class Instance {
139139
});
140140
}
141141

142-
async fetchRoutesData() {
142+
async fetchGatewayRoutes() {
143143
return this.axios.get(uri`actuator/gateway/routes`, {
144144
headers: {'Accept': actuatorMimeTypes}
145145
});
146146
}
147147

148-
async deleteRoute(routeId) {
148+
async deleteGatewayRoute(routeId) {
149149
return this.axios.delete(uri`actuator/gateway/routes/${routeId}`, {
150150
headers: {'Accept': actuatorMimeTypes}
151151
});
152152
}
153153

154-
async clearRoutesCache() {
154+
async refreshGatewayRoutesCache() {
155155
return this.axios.post(uri`actuator/gateway/refresh`, {
156156
headers: {'Accept': actuatorMimeTypes}
157157
});

spring-boot-admin-server-ui/src/main/frontend/views/instances/env/env-manager.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<template>
1818
<div class="box">
19-
<h1 class="is-size-5">
19+
<h1 class="is-size-6">
2020
Environment Manager
2121
</h1>
2222
<datalist id="allPropertyNames">
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<!--
2+
- Copyright 2014-2018 the original author or authors.
3+
-
4+
- Licensed under the Apache License, Version 2.0 (the "License");
5+
- you may not use this file except in compliance with the License.
6+
- You may obtain a copy of the License at
7+
-
8+
- http://www.apache.org/licenses/LICENSE-2.0
9+
-
10+
- Unless required by applicable law or agreed to in writing, software
11+
- distributed under the License is distributed on an "AS IS" BASIS,
12+
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
- See the License for the specific language governing permissions and
14+
- limitations under the License.
15+
-->
16+
17+
<template>
18+
<div>
19+
<div v-if="error" class="message is-danger">
20+
<div class="message-body">
21+
<strong>
22+
<font-awesome-icon class="has-text-warning" icon="exclamation-triangle" />
23+
Adding route failed.
24+
</strong>
25+
<p v-text="error.message" />
26+
</div>
27+
</div>
28+
29+
<div class="field">
30+
<label class="label" for="routeId">
31+
Id
32+
</label>
33+
<p class="control">
34+
<input class="input" id="routeId" v-model="routeId" required>
35+
</p>
36+
</div>
37+
38+
<div class="field">
39+
<label class="label" for="order">
40+
Order
41+
</label>
42+
<p class="control">
43+
<input class="input" id="order" placeholder="0" v-model="routeOrder" type="number">
44+
</p>
45+
</div>
46+
47+
<div class="field">
48+
<label class="label" for="predicates">
49+
Predicates
50+
</label>
51+
<p class="control">
52+
<textarea rows="4" class="textarea" id="predicates" placeholder="[]" v-model="routePredicates" required />
53+
</p>
54+
</div>
55+
56+
<div class="field">
57+
<label class="label" for="filters">
58+
Filters
59+
</label>
60+
<p class="control">
61+
<textarea rows="4" class="textarea" id="filters" placeholder="[]" v-model="routeFilters" />
62+
</p>
63+
</div>
64+
65+
<div class="field">
66+
<label class="label" for="routeUri">
67+
URI
68+
</label>
69+
<p class="control">
70+
<input class="input" id="routeUri" placeholder="http://example.com" v-model="routeUri" required>
71+
</p>
72+
</div>
73+
74+
<div class="field is-grouped is-grouped-right">
75+
<div class="control">
76+
<button class="button is-primary" :disabled="!isAddingRoutePossible" @click="addRoute">
77+
Add route
78+
</button>
79+
</div>
80+
</div>
81+
</div>
82+
</template>
83+
84+
<script>
85+
import Instance from '@/services/instance';
86+
import {from} from '@/utils/rxjs';
87+
88+
export default {
89+
props: {
90+
instance: {
91+
type: Instance,
92+
required: true
93+
}
94+
},
95+
data: () => ({
96+
error: null,
97+
routeId: null,
98+
routePredicates: null,
99+
routeFilters: null,
100+
routeUri: null,
101+
routeOrder: null
102+
}),
103+
computed: {
104+
isAddingRoutePossible() {
105+
return this.routeId && this.routePredicates && this.routeUri;
106+
}
107+
},
108+
methods: {
109+
addRoute() {
110+
const vm = this;
111+
const newRoute = {
112+
id: vm.routeId,
113+
predicates: vm.routePredicates ? JSON.parse(vm.routePredicates) : undefined,
114+
filters: vm.routeFilters ? JSON.parse(vm.routeFilters) : [],
115+
uri: vm.routeUri,
116+
order: vm.routeOrder || 0
117+
};
118+
from(vm.instance.addGatewayRoute(newRoute))
119+
.subscribe({
120+
complete: () => {
121+
vm.routeId = null;
122+
vm.routePredicates = null;
123+
vm.routeFilters = null;
124+
vm.routeUri = null;
125+
vm.routeOrder = null;
126+
vm.error = null;
127+
setTimeout(() => vm.$emit('route-added'), 2500);
128+
},
129+
error: error => {
130+
this.error = error;
131+
}
132+
});
133+
}
134+
}
135+
}
136+
</script>
137+

spring-boot-admin-server-ui/src/main/frontend/views/instances/gateway/filters-global.vue

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)