From 404693d046fb7ab25a2d019c09d086e5e9fa0d05 Mon Sep 17 00:00:00 2001 From: teh_coderer Date: Fri, 17 Mar 2023 14:36:29 -0400 Subject: [PATCH] readded rust install on CLI for linux in case cache gets cleared --- .github/workflows/unit-test.yml | 4 ++++ openbb_terminal/core/plots/web/main.js | 15 +++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index b0fb51b849e..42f374b7a47 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -82,6 +82,7 @@ jobs: - name: Setup sudo apt installs for ubuntu-latest run: | + curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable sudo apt-get update sudo apt-get install -y \ build-essential \ @@ -159,6 +160,7 @@ jobs: - name: Setup sudo apt installs for ubuntu-latest run: | + curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable sudo apt-get update sudo apt-get install -y \ build-essential \ @@ -241,6 +243,7 @@ jobs: - name: Setup sudo apt installs for ubuntu-latest if: runner.os == 'Linux' run: | + curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable sudo apt-get update sudo apt-get install -y \ build-essential \ @@ -321,6 +324,7 @@ jobs: - name: Setup sudo apt installs for ubuntu-latest if: runner.os == 'Linux' run: | + curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable sudo apt-get update sudo apt-get install -y \ build-essential \ diff --git a/openbb_terminal/core/plots/web/main.js b/openbb_terminal/core/plots/web/main.js index 702e977c541..5b8afde8670 100644 --- a/openbb_terminal/core/plots/web/main.js +++ b/openbb_terminal/core/plots/web/main.js @@ -279,8 +279,7 @@ function OpenBBMain(plotly_figure, chartdiv, csvdiv, textdiv, titlediv) { "yaxis.exponentformat": "SI", "yaxis.tickformat": ".0s", "yaxis.exponentbase": 100, - - } + }; Plotly.update(globals.CHART_DIV, layout_update); } if (globals.CHART_DIV.layout.yaxis.type == "linear" && globals.logYaxis) { @@ -293,8 +292,7 @@ function OpenBBMain(plotly_figure, chartdiv, csvdiv, textdiv, titlediv) { "yaxis.exponentformat": "none", "yaxis.tickformat": null, "yaxis.exponentbase": 10, - - } + }; Plotly.update(globals.CHART_DIV, layout_update); } } else { @@ -313,17 +311,14 @@ function OpenBBMain(plotly_figure, chartdiv, csvdiv, textdiv, titlediv) { }); } - // We check to see if window.save_png is defined and true if (window.save_image != undefined && window.export_image) { // if is_3dmesh is true, we set the close_interval to 1000 let close_interval = is_3dmesh ? 1000 : 500; // We get the extension of the file and check if it is valid - const extension = window.export_image - .split(".") - .pop() - .replace("jpg", "jpeg"); + let filename = window.export_image.split("/").pop(); + const extension = filename.split(".").pop().replace("jpg", "jpeg"); if (["jpeg", "png", "svg"].includes(extension)) { // We run Plotly.downloadImage to save the chart as an image @@ -331,7 +326,7 @@ function OpenBBMain(plotly_figure, chartdiv, csvdiv, textdiv, titlediv) { format: extension, width: globals.CHART_DIV.clientWidth, height: globals.CHART_DIV.clientHeight, - filename: window.export_image.split("/").pop(), + filename: filename.split(".")[0], }); } setTimeout(function () {