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
d1b31bb3
Commit
d1b31bb3
authored
Jan 05, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved stuff around, trying to get rid of the pro folders and fixing some issues
parent
9be53f0a
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
26 additions
and
195 deletions
+26
-195
Gruntfile.js
+1
-1
src/app/controllers/all.js
+1
-0
src/app/controllers/loginCtrl.js
+0
-0
src/app/controllers/pro/sharePanelCtrl.js
+0
-88
src/app/features/admin/accountCtrl.js
+0
-0
src/app/features/admin/datasourcesCtrl.js
+0
-0
src/app/features/admin/partials/account.html
+1
-1
src/app/features/admin/partials/datasources.html
+1
-1
src/app/features/all.js
+2
-0
src/app/features/dashboard/sharePanelCtrl.js
+7
-1
src/app/partials/dashboard.html
+1
-1
src/app/partials/dashboard_topnav.html
+4
-1
src/app/partials/login.html
+0
-0
src/app/partials/navbar.html
+0
-0
src/app/partials/pro/dashboard_topnav.html
+0
-88
src/app/partials/register.html
+0
-0
src/app/partials/sidemenu.html
+0
-0
src/app/partials/solo-panel.html
+0
-0
src/app/routes/backend/admin.js
+2
-4
src/app/routes/backend/login.js
+4
-7
src/app/routes/backend/solo-panel.js
+1
-1
src/views/index.html
+1
-1
No files found.
Gruntfile.js
View file @
d1b31bb3
...
...
@@ -24,7 +24,7 @@ module.exports = function (grunt) {
grunt
.
log
.
writeln
(
'Setting backend build mode'
);
config
.
modeOptions
.
zipSuffix
=
'-backend'
;
config
.
modeOptions
.
requirejs
.
path
=
{
config
:
'components/config'
};
config
.
modeOptions
.
requirejs
.
excludeConfig
=
tru
e
;
config
.
modeOptions
.
requirejs
.
excludeConfig
=
fals
e
;
}
// load plugins
...
...
src/app/controllers/all.js
View file @
d1b31bb3
...
...
@@ -6,4 +6,5 @@ define([
'./graphiteImport'
,
'./inspectCtrl'
,
'./jsonEditorCtrl'
,
'./loginCtrl'
,
],
function
()
{});
src/app/controllers/
pro/
loginCtrl.js
→
src/app/controllers/loginCtrl.js
View file @
d1b31bb3
File moved
src/app/controllers/pro/sharePanelCtrl.js
deleted
100644 → 0
View file @
9be53f0a
define
([
'angular'
,
'lodash'
],
function
(
angular
,
_
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.controllers'
);
module
.
controller
(
'SharePanelCtrl'
,
function
(
$scope
,
$location
,
$timeout
,
timeSrv
,
$element
,
templateSrv
,
$routeParams
)
{
$scope
.
init
=
function
()
{
$scope
.
editor
=
{
index
:
0
};
$scope
.
forCurrent
=
true
;
$scope
.
toPanel
=
true
;
$scope
.
includeTemplateVars
=
true
;
$scope
.
buildUrl
();
};
$scope
.
buildUrl
=
function
()
{
var
panelId
=
$scope
.
panel
.
id
;
var
range
=
timeSrv
.
timeRange
(
false
);
var
params
=
angular
.
copy
(
$location
.
search
());
if
(
_
.
isString
(
range
.
to
)
&&
range
.
to
.
indexOf
(
'now'
))
{
range
=
timeSrv
.
timeRange
();
}
params
.
from
=
range
.
from
;
params
.
to
=
range
.
to
;
if
(
_
.
isDate
(
params
.
from
))
{
params
.
from
=
params
.
from
.
getTime
();
}
if
(
_
.
isDate
(
params
.
to
))
{
params
.
to
=
params
.
to
.
getTime
();
}
if
(
$scope
.
includeTemplateVars
)
{
_
.
each
(
templateSrv
.
variables
,
function
(
variable
)
{
params
[
'var-'
+
variable
.
name
]
=
variable
.
current
.
text
;
});
}
else
{
_
.
each
(
templateSrv
.
variables
,
function
(
variable
)
{
delete
params
[
'var-'
+
variable
.
name
];
});
}
if
(
!
$scope
.
forCurrent
)
{
delete
params
.
from
;
delete
params
.
to
;
}
if
(
$scope
.
toPanel
)
{
params
.
panelId
=
panelId
;
params
.
fullscreen
=
true
;
}
else
{
delete
params
.
panelId
;
delete
params
.
fullscreen
;
}
var
paramsArray
=
[];
_
.
each
(
params
,
function
(
value
,
key
)
{
var
str
=
key
;
if
(
value
!==
true
)
{
str
+=
'='
+
encodeURIComponent
(
value
);
}
paramsArray
.
push
(
str
);
});
var
baseUrl
=
'http://localhost:3000'
;
$scope
.
shareUrl
=
baseUrl
+
'/dashboard/db/'
+
$routeParams
.
id
+
"?"
+
paramsArray
.
join
(
'&'
)
;
paramsArray
.
push
(
'width=1000'
);
paramsArray
.
push
(
'height=500'
);
$scope
.
imageUrl
=
baseUrl
+
'/render/dashboard/solo/'
+
$routeParams
.
id
+
'?'
+
paramsArray
.
join
(
'&'
)
;
$timeout
(
function
()
{
var
input
=
$element
.
find
(
'[data-share-panel-url]'
);
input
.
focus
();
input
.
select
();
},
10
);
};
$scope
.
init
();
});
});
src/app/
controllers/pro
/accountCtrl.js
→
src/app/
features/admin
/accountCtrl.js
View file @
d1b31bb3
File moved
src/app/
controllers/pro
/datasourcesCtrl.js
→
src/app/
features/admin
/datasourcesCtrl.js
View file @
d1b31bb3
File moved
src/app/
partials/pro
/account.html
→
src/app/
features/admin/partials
/account.html
View file @
d1b31bb3
<div
ng-include=
"'app/partials/
pro/
navbar.html'"
ng-init=
"pageTitle='Account Settings'"
></div>
<div
ng-include=
"'app/partials/navbar.html'"
ng-init=
"pageTitle='Account Settings'"
></div>
<div
class=
"dashboard-edit-view"
>
<div
class=
"editor-row"
>
...
...
src/app/
partials/pro
/datasources.html
→
src/app/
features/admin/partials
/datasources.html
View file @
d1b31bb3
<div
ng-include=
"'app/partials/
pro/
navbar.html'"
ng-init=
"pageTitle='Admin'"
></div>
<div
ng-include=
"'app/partials/navbar.html'"
ng-init=
"pageTitle='Admin'"
></div>
<div
class=
"dashboard-edit-view"
style=
"min-height: 500px"
>
<div
class=
"editor-row"
>
...
...
src/app/features/all.js
View file @
d1b31bb3
...
...
@@ -7,4 +7,6 @@ define([
'./opentsdb/datasource'
,
'./elasticsearch/datasource'
,
'./dashboard/all'
,
'./admin/accountCtrl'
,
'./admin/datasourcesCtrl'
,
],
function
()
{});
src/app/features/dashboard/sharePanelCtrl.js
View file @
d1b31bb3
...
...
@@ -68,7 +68,13 @@ function (angular, _) {
}
});
$scope
.
shareUrl
=
baseUrl
+
"?"
+
paramsArray
.
join
(
'&'
)
;
$scope
.
shareUrl
=
baseUrl
+
"?"
+
paramsArray
.
join
(
'&'
);
// var baseUrl = 'http://localhost:3000';
// $scope.shareUrl = baseUrl + '/dashboard/db/' + $routeParams.id + "?" + paramsArray.join('&') ;
// paramsArray.push('width=1000');
// paramsArray.push('height=500');
// $scope.imageUrl = baseUrl + '/render/dashboard/solo/' + $routeParams.id + '?' + paramsArray.join('&') ;
$timeout
(
function
()
{
var
input
=
$element
.
find
(
'[data-share-panel-url]'
);
...
...
src/app/partials/dashboard.html
View file @
d1b31bb3
<div
body-class
class=
"dashboard"
ng-class=
"{'dashboard-fullscreen': dashboardViewState.fullscreen}"
>
<div
ng-include=
"'app/partials/
pro/
dashboard_topnav.html'"
>
<div
ng-include=
"'app/partials/dashboard_topnav.html'"
>
</div>
<div
ng-if=
"submenuEnabled"
ng-include=
"'app/partials/submenu.html'"
>
...
...
src/app/partials/dashboard_topnav.html
View file @
d1b31bb3
...
...
@@ -2,9 +2,12 @@
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<span
class=
"brand"
>
<img
class=
"logo-icon"
src=
"img/fav32.png"
bs-tooltip=
"'Grafana'"
data-placement=
"bottom"
></img>
<a
ng-click=
"toggleProSideMenu()"
>
<img
class=
"logo-icon"
src=
"img/fav32.png"
bs-tooltip=
"'Grafana'"
data-placement=
"bottom"
></img>
</a>
<span
class=
"page-title"
>
{{dashboard.title}}
</span>
</span>
<ul
class=
"nav pull-right"
ng-controller=
'DashboardNavCtrl'
ng-init=
"init()"
>
<li
ng-show=
"dashboardViewState.fullscreen"
>
...
...
src/app/partials/
pro/
login.html
→
src/app/partials/login.html
View file @
d1b31bb3
File moved
src/app/partials/
pro/
navbar.html
→
src/app/partials/navbar.html
View file @
d1b31bb3
File moved
src/app/partials/pro/dashboard_topnav.html
deleted
100644 → 0
View file @
9be53f0a
<div
class=
"navbar navbar-static-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<span
class=
"brand"
>
<a
ng-click=
"toggleProSideMenu()"
>
<img
class=
"logo-icon"
src=
"img/fav32.png"
bs-tooltip=
"'Grafana'"
data-placement=
"bottom"
></img>
</a>
<span
class=
"page-title"
>
{{dashboard.title}}
</span>
</span>
<ul
class=
"nav pull-right"
ng-controller=
'DashboardNavCtrl'
ng-init=
"init()"
>
<li
ng-show=
"dashboardViewState.fullscreen"
>
<a
ng-click=
"exitFullscreen()"
>
Back to dashboard
</a>
</li>
<li
class=
"grafana-menu-zoom-out"
>
<a
class=
'small'
ng-click=
'zoom(2)'
>
Zoom Out
</a>
</li>
<li
ng-repeat=
"pulldown in dashboard.nav"
ng-controller=
"PulldownCtrl"
ng-show=
"pulldown.enable"
>
<grafana-simple-panel
type=
"pulldown.type"
ng-cloak
>
</grafana-simple-panel>
</li>
<li
class=
"dropdown grafana-menu-save"
>
<a
bs-tooltip=
"'Save'"
data-placement=
"bottom"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
ng-click=
"openSaveDropdown()"
>
<i
class=
'icon-save'
></i>
</a>
<ul
class=
"save-dashboard-dropdown dropdown-menu"
ng-if=
"saveDropdownOpened"
>
<li>
<form
class=
"input-prepend nomargin save-dashboard-dropdown-save-form"
>
<input
class=
'input-medium'
ng-model=
"dashboard.title"
type=
"text"
/>
<button
class=
"btn"
ng-click=
"saveDashboard()"
><i
class=
"icon-save"
></i></button>
</form>
</li>
<li>
<a
class=
"link"
ng-click=
"set_default()"
>
Save as Home
</a>
</li>
<li>
<a
class=
"link"
ng-click=
"purge_default()"
>
Reset Home
</a>
</li>
<li
ng-show=
"!isFavorite"
>
<a
class=
"link"
ng-click=
"markAsFavorite()"
>
Mark as favorite
</a>
</li>
<li
ng-show=
"isFavorite"
>
<a
class=
"link"
ng-click=
"removeAsFavorite()"
>
Remove as favorite
</a>
</li>
<li>
<a
class=
"link"
ng-click=
"editJson()"
>
Dashboard JSON
</a>
</li>
<li>
<a
class=
"link"
ng-click=
"exportDashboard()"
>
Export dashboard
</a>
</li>
<li
ng-show=
"db.saveTemp"
>
<a
bs-tooltip=
"'Share'"
data-placement=
"bottom"
ng-click=
"saveForSharing()"
config-modal=
"app/partials/dashLoaderShare.html"
>
Share temp copy
</a>
</li>
</ul>
</li>
<li
class=
"dropdown grafana-menu-load"
>
<a
bs-tooltip=
"'Search'"
ng-click=
"openSearch()"
>
<i
class=
'icon-folder-open'
></i>
</a>
</li>
<li
class=
"grafana-menu-home"
><a
bs-tooltip=
"'Goto saved default'"
data-placement=
"bottom"
href=
'#/'
><i
class=
'icon-home'
></i></a></li>
<li
class=
"grafana-menu-edit"
ng-show=
"dashboard.editable"
bs-tooltip=
"'Configure dashboard'"
data-placement=
"bottom"
><a
class=
"link"
dash-editor-link=
"app/partials/dasheditor.html"
><i
class=
'icon-cog pointer'
></i></a></li>
<li
class=
"grafana-menu-stop-playlist hide"
>
<a
class=
'small'
ng-click=
'stopPlaylist(2)'
>
Stop playlist
</a>
</li>
</ul>
</div>
</div>
</div>
src/app/partials/
pro/
register.html
→
src/app/partials/register.html
View file @
d1b31bb3
File moved
src/app/partials/
pro/
sidemenu.html
→
src/app/partials/sidemenu.html
View file @
d1b31bb3
File moved
src/app/partials/
pro/
solo-panel.html
→
src/app/partials/solo-panel.html
View file @
d1b31bb3
File moved
src/app/routes/backend/admin.js
View file @
d1b31bb3
define
([
'angular'
,
'controllers/pro/accountCtrl'
,
'controllers/pro/datasourcesCtrl'
,
],
function
(
angular
)
{
"use strict"
;
...
...
@@ -11,11 +9,11 @@ function (angular) {
module
.
config
(
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/admin/datasources'
,
{
templateUrl
:
'app/
partials/pro
/datasources.html'
,
templateUrl
:
'app/
features/admin/partials
/datasources.html'
,
controller
:
'DataSourcesCtrl'
,
})
.
when
(
'/account'
,
{
templateUrl
:
'app/
partials/pro
/account.html'
,
templateUrl
:
'app/
features/admin/partials
/account.html'
,
controller
:
'AccountCtrl'
,
});
});
...
...
src/app/routes/backend/login.js
View file @
d1b31bb3
define
([
'angular'
,
'controllers/pro/loginCtrl'
,
],
function
(
angular
)
{
"use strict"
;
...
...
@@ -10,16 +9,16 @@ function (angular) {
module
.
config
(
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/login'
,
{
templateUrl
:
'app/partials/
pro/
login.html'
,
templateUrl
:
'app/partials/login.html'
,
controller
:
'LoginCtrl'
,
})
.
when
(
'/register'
,
{
templateUrl
:
'app/partials/
pro/
register.html'
,
templateUrl
:
'app/partials/register.html'
,
controller
:
'RegisterCtrl'
,
});
});
module
.
controller
(
'RegisterCtrl'
,
function
(
$scope
,
$http
,
$location
)
{
module
.
controller
(
'RegisterCtrl'
,
function
(
$scope
,
backendSrv
,
$location
)
{
$scope
.
loginModel
=
{};
$scope
.
grafana
.
sidemenu
=
false
;
...
...
@@ -32,10 +31,8 @@ function (angular) {
return
;
}
$http
.
post
(
'/api/account'
,
$scope
.
loginModel
).
then
(
function
()
{
backendSrv
.
post
(
'/api/account'
,
$scope
.
loginModel
).
then
(
function
()
{
$location
.
path
(
'/login'
);
},
function
(
err
)
{
$scope
.
registerError
=
"Unexpected error: "
+
err
;
});
};
...
...
src/app/routes/backend/solo-panel.js
View file @
d1b31bb3
...
...
@@ -10,7 +10,7 @@ function (angular, $) {
module
.
config
(
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/dashboard/solo/:id/'
,
{
templateUrl
:
'app/partials/
pro/
solo-panel.html'
,
templateUrl
:
'app/partials/solo-panel.html'
,
controller
:
'SoloPanelCtrl'
,
});
});
...
...
src/views/index.html
View file @
d1b31bb3
...
...
@@ -30,7 +30,7 @@
<div
class=
"pro-container"
ng-class=
"{'pro-sidemenu-open': grafana.sidemenu}"
>
<aside
class=
"pro-sidemenu"
ng-if=
"grafana.sidemenu"
>
<div
ng-include=
"'app/partials/
pro/
sidemenu.html'"
></div>
<div
ng-include=
"'app/partials/sidemenu.html'"
></div>
</aside>
<div
class=
"page-alert-list"
>
...
...
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