Skip to content

Commit

Permalink
feat: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nnillni committed Jan 25, 2024
1 parent e159df4 commit bf212c3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ snyk:
# Host of the Web UI to render links. Defaults to "app.snyk.io"
# If you use EU or AU Snyk account, change this to app.eu.snyk.io or app.au.snyk.io
appHost: app.snyk.io
# Version of the API to use on the calls. Defaults to "2023-11-06"
# Version of the API to use on the calls. Defaults to "2023-06-19~experimental"
apiVersion: 2023-11-06
# Mocks the API calls, useful for development and for testing the plugin without a Snyk account. Defaults to "false"
mocked: false
Expand Down
4 changes: 4 additions & 0 deletions config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export interface Config {
* @visibility frontend
*/
appHost?: string;
/**
* @visibility frontend
*/
AppHost?: string; // kept for backward compatibility
/**
* @visibility frontend
*/
Expand Down
10 changes: 8 additions & 2 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ export class SnykApiClient implements SnykApi {
}

getSnykAppHost() {
return this.configApi.getOptionalString("snyk.appHost") ?? "app.snyk.io";
const appHost =
this.configApi.getOptionalString("snyk.AppHost") ??
this.configApi.getOptionalString("snyk.appHost");
return appHost ?? "app.snyk.io";
}

isMocked(): boolean {
Expand All @@ -105,7 +108,10 @@ export class SnykApiClient implements SnykApi {
}

getSnykApiVersion(): string {
return this.configApi.getOptionalString("snyk.apiVersion") ?? "2023-11-06";
return (
this.configApi.getOptionalString("snyk.apiVersion") ??
"2023-06-19~experimental"
);
}

isAvailableInEntity(entity: Entity): boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { FC, useEffect, useRef, useState } from "react";
import {
CircularProgressbarWithChildren,
CircularProgressbar,
buildStyles,
} from "react-circular-progressbar";
import "react-circular-progressbar/dist/styles.css";
Expand Down Expand Up @@ -173,7 +172,7 @@ export const SnykCircularCounter: FC<SnykCircularCounterProps> = ({
})}
>
<div style={{ width: "88%" }}>
<CircularProgressbar
<CircularProgressbarWithChildren
value={lines[3].value}
circleRatio={2 / 3}
styles={buildStyles({
Expand Down

0 comments on commit bf212c3

Please sign in to comment.