Sandor Molnar created KNOX-2069:
-----------------------------------
Summary: Standardise resource type constants in admin UI
Key: KNOX-2069
URL: https://issues.apache.org/jira/browse/KNOX-2069
Project: Apache Knox
Issue Type: Improvement
Components: AdminUI
Affects Versions: 1.3.0, 1.4.0
Reporter: Sandor Molnar
As of now, the following resource types exist on admin UI (see
{{resourcetypes.service.ts}}):
{code:java}
resourceTypes = ['Provider Configurations', 'Descriptors', 'Topologies',
'Service Definitions']; {code}
As [~krisden] pointed out, during the review of [PR
#169|https://github.com/apache/knox/pull/169] it's not a good idea, and against
any best practice in general, that there are constants with space-separated
worlds. I'd suggest the following pattern:
{code:java}
const PROVIDER_CONFIGURATIONS = 'Provider Configurations';
const DESCRIPTORS = 'Descriptors';
const TOPOLOGIES = 'Topologies';
const SERVICE_DEFINITIONS = 'Service Definitions';
const resourceTypes = [PROVIDER_CONFIGURATIONS, DESCRIPTORS, TOPOLOGIES,
SERVICE_DEFINITIONS];{code}
Once these constants are created they should be used within the project.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)