Clean up conditionals by refactoring to use loop label.
Incidentally this also fixed a bug that would not allow
a Kapacitor server to be added by the same name as one
that already existed, allowing the check to be removed
as well.
Determines the required length in pixels based on the length of the
longest item in the menu and only sets it if it is greater than the
minimum dropdown width
Validation logic in the "DatabaseRow" component made some optimistic
assumptions about the presence of the "replication" in state.
Replication won't be present in OSS or Influx Relay sources, so when
users tried to update other properties of a retention policy, it failed
with an error that indicated "replication" was undefined.
Since this is expected and desired behavior, this patch uses the
existing "isRFVisible" property to determine whether or not we should
process the "replication" part of the component's state, or simply
replace it with a "1", which is the only allowed value for
non-Enterprise sources.
This covers cases where users are or are not members of organizations as
well as whether or not they should have access to the application based
on their organization membership.
It's useful for operators to classify users into separate groups which
we have termed "organizations". For other OAuth providers, the notion of
an organization typically fell along company lines. For example,
MegaCorp might have a "MegaCorp" GitHub organiztion, and all email
addresses would have the domain "megacorp.com".
Auth0 is slightly different in that MegaCorp would likely run their own
Auth0 provider for their internal services, so "organizations" in Auth0
are no longer synonymous with "large organizations" (or companies).
Instead, Auth0 organizations could be used to restrict access to
Chronograf instances based on team membership within an organization.
To make use of Auth0 organizations, operators should modify users'
app_metadata to include the key "organization". Its value should be the
organization which that user belongs to. This can be done automatically
through arbitrary rules using Auth0 Rules.