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

Fix: Inform user if URL is incomplete #2367

Merged
merged 8 commits into from
Feb 7, 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
2 changes: 1 addition & 1 deletion src/app/views/query-runner/query-input/QueryInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const QueryInput = (props: IQueryInputProps) => {
}

const runQuery = () => {
if (!sampleQuery.sampleUrl) {
if (!sampleQuery.sampleUrl || sampleQuery.sampleUrl.indexOf('graph.microsoft.com') === -1) {
return;
}
handleOnRunQuery(sampleQuery);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ function getErrorMessage(queryUrl: string) {
if (error) {
return `${translateMessage('Possible error found in URL near')}: ${error}`;
}
if (queryUrl.indexOf('graph.microsoft.com') === -1){
return translateMessage('The URL must contain graph.microsoft.com');
}
return '';
}

Expand Down
3 changes: 2 additions & 1 deletion src/messages/GE.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,5 +470,6 @@
"Permission propagation delay": "Permission propagation delay",
"Scope consent successful": "Scope consent successful",
"Query documentation": "Query documentation",
"This token is not a jwt token and cannot be decoded by jwt.ms": "This token is not a jwt token and cannot be decoded by jwt.ms"
"This token is not a jwt token and cannot be decoded by jwt.ms": "This token is not a jwt token and cannot be decoded by jwt.ms",
"The URL must contain graph.microsoft.com": "The URL must contain graph.microsoft.com"
}