0.3.0-beta.19 • Published 5 days ago

@blueking/ip-selector v0.3.0-beta.19

Weekly downloads
-
License
ISC
Repository
-
Last release
5 days ago

蓝鲸 IPv6 选择器

使用

service.js
  export default {
    fetchTopologyWithCount: (params) => {
      return http.post('topology_width_count', { params })
    },
    fetchTopologyHost: (params) => {
      return http.post('topology_host', { params })
    },
    fetchTopologyHostIdsNodes: (params) => {
      return http.post('topology_host_ids_noodes', { params })
    },
    // ...
  }
创建组件
import vue from 'vue';
import createFactory from '@blueking/ip-selector';
import Service from './service'

// 初始化配置,创建组件
const IpSelector = createFactory({
  // 组件版本(改变版本重置用户自定义配置)
  version: '',
  // 需要支持的面板('staticTopo', 'dynamicTopo', 'dynamicGroup', 'serviceTemplate', 'setTemplate', 'serviceInstance', 'manualInput')
  panelList: ['staticTopo', 'dynamicTopo', 'dynamicGroup', 'manualInput'],
  // 面板选项的值是否唯一
  unqiuePanelValue: false,
  // 字段命名风格('camelCase', 'kebabCase')
  nameStyle: 'camelCase',
  // 主机列表全选模式,false: 本页全选;true: 跨页全选
  hostTableDefaultSelectAllMode: false,
  // 主机列表开启仅显示可用过滤
  hostOnlyValid: false,
  // 主机列表开启仅显示可用过滤时,手动输入 tab 判断主机可用的回调
  manualInputHostValidMethod: () => true,
  // 自定义主机列表列
  hostTableCustomColumnList: [
    // {
    //   key: 'collectStatus',
    //   index: 5,
    //   width: '100px',
    //   label: '采集状态',
    //   renderHead: h => h('span', '采集状态'),
    //   field: 'collect_status',
    //   renderCell: (h, row) => h('span', row.collect_status || '--'),
    // }
  ],
  nodeTableCustomColumnList: [],  // 自定义动态拓扑列表列 同上
  serviceTemplateTableCustomColumnList: [],  // 自定义服务模板列表列 同上
  setTemplateCustomColumnList: [],  // 自定义集群模板列表列 同上
  hostMemuExtends: [
    // {
    //   name: '复制采集状态异常',
    //   action: () => {
    //     console.log('复制成功');
    //   },
    // },
  ],
  // 主机预览字段显示
  hostViewFieldRender: (host, primaryField) => host.host_id,
  // 主机列表显示列(默认值:['ip', 'ipv6', 'alive', 'osName']),按配置顺序显示列
  // 内置所有列的 key ['ip', 'ipv6', 'cloudArea', 'alive', 'hostName', 'osName', 'coludVerdor', 'osType', 'hostId', 'agentId']
  hostTableRenderColumnList: [],

  // 创建时是否提示 service 信息
  serviceConfigError: false,

  // 需要的数据源配置(返回 Promise)
  // 主机拓扑
  fetchTopologyHostCount: Service.fetchTopologyWithCount,
  fetchTopologyHostsNodes: Service.fetchTopologyHost, // (params: Object, hostOnlyValid: boolean) => Promise<any[]>
  fetchTopologyHostIdsNodes: Service.fetchTopogyHostIdList, // (params: Object, hostOnlyValid: boolean) => Promise<any[]>
  fetchHostsDetails: Service.fetchHostInfoByHostId,
  fetchHostCheck: Service.fetchInputParseHostList,
  fetchNodesQueryPath: Service.fetchNodePath,
  fetchHostAgentStatisticsNodes: Service.fetchBatchNodeAgentStatistics,
  // 动态分组
  fetchDynamicGroups: Service.fetchDynamicGroup,
  fetchHostsDynamicGroup: Service.fetchDynamicGroupHost,
  fetchHostAgentStatisticsDynamicGroups: Service.fetchBatchGroupAgentStatistics,
  // 服务模板
  fetchServiceTemplates: Service.fetchServiceTemplates,
  fetchNodesServiceTemplate: Service.fetchNodesServiceTemplate,
  fetchHostServiceTemplate: Service.fetchHostServiceTemplate,
  fetchHostAgentStatisticsServiceTemplate: Service.fetchHostAgentStatisticsServiceTemplate,
  // 集群模板
  fetchSetTemplates: Service.fetchSetTemplates,
  fetchNodesSetTemplate: Service.fetchNodesSetTemplate,
  fetchHostSetTemplate: Service.fetchHostSetTemplate,
  fetchHostAgentStatisticsSetTemplate: Service.fetchHostAgentStatisticsSetTemplate,
  // 服务实例
  fetchSeriviceInstanceList: Service.fetchSeriviceInstanceList,
  fetchSeriviceInstanceDetails: Service.fetchSeriviceInstanceDetails,
  // DBM 白名单
  fetchDBMWhitelist: Service.fetchDBMWhitelist,
  // 自定义配置
  fetchCustomSettings: Service.fetchAll,
  updateCustomSettings: Service.update,
  // 系统相关配置
  fetchConfig: () => Promise.resolve()
    .then(() => ({
      // CMDB 动态分组链接
      bk_cmdb_dynamic_group_url: `http:xx.yy.zz.com/#/business/1/custom-query`,
      // CMDB 拓扑节点链接
      bk_cmdb_static_topo_url: `http:xx.yy.zz.com/#/business/1/custom-query`,
      // DBM 创建白名单链接
      bk_dbm_whitelist: `http:xx.yy.zz.com/#/business/1/custom-query`,
      // CMDB 服务模版链接
      bk_cmdb_service_template_url: `http:xx.yy.zz.com/#/business/1/custom-query`,
    })),
})

// 全局注册
vue.component('IpSelector', IpSelector)

组件 Props

组件 Events

实例方法

0.3.0-beta.19

5 days ago

0.3.0-beta.18

17 days ago

0.3.0-beta.17

23 days ago

0.3.0-beta.16

1 month ago

0.3.0-beta.14

2 months ago

0.3.0-beta.15

2 months ago

0.3.0-beta.13

3 months ago

0.3.0-beta.12

3 months ago

0.3.0-beta.11

3 months ago

0.3.0-beta.8

3 months ago

0.3.0-beta.9

3 months ago

0.2.0-beta.1

3 months ago

0.3.0-beta.6

4 months ago

0.3.0-beta.7

4 months ago

0.3.0-beta.5

4 months ago

0.3.0-beta.4

4 months ago

0.3.0-beta.2

4 months ago

0.3.0-beta.3

4 months ago

0.3.0-beta.1

4 months ago

0.0.1-beta.138

6 months ago

0.0.1-beta.132

6 months ago

0.0.1-beta.133

6 months ago

0.0.1-beta.130

6 months ago

0.0.1-beta.131

6 months ago

0.0.1-beta.136

6 months ago

0.0.1-beta.137

6 months ago

0.0.1-beta.134

6 months ago

0.0.1-beta.135

6 months ago

0.0.1-beta.129

6 months ago

0.0.1-beta.127

6 months ago

0.0.1-beta.128

6 months ago

0.0.1-beta.121

10 months ago

0.0.1-beta.122

10 months ago

0.0.1-beta.120

10 months ago

0.0.1-beta.125

8 months ago

0.0.1-beta.126

7 months ago

0.0.1-beta.123

10 months ago

0.0.1-beta.124

10 months ago

0.0.1-beta.118

10 months ago

0.0.1-beta.119

10 months ago

0.0.1-beta.116

10 months ago

0.0.1-beta.117

10 months ago

0.0.1-beta.114

10 months ago

0.0.1-beta.115

10 months ago

0.0.1-beta.112

10 months ago

0.0.1-beta.113

10 months ago

0.2.0-beta

5 months ago

0.0.1-beta.110

10 months ago

0.0.1-beta.111

10 months ago

0.0.1-beta.109

11 months ago

0.0.1-beta.107

11 months ago

0.0.1-beta.108

11 months ago

0.0.1-beta.105

11 months ago

0.0.1-beta.106

11 months ago

0.0.1-beta.100

12 months ago

0.0.1-beta.103

11 months ago

0.0.1-beta.104

11 months ago

0.0.1-beta.101

12 months ago

0.0.1-beta.102

11 months ago

0.0.1-beta.98

12 months ago

0.0.1-beta.97

12 months ago

0.0.1-beta.99

12 months ago

0.0.1-beta.90

1 year ago

0.0.1-beta.92

1 year ago

0.0.1-beta.91

1 year ago

0.0.1-beta.94

1 year ago

0.0.1-beta.93

1 year ago

0.0.1-beta.96

1 year ago

0.0.1-beta.95

1 year ago

0.0.1-beta.87

1 year ago

0.0.1-beta.86

1 year ago

0.0.1-beta.89

1 year ago

0.0.1-beta.88

1 year ago

0.0.1-beta.83

1 year ago

0.0.1-beta.82

1 year ago

0.0.1-beta.85

1 year ago

0.0.1-beta.84

1 year ago

0.0.1-beta.81

1 year ago

0.0.1-beta.80

1 year ago

0.0.1-beta.76

1 year ago

0.0.1-beta.75

1 year ago

0.0.1-beta.78

1 year ago

0.0.1-beta.77

1 year ago

0.0.1-beta.72

1 year ago

0.0.1-beta.71

1 year ago

0.0.1-beta.74

1 year ago

0.0.1-beta.73

1 year ago

0.0.1-beta.79

1 year ago

0.0.1-beta.70

1 year ago

0.0.1-beta.67

1 year ago

0.0.1-beta.66

1 year ago

0.0.1-beta.69

1 year ago

0.0.1-beta.68

1 year ago

0.0.1-beta.64

1 year ago

0.0.1-beta.61

1 year ago

0.0.1-beta.60

1 year ago

0.0.1-beta.63

1 year ago

0.0.1-beta.62

1 year ago

0.0.1-beta.54

1 year ago

0.0.1-beta.53

1 year ago

0.0.1-beta.56

1 year ago

0.0.1-beta.55

1 year ago

0.0.1-beta.58

1 year ago

0.0.1-beta.57

1 year ago

0.0.1-beta.59

1 year ago

0.0.1-beta.43

1 year ago

0.0.1-beta.42

1 year ago

0.0.1-beta.45

1 year ago

0.0.1-beta.44

1 year ago

0.0.1-beta.41

1 year ago

0.0.1-beta.40

1 year ago

0.0.1-beta.47

1 year ago

0.0.1-beta.46

1 year ago

0.0.1-beta.49

1 year ago

0.0.1-beta.48

1 year ago

0.0.1-beta.32

1 year ago

0.0.1-beta.31

1 year ago

0.0.1-beta.34

1 year ago

0.0.1-beta.33

1 year ago

0.0.1-beta.30

2 years ago

0.0.1-beta.39

1 year ago

0.0.1-beta.36

1 year ago

0.0.1-beta.38

1 year ago

0.0.1-beta.37

1 year ago

0.0.1-beta.29

2 years ago

0.0.1-beta.28

2 years ago

0.0.1-beta.27

2 years ago

0.0.1-beta.50

1 year ago

0.0.1-beta.52

1 year ago

0.0.1-beta.51

1 year ago

0.0.1-beta.23

2 years ago

0.0.1-beta.25

2 years ago

0.0.1-beta.26

2 years ago

0.0.1-beta.22

2 years ago

0.0.1-beta.21

2 years ago

0.0.1-beta.20

2 years ago

0.0.1-beta.19

2 years ago

0.0.1-beta.18

2 years ago

0.0.1-beta.17

2 years ago

0.0.1-beta.16

2 years ago

0.0.1-beta.15

2 years ago

0.0.1-beta.14

2 years ago

0.0.1-beta.13

2 years ago

0.0.1-beta.12

2 years ago

0.0.1-beta.11

2 years ago

0.0.1-beta.9

2 years ago

0.0.1-beta.8

2 years ago

0.0.1-beta.7

2 years ago

0.0.1-beta.6

2 years ago

0.0.1-beta.5

2 years ago

0.0.1-beta.4

2 years ago

0.0.1-beta.3

2 years ago

0.0.1-beta.2

2 years ago

0.0.1-beta.1

2 years ago