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
4c406dec
Commit
4c406dec
authored
Dec 05, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup(): removed unused (old) migrate stuff
parent
aea3093d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
130 deletions
+0
-130
public/app/core/routes/routes.ts
+0
-4
public/app/features/dashboard/all.js
+0
-1
public/app/features/dashboard/importCtrl.js
+0
-81
public/app/features/dashboard/partials/migrate.html
+0
-44
No files found.
public/app/core/routes/routes.ts
View file @
4c406dec
...
...
@@ -44,10 +44,6 @@ function setupAngularRoutes($routeProvider, $locationProvider) {
templateUrl
:
'public/app/features/dashboard/partials/dash_list.html'
,
controller
:
'DashListCtrl'
,
})
.
when
(
'/dashboards/migrate'
,
{
templateUrl
:
'public/app/features/dashboard/partials/migrate.html'
,
controller
:
'DashboardImportCtrl'
,
})
.
when
(
'/datasources'
,
{
templateUrl
:
'public/app/features/plugins/partials/ds_list.html'
,
controller
:
'DataSourcesCtrl'
,
...
...
public/app/features/dashboard/all.js
View file @
4c406dec
...
...
@@ -13,7 +13,6 @@ define([
'./unsavedChangesSrv'
,
'./timepicker/timepicker'
,
'./graphiteImportCtrl'
,
'./importCtrl'
,
'./impression_store'
,
'./upload'
,
'./import/dash_import'
,
...
...
public/app/features/dashboard/importCtrl.js
deleted
100644 → 0
View file @
aea3093d
define
([
'angular'
,
'lodash'
,
],
function
(
angular
,
_
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.controllers'
);
module
.
controller
(
'DashboardImportCtrl'
,
function
(
$scope
,
$http
,
backendSrv
,
datasourceSrv
)
{
$scope
.
init
=
function
()
{
$scope
.
datasources
=
[];
$scope
.
sourceName
=
'grafana'
;
$scope
.
destName
=
'grafana'
;
$scope
.
imported
=
[];
$scope
.
dashboards
=
[];
$scope
.
infoText
=
''
;
$scope
.
importing
=
false
;
_
.
each
(
datasourceSrv
.
getAll
(),
function
(
ds
,
key
)
{
if
(
ds
.
type
===
'influxdb_08'
||
ds
.
type
===
'elasticsearch'
)
{
$scope
.
sourceName
=
key
;
$scope
.
datasources
.
push
(
key
);
}
});
};
$scope
.
startImport
=
function
()
{
datasourceSrv
.
get
(
$scope
.
sourceName
).
then
(
function
(
ds
)
{
$scope
.
dashboardSource
=
ds
;
$scope
.
dashboardSource
.
searchDashboards
(
'title:'
).
then
(
function
(
results
)
{
$scope
.
dashboards
=
results
.
dashboards
;
if
(
$scope
.
dashboards
.
length
===
0
)
{
$scope
.
infoText
=
'No dashboards found'
;
return
;
}
$scope
.
importing
=
true
;
$scope
.
imported
=
[];
$scope
.
next
();
},
function
(
err
)
{
var
resp
=
err
.
message
||
err
.
statusText
||
'Unknown error'
;
var
message
=
"Failed to load dashboards from selected data source, response from server was: "
+
resp
;
$scope
.
appEvent
(
'alert-error'
,
[
'Import failed'
,
message
]);
});
});
};
$scope
.
next
=
function
()
{
if
(
$scope
.
dashboards
.
length
===
0
)
{
$scope
.
infoText
=
"Done! Imported "
+
$scope
.
imported
.
length
+
" dashboards"
;
}
var
dash
=
$scope
.
dashboards
.
shift
();
if
(
!
dash
.
title
)
{
console
.
log
(
dash
);
return
;
}
var
infoObj
=
{
name
:
dash
.
title
,
info
:
'Importing...'
};
$scope
.
imported
.
push
(
infoObj
);
$scope
.
infoText
=
"Importing "
+
$scope
.
imported
.
length
+
'/'
+
(
$scope
.
imported
.
length
+
$scope
.
dashboards
.
length
);
$scope
.
dashboardSource
.
getDashboard
(
dash
.
id
).
then
(
function
(
loadedDash
)
{
backendSrv
.
saveDashboard
(
loadedDash
).
then
(
function
()
{
infoObj
.
info
=
"Done!"
;
$scope
.
next
();
},
function
(
err
)
{
err
.
isHandled
=
true
;
infoObj
.
info
=
"Error: "
+
(
err
.
data
||
{
message
:
'Unknown'
}).
message
;
$scope
.
next
();
});
});
};
$scope
.
init
();
});
});
public/app/features/dashboard/partials/migrate.html
deleted
100644 → 0
View file @
aea3093d
<navbar
title=
"Migrate"
title-url=
"dashboards/migrate"
icon=
"fa fa-download"
>
</navbar>
<div
class=
"page-container"
>
<div
class=
"page-header"
>
<h1>
Migrate dashboards
</h1>
</div>
<h5
class=
"section-heading"
>
Import dashboards from Elasticsearch or InfluxDB
</h5>
<div
class=
"gf-form-inline gf-form-group"
>
<div
class=
"gf-form"
>
<div
class=
"gf-form-label"
>
Dashboard source
</div>
<div
class=
"gf-form-select-wrapper"
>
<select
class=
"gf-form-input gf-size-auto"
ng-model=
"sourceName"
ng-options=
"f for f in datasources"
></select>
</div>
</div>
<div
class=
"gf-form"
>
<button
class=
"btn btn-success gf-form-btn"
ng-click=
"startImport()"
>
Import
</button>
</div>
</div>
<h5
class=
"section-heading"
ng-if=
"importing"
>
{{infoText}}
</h5>
<div
class=
"editor-row"
ng-if=
"importing"
>
<div
class=
"editor-row row"
>
<table
class=
"grafana-options-table span5"
>
<tr
ng-repeat=
"dash in imported"
>
<td>
{{dash.name}}
</td>
<td>
{{dash.info}}
</td>
</tr>
</table>
</div>
</div>
<div
ng-include=
"'public/app/features/dashboard/partials/graphiteImport.html'"
></div>
</div>
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