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

Quick Fixes For Heimdall Issues #5237

Merged
merged 16 commits into from
Dec 6, 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
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
text="Controls Viewed"
sort="disabled"
:viewed-header="true"
:number-of-viewed-controls="viewedControlIds.length"
Amndeep7 marked this conversation as resolved.
Show resolved Hide resolved
:number-of-viewed-controls="numOfViewed"
:number-of-all-controls="raw_items.length"
/>
</template>
Expand Down Expand Up @@ -207,6 +207,12 @@ export default class ControlTable extends Vue {
viewedControlIds: string[] = [];
displayUnviewedControls = true;

get numOfViewed() {
return this.raw_items.filter((elem) =>
this.viewedControlIds.some((id) => elem.control.data.id === id)
).length;
}

toggleControlViewed(control: ContextualizedControl) {
const alreadyViewed = this.viewedControlIds.indexOf(control.data.id);
// If the control hasn't been marked as viewed yet, mark it as viewed.
Expand Down
6 changes: 3 additions & 3 deletions apps/frontend/src/components/global/groups/GroupRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
multiple
chips
>
<v-chip v-for="(group, i) in groups" :key="'chip' + i" small>{{
group.text
}}</v-chip>
<template v-for="(group, i) in groups">
<v-chip :key="'chip' + i" small>{{ group.text }}</v-chip>
</template>
</v-chip-group>
</div>
</template>
Expand Down
11 changes: 9 additions & 2 deletions apps/frontend/src/components/global/login/LocalLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@
ref="password"
v-model="password"
:error-messages="requiredFieldError($v.password, 'Password')"
type="password"
:type="showPassword ? 'text' : 'password'"
name="password"
label="Password"
prepend-icon="mdi-lock"
tabindex="2"
@blur="$v.password.$touch()"
/>
>
<template #append>
<v-icon @click="showPassword = !showPassword">
{{ showPassword ? 'mdi-eye' : 'mdi-eye-off' }}
</v-icon>
</template>
</v-text-field>
<v-container fluid class="mb-0">
<v-btn
id="login_button"
Expand Down Expand Up @@ -176,6 +182,7 @@ export default class LocalLogin extends Vue {
email = '';
password = '';
buttonLoading = false;
showPassword = false;

login() {
this.buttonLoading = true;
Expand Down
5 changes: 4 additions & 1 deletion apps/frontend/src/mixins/EvaluationMixin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import {GroupsModule} from '@/store/groups';
import {IGroup} from '@heimdall/interfaces';
import {intersectionBy} from 'lodash';
import {Component, Vue} from 'vue-property-decorator';
import {IVuetifyItems} from '../utilities/helper_util';

Expand All @@ -8,7 +10,8 @@ export default class EvaluationMixin extends Vue {
if (!groups) {
return [];
}
return groups.map((group) => {

return intersectionBy(groups, GroupsModule.myGroups, 'id').map((group) => {
return {
text: group.name,
value: group.id
Expand Down
11 changes: 8 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
version: '3.5'

services:
database:
image: postgres:13
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
volumes:
- ./data:/var/lib/postgresql/data
environment:
Expand All @@ -23,7 +27,8 @@ services:
ports:
- "3000"
depends_on:
- "database"
database:
condition: service_healthy
nginx:
Amndeep7 marked this conversation as resolved.
Show resolved Hide resolved
image: nginx:alpine
environment:
Expand Down
Loading