Skip to content

Conversation

flowirtz
Copy link

@flowirtz flowirtz commented Feb 25, 2022

  • Add button component
  • Implement CRE page
  • Implement standards page
  • Implement generic search page

Fixes #161

https://www.loom.com/share/67d67449e98649dc9fffe0f180d5dee8

@flowirtz flowirtz marked this pull request as ready for review February 25, 2022 11:42
@flowirtz flowirtz changed the title [WIP] Add Export Functionality Add Export Functionality Feb 25, 2022
@northdpole northdpole self-requested a review April 28, 2022 01:46
Copy link
Collaborator

@northdpole northdpole left a comment

Choose a reason for hiding this comment

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

the pattern so far has been to make actions into query strings, e.g. ?export=true
this is to prevent accidentally exporting things when you call
node/US_CRYPTO_EXPORT/foo

i'll fix this in the next few days
other than that it's good work, thank you

@northdpole northdpole self-requested a review April 28, 2022 02:17
@northdpole
Copy link
Collaborator

TODO: @northdpole , add documentation on how to setup a gspread oauth token so that the backend can generate the spreadsheet.

Copy link
Collaborator

@northdpole northdpole left a comment

Choose a reason for hiding this comment

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

This can easily be abused by bots, can you please

  • make this feature optional (hide it behind an environment variable when building the frontend ?
  • add a captcha challenge for clicking the button

yarn-error.log
coverage/

## Database Cache

Choose a reason for hiding this comment

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

New keyword noted.great

e2e:
yarn build
[ -d "./venv" ] && . ./venv/bin/activate
export FLASK_APP=$(CURDIR)/cre.py

Choose a reason for hiding this comment

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

Better


Common Requirements Enumeration Application
===============================
# Common Requirements Enumeration Application

Choose a reason for hiding this comment

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

cloned


Install dependencies
<pre> make install </pre>
# Install the dependencies

Choose a reason for hiding this comment

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

yes true logic is correct

- [x] > refer use case (search by cre)
- [x] > search by standard
- [x] add the ability for a mapping document to have multiple yamls in it
- [x] add db integration of tags

Choose a reason for hiding this comment

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

No need to delete it also works perfecty

@@ -0,0 +1,5 @@
a.export-button {
font-size: 1.2rem;
margin-left: 1rem;

Choose a reason for hiding this comment

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

Great view of styling

import { applyFilters } from '../../hooks/applyFilters';
import { Document } from '../../types';
import { groupLinksByType } from '../../utils';
import { applyFilters, filterContext } from '../../hooks/applyFilters';

Choose a reason for hiding this comment

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

No need to remove

<h4 className="cre-page__heading">{display.name}</h4>
<h4 className="cre-page__heading">
{display.name}
<ExportButton fetchURL={FETCH_URL} />

Choose a reason for hiding this comment

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

New version of same thing better

}
{display.tags?
<div className="cre-page__tags">Tags:{display.tags.map((tag) => ( <b>{tag} </b>))}</div>:""}

Choose a reason for hiding this comment

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

No need to delete

import { useParams } from 'react-router-dom';
import axios from 'axios';

import { useEnvironment } from '../../hooks';

Choose a reason for hiding this comment

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

No need to remove this lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add export functionality
3 participants