Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
c17d02e4
Commit
c17d02e4
authored
May 26, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
csv: remove sep metadata as only works for excel
parent
ee0d0155
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
public/app/core/utils/file_export.ts
+3
-3
No files found.
public/app/core/utils/file_export.ts
View file @
c17d02e4
...
@@ -8,7 +8,7 @@ declare var window: any;
...
@@ -8,7 +8,7 @@ declare var window: any;
const
DEFAULT_DATETIME_FORMAT
:
String
=
'YYYY-MM-DDTHH:mm:ssZ'
;
const
DEFAULT_DATETIME_FORMAT
:
String
=
'YYYY-MM-DDTHH:mm:ssZ'
;
export
function
exportSeriesListToCsv
(
seriesList
,
dateTimeFormat
=
DEFAULT_DATETIME_FORMAT
)
{
export
function
exportSeriesListToCsv
(
seriesList
,
dateTimeFormat
=
DEFAULT_DATETIME_FORMAT
)
{
var
text
=
'
sep=;
\
n
Series;Time;Value
\
n'
;
var
text
=
'Series;Time;Value
\
n'
;
_
.
each
(
seriesList
,
function
(
series
)
{
_
.
each
(
seriesList
,
function
(
series
)
{
_
.
each
(
series
.
datapoints
,
function
(
dp
)
{
_
.
each
(
series
.
datapoints
,
function
(
dp
)
{
text
+=
series
.
alias
+
';'
+
moment
(
dp
[
1
]).
format
(
dateTimeFormat
)
+
';'
+
dp
[
0
]
+
'
\
n'
;
text
+=
series
.
alias
+
';'
+
moment
(
dp
[
1
]).
format
(
dateTimeFormat
)
+
';'
+
dp
[
0
]
+
'
\
n'
;
...
@@ -18,7 +18,7 @@ export function exportSeriesListToCsv(seriesList, dateTimeFormat = DEFAULT_DATET
...
@@ -18,7 +18,7 @@ export function exportSeriesListToCsv(seriesList, dateTimeFormat = DEFAULT_DATET
}
}
export
function
exportSeriesListToCsvColumns
(
seriesList
,
dateTimeFormat
=
DEFAULT_DATETIME_FORMAT
)
{
export
function
exportSeriesListToCsvColumns
(
seriesList
,
dateTimeFormat
=
DEFAULT_DATETIME_FORMAT
)
{
var
text
=
'
sep=;
\
n
Time;'
;
var
text
=
'Time;'
;
// add header
// add header
_
.
each
(
seriesList
,
function
(
series
)
{
_
.
each
(
seriesList
,
function
(
series
)
{
text
+=
series
.
alias
+
';'
;
text
+=
series
.
alias
+
';'
;
...
@@ -53,7 +53,7 @@ export function exportSeriesListToCsvColumns(seriesList, dateTimeFormat = DEFAUL
...
@@ -53,7 +53,7 @@ export function exportSeriesListToCsvColumns(seriesList, dateTimeFormat = DEFAUL
}
}
export
function
exportTableDataToCsv
(
table
)
{
export
function
exportTableDataToCsv
(
table
)
{
var
text
=
'
sep=;
\
n
'
;
var
text
=
''
;
// add header
// add header
_
.
each
(
table
.
columns
,
function
(
column
)
{
_
.
each
(
table
.
columns
,
function
(
column
)
{
text
+=
(
column
.
title
||
column
.
text
)
+
';'
;
text
+=
(
column
.
title
||
column
.
text
)
+
';'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment