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
f67563e9
Commit
f67563e9
authored
Jan 08, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(apps): moving things around
parent
69d0e824
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
26 additions
and
49 deletions
+26
-49
pkg/api/index.go
+14
-0
public/app/core/controllers/sidemenu_ctrl.js
+1
-9
public/app/core/routes/all.js
+7
-6
public/app/features/apps/all.ts
+3
-0
public/app/features/apps/app_srv.ts
+0
-0
public/app/features/apps/edit_ctrl.ts
+0
-0
public/app/features/apps/list_ctrl.ts
+0
-0
public/app/features/apps/partials/edit.html
+0
-0
public/app/features/apps/partials/list.html
+1
-1
public/app/features/org/app_directive.js
+0
-33
No files found.
pkg/api/index.go
View file @
f67563e9
...
...
@@ -55,6 +55,20 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
Url
:
"/"
,
})
if
c
.
OrgRole
==
m
.
ROLE_ADMIN
{
data
.
MainNavLinks
=
append
(
data
.
MainNavLinks
,
&
dtos
.
NavLink
{
Text
:
"Data Sources"
,
Icon
:
"fa fa-fw fa-database"
,
Url
:
"/datasources"
,
})
data
.
MainNavLinks
=
append
(
data
.
MainNavLinks
,
&
dtos
.
NavLink
{
Text
:
"Apps"
,
Icon
:
"fa fa-fw fa-cubes"
,
Url
:
"/apps"
,
})
}
orgApps
:=
m
.
GetAppPluginsQuery
{
OrgId
:
c
.
OrgId
}
err
=
bus
.
Dispatch
(
&
orgApps
)
if
err
!=
nil
{
...
...
public/app/core/controllers/sidemenu_ctrl.js
View file @
f67563e9
...
...
@@ -19,7 +19,7 @@ function (angular, _, $, coreModule, config) {
$scope
.
mainLinks
.
push
({
text
:
item
.
text
,
icon
:
item
.
icon
,
href
:
$scope
.
getUrl
(
item
.
href
)
url
:
$scope
.
getUrl
(
item
.
url
)
});
});
};
...
...
@@ -40,14 +40,6 @@ function (angular, _, $, coreModule, config) {
text
:
"API Keys"
,
href
:
$scope
.
getUrl
(
"/org/apikeys"
),
});
$scope
.
orgMenu
.
push
({
text
:
"Datasources"
,
href
:
$scope
.
getUrl
(
"/datasources"
),
});
$scope
.
orgMenu
.
push
({
text
:
"Apps"
,
href
:
$scope
.
getUrl
(
"/org/apps"
),
});
}
if
(
$scope
.
orgMenu
.
length
>
0
)
{
...
...
public/app/core/routes/all.js
View file @
f67563e9
...
...
@@ -10,6 +10,7 @@ define([
$locationProvider
.
html5Mode
(
true
);
var
loadOrgBundle
=
new
BundleLoader
.
BundleLoader
(
'app/features/org/all'
);
var
loadAppsBundle
=
new
BundleLoader
.
BundleLoader
(
'app/features/apps/all'
);
$routeProvider
.
when
(
'/'
,
{
...
...
@@ -131,17 +132,17 @@ define([
templateUrl
:
'app/partials/reset_password.html'
,
controller
:
'ResetPasswordCtrl'
,
})
.
when
(
'/
org/
apps'
,
{
templateUrl
:
'app/features/
org/partials/app_
list.html'
,
.
when
(
'/apps'
,
{
templateUrl
:
'app/features/
apps/partials/
list.html'
,
controller
:
'AppListCtrl'
,
controllerAs
:
'ctrl'
,
resolve
:
load
Org
Bundle
,
resolve
:
load
Apps
Bundle
,
})
.
when
(
'/
org/
apps/edit/:type'
,
{
templateUrl
:
'app/features/
org/partials/app_
edit.html'
,
.
when
(
'/apps/edit/:type'
,
{
templateUrl
:
'app/features/
apps/partials/
edit.html'
,
controller
:
'AppEditCtrl'
,
controllerAs
:
'ctrl'
,
resolve
:
load
Org
Bundle
,
resolve
:
load
Apps
Bundle
,
})
.
when
(
'/global-alerts'
,
{
templateUrl
:
'app/features/dashboard/partials/globalAlerts.html'
,
...
...
public/app/features/apps/all.ts
0 → 100644
View file @
f67563e9
import
'./edit_ctrl'
;
import
'./list_ctrl'
;
import
'./app_srv'
;
public/app/features/
org
/app_srv.ts
→
public/app/features/
apps
/app_srv.ts
View file @
f67563e9
File moved
public/app/features/
org/app_
edit_ctrl.ts
→
public/app/features/
apps/
edit_ctrl.ts
View file @
f67563e9
File moved
public/app/features/
org/app_
list_ctrl.ts
→
public/app/features/
apps/
list_ctrl.ts
View file @
f67563e9
File moved
public/app/features/
org/partials/app_
edit.html
→
public/app/features/
apps/partials/
edit.html
View file @
f67563e9
File moved
public/app/features/
org/partials/app_
list.html
→
public/app/features/
apps/partials/
list.html
View file @
f67563e9
...
...
@@ -18,7 +18,7 @@
<li>
<div
class=
"filter-list-card-controls"
>
<div
class=
"filter-list-card-config"
>
<a
href=
"
org/
apps/edit/{{app.type}}"
>
<a
href=
"apps/edit/{{app.type}}"
>
<i
class=
"fa fa-cog"
></i>
</a>
</div>
...
...
public/app/features/org/app_directive.js
deleted
100644 → 0
View file @
69d0e824
define
([
'angular'
,
],
function
(
angular
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.directives'
);
module
.
directive
(
'appConfigLoader'
,
function
(
$compile
)
{
return
{
restrict
:
'E'
,
link
:
function
(
scope
,
elem
)
{
var
directive
=
'grafana-app-default'
;
//wait for the parent scope to be applied.
scope
.
panelAdded
=
false
;
scope
.
$watch
(
"current"
,
function
(
newVal
)
{
if
(
newVal
&&
!
scope
.
panelAdded
)
{
if
(
newVal
.
module
)
{
scope
.
panelAdded
=
true
;
directive
=
'grafana-app-'
+
newVal
.
type
;
scope
.
require
([
newVal
.
module
],
function
()
{
var
panelEl
=
angular
.
element
(
document
.
createElement
(
directive
));
elem
.
append
(
panelEl
);
$compile
(
panelEl
)(
scope
);
});
}
}
});
}
};
});
});
\ No newline at end of file
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