diff --git a/ui/src/config/section/role.js b/ui/src/config/section/role.js index 3dccfa0401d..cefe1e17546 100644 --- a/ui/src/config/section/role.js +++ b/ui/src/config/section/role.js @@ -36,12 +36,16 @@ export default { icon: 'plus', label: 'label.add.role', listView: true, - args: ['name', 'description', 'type'], - mapping: { - type: { - options: ['Admin', 'DomainAdmin', 'User'] - } - } + popup: true, + component: () => import('@/views/iam/CreateRole.vue') + }, + { + api: 'importRole', + icon: 'cloud-upload', + label: 'label.import.role', + listView: true, + popup: true, + component: () => import('@/views/iam/ImportRole.vue') }, { api: 'updateRole', diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json index 4b64d55b777..78ad666fd57 100644 --- a/ui/src/locales/en.json +++ b/ui/src/locales/en.json @@ -449,6 +449,7 @@ "label.baremetalcpucores": "# of CPU Cores", "label.baremetalmac": "Host MAC", "label.baremetalmemory": "Memory (in MB)", +"label.based.on": "Based on", "label.basic": "Basic", "label.basic.mode": "Basic Mode", "label.basicsetup": "Basic setup", @@ -777,6 +778,9 @@ "label.enter.token": "Enter token", "label.error": "Error", "label.error.code": "Error Code", +"label.error.file.upload": "File upload failed", +"label.error.file.read": "Cannot read file", +"label.error.rules.file.import": "Please choose a valid CSV rules file", "label.error.something.went.wrong.please.correct.the.following": "Something went wrong; please correct the following", "label.error.upper": "ERROR", "label.error.volume.upload": "Please choose a file", @@ -937,6 +941,7 @@ "label.ikepolicy": "IKE policy", "label.images": "Images", "label.import.backup.offering": "Import Backup Offering", +"label.import.role": "Import Role", "label.info": "Info", "label.info.upper": "INFO", "label.infrastructure": "Infrastructure", @@ -1665,6 +1670,8 @@ "label.rule": "Rule", "label.rule.number": "Rule Number", "label.rules": "Rules", +"label.rules.file": "Rules File", +"label.rules.file.import.description": "Click or drag rule defintions CVS file to import", "label.running": "Running VMs", "label.saml.disable": "SAML Disable", "label.saml.enable": "SAML Enable", diff --git a/ui/src/views/iam/CreateRole.vue b/ui/src/views/iam/CreateRole.vue new file mode 100644 index 00000000000..23730b5aa13 --- /dev/null +++ b/ui/src/views/iam/CreateRole.vue @@ -0,0 +1,205 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + + diff --git a/ui/src/views/iam/ImportRole.vue b/ui/src/views/iam/ImportRole.vue new file mode 100644 index 00000000000..64c6ee595b4 --- /dev/null +++ b/ui/src/views/iam/ImportRole.vue @@ -0,0 +1,299 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + + diff --git a/ui/src/views/iam/RolePermissionTab.vue b/ui/src/views/iam/RolePermissionTab.vue index f95c0d699bc..bb63b9bcd65 100644 --- a/ui/src/views/iam/RolePermissionTab.vue +++ b/ui/src/views/iam/RolePermissionTab.vue @@ -18,6 +18,11 @@