|
| 1 | +// Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +// or more contributor license agreements. See the NOTICE file |
| 3 | +// distributed with this work for additional information |
| 4 | +// regarding copyright ownership. The ASF licenses this file |
| 5 | +// to you under the Apache License, Version 2.0 (the |
| 6 | +// "License"); you may not use this file except in compliance |
| 7 | +// with the License. You may obtain a copy of the License at |
| 8 | +// |
| 9 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +// Unless required by applicable law or agreed to in writing, |
| 12 | +// software distributed under the License is distributed on an |
| 13 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +// KIND, either express or implied. See the License for the |
| 15 | +// specific language governing permissions and limitations |
| 16 | +// under the License. |
| 17 | + |
| 18 | +export default { |
| 19 | + name: 'nsp', |
| 20 | + title: 'Network Service Providers', |
| 21 | + icon: 'compass', |
| 22 | + hidden: true, |
| 23 | + permission: ['listNetworkServiceProviders'], |
| 24 | + columns: ['name', 'state', 'physicalnetworkid'], |
| 25 | + details: ['name', 'state', 'servicelist', 'canenableindividualservice', 'physicalnetworkid'], |
| 26 | + tabs: [{ |
| 27 | + name: 'details', |
| 28 | + component: () => import('@/components/view/DetailsTab.vue') |
| 29 | + }], |
| 30 | + actions: [ |
| 31 | + { |
| 32 | + api: 'updateNetworkServiceProvider', |
| 33 | + icon: 'stop', |
| 34 | + label: 'Disable Provider', |
| 35 | + dataView: true, |
| 36 | + args: ['state'], |
| 37 | + show: (record) => { return record.state === 'Enabled' }, |
| 38 | + mapping: { |
| 39 | + state: { |
| 40 | + value: (record) => { return 'Disabled' } |
| 41 | + } |
| 42 | + } |
| 43 | + }, |
| 44 | + { |
| 45 | + api: 'updateNetworkServiceProvider', |
| 46 | + icon: 'right-circle', |
| 47 | + label: 'Enable Provider', |
| 48 | + dataView: true, |
| 49 | + args: ['state'], |
| 50 | + show: (record) => { return record.state === 'Disabled' }, |
| 51 | + mapping: { |
| 52 | + state: { |
| 53 | + value: (record) => { return 'Enabled' } |
| 54 | + } |
| 55 | + } |
| 56 | + } |
| 57 | + ] |
| 58 | +} |
0 commit comments