Skip to content

Commit

Permalink
feat(#3101): fix warnings and deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
SteKoe committed Oct 6, 2024
1 parent 1523191 commit d47f071
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 41 deletions.
1 change: 1 addition & 0 deletions spring-boot-admin-server-ui/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.20.2
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
-->

<template>
<div>
<div class="flex">
<sba-button
v-if="instanceCount <= 1 || modelValue === APPLICATION"
v-if="instanceCount <= 1 || modelValue === ActionScope.APPLICATION"
:class="classNames"
:title="$t('term.affects_all_instances', { count: instanceCount })"
class="w-full"
size="sm"
@click="toggleScope(ActionScope.INSTANCE)"
@click="() => (modelValue = ActionScope.INSTANCE)"
>
<span v-text="$t('term.application')" />
</sba-button>
Expand All @@ -32,55 +32,33 @@
:title="$t('term.affects_this_instance_only')"
class="w-full"
size="sm"
@click="toggleScope(ActionScope.APPLICATION)"
@click="() => (modelValue = ActionScope.APPLICATION)"
>
<span v-text="$t('term.instance')" />
</sba-button>

<p v-if="showInfo" class="text-center text-xs pt-1 truncate">
<span
v-if="modelValue === APPLICATION"
v-if="modelValue === ActionScope.APPLICATION"
v-text="$t('term.affects_all_instances', { count: instanceCount })"
/>
<span v-else v-text="$t('term.affects_this_instance_only')" />
</p>
</div>
</template>

<script>
<script lang="ts" setup>
import { ActionScope } from '@/components/ActionScope';
import SbaButton from '@/components/sba-button';
import SbaButton from '@/components/sba-button.vue';
export default {
name: 'SbaToggleScopeButton',
components: { SbaButton },
props: {
modelValue: {
type: String,
required: true,
},
instanceCount: {
type: Number,
required: true,
},
showInfo: {
type: Boolean,
default: true,
},
},
emits: ['update:modelValue'],
data() {
return {
ActionScope,
APPLICATION: ActionScope.APPLICATION,
INSTANCE: ActionScope.INSTANCE,
classNames: [],
};
},
methods: {
toggleScope(newScope) {
this.$emit('update:modelValue', newScope);
},
},
};
const modelValue = defineModel({
type: String,
default: ActionScope.APPLICATION,
});
const { instanceCount, showInfo = true } = defineProps<{
instanceCount: number;
showInfo: boolean;
classNames?: string | string[] | Record<string, boolean>;
}>();
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* - Please do NOT serve this file on production.
*/

const PACKAGE_VERSION = '2.3.5'
const PACKAGE_VERSION = '2.4.9'
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { parse } from 'iso8601-duration';

import { StartupActuatorEventTree } from '@/services/startup-activator-tree';
import { parse, toMilliseconds } from '@/utils/iso8601-duration';
import { toMilliseconds } from '@/utils/iso8601-duration';

const regex = new RegExp('([^=\\s]*)=\\[([^\\]]*)\\]', 'gi');

Expand Down
5 changes: 5 additions & 0 deletions spring-boot-admin-server-ui/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ export default defineConfig(({ mode }) => {
],
css: {
postcss,
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
test: {
root: __dirname,
Expand Down

0 comments on commit d47f071

Please sign in to comment.