Skip to content

Commit 7e2130a

Browse files
Better handling of endpoints deployed into elastic scale environments (#2019)
always display logical endpoints and show how many instances total. UI overhaul and introduction of track/do not track endpoint concept --------- Co-authored-by: Phil Bastian <[email protected]>
1 parent b6865ad commit 7e2130a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1623
-460
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<script setup lang="ts">
2+
const model = defineModel<string>({ required: true });
3+
</script>
4+
5+
<template>
6+
<div role="search" aria-label="filter" class="filter-input">
7+
<input type="search" placeholder="Filter by name..." aria-label="filter by name" class="form-control-static filter-input" v-model="model" />
8+
</div>
9+
</template>
10+
11+
<style scoped>
12+
.filter-input input {
13+
display: inline-block;
14+
width: 100%;
15+
padding-right: 10px;
16+
padding-left: 30px;
17+
border: 1px solid #aaa;
18+
border-radius: 4px;
19+
height: 100%;
20+
}
21+
22+
div.filter-input {
23+
position: relative;
24+
width: 280px;
25+
height: 36px;
26+
}
27+
28+
.filter-input:before {
29+
font-family: "FontAwesome";
30+
width: 1.43em;
31+
content: "\f0b0";
32+
color: #919e9e;
33+
position: absolute;
34+
top: calc(50% - 0.7em);
35+
left: 0.75em;
36+
}
37+
</style>

src/Frontend/src/components/OrderBy.vue

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
<script lang="ts">
2-
export function getSortFunction<T>(selector: SortOptions<T>["selector"], dir: SortDirection) {
3-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4-
if (!selector) return (firstElement: T, secondElement: T) => 0;
5-
return (firstElement: T, secondElement: T) => {
6-
if (dir === SortDirection.Ascending) {
7-
return selector(firstElement) < selector(secondElement) ? -1 : 1;
8-
} else {
9-
return selector(firstElement) < selector(secondElement) ? 1 : -1;
10-
}
11-
};
12-
}
13-
</script>
14-
151
<script setup generic="T" lang="ts">
162
import { onMounted, ref } from "vue";
173
import { useCookies } from "vue3-cookies";
184
import SortOptions, { SortDirection } from "@/resources/SortOptions";
5+
import getSortFunction from "@/components/getSortFunction";
196
207
const emit = defineEmits<{
218
sortUpdated: [option: SortOptions<T>];
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
displayed: number;
4+
total: number;
5+
}>();
6+
</script>
7+
8+
<template>
9+
<div class="col format-showing-results">
10+
<div>Showing {{ displayed }} of {{ total }} result(s)</div>
11+
</div>
12+
</template>
13+
14+
<style scoped>
15+
.format-showing-results {
16+
display: flex;
17+
align-items: flex-end;
18+
color: gray;
19+
}
20+
</style>

src/Frontend/src/components/failedmessages/FailedMessageGroups.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import LicenseExpired from "../../components/LicenseExpired.vue";
88
import ServiceControlNotAvailable from "../ServiceControlNotAvailable.vue";
99
import LastTenOperations from "../failedmessages/LastTenOperations.vue";
1010
import MessageGroupList, { IMessageGroupList } from "../failedmessages/MessageGroupList.vue";
11-
import OrderBy, { getSortFunction } from "@/components/OrderBy.vue";
11+
import OrderBy from "@/components/OrderBy.vue";
1212
import SortOptions, { SortDirection } from "@/resources/SortOptions";
1313
import GroupOperation from "@/resources/GroupOperation";
14+
import getSortFunction from "@/components/getSortFunction";
1415
1516
const selectedClassifier = ref<string>("");
1617
const classifiers = ref<string[]>([]);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { GroupPropertyType } from "@/resources/SortOptions";
2+
import { SortDirection } from "@/resources/SortOptions";
3+
4+
export default function getSortFunction<T>(selector: ((group: T) => GroupPropertyType) | undefined, dir: SortDirection) {
5+
if (!selector) {
6+
return () => 0;
7+
}
8+
const sortFunc = (firstElement: T, secondElement: T) => {
9+
const x = selector(firstElement);
10+
const y = selector(secondElement);
11+
if (x > y) {
12+
return 1;
13+
} else if (x < y) {
14+
return -1;
15+
}
16+
return 0;
17+
};
18+
19+
return dir === SortDirection.Ascending ? sortFunc : (firstElement: T, secondElement: T) => -sortFunc(firstElement, secondElement);
20+
}

src/Frontend/src/components/heartbeats/ActiveEndpoints.vue

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

0 commit comments

Comments
 (0)