/*! grafana - v4.5.1 - 2017-09-19
 * Copyright (c) 2017 Torkel Ödegaard; Licensed Apache-2.0 */

System.register(["app/core/core_module"],function(a,b){"use strict";var c,d;b&&b.id;return{setters:[function(a){c=a}],execute:function(){d=function(){function a(a){this.contextSrv=a}return a.$inject=["contextSrv"],a.prototype.getAlertingNav=function(a){return{section:{title:"Alerting",url:"plugins",icon:"icon-gf icon-gf-alert"},menu:[{title:"Alert List",active:0===a,url:"alerting/list",icon:"fa fa-list-ul"},{title:"Notification channels",active:1===a,url:"alerting/notifications",icon:"fa fa-bell-o"}]}},a.prototype.getDatasourceNav=function(a){return{section:{title:"Data Sources",url:"datasources",icon:"icon-gf icon-gf-datasources"},menu:[{title:"List view",active:0===a,url:"datasources",icon:"fa fa-list-ul"},{title:"Add data source",active:1===a,url:"datasources/new",icon:"fa fa-plus"}]}},a.prototype.getPlaylistsNav=function(a){return{section:{title:"Playlists",url:"playlists",icon:"fa fa-fw fa-film"},menu:[{title:"List view",active:0===a,url:"playlists",icon:"fa fa-list-ul"},{title:"Add Playlist",active:1===a,url:"playlists/create",icon:"fa fa-plus"}]}},a.prototype.getProfileNav=function(){return{section:{title:"User Profile",url:"profile",icon:"fa fa-fw fa-user"},menu:[]}},a.prototype.getNotFoundNav=function(){return{section:{title:"Page",url:"",icon:"fa fa-fw fa-warning"},menu:[]}},a.prototype.getOrgNav=function(a){return{section:{title:"Organization",url:"org",icon:"icon-gf icon-gf-users"},menu:[{title:"Preferences",active:0===a,url:"org",icon:"fa fa-fw fa-cog"},{title:"Org Users",active:1===a,url:"org/users",icon:"fa fa-fw fa-users"},{title:"API Keys",active:2===a,url:"org/apikeys",icon:"fa fa-fw fa-key"}]}},a.prototype.getAdminNav=function(a){return{section:{title:"Admin",url:"admin",icon:"fa fa-fw fa-cogs"},menu:[{title:"Users",active:0===a,url:"admin/users",icon:"fa fa-fw fa-user"},{title:"Orgs",active:1===a,url:"admin/orgs",icon:"fa fa-fw fa-users"},{title:"Server Settings",active:2===a,url:"admin/settings",icon:"fa fa-fw fa-cogs"},{title:"Server Stats",active:2===a,url:"admin/stats",icon:"fa fa-fw fa-line-chart"},{title:"Style Guide",active:2===a,url:"styleguide",icon:"fa fa-fw fa-key"}]}},a.prototype.getPluginsNav=function(){return{section:{title:"Plugins",url:"plugins",icon:"icon-gf icon-gf-apps"},menu:[]}},a.prototype.getDashboardNav=function(a,b){if(a.meta.isSnapshot)return{section:{title:a.title,icon:"icon-gf icon-gf-snapshot"},menu:[{title:"Go to original dashboard",icon:"fa fa-fw fa-external-link",url:a.snapshot.originalUrl}]};var c=[];return a.meta.canEdit&&(c.push({title:"Settings",icon:"fa fa-fw fa-cog",clickHandler:function(){return b.openEditView("settings")}}),c.push({title:"Templating",icon:"fa fa-fw fa-code",clickHandler:function(){return b.openEditView("templating")}}),c.push({title:"Annotations",icon:"fa fa-fw fa-bolt",clickHandler:function(){return b.openEditView("annotations")}}),a.meta.isHome||c.push({title:"Version history",icon:"fa fa-fw fa-history",clickHandler:function(){return b.openEditView("history")}}),c.push({title:"View JSON",icon:"fa fa-fw fa-eye",clickHandler:function(){return b.viewJson()}})),this.contextSrv.isEditor&&!a.editable&&c.push({title:"Make Editable",icon:"fa fa-fw fa-edit",clickHandler:function(){return b.makeEditable()}}),c.push({title:"Shortcuts",icon:"fa fa-fw fa-keyboard-o",clickHandler:function(){return b.showHelpModal()}}),this.contextSrv.isEditor&&c.push({title:"Save As ...",icon:"fa fa-fw fa-save",clickHandler:function(){return b.saveDashboardAs()}}),a.meta.canSave&&c.push({title:"Delete",icon:"fa fa-fw fa-trash",clickHandler:function(){return b.deleteDashboard()}}),{section:{title:a.title,icon:"icon-gf icon-gf-dashboard"},menu:c}},a}(),a("NavModelSrv",d),c.default.service("navModelSrv",d)}}});