Skip to content
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
98 changes: 42 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on:
on:
push:
paths-ignore:
- '.github/workflows/manual-release.yml'
Expand All @@ -9,93 +9,79 @@ jobs:
bundle-app:
name: Bundle App
runs-on: ubuntu-latest
outputs:
app_name: ${{ steps.appinfo.outputs.app_name }}
app_id: ${{ steps.appinfo.outputs.app_id }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Fetch and set app info
id: appinfo
- uses: actions/checkout@v4
- name: Read App Info
id: app
run: |
APP_ID=$(cat app.manifest | jq -r '.info.id.name')
echo "app_id=${APP_ID}" >> $GITHUB_OUTPUT
APP_NAME=$(echo "$APP_ID" | tr _ - )
echo "app_name=${APP_NAME}" >> $GITHUB_OUTPUT
app_id=$(cat splunk_*/app.manifest | jq -r '.info.id.name')
app_version=$(cat splunk_*/app.manifest | jq -r '.info.id.version')
echo "name=${app_id}" >> $GITHUB_OUTPUT
echo "version=${app_version}" >> $GITHUB_OUTPUT
working-directory: ./packages

- name: Excluding images from README
- name: Bundle app source
env:
APP_NAME: ${{ steps.app.outputs.name }}
APP_VERSION: ${{ steps.app.outputs.version }}
run: |
# Exclude images from README file
sed -i '/^!/d' README.md
cp README.md packages/$APP_NAME
tar -C packages -zcvf $APP_NAME-$APP_VERSION.tar.gz $APP_NAME/

- name: Bundle app source
run: |
mkdir dist
tar -zcvf dist/${{ steps.appinfo.outputs.app_name }}.tgz --exclude='.[^/]*' --exclude=./dist .

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: app_tgz
path: dist/${{ steps.appinfo.outputs.app_name }}.tgz
name: packaged_app
path: ${{ steps.app.outputs.name }}*.tar.gz

slim-validate:
name: SLIM Validation
needs: bundle-app
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9 ]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: app_tgz
name: packaged_app

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install splunk-packaging-toolkit

- name: Unpackage artifact
run: |
mkdir ${{ needs.bundle-app.outputs.app_id }}
tar -xf ${{ needs.bundle-app.outputs.app_name }}.tgz -C ${{ needs.bundle-app.outputs.app_id }}

- name: Slim Validate
run: slim validate ${{ needs.bundle-app.outputs.app_id }}
run: slim validate *.tar.gz

appinspect-cli:
name: AppInspect CLI Validation
name: AppInspect CLI ${{ matrix.tags }}
needs: bundle-app
runs-on: ubuntu-latest
strategy:
matrix:
tags:
- "cloud"
- "private_app"
- "private_classic"
- "private_victoria"
steps:
- name: Download artifact
uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: app_tgz

- name: Unpackage artifact
run: |
mkdir -p build/${{ needs.bundle-app.outputs.app_id }}
tar -xf ${{ needs.bundle-app.outputs.app_name }}.tgz -C build/${{ needs.bundle-app.outputs.app_id }}

- name: Setup Python
uses: actions/setup-python@v4
name: packaged_app
path: dist
- uses: splunk/appinspect-cli-action@v2.10
with:
python-version: 3.7

- name: Install dependencies
run: |
python -m pip install splunk-appinspect

- name: Run AppInspect
run: |
splunk-appinspect inspect ${{ needs.bundle-app.outputs.app_id }} --output-file appinspect.json
exit `cat appinspect.json | jq '.summary.failure'`
working-directory: ./build
app_path: dist
included_tags: ${{ matrix.tags }}

# appinspect-api:
# name: AppInspect API Validation
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ If not provided, default values will be used for optional fields `currencypair`,

> Field names **must** correspond to the ones specified above to be properly handled by the visualization

![alt text](.images/OHLC_candlestick.png "OHLC Chart - Candlestick Example")
![alt text](etc/OHLC_candlestick.png "OHLC Chart - Candlestick Example")

![alt text](.images/OHLC_bars.png "OHLC Chart - Bars Example")
![alt text](etc/OHLC_bars.png "OHLC Chart - Bars Example")

### Box Plot
`<basesearch> | table box_name value`
Expand All @@ -43,7 +43,7 @@ Replace `box_name` and `value` with your fields to start.
| `box_name` | string | Label of the box | `A` |
| `value` | numeric | Data forming box dataset | `20` |

![alt text](.images/boxplot_chart.png "Boxplot Chart Example")
![alt text](etc/boxplot_chart.png "Boxplot Chart Example")

### Multiple Axes Plot
`<basesearch> | table _time scatter-y2-dataset1 scatter-y2_datasetN line-y-dataset1 line-y-datasetN`
Expand All @@ -60,12 +60,12 @@ Replace `_time`, `scatter-y2-datasetX` and `line-y-datasetX` with your fields to

> Field names **must** begin with `scatter` and `line` to be properly handled by the visualization

![alt text](.images/MultipleAxes_plot.png "Multiple Axes Plot")
![alt text](etc/MultipleAxes_plot.png "Multiple Axes Plot")

## Example
This app comes with a dashboard showcasing simple usages of mentioned charts.

* Navigate to `Apps / Search & Reporting / Dashboards`
* Navigate to `Apps / Search & Reporting / Dashboards`
* Click on the dashboard `Overview of Plotly Charts for Splunk`
* Be inspired

Expand All @@ -75,4 +75,4 @@ This app comes with a dashboard showcasing simple usages of mentioned charts.
* :bulb: Got an idea for a **new feature**? [Open a feature request](https://github.com/splunk/splunk-plotly-collection-viz/issues/new?assignees=edro15&labels=&template=feature_request.md&title=)

## License
This project is licensed under [Apache-2.0](LICENSE.md)
This project is licensed under [Apache-2.0](./packages/splunk_plotly_collection_viz/LICENSE.md)
Loading