Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI improv #463

Merged
merged 3 commits into from
Aug 1, 2023
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
5 changes: 5 additions & 0 deletions src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ $min-contrast-ratio: 4;

html {
font-size: 0.9rem;
}

.btn-primary {
color: white;
background-color: #0099a0;
}
2 changes: 1 addition & 1 deletion src/lib/CertificateCard.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Card, CardBody, CardHeader, CardText, ListGroup, ListGroupItem, Table, Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'sveltestrap';
import { Card, CardBody, CardHeader, CardText, Table, Button, Modal, ModalBody, ModalHeader } from 'sveltestrap';
import type { Certificate } from '$lib/orchestrator';

export let certificate: Certificate;
Expand Down
3 changes: 1 addition & 2 deletions src/lib/EmptyCloudService.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ function discard() {
<CardText>
<div class="sign">
<Button on:click={() => editing.set(true)} class="mt-2" color="primary">
<div>Add service</div></Button
>
<div>Add service</div></Button>
</div>
</CardText>
</CardBody>
Expand Down
9 changes: 0 additions & 9 deletions src/lib/Navigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,6 @@ let loggedIn = localStorage.token ? true : false;
<Fa icon={faQuestion} /> Help
</NavLink>
</NavItem>
<!-- removed for medina: <Dropdown nav inNavbar>
<DropdownToggle nav caret>Account</DropdownToggle>
<DropdownMenu end>
<DropdownItem>Option 1</DropdownItem>
<DropdownItem>Option 2</DropdownItem>
<DropdownItem divider />
<DropdownItem>Reset</DropdownItem>
</DropdownMenu>
</Dropdown> -->
</Nav>
</Collapse>
</Navbar>
Expand Down
10 changes: 10 additions & 0 deletions src/routes/assessment/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ let filterCompliant;
let filterMetricCategory;
let filterMetric;
let filterResourceType;
let filterResourceID;

$: filteredResults = results.filter((r) => {
return (
Expand All @@ -36,6 +37,9 @@ $: filteredResults = results.filter((r) => {
: true) &&
(filterMetric != ''
? $metrics.get(r.metricId)?.name?.toLowerCase()?.includes(filterMetric?.toLowerCase())
: true) &&
(filterResourceID != ''
? r.resourceId.toLocaleLowerCase().includes(filterResourceID?.toLocaleLowerCase())
: true)
);
});
Expand Down Expand Up @@ -88,6 +92,12 @@ The following list contains all assessment results, sorted by timestamp.
<Input type="text" name="resourceType" id="resourceType" bind:value={filterResourceType} />
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="resourceType">Resource ID</Label>
<Input type="text" name="resourceID" id="resourceID" bind:value={filterResourceID} />
</FormGroup>
</Col>
<Col />
</Row>
</Container>
Expand Down
11 changes: 11 additions & 0 deletions src/routes/cloud/[...id]/assessment/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ let filterStartTimestamp: string | number | Date;
// let dateFilterStartTimestamp = new Date(filterStartTimestamp);
let filterEndTimestamp: string | number | Date;
// let dateFilterEndTimestamp = new Date(filterEndTimestamp);
let filterResourceID: string;


$: filteredResults = results.filter((r) => {
let dateFilterStartTimestamp = new Date(filterStartTimestamp);
Expand All @@ -52,6 +54,9 @@ $: filteredResults = results.filter((r) => {
: true) &&
(filterEndTimestamp != ''
? new Date(r.timestamp) < dateFilterEndTimestamp
: true) &&
(filterResourceID != ''
? r.resourceId.toLocaleLowerCase().includes(filterResourceID?.toLocaleLowerCase())
: true)
);
});
Expand Down Expand Up @@ -170,6 +175,12 @@ const resourceList = getListOfResources()
<Input type="text" name="endTimestamp" id="endTimestamp" placeholder="2024-02-01T10:01" bind:value={filterEndTimestamp} />
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="resourceType">Resource ID</Label>
<Input type="text" name="resourceID" id="resourceID" bind:value={filterResourceID} />
</FormGroup>
</Col>
<Col />
</Row>
</Container>
Expand Down
Loading