Skip to content

Commit d21d6bf

Browse files
committed
Made environment more developer friendly, and added span field to dashboard.
1 parent b61b454 commit d21d6bf

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

Dockerfile-splunk

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ FROM dmuth1/splunk-lab-ml
77
#
88
# Copy in our application
99
#
10-
COPY app/ /app/
11-
10+
COPY app/ /opt/splunk/etc/apps/splunk-yelp/default
1211

app/app.conf

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# Splunk app configuration file
3+
#
4+
5+
[install]
6+
is_configured = 0
7+
8+
[ui]
9+
is_visible = 1
10+
label = Splunk Yelp
11+
12+
[launcher]
13+
author = Douglas Muth
14+
description = Splunk Yelp: Splunk Yelp Reviews by Venue!
15+
version = 1.0.0
16+

app/data/ui/views/yelp_venue_report.xml

+12-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88
<latest></latest>
99
</default>
1010
</input>
11+
<input type="dropdown" token="span" searchWhenChanged="true">
12+
<label>Span</label>
13+
<choice value="1y">1 Year</choice>
14+
<choice value="6mon">6 Months</choice>
15+
<choice value="3mon">3 Months</choice>
16+
<choice value="1mon">1 Month</choice>
17+
<choice value="1w">1 Week</choice>
18+
<choice value="1d">1 Day</choice>
19+
<default>1mon</default>
20+
<initialValue>1mon</initialValue>
21+
</input>
1122
<input type="dropdown" token="venue" searchWhenChanged="true">
1223
<label>Venue</label>
1324
<fieldForLabel>venue</fieldForLabel>
@@ -65,7 +76,7 @@
6576
<chart>
6677
<search>
6778
<query>index=main venue="$venue$"
68-
| timechart avg(stars) AS "Avg Rating" count(stars) AS "Num Ratings"</query>
79+
| timechart span=$span$ avg(stars) AS "Avg Rating" count(stars) AS "Num Ratings"</query>
6980
<earliest>$field1.earliest$</earliest>
7081
<latest>$field1.latest$</latest>
7182
<sampleRatio>1</sampleRatio>

go.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ cat > user-prefs.conf << EOF
127127
# Created by Splunk Yelp
128128
#
129129
[general]
130-
default_namespace = splunk-lab
130+
default_namespace = splunk-yelp
131131
EOF
132132

133133
echo
@@ -180,7 +180,7 @@ then
180180
ID=$(docker run $CMD -d dmuth1/splunk-yelp)
181181

182182
else
183-
DOCKER_V_APP="-v $(pwd)/app:/app"
183+
DOCKER_V_APP="-v $(pwd)/app:/opt/splunk/etc/apps/splunk-yelp/local"
184184
docker run $CMD ${DOCKER_V_MNT} ${DOCKER_V_APP} -it dmuth1/splunk-yelp bash
185185

186186
fi

0 commit comments

Comments
 (0)