-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand pre-checking of file source/object store configuration.
- UI for detailed display of errors. - UI option to test configuration from management menu. - API + UI for checking configuration before upgrading to new version of template. - API + UI for checking configuration before updating current template's settings. - Add an option during update/upgrade to allow forcing the update even if configuration doesn't validate - I don't allow creation of invalid things, but if there are problems with an existing thing - admins and power users should have recourse. It is their data.
- Loading branch information
Showing
38 changed files
with
1,408 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script lang="ts" setup> | ||
import { BAlert, BButton } from "bootstrap-vue"; | ||
import { ref } from "vue"; | ||
import type { PluginStatus } from "@/api/configTemplates"; | ||
import ConfigurationTestSummaryModal from "@/components/ConfigTemplates/ConfigurationTestSummaryModal.vue"; | ||
interface Props { | ||
error: String | null; | ||
testResults?: PluginStatus; | ||
errorDataDescription: string; | ||
} | ||
const showTestResults = ref(false); | ||
defineProps<Props>(); | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<ConfigurationTestSummaryModal v-model="showTestResults" :test-results="testResults" /> | ||
<BAlert v-if="error" variant="danger" class="configuration-instance-error" show> | ||
<span :data-description="errorDataDescription"> | ||
{{ error }} | ||
</span> | ||
<BButton variant="link" @click="showTestResults = true">View configuration test status.</BButton> | ||
</BAlert> | ||
</div> | ||
</template> |
32 changes: 32 additions & 0 deletions
32
client/src/components/ConfigTemplates/ConfigurationTestItem.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script lang="ts" setup> | ||
import { library } from "@fortawesome/fontawesome-svg-core"; | ||
import { faCheckSquare, faSquare, faTimes } from "@fortawesome/free-solid-svg-icons"; | ||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; | ||
import { BListGroupItem, BSpinner } from "bootstrap-vue"; | ||
import type { PluginAspectStatus } from "@/api/configTemplates"; | ||
library.add(faCheckSquare, faTimes, faSquare); | ||
interface Props { | ||
status?: PluginAspectStatus; | ||
} | ||
defineProps<Props>(); | ||
</script> | ||
|
||
<template> | ||
<BListGroupItem href="#" class="d-flex align-items-center"> | ||
<BSpinner v-if="status == undefined" class="mr-3" label="Testing...."></BSpinner> | ||
<FontAwesomeIcon | ||
v-else-if="status.state == 'ok'" | ||
class="mr-3 text-success" | ||
icon="fas fa-check-square" | ||
size="lg" /> | ||
<FontAwesomeIcon v-else-if="status.state == 'not_ok'" class="mr-3 text-warning" icon="fas fa-times" size="lg" /> | ||
<FontAwesomeIcon v-else-if="status.state == 'unknown'" class="mr-3 text-info" icon="fas fa-square" size="lg" /> | ||
<span v-if="status && status.message" class="mr-auto"> | ||
{{ status.message }} | ||
</span> | ||
</BListGroupItem> | ||
</template> |
21 changes: 21 additions & 0 deletions
21
client/src/components/ConfigTemplates/ConfigurationTestSummary.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script lang="ts" setup> | ||
import { BListGroup } from "bootstrap-vue"; | ||
import type { PluginStatus } from "@/api/configTemplates"; | ||
import ConfigurationTestItem from "./ConfigurationTestItem.vue"; | ||
interface Props { | ||
testResults?: PluginStatus; | ||
} | ||
defineProps<Props>(); | ||
</script> | ||
|
||
<template> | ||
<BListGroup v-if="testResults"> | ||
<ConfigurationTestItem :status="testResults?.template_definition" /> | ||
<ConfigurationTestItem :status="testResults?.template_settings" /> | ||
<ConfigurationTestItem :status="testResults?.connection" /> | ||
</BListGroup> | ||
</template> |
39 changes: 39 additions & 0 deletions
39
client/src/components/ConfigTemplates/ConfigurationTestSummaryModal.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script lang="ts" setup> | ||
import { BAlert, BModal } from "bootstrap-vue"; | ||
import { ref, watch } from "vue"; | ||
import type { PluginStatus } from "@/api/configTemplates"; | ||
import ConfigurationTestSummary from "./ConfigurationTestSummary.vue"; | ||
interface Props { | ||
value: boolean; | ||
testResults?: PluginStatus; | ||
error?: string; | ||
} | ||
const props = defineProps<Props>(); | ||
const show = ref(props.value); | ||
watch(props, () => { | ||
show.value = props.value; | ||
}); | ||
const emit = defineEmits<{ | ||
(e: "input", value: boolean): void; | ||
}>(); | ||
watch(show, () => { | ||
emit("input", show.value); | ||
}); | ||
</script> | ||
|
||
<template> | ||
<BModal v-model="show" title="Configuration Test Summary" hide-footer> | ||
<BAlert v-if="error" variant="danger" show dismissible> | ||
{{ error || "" }} | ||
</BAlert> | ||
<ConfigurationTestSummary :test-results="testResults" /> | ||
</BModal> | ||
</template> |
17 changes: 17 additions & 0 deletions
17
client/src/components/ConfigTemplates/ForceActionButton.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script setup lang="ts"> | ||
import { BButton } from "bootstrap-vue"; | ||
interface Props { | ||
action: string; | ||
} | ||
defineProps<Props>(); | ||
const emit = defineEmits<{ | ||
(e: "click"): void; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<BButton variant="link" @click="emit('click')">I know what I am doing, force {{ action.toLowerCase() }}.</BButton> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.