Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft SQL Server data source #11298

Merged
merged 49 commits into from
Mar 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
cc00327
add server only build target "build-srv"
linuxchips Dec 2, 2017
c75f9a1
MSSQL Data Source
linuxchips Dec 2, 2017
6f3a62d
add _tests for mssql data source
linuxchips Dec 3, 2017
8883201
updating the query editor's syntax highlighting mode to sqlserver
linuxchips Dec 5, 2017
1c1675a
adding mssql docs
linuxchips Dec 5, 2017
5114b1f
fixing a few fromattings
linuxchips Dec 6, 2017
dd7ab43
added missing cases for DATETIME datatype
linuxchips Dec 12, 2017
6e7a067
adding support for sgl native time datatypes
linuxchips Dec 12, 2017
de22e79
Merge branch 'master' into master
linuxchips Jan 3, 2018
3e414ff
Update built_in_plugins.ts
linuxchips Jan 3, 2018
d4beee2
Merge branch 'master' into mssql_datasource
marefr Mar 13, 2018
e7b7903
docker: add mssql block
marefr Mar 13, 2018
57d46a7
mssql datasource: additional data type tests
marefr Mar 13, 2018
c877521
mssql datasource: support for timeGroup macro function
marefr Mar 13, 2018
6503e48
docker: add test dashboard for mssql for visualizing data generated b…
marefr Mar 13, 2018
ef3588c
docker: mssql and mssql tests blocks with common build context
marefr Mar 15, 2018
3d0f97a
mssql datasource: wip
marefr Mar 15, 2018
d226764
Merge branch 'master' into mssql_datasource
marefr Mar 15, 2018
571556e
mssql: adds fill to timeGroup macro.
xlson Mar 15, 2018
faf9e3f
mssql: add timeGroup integration test
marefr Mar 15, 2018
3b03dce
mssql: timeGroup fill support added.
xlson Mar 15, 2018
9144701
mssql: disable mssql integration tests per default
marefr Mar 15, 2018
7dfa159
docs: update mssql documentation
marefr Mar 15, 2018
a6e4ac5
mssql: update plugin.json, added description and name MSSQL -> Micros…
marefr Mar 16, 2018
f0f8006
mssql: support money, smallmoney and decimal data types
marefr Mar 16, 2018
e97b03e
mssql: additional integration tests
marefr Mar 16, 2018
673c829
docker: add test dashboard for mssql tests based on test data generat…
marefr Mar 16, 2018
ccd57fb
mssql: skip rendering of mssql logos until we have a valid logo
marefr Mar 16, 2018
69b9fb6
mssql: minor improvements of query editor help
marefr Mar 16, 2018
1c7aff7
mssql: strip inkscape from logo
marefr Mar 16, 2018
06afd24
mssql: add alternative logo without text
marefr Mar 16, 2018
d26d8c7
Merge branch 'master' into mssql_datasource
marefr Mar 16, 2018
e1c4a27
docs: mssql documentation will go into another branch targeting next …
marefr Mar 19, 2018
74a98d4
mssql: remove logos for now
marefr Mar 19, 2018
294ee5a
Merge branch 'master' into mssql_datasource
marefr Mar 19, 2018
03d15f7
mssql: update test dashboard
marefr Mar 19, 2018
8c2f3f7
mssql: update readme
marefr Mar 19, 2018
62174c8
mssql: cleanup and minor changes
marefr Mar 19, 2018
2802fe3
docker: update test dashboard for mssql tests
marefr Mar 19, 2018
24c0f28
mssql: allow host without port and fallback to default port 1433
marefr Mar 19, 2018
d14946a
mssql: cleanup and minor refactor
marefr Mar 19, 2018
a2eaf39
test
marefr Mar 19, 2018
f5e02d6
fix: only run gofmt on pkg directory omitting vendor directory
marefr Mar 19, 2018
4eb4ba6
fix: dep ensure. now without gofmt on ventor directory
marefr Mar 19, 2018
b8e2414
docker: pin microsoft/mssql-server-linux to 2017-CU4 tag
marefr Mar 19, 2018
449a307
mssql: remove dynamic construction of metric column and other columns
marefr Mar 19, 2018
6044b3a
Merge branch 'master' into mssql_datasource
marefr Mar 19, 2018
8f6626e
mssql: encrypt password in database
marefr Mar 19, 2018
192e913
mssql: add integration test to verify stored procedure usage
marefr Mar 19, 2018
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
15 changes: 13 additions & 2 deletions Gopkg.lock

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

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,7 @@ ignored = [
[[constraint]]
branch = "master"
name = "github.com/teris-io/shortid"

[[constraint]]
name = "github.com/denisenkom/go-mssqldb"
revision = "270bc3860bb94dd3a3ffd047377d746c5e276726"
4 changes: 4 additions & 0 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ func main() {
case "setup":
setup()

case "build-srv":
clean()
build("grafana-server", "./pkg/cmd/grafana-server", []string{})

case "build-cli":
clean()
build("grafana-cli", "./pkg/cmd/grafana-cli", []string{})
Expand Down
5 changes: 5 additions & 0 deletions docker/blocks/mssql/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM microsoft/mssql-server-linux:2017-CU4
WORKDIR /usr/setup
COPY . /usr/setup
RUN chmod +x /usr/setup/setup.sh
CMD /bin/bash ./entrypoint.sh
2 changes: 2 additions & 0 deletions docker/blocks/mssql/build/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#start SQL Server and run setup script
/usr/setup/setup.sh & /opt/mssql/bin/sqlservr
12 changes: 12 additions & 0 deletions docker/blocks/mssql/build/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#/bin/bash

#wait for the SQL Server to come up
sleep 15s

cat /usr/setup/setup.sql.template | awk '{
gsub(/%%DB%%/,"'$MSSQL_DATABASE'");
gsub(/%%USER%%/,"'$MSSQL_USER'");
gsub(/%%PWD%%/,"'$MSSQL_PASSWORD'")
}1' > /usr/setup/setup.sql

/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i /usr/setup/setup.sql
14 changes: 14 additions & 0 deletions docker/blocks/mssql/build/setup.sql.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE LOGIN %%USER%% WITH PASSWORD = '%%PWD%%'
GO

CREATE DATABASE %%DB%%;
GO

USE %%DB%%;
GO

CREATE USER %%USER%% FOR LOGIN %%USER%%;
GO

EXEC sp_addrolemember 'db_owner', '%%USER%%';
GO
Loading