Merge pull request #2560 from influxdata/2422-disallow-viewer-switch-kapacitors-rebased

Render static text instead of kapacitor switching dropdown for Viewers
pull/2564/head
lukevmorris 2017-12-12 13:41:13 -08:00 committed by GitHub
commit 31ee9c4f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -43,10 +43,16 @@ const kapacitorDropdown = (
selected = kapacitorItems[0].text
}
const unauthorizedDropdown = (
<div className="source-table--kapacitor__view-only">
{selected}
</div>
)
return (
<Authorized
requiredRole={EDITOR_ROLE}
propsOverride={{addNew: null, actions: null}}
replaceWithIfNotAuthorized={unauthorizedDropdown}
>
<Dropdown
className="dropdown-260"

View File

@ -180,6 +180,11 @@ br {
border-left: 2px solid $g5-pepper;
width: 278px;
}
.source-table--kapacitor__view-only {
@include no-user-select();
font-size: 14px;
font-weight: 600;
}
/*
Styles for the Status Dashboard