Closed danoswaltCL closed 1 week ago
@danoswaltCL @bcb37 For backend:
the /validation
api will expect the below format:
[{
fileName: string;
fileContent: string;
}]
This api will return the below format:
[{
fileName: string;
compatibilityType: FF_COMPATIBILITY_TYPE;
}]
enum FF_COMPATIBILITY_TYPE {
COMPATIBLE = 'compatible',
WARNING = 'warning',
INCOMPATIBLE = 'incompatible',
}
Based on the returned filenames and their compatibilityType, we can show the required message in the modal
@danoswaltCL @bcb37 Is this fine? I can start with the api development.
yes please, can you put those details in the validation endpoint story as well and take needs refined off? It's all yours.
fileContent
just means a valid feature flag JSON string, right?
https://github.com/orgs/CarnegieLearningWeb/projects/1/views/12?pane=issue&itemId=69574460
Yes right. fileContent
means a valid feature flag JSON string. Ohh sorry searched for validation
and could find only this ticket. Will add it there. Thanks for the link to the ticket.
all good, we need those details for this story too anyway
@ppratikcr7 The API is good as it is, with no message needed from the backend
On successful selection and parsing of a JSON file, the UI will send a request to validate the file to the backend. On successful 200 ok of that validation, the file-uploader component will disappear and be replaced by a table that contains values in the following states:
COMPATIBLE
: Greyed out carat, name of segment,COMPATIBLE
status.WARNING
orINCOMPLETE
will have an enabled carat and an expandable row to see detailed information.TBD: The implementation of https://github.com/CarnegieLearningWeb/UpGrade/issues/1713 will give us the data type of the response.
Latest design (allow uploading only one file):