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

[frontend] Remove grey sections with 'coming soon' to be more align with what's actually available #2297

Open
wants to merge 2 commits into
base: release/current
Choose a base branch
from
Open
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 @@ -11,9 +11,12 @@
import io.openbas.database.repository.TagRepository;
import io.openbas.rest.payload.form.PayloadCreateInput;
import jakarta.transaction.Transactional;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import lombok.extern.java.Log;
import org.springframework.stereotype.Service;

@Log
@RequiredArgsConstructor
@Service
public class PayloadCreationService {
Expand Down Expand Up @@ -55,8 +58,12 @@
fileDropPayload.setAttackPatterns(
fromIterable(attackPatternRepository.findAllById(input.getAttackPatternsIds())));
fileDropPayload.setTags(iterableToSet(tagRepository.findAllById(input.getTagIds())));
fileDropPayload.setFileDropFile(
documentRepository.findById(input.getFileDropFile()).orElseThrow());
Optional<Document> document = documentRepository.findById(input.getFileDropFile());

Check warning on line 61 in openbas-api/src/main/java/io/openbas/rest/payload/service/PayloadCreationService.java

View check run for this annotation

Codecov / codecov/patch

openbas-api/src/main/java/io/openbas/rest/payload/service/PayloadCreationService.java#L61

Added line #L61 was not covered by tests
if (document.isPresent()) {
fileDropPayload.setFileDropFile(document.get());

Check warning on line 63 in openbas-api/src/main/java/io/openbas/rest/payload/service/PayloadCreationService.java

View check run for this annotation

Codecov / codecov/patch

openbas-api/src/main/java/io/openbas/rest/payload/service/PayloadCreationService.java#L63

Added line #L63 was not covered by tests
} else {
log.info("Document not found: " + input.getFileDropFile());

Check warning on line 65 in openbas-api/src/main/java/io/openbas/rest/payload/service/PayloadCreationService.java

View check run for this annotation

Codecov / codecov/patch

openbas-api/src/main/java/io/openbas/rest/payload/service/PayloadCreationService.java#L65

Added line #L65 was not covered by tests
}
fileDropPayload = payloadRepository.save(fileDropPayload);
this.payloadService.updateInjectorContractsForPayload(fileDropPayload);
return fileDropPayload;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AttachMoneyOutlined, EmojiEventsOutlined, GroupsOutlined } from '@mui/i
import { NewspaperVariantMultipleOutline } from 'mdi-material-ui';
import * as React from 'react';

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove browser-agent screen (not supported for now)

import RightMenu, { RightMenuEntry } from '../../../../components/common/RightMenu';
import RightMenu, { RightMenuEntry } from '../../../../components/common/menu/RightMenu';
import type { Exercise, Scenario } from '../../../../utils/api-types';

interface Numbers {
Expand Down
Loading