Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/system-security-plans/ComponentsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<!-- Component Dashboard Drawer -->
<Drawer
v-model:visible="dashboardDrawerOpen"
header="Dashboards"
header="Evidence Filters"
position="right"
class="w-full! md:w-1/2! lg:w-3/5!"
>
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useDashboardSuggestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export function useDashboardSuggestions(
function formatRunFailureDetail(run: SuggestionRun): string {
const failures = runCellFailures(run);
if (failures.length === 0) {
return run.error ?? 'Dashboard suggestion generation failed.';
return run.error ?? 'Evidence filter suggestion generation failed.';
}

const shown = failures.slice(0, 3).map((failure) => {
Expand Down
2 changes: 1 addition & 1 deletion src/config/tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const TOOLTIPS = {
'control.implementation.components':
'System components that implement this control statement',
'control.implementation.evidence':
'Link evidence dashboards to automatically track compliance for this control',
'Link evidence filters to automatically track compliance for this control',
'control.implementation.title': '', // TODO: Add tooltip
'control.implementation.requirements': '', // TODO: Add tooltip

Expand Down
6 changes: 3 additions & 3 deletions src/constants/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const MANIFEST_ROLES = [
{
name: 'contributor',
description:
'Author content (OSCAL docs, register items, workflows, dashboards); no admin.',
'Author content (OSCAL docs, register items, workflows, evidence filters); no admin.',
},
{
name: 'agent',
Expand Down Expand Up @@ -125,8 +125,8 @@ const RESOURCE_LABELS: Partial<Record<string, string>> = {
[RESOURCES.ACTIVITY]: 'activities',
[RESOURCES.SSP_EXPORT_OFFERING]: 'export offerings',
[RESOURCES.RISK]: 'risks',
[RESOURCES.FILTER]: 'dashboards',
[RESOURCES.DASHBOARD_SUGGESTION]: 'dashboard suggestions',
[RESOURCES.FILTER]: 'evidence filters',
[RESOURCES.DASHBOARD_SUGGESTION]: 'evidence filter suggestions',
[RESOURCES.WORKFLOW_DEFINITION]: 'workflow definitions',
[RESOURCES.WORKFLOW_STEP_DEFINITION]: 'workflow steps',
[RESOURCES.WORKFLOW_INSTANCE]: 'workflow instances',
Expand Down
2 changes: 1 addition & 1 deletion src/views/admin/AiDiagnosticsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function formatLabelSet(labels: Record<string, string>): string {
severity="info"
variant="outlined"
>
Loading dashboard suggestions configuration.
Loading evidence filter suggestions configuration.
</Message>

<Message
Expand Down
14 changes: 7 additions & 7 deletions src/views/admin/ImportView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const uploadDashboardFiles = async () => {
toast.add({
severity: 'warn',
summary: 'No Files',
detail: 'Please select at least one dashboard file to import',
detail: 'Please select at least one evidence filter file to import',
life: 3000,
});
return;
Expand Down Expand Up @@ -164,7 +164,7 @@ const uploadDashboardFiles = async () => {
toast.add({
severity: 'success',
summary: 'Import Successful',
detail: `Successfully imported ${response.data.data.total_dashboards} dashboard(s) from ${response.data.data.successful_count} file(s)`,
detail: `Successfully imported ${response.data.data.total_dashboards} evidence filter(s) from ${response.data.data.successful_count} file(s)`,
life: 5000,
});
}
Expand All @@ -186,7 +186,7 @@ const uploadDashboardFiles = async () => {
toast.add({
severity: 'error',
summary: 'Import Failed',
detail: errorMessage || 'Failed to import dashboard files',
detail: errorMessage || 'Failed to import evidence filter files',
life: 5000,
});
} finally {
Expand Down Expand Up @@ -215,7 +215,7 @@ const clearDashboardFiles = () => {
<PageHeader>Import Data</PageHeader>
<div class="mt-8">
<p class="text-gray-600 dark:text-gray-400 mb-6">
Import OSCAL content and dashboards from JSON files
Import OSCAL content and evidence filters from JSON files
</p>

<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
Expand Down Expand Up @@ -317,12 +317,12 @@ const clearDashboardFiles = () => {
<template #header>
<h3 class="text-lg font-semibold flex items-center gap-2">
<span>📊</span>
<span>Import Dashboards</span>
<span>Import Evidence Filters</span>
</h3>
</template>
<div class="space-y-4">
<p class="text-sm text-gray-600 dark:text-gray-400">
Import dashboard configurations with filters and control
Import evidence filter configurations with filters and control
associations.
</p>

Expand All @@ -340,7 +340,7 @@ const clearDashboardFiles = () => {
<div class="flex flex-col items-center justify-center">
<span class="text-4xl mb-3">☁️</span>
<p class="text-gray-600 dark:text-gray-400 mb-2">
Drag and drop dashboard JSON files here or
Drag and drop evidence filter JSON files here or
</p>
<button
type="button"
Expand Down
8 changes: 4 additions & 4 deletions src/views/control-implementations/__tests__/IndexView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ describe('control implementations IndexView', () => {
await implementationButton?.trigger('click');
await flushPromises();

expect(wrapper.text()).not.toContain('AI dashboard suggestions');
expect(wrapper.text()).not.toContain('AI evidence filter suggestions');
expect(axiosGet).not.toHaveBeenCalledWith(
expect.stringContaining('/dashboard-suggestions?status=pending'),
expect.anything(),
Expand Down Expand Up @@ -384,7 +384,7 @@ describe('control implementations IndexView', () => {
await implementationButton?.trigger('click');
await flushPromises();

expect(wrapper.text()).toContain('AI dashboard suggestions');
expect(wrapper.text()).toContain('AI evidence filter suggestions');
expect(wrapper.text()).toContain('Production evidence');
expect(wrapper.text()).toContain('80% confidence');
expect(axiosGet).toHaveBeenCalledWith(
Expand Down Expand Up @@ -574,7 +574,7 @@ describe('control implementations IndexView', () => {
await flushPromises();

expect(wrapper.text()).toContain(
'AI reviewed this control and found no matching dashboard filter',
'AI reviewed this control and found no matching evidence filter',
);
});

Expand Down Expand Up @@ -608,7 +608,7 @@ describe('control implementations IndexView', () => {
.find((button) =>
button
.attributes('aria-label')
?.includes('pending AI dashboard suggestion'),
?.includes('pending AI evidence filter suggestion'),
);
expect(badge).toBeTruthy();
expect(badge?.text()).toContain('1');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function filterName(suggestion: DashboardSuggestion): string {
return (
suggestion.proposedFilterName ??
suggestion.targetFilterName ??
'Proposed dashboard filter'
'Proposed evidence filter'
);
}

Expand Down Expand Up @@ -81,20 +81,20 @@ function toggleReasoning(key: string) {
<template>
<section class="mb-6" data-testid="control-implementation-suggestions">
<div class="mb-3 flex items-center justify-between gap-4">
<h4 class="m-0 text-base font-medium">AI dashboard suggestions</h4>
<h4 class="m-0 text-base font-medium">AI evidence filter suggestions</h4>
<RouterLink
v-if="hasSuggestions && sspId"
:to="reviewRoute"
class="text-sm font-medium text-blue-600 underline dark:text-blue-300"
>
Review in dashboard suggestions
Review in evidence filter suggestions
</RouterLink>
</div>

<Message v-if="loading" severity="info" variant="simple">
<span class="flex items-center gap-2">
<i class="pi pi-spin pi-spinner"></i>
Loading AI dashboard suggestions...
Loading AI evidence filter suggestions...
</span>
</Message>

Expand Down Expand Up @@ -153,7 +153,7 @@ function toggleReasoning(key: string) {
</div>

<Message v-else-if="noMatch" severity="info" variant="outlined">
AI reviewed this control and found no matching dashboard filter<span
AI reviewed this control and found no matching evidence filter<span
v-if="formatEvaluatedAt(result?.evaluatedAt)"
>
on {{ formatEvaluatedAt(result?.evaluatedAt) }}</span
Expand All @@ -163,7 +163,7 @@ function toggleReasoning(key: string) {
<p v-else class="text-sm text-zinc-500 dark:text-slate-400">
{{
matchedWithoutPending
? 'No pending AI dashboard suggestions for this control.'
? 'No pending AI evidence filter suggestions for this control.'
: "AI hasn't evaluated this control yet."
}}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,11 +1047,11 @@ async function loadAllDashboards() {
console.error('Failed to load all dashboards:', error);
toast.add({
severity: 'error',
summary: 'Error Loading Dashboards',
summary: 'Error Loading Evidence Filters',
detail:
error instanceof Error
? error.message
: 'Failed to load dashboards. Please try again later.',
: 'Failed to load evidence filters. Please try again later.',
life: 3000,
});
}
Expand Down Expand Up @@ -1091,8 +1091,8 @@ async function linkExistingDashboard() {
});
toast.add({
severity: 'success',
summary: 'Dashboard Linked',
detail: `Dashboard "${dashboard.name}" linked to this control.`,
summary: 'Evidence Filter Linked',
detail: `Evidence filter "${dashboard.name}" linked to this control.`,
life: 3000,
});
// Refresh and reset
Expand All @@ -1105,7 +1105,7 @@ async function linkExistingDashboard() {
linkDashboardError.value =
error instanceof Error
? error.message
: 'Unexpected error linking dashboard.';
: 'Unexpected error linking evidence filter.';
} finally {
linkingDashboard.value = false;
}
Expand All @@ -1131,8 +1131,8 @@ async function unlinkDashboard(dashboard: DashboardWithControls) {
});
toast.add({
severity: 'success',
summary: 'Dashboard Unlinked',
detail: `Dashboard "${dashboard.name}" removed from this control.`,
summary: 'Evidence Filter Unlinked',
detail: `Evidence filter "${dashboard.name}" removed from this control.`,
life: 3000,
});
await loadDashboardsForControl();
Expand All @@ -1141,11 +1141,11 @@ async function unlinkDashboard(dashboard: DashboardWithControls) {
console.error(error);
toast.add({
severity: 'error',
summary: 'Error Unlinking Dashboard',
summary: 'Error Unlinking Evidence Filter',
detail:
error instanceof Error
? error.message
: 'Unexpected error unlinking dashboard.',
: 'Unexpected error unlinking evidence filter.',
life: 3000,
});
}
Expand Down Expand Up @@ -1211,7 +1211,7 @@ function viewDashboardEvidence(dashboard: DashboardWithControls) {
console.error('Unable to build dashboard filter string.', error);
toast.add({
severity: 'error',
summary: 'Invalid Dashboard Filter',
summary: 'Invalid Evidence Filter',
detail:
error instanceof Error
? error.message
Expand Down Expand Up @@ -1254,7 +1254,7 @@ async function submitEvidenceLinking() {
toast.add({
severity: 'error',
summary: 'Validation Error',
detail: 'Please provide a name for the evidence dashboard.',
detail: 'Please provide a name for the evidence filter.',
life: 3000,
});
return;
Expand All @@ -1263,7 +1263,8 @@ async function submitEvidenceLinking() {
toast.add({
severity: 'error',
summary: 'Validation Error',
detail: 'Please build a label filter before creating the dashboard.',
detail:
'Please build a label filter before creating the evidence filter.',
life: 3000,
});
return;
Expand Down Expand Up @@ -1301,7 +1302,7 @@ async function submitEvidenceLinking() {
toast.add({
severity: 'success',
summary: 'Evidence Linked',
detail: 'Evidence dashboard created successfully.',
detail: 'Evidence filter created successfully.',
life: 3000,
});
// Refresh dashboards list and reset form for next entry
Expand All @@ -1312,7 +1313,7 @@ async function submitEvidenceLinking() {
createEvidenceDashboardError.value =
error instanceof Error
? error.message
: 'Unexpected error creating evidence dashboard.';
: 'Unexpected error creating evidence filter.';
} finally {
creatingEvidenceDashboard.value = false;
}
Expand Down Expand Up @@ -1352,7 +1353,7 @@ async function submitEvidenceLinking() {
:disabled="!resolvedSspId"
@click="openDashboardSuggestions"
>
AI dashboard suggestions
AI evidence filter suggestions
</PrimaryButton>
</div>

Expand All @@ -1366,7 +1367,8 @@ async function submitEvidenceLinking() {
variant="outlined"
class="mt-6"
>
AI is not configured, so dashboard suggestions cannot be generated.
AI is not configured, so evidence filter suggestions cannot be
generated.
</Message>
<div class="h-0.5 w-full bg-gray-200 dark:bg-slate-700 mt-4"></div>

Expand Down Expand Up @@ -1420,14 +1422,14 @@ async function submitEvidenceLinking() {
<BurgerMenu
:items="[
{
label: 'Create New Dashboard',
label: 'Create New Evidence Filter',
command: () => {
setLinkExistingForm(false);
setEvidenceLinkingForm(true);
},
},
{
label: 'Link Existing Dashboard',
label: 'Link Existing Evidence Filter',
command: () => {
setEvidenceLinkingForm(false);
setLinkExistingForm(true);
Expand All @@ -1440,7 +1442,7 @@ async function submitEvidenceLinking() {
<!-- Existing Dashboards List -->
<div v-if="existingDashboards.length > 0" class="mb-6">
<h6 class="text-sm font-medium text-gray-500 mb-2">
Linked Dashboards
Linked Evidence Filters
</h6>
<div class="space-y-2">
<div
Expand Down Expand Up @@ -1478,7 +1480,7 @@ async function submitEvidenceLinking() {
<Message v-else-if="dashboardsLoading" severity="info" variant="simple">
<span class="flex items-center gap-2">
<i class="pi pi-spin pi-spinner"></i>
Loading dashboards...
Loading evidence filters...
</span>
</Message>
<div
Expand All @@ -1488,7 +1490,7 @@ async function submitEvidenceLinking() {
class="mb-6"
>
<Message severity="secondary">
No dashboards linked to this control yet.
No evidence filters linked to this control yet.
</Message>
</div>

Expand Down Expand Up @@ -1547,7 +1549,7 @@ async function submitEvidenceLinking() {
<div v-if="showEvidenceSection" class="mt-6">
<h4 class="m-0 mb-2 font-medium text-base">Evidence Linking</h4>
<Message severity="secondary">
Evidence dashboards can be linked after you create this statement.
Evidence filters can be linked after you create this statement.
</Message>
</div>
</div>
Expand Down
Loading
Loading