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
a440d351
Commit
a440d351
authored
Sep 07, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming things in admin
parent
4391209f
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
24 additions
and
41 deletions
+24
-41
public/app/core/selectors/navModel.ts
+1
-1
public/app/features/admin/AdminEditOrgCtrl.ts
+1
-3
public/app/features/admin/AdminEditUserCtrl.ts
+1
-4
public/app/features/admin/AdminListOrgsCtrl.ts
+1
-3
public/app/features/admin/AdminListUsersCtrl.ts
+0
-0
public/app/features/admin/ServerStats.test.tsx
+2
-2
public/app/features/admin/ServerStats.tsx
+1
-1
public/app/features/admin/__snapshots__/ServerStats.test.tsx.snap
+0
-0
public/app/features/admin/index.ts
+8
-18
public/app/features/admin/state/apis.ts
+0
-0
public/app/features/all.ts
+1
-1
public/app/routes/routes.ts
+1
-1
public/test/jest-setup.ts
+6
-6
public/test/mocks/common.ts
+1
-1
No files found.
public/app/core/selectors/navModel.ts
View file @
a440d351
import
{
NavModel
,
NavModelItem
,
NavIndex
}
from
'app/types'
;
function
getNotFoundModel
():
NavModel
{
var
node
:
NavModelItem
=
{
const
node
:
NavModelItem
=
{
id
:
'not-found'
,
text
:
'Page not found'
,
icon
:
'fa fa-fw fa-warning'
,
...
...
public/app/features/admin/
admin_edit_org_c
trl.ts
→
public/app/features/admin/
AdminEditOrgC
trl.ts
View file @
a440d351
import
angular
from
'angular'
;
export
class
AdminEditOrgCtrl
{
export
default
class
AdminEditOrgCtrl
{
/** @ngInject */
constructor
(
$scope
,
$routeParams
,
backendSrv
,
$location
,
navModelSrv
)
{
$scope
.
init
=
()
=>
{
...
...
@@ -48,4 +47,3 @@ export class AdminEditOrgCtrl {
}
}
angular
.
module
(
'grafana.controllers'
).
controller
(
'AdminEditOrgCtrl'
,
AdminEditOrgCtrl
);
public/app/features/admin/
admin_edit_user_c
trl.ts
→
public/app/features/admin/
AdminEditUserC
trl.ts
View file @
a440d351
import
angular
from
'angular'
;
import
_
from
'lodash'
;
export
class
AdminEditUserCtrl
{
export
default
class
AdminEditUserCtrl
{
/** @ngInject */
constructor
(
$scope
,
$routeParams
,
backendSrv
,
$location
,
navModelSrv
)
{
$scope
.
user
=
{};
...
...
@@ -117,5 +116,3 @@ export class AdminEditUserCtrl {
$scope
.
init
();
}
}
angular
.
module
(
'grafana.controllers'
).
controller
(
'AdminEditUserCtrl'
,
AdminEditUserCtrl
);
public/app/features/admin/
admin_list_orgs_c
trl.ts
→
public/app/features/admin/
AdminListOrgsC
trl.ts
View file @
a440d351
import
angular
from
'angular'
;
export
class
AdminListOrgsCtrl
{
export
default
class
AdminListOrgsCtrl
{
/** @ngInject */
constructor
(
$scope
,
backendSrv
,
navModelSrv
)
{
$scope
.
init
=
()
=>
{
...
...
@@ -33,4 +32,3 @@ export class AdminListOrgsCtrl {
}
}
angular
.
module
(
'grafana.controllers'
).
controller
(
'AdminListOrgsCtrl'
,
AdminListOrgsCtrl
);
public/app/features/admin/
admin_list_users_c
trl.ts
→
public/app/features/admin/
AdminListUsersC
trl.ts
View file @
a440d351
File moved
public/app/features/admin/
containers/
ServerStats.test.tsx
→
public/app/features/admin/ServerStats.test.tsx
View file @
a440d351
...
...
@@ -2,14 +2,14 @@ import React from 'react';
import
renderer
from
'react-test-renderer'
;
import
{
ServerStats
}
from
'./ServerStats'
;
import
{
createNavModel
}
from
'test/mocks/common'
;
import
{
ServerStat
}
from
'.
.
/apis'
;
import
{
ServerStat
}
from
'.
/state
/apis'
;
describe
(
'ServerStats'
,
()
=>
{
it
(
'Should render table with stats'
,
done
=>
{
const
navModel
=
createNavModel
(
'Admin'
,
'stats'
);
const
stats
:
ServerStat
[]
=
[{
name
:
'Total dashboards'
,
value
:
10
},
{
name
:
'Total Users'
,
value
:
1
}];
le
t
getServerStats
=
()
=>
{
cons
t
getServerStats
=
()
=>
{
return
Promise
.
resolve
(
stats
);
};
...
...
public/app/features/admin/
containers/
ServerStats.tsx
→
public/app/features/admin/ServerStats.tsx
View file @
a440d351
...
...
@@ -3,7 +3,7 @@ import { hot } from 'react-hot-loader';
import
{
connect
}
from
'react-redux'
;
import
{
NavModel
,
StoreState
}
from
'app/types'
;
import
{
getNavModel
}
from
'app/core/selectors/navModel'
;
import
{
getServerStats
,
ServerStat
}
from
'.
.
/apis'
;
import
{
getServerStats
,
ServerStat
}
from
'.
/state
/apis'
;
import
PageHeader
from
'app/core/components/PageHeader/PageHeader'
;
interface
Props
{
...
...
public/app/features/admin/
containers/
__snapshots__/ServerStats.test.tsx.snap
→
public/app/features/admin/__snapshots__/ServerStats.test.tsx.snap
View file @
a440d351
File moved
public/app/features/admin/
admin
.ts
→
public/app/features/admin/
index
.ts
View file @
a440d351
import
AdminListUsersCtrl
from
'./
admin_list_users_c
trl'
;
import
'./admin_list_orgs_c
trl'
;
import
'./admin_edit_org_c
trl'
;
import
'./admin_edit_user_c
trl'
;
import
AdminListUsersCtrl
from
'./
AdminListUsersC
trl'
;
import
AdminEditUserCtrl
from
'./AdminEditUserC
trl'
;
import
AdminListOrgsCtrl
from
'./AdminListOrgsC
trl'
;
import
AdminEditOrgCtrl
from
'./AdminEditOrgC
trl'
;
import
coreModule
from
'app/core/core_module'
;
...
...
@@ -27,21 +27,11 @@ class AdminHomeCtrl {
}
}
export
class
AdminStatsCtrl
{
stats
:
any
;
navModel
:
any
;
/** @ngInject */
constructor
(
backendSrv
:
any
,
navModelSrv
)
{
this
.
navModel
=
navModelSrv
.
getNav
(
'cfg'
,
'admin'
,
'server-stats'
,
1
);
coreModule
.
controller
(
'AdminListUsersCtrl'
,
AdminListUsersCtrl
);
coreModule
.
controller
(
'AdminEditUserCtrl'
,
AdminEditUserCtrl
);
backendSrv
.
get
(
'/api/admin/stats'
).
then
(
stats
=>
{
this
.
stats
=
stats
;
});
}
}
coreModule
.
controller
(
'AdminListOrgsCtrl'
,
AdminListOrgsCtrl
);
coreModule
.
controller
(
'AdminEditOrgCtrl'
,
AdminEditOrgCtrl
);
coreModule
.
controller
(
'AdminSettingsCtrl'
,
AdminSettingsCtrl
);
coreModule
.
controller
(
'AdminHomeCtrl'
,
AdminHomeCtrl
);
coreModule
.
controller
(
'AdminStatsCtrl'
,
AdminStatsCtrl
);
coreModule
.
controller
(
'AdminListUsersCtrl'
,
AdminListUsersCtrl
);
public/app/features/admin/
apis/index
.ts
→
public/app/features/admin/
state/apis
.ts
View file @
a440d351
File moved
public/app/features/all.ts
View file @
a440d351
...
...
@@ -8,7 +8,7 @@ import './playlist/all';
import
'./snapshot/all'
;
import
'./panel/all'
;
import
'./org/all'
;
import
'./admin
/admin
'
;
import
'./admin'
;
import
'./alerting/NotificationsEditCtrl'
;
import
'./alerting/NotificationsListCtrl'
;
import
'./styleguide/styleguide'
;
public/app/routes/routes.ts
View file @
a440d351
import
'./dashboard_loaders'
;
import
'./ReactContainer'
;
import
ServerStats
from
'app/features/admin/
containers/
ServerStats'
;
import
ServerStats
from
'app/features/admin/ServerStats'
;
import
AlertRuleList
from
'app/features/alerting/AlertRuleList'
;
import
FolderSettings
from
'app/containers/ManageDashboards/FolderSettings'
;
import
FolderPermissions
from
'app/containers/ManageDashboards/FolderPermissions'
;
...
...
public/test/jest-setup.ts
View file @
a440d351
...
...
@@ -21,19 +21,19 @@ configure({ adapter: new Adapter() });
const
global
=
window
as
any
;
global
.
$
=
global
.
jQuery
=
$
;
const
localStorageMock
=
(
function
()
{
var
store
=
{};
const
localStorageMock
=
(
()
=>
{
let
store
=
{};
return
{
getItem
:
function
(
key
)
{
getItem
:
key
=>
{
return
store
[
key
];
},
setItem
:
function
(
key
,
value
)
{
setItem
:
(
key
,
value
)
=>
{
store
[
key
]
=
value
.
toString
();
},
clear
:
function
()
{
clear
:
()
=>
{
store
=
{};
},
removeItem
:
function
(
key
)
{
removeItem
:
key
=>
{
delete
store
[
key
];
},
};
...
...
public/test/mocks/common.ts
View file @
a440d351
...
...
@@ -31,7 +31,7 @@ export function createNavModel(title: string, ...tabs: string[]): NavModel {
breadcrumbs
:
[],
};
for
(
le
t
tab
of
tabs
)
{
for
(
cons
t
tab
of
tabs
)
{
node
.
children
.
push
({
id
:
tab
,
icon
:
'icon'
,
...
...
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