Skip to content

Commit

Permalink
Merge branch 'main' of github.com:digma-ai/digma-docker-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
shaykeren committed Jun 7, 2023
2 parents 179fc7f + a919652 commit 67bc9da
Show file tree
Hide file tree
Showing 98 changed files with 3,986 additions and 750 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ LABEL org.opencontainers.image.title="Digma Continuous Feedback" \
com.docker.extension.detailed-description="<h3>Continuous Feedback for Code</h3><p>Digma collects data from applications running locally or inside your containers and lints their runtime behavior. It is able to find issues, code smells, performance degradations and provide more context to making risky changes.</p><p>The Digma IDE plugin provides detailed information in your code itself to explore hidden issues and design better applications/p>" \
com.docker.extension.publisher-url="https://digma.ai" \
com.docker.extension.additional-urls="[{\"alt\": \"Digma IntelliJ Plugin\", \"title\":\"Jetbrain IDEA Plugin\", \"url\": \"https://plugins.jetbrains.com/plugin/19470-digma-continuous-feedback\"}]" \
com.docker.extension.changelog="<p>Extension changelog<ul><li>Updating the getting started page</li></ul></p>" \
com.docker.extension.changelog="<p>Extension changelog<ul><li>Backend version bump</li></ul></p>" \
com.docker.desktop.extension.icon="https://media-public-1.s3.eu-west-1.amazonaws.com/digma.svg" \
com.docker.extension.categories="cloud-development,testing-tools"

Expand Down
19 changes: 19 additions & 0 deletions backend/analyticsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class AnalyticsProvider {
throw new Error(e);
}
}

async getAssets(environment, serviceNames) {
try {
const response = await this.send(
Expand All @@ -36,6 +37,24 @@ class AnalyticsProvider {
}
}

async getInsights(codeObjectIds, environment) {
try {
const response = await this.send(
"POST",
`/CodeAnalytics/codeObjects/insights`,
undefined,
{
codeObjectIds,
environment,
}
);
return response;
} catch (e) {
console.log(e);
throw new Error(e);
}
}

createSslAgent() {
// when NODE_TLS_REJECT_UNAUTHORIZED = 0, it allows allows insecure http
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
Expand Down
36 changes: 18 additions & 18 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ app.post("/environments/:environmentId/assets", async function (req, res) {
}
});

app.post("/insights", async function (req, res) {
try {
const insights = await analyticsProvider.getInsights(
req.body.codeObjectIds,
req.body.environment
);
res.send(insights);
} catch (e) {
console.log(e);
res.sendStatus(500);
}
});

var sock = process.argv[2];

fs.stat(sock, function (err) {
Expand Down
Binary file modified ui/assets/images/jetBrainsPluginThumbnail_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui/assets/images/jetBrainsPluginThumbnail_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions ui/src/components/App/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export const SLACK_CHANNEL_URL =
"https://join.slack.com/t/continuous-feedback/shared_invite/zt-1hk5rbjow-yXOIxyyYOLSXpCZ4RXstgA";

export const JETBRAINS_PLUGIN_URL =
"https://plugins.jetbrains.com/plugin/19470-digma-continuous-feedback";

export const PAGES = {
GETTING_STARTED: "GETTING_STARTED",
ASSETS: "ASSETS",
};
Loading

0 comments on commit 67bc9da

Please sign in to comment.