You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by ha...@apache.org on 2018/03/07 02:13:13 UTC

[incubator-skywalking-ui] branch fix/license updated: Add license header to Chart components.

This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch fix/license
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-ui.git


The following commit(s) were added to refs/heads/fix/license by this push:
     new 0e664a2  Add license header to Chart components.
0e664a2 is described below

commit 0e664a2950f612f94204520aaffbaab6850e3336
Author: hanahmily <ha...@gmail.com>
AuthorDate: Wed Mar 7 10:11:12 2018 +0800

    Add license header to Chart components.
---
 src/components/Authorized/demo/AuthorizedArray.md  |  23 ----
 .../Authorized/demo/AuthorizedFunction.md          |  31 -----
 src/components/Authorized/demo/basic.md            |  25 ----
 src/components/Authorized/demo/secured.md          |  28 -----
 src/components/Authorized/index.md                 |  58 ---------
 src/components/Charts/Bar/index.d.ts               |  15 ---
 src/components/Charts/ChartCard/index.d.ts         |  12 --
 src/components/Charts/Field/index.d.ts             |   8 --
 src/components/Charts/MiniArea/index.d.ts          |  29 -----
 src/components/Charts/MiniBar/index.d.ts           |  12 --
 src/components/Charts/Pie/index.d.ts               |  20 ----
 src/components/Charts/index.md                     | 132 ---------------------
 src/components/DescriptionList/demo/basic.md       |  35 ------
 src/components/DescriptionList/demo/vertical.md    |  35 ------
 src/components/DescriptionList/index.d.ts          |  24 ----
 src/components/DescriptionList/index.md            |  39 ------
 16 files changed, 526 deletions(-)

diff --git a/src/components/Authorized/demo/AuthorizedArray.md b/src/components/Authorized/demo/AuthorizedArray.md
deleted file mode 100644
index 46eaf76..0000000
--- a/src/components/Authorized/demo/AuthorizedArray.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-order: 1
-title: 
-  zh-CN: 使用数组作为参数
-  en-US: Use Array as a parameter
----
-
-Use Array as a parameter
-
-```jsx
-import RenderAuthorized from 'ant-design-pro/lib/Authorized';
-import { Alert } from 'antd';
-
-const Authorized = RenderAuthorized('user');
-const noMatch = <Alert message="No permission." type="error" showIcon />;
-
-ReactDOM.render(
-  <Authorized authority={['user', 'admin']} noMatch={noMatch}>
-    <Alert message="Use Array as a parameter passed!" type="success" showIcon />
-  </Authorized>,
-  mountNode,
-);
-```
diff --git a/src/components/Authorized/demo/AuthorizedFunction.md b/src/components/Authorized/demo/AuthorizedFunction.md
deleted file mode 100644
index 8ad8b91..0000000
--- a/src/components/Authorized/demo/AuthorizedFunction.md
+++ /dev/null
@@ -1,31 +0,0 @@
----
-order: 2
-title: 
-  zh-CN: 使用方法作为参数
-  en-US: Use function as a parameter
----
-
-Use Function as a parameter
-
-```jsx
-import RenderAuthorized from 'ant-design-pro/lib/Authorized';
-import { Alert } from 'antd';
-
-const Authorized = RenderAuthorized('user');
-const noMatch = <Alert message="No permission." type="error" showIcon />;
-
-const havePermission = () => {
-  return false;
-};
-
-ReactDOM.render(
-  <Authorized authority={havePermission} noMatch={noMatch}>
-    <Alert
-      message="Use Function as a parameter passed!"
-      type="success"
-      showIcon
-    />
-  </Authorized>,
-  mountNode,
-);
-```
diff --git a/src/components/Authorized/demo/basic.md b/src/components/Authorized/demo/basic.md
deleted file mode 100644
index a5f12f2..0000000
--- a/src/components/Authorized/demo/basic.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-order: 0
-title: 
-  zh-CN: 基本使用
-  en-US: Basic use
----
-
-Basic use
-
-```jsx
-import RenderAuthorized from 'ant-design-pro/lib/Authorized';
-import { Alert } from 'antd';
-
-const Authorized = RenderAuthorized('user');
-const noMatch = <Alert message="No permission." type="error" showIcon />;
-
-ReactDOM.render(
-  <div>
-    <Authorized authority="admin" noMatch={noMatch}>
-      <Alert message="user Passed!" type="success" showIcon />
-    </Authorized>
-  </div>,
-  mountNode,
-);
-```
diff --git a/src/components/Authorized/demo/secured.md b/src/components/Authorized/demo/secured.md
deleted file mode 100644
index 1e9537a..0000000
--- a/src/components/Authorized/demo/secured.md
+++ /dev/null
@@ -1,28 +0,0 @@
----
-order: 3
-title: 
-  zh-CN: 注解基本使用
-  en-US: Basic use secured
----
-
-secured demo used
-
-```jsx
-import RenderAuthorized from 'ant-design-pro/lib/Authorized';
-import { Alert } from 'antd';
-
-const { Secured } = RenderAuthorized('user');
-
-@Secured('admin')
-class TestSecuredString extends React.Component {
-  render() {
-    <Alert message="user Passed!" type="success" showIcon />;
-  }
-}
-ReactDOM.render(
-  <div>
-    <TestSecuredString />
-  </div>,
-  mountNode,
-);
-```
diff --git a/src/components/Authorized/index.md b/src/components/Authorized/index.md
deleted file mode 100644
index 51588bb..0000000
--- a/src/components/Authorized/index.md
+++ /dev/null
@@ -1,58 +0,0 @@
----
-title:
-  en-US: Authorized
-  zh-CN: Authorized
-subtitle: 权限
-cols: 1
-order: 15
----
-
-权限组件,通过比对现有权限与准入权限,决定相关元素的展示。
-
-## API
-
-### RenderAuthorized
-
-`RenderAuthorized: (currentAuthority: string | () => string) => Authorized`
-
-权限组件默认 export RenderAuthorized 函数,它接收当前权限作为参数,返回一个权限对象,该对象提供以下几种使用方式。
-
-
-### Authorized
-
-最基础的权限控制。
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| children    | 正常渲染的元素,权限判断通过时展示           | ReactNode  | - |
-| authority   | 准入权限/权限判断         | `string | array | Promise | (currentAuthority) => boolean` | - |
-| noMatch     | 权限异常渲染元素,权限判断不通过时展示        | ReactNode  | - |
-
-### Authorized.AuthorizedRoute
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| authority     | 准入权限/权限判断         | `string | array | Promise | (currentAuthority) => boolean` | - |
-| redirectPath  | 权限异常时重定向的页面路由                | string  | - |
-
-其余参数与 `Route` 相同。
-
-### Authorized.Secured
-
-注解方式,`@Authorized.Secured(authority, error)`
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| authority     | 准入权限/权限判断         | `string | Promise | (currentAuthority) => boolean` | - |
-| error  | 权限异常时渲染元素                |  ReactNode | <Exception type="403" /> |
-
-### Authorized.check
-
-函数形式的 Authorized,用于某些不能被 HOC 包裹的组件。 `Authorized.check(authority, target, Exception)`  
-注意:传入一个 Promise 时,无论正确还是错误返回的都是一个 ReactClass。
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| authority     | 准入权限/权限判断         | `string | Promise | (currentAuthority) => boolean` | - |
-| target     | 权限判断通过时渲染的元素         | ReactNode | - |
-| Exception  | 权限异常时渲染元素                |  ReactNode | - |
diff --git a/src/components/Charts/Bar/index.d.ts b/src/components/Charts/Bar/index.d.ts
deleted file mode 100644
index 7be2a1a..0000000
--- a/src/components/Charts/Bar/index.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import * as React from "react";
-export interface BarProps {
-  title: React.ReactNode;
-  color?: string;
-  padding?: [number, number, number, number];
-  height: number;
-  data: Array<{
-    x: string;
-    y: number;
-  }>;
-  autoLabel?: boolean;
-  style?: React.CSSProperties;
-}
-
-export default class Bar extends React.Component<BarProps, any> {}
diff --git a/src/components/Charts/ChartCard/index.d.ts b/src/components/Charts/ChartCard/index.d.ts
deleted file mode 100644
index 35a5852..0000000
--- a/src/components/Charts/ChartCard/index.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import * as React from "react";
-export interface ChartCardProps {
-  title: React.ReactNode;
-  action?: React.ReactNode;
-  total?: React.ReactNode | number;
-  footer?: React.ReactNode;
-  contentHeight?: number;
-  avatar?: React.ReactNode;
-  style?: React.CSSProperties;
-}
-
-export default class ChartCard extends React.Component<ChartCardProps, any> {}
diff --git a/src/components/Charts/Field/index.d.ts b/src/components/Charts/Field/index.d.ts
deleted file mode 100644
index b1f779c..0000000
--- a/src/components/Charts/Field/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import * as React from "react";
-export interface FieldProps {
-  label: React.ReactNode;
-  value: React.ReactNode;
-  style?: React.CSSProperties;
-}
-
-export default class Field extends React.Component<FieldProps, any> {}
diff --git a/src/components/Charts/MiniArea/index.d.ts b/src/components/Charts/MiniArea/index.d.ts
deleted file mode 100644
index d2f67e4..0000000
--- a/src/components/Charts/MiniArea/index.d.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as React from "react";
-
-// g2已经更新到3.0
-// 不带的写了
-
-export interface Axis {
-  title: any;
-  line: any;
-  gridAlign: any;
-  labels: any;
-  tickLine: any;
-  grid: any;
-}
-
-export interface MiniAreaProps {
-  color?: string;
-  height: number;
-  borderColor?: string;
-  line?: boolean;
-  animate?: boolean;
-  xAxis?: Axis;
-  yAxis?: Axis;
-  data: Array<{
-    x: number;
-    y: number;
-  }>;
-}
-
-export default class MiniArea extends React.Component<MiniAreaProps, any> {}
diff --git a/src/components/Charts/MiniBar/index.d.ts b/src/components/Charts/MiniBar/index.d.ts
deleted file mode 100644
index 3e2f1ec..0000000
--- a/src/components/Charts/MiniBar/index.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import * as React from 'react';
-export interface MiniBarProps {
-  color?: string;
-  height: number;
-  data: Array<{
-    x: number | string;
-    y: number;
-  }>;
-  style?: React.CSSProperties;
-}
-
-export default class MiniBar extends React.Component<MiniBarProps, any> {}
diff --git a/src/components/Charts/Pie/index.d.ts b/src/components/Charts/Pie/index.d.ts
deleted file mode 100644
index fe2e2a8..0000000
--- a/src/components/Charts/Pie/index.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import * as React from 'react';
-export interface PieProps {
-  animate?: boolean;
-  color?: string;
-  height: number;
-  hasLegend?: boolean;
-  padding?: [number, number, number, number];
-  percent?: number;
-  data?: Array<{
-    x: string | string;
-    y: number;
-  }>;
-  total?: string;
-  title?: React.ReactNode;
-  tooltip?: boolean;
-  valueFormat?: (value: string) => string;
-  subTitle?: React.ReactNode;
-}
-
-export default class Pie extends React.Component<PieProps, any> {}
diff --git a/src/components/Charts/index.md b/src/components/Charts/index.md
deleted file mode 100644
index 218f4eb..0000000
--- a/src/components/Charts/index.md
+++ /dev/null
@@ -1,132 +0,0 @@
----
-title: 
-  en-US: Charts
-  zh-CN: Charts
-subtitle: 图表
-order: 2
-cols: 2
----
-
-Ant Design Pro 提供的业务中常用的图表类型,都是基于 [G2](https://antv.alipay.com/g2/doc/index.html) 按照 Ant Design 图表规范封装,需要注意的是 Ant Design Pro 的图表组件以套件形式提供,可以任意组合实现复杂的业务需求。
-
-因为结合了 Ant Design 的标准设计,本着极简的设计思想以及开箱即用的理念,简化了大量 API 配置,所以如果需要灵活定制图表,可以参考 Ant Design Pro 图表实现,自行基于 [G2](https://antv.alipay.com/g2/doc/index.html) 封装图表组件使用。
-
-## API
-
-### ChartCard
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| title | 卡片标题 | ReactNode\|string | - |
-| action | 卡片操作 | ReactNode | - |
-| total | 数据总量 | ReactNode \| number | - |
-| footer | 卡片底部 | ReactNode | - |
-| contentHeight | 内容区域高度 | number | - |
-| avatar | 右侧图标 | React.ReactNode | - |
-### MiniBar
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| color | 图表颜色 | string | `#1890FF` |
-| height | 图表高度 | number | - |
-| data | 数据 | array<{x, y}> | - |
-
-### MiniArea
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| color | 图表颜色 | string | `rgba(24, 144, 255, 0.2)` |
-| borderColor | 图表边颜色 | string | `#1890FF` |
-| height | 图表高度 | number | - |
-| line | 是否显示描边 | boolean | false |
-| animate | 是否显示动画 | boolean | true |
-| xAxis | [x 轴配置](http://antvis.github.io/g2/doc/tutorial/start/axis.html) | object | - |
-| yAxis | [y 轴配置](http://antvis.github.io/g2/doc/tutorial/start/axis.html) | object | - |
-| data | 数据 | array<{x, y}> | - |
-
-### MiniProgress
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| target | 目标比例 | number | - |
-| color | 进度条颜色 | string | - |
-| strokeWidth | 进度条高度 | number | - |
-| percent | 进度比例 | number | - |
-
-### Bar
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| title | 图表标题 | ReactNode\|string | - |
-| color | 图表颜色 | string | `rgba(24, 144, 255, 0.85)` |
-| margin | 图表内部间距 | array | \[32, 0, 32, 40\] |
-| height | 图表高度 | number | - |
-| data | 数据 | array<{x, y}> | - |
-| autoLabel | 在宽度不足时,自动隐藏 x 轴的 label | boolean | `true` |
-
-### Pie
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| animate | 是否显示动画 | boolean | true |
-| color | 图表颜色 | string | `rgba(24, 144, 255, 0.85)` |
-| height | 图表高度 | number | - |
-| hasLegend | 是否显示 legend | boolean | `false` |
-| margin | 图表内部间距 | array | \[24, 0, 24, 0\] |
-| percent | 占比 | number | - |
-| tooltip | 是否显示 tooltip | boolean | true |
-| valueFormat | 显示值的格式化函数 | function | - |
-| title | 图表标题 | ReactNode|string | - |
-| subTitle | 图表子标题 | ReactNode|string | - |
-| total | 图标中央的总数 | string | - |
-
-### Radar
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| title | 图表标题 | ReactNode\|string | - |
-| height | 图表高度 | number | - |
-| hasLegend | 是否显示 legend | boolean | `false` |
-| margin | 图表内部间距 | array | \[24, 30, 16, 30\] |
-| data | 图标数据 | array<{name,label,value}> | - |
-
-### Gauge
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| title | 图表标题 | ReactNode\|string | - |
-| height | 图表高度 | number | - |
-| color | 图表颜色 | string | `#2F9CFF` |
-| bgColor | 图表背景颜色 | string | `#F0F2F5` |
-| percent | 进度比例 | number | - |
-
-### WaterWave
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| title | 图表标题 | ReactNode\|string | - |
-| height | 图表高度 | number | - |
-| color | 图表颜色 | string | `#1890FF` |
-| percent | 进度比例 | number | - |
-
-### TagCloud
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| data | 标题 | Array<name, value\> | - |
-| height | 高度值 | number | - |
-
-### TimelineChart
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| data | 标题 | Array<x, y1, y2\> | - |
-| titleMap | 指标别名 | Object{y1: '客流量', y2: '支付笔数'} | - |
-| height | 高度值 | number | 400 |
-
-### Field
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| label | 标题 | ReactNode\|string | - |
-| value | 值 | ReactNode\|string | - |
diff --git a/src/components/DescriptionList/demo/basic.md b/src/components/DescriptionList/demo/basic.md
deleted file mode 100644
index 8dd8534..0000000
--- a/src/components/DescriptionList/demo/basic.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-order: 0
-title: Basic
----
-
-基本描述列表。
-
-````jsx
-import DescriptionList from 'ant-design-pro/lib/DescriptionList';
-
-const { Description } = DescriptionList;
-
-ReactDOM.render(
-  <DescriptionList size="large" title="title">
-    <Description term="Firefox">
-      A free, open source, cross-platform,
-      graphical web browser developed by the
-      Mozilla Corporation and hundreds of
-      volunteers.
-    </Description>
-    <Description term="Firefox">
-      A free, open source, cross-platform,
-      graphical web browser developed by the
-      Mozilla Corporation and hundreds of
-      volunteers.
-    </Description>
-    <Description term="Firefox">
-      A free, open source, cross-platform,
-      graphical web browser developed by the
-      Mozilla Corporation and hundreds of
-      volunteers.
-    </Description>
-  </DescriptionList>
-, mountNode);
-````
diff --git a/src/components/DescriptionList/demo/vertical.md b/src/components/DescriptionList/demo/vertical.md
deleted file mode 100644
index a304f94..0000000
--- a/src/components/DescriptionList/demo/vertical.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-order: 1
-title: Vertical
----
-
-垂直布局。
-
-````jsx
-import DescriptionList from 'ant-design-pro/lib/DescriptionList';
-
-const { Description } = DescriptionList;
-
-ReactDOM.render(
-  <DescriptionList size="large" title="title" layout="vertical">
-    <Description term="Firefox">
-      A free, open source, cross-platform,
-      graphical web browser developed by the
-      Mozilla Corporation and hundreds of
-      volunteers.
-    </Description>
-    <Description term="Firefox">
-      A free, open source, cross-platform,
-      graphical web browser developed by the
-      Mozilla Corporation and hundreds of
-      volunteers.
-    </Description>
-    <Description term="Firefox">
-      A free, open source, cross-platform,
-      graphical web browser developed by the
-      Mozilla Corporation and hundreds of
-      volunteers.
-    </Description>
-  </DescriptionList>
-, mountNode);
-````
diff --git a/src/components/DescriptionList/index.d.ts b/src/components/DescriptionList/index.d.ts
deleted file mode 100644
index fe64433..0000000
--- a/src/components/DescriptionList/index.d.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import * as React from 'react';
-export interface DescriptionListProps {
-  layout?: 'horizontal' | 'vertical';
-  col?: number;
-  title: React.ReactNode;
-  gutter?: number;
-  size?: 'large' | 'small';
-  style?: React.CSSProperties;
-}
-
-declare class Description extends React.Component<
-  {
-    term: React.ReactNode;
-    style?: React.CSSProperties;
-  },
-  any
-> {}
-
-export default class DescriptionList extends React.Component<
-  DescriptionListProps,
-  any
-> {
-  static Description: typeof Description;
-}
diff --git a/src/components/DescriptionList/index.md b/src/components/DescriptionList/index.md
deleted file mode 100644
index bfa60cb..0000000
--- a/src/components/DescriptionList/index.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
-title:
-  en-US: DescriptionList
-  zh-CN: DescriptionList
-subtitle: 描述列表
-cols: 1
-order: 4
----
-
-成组展示多个只读字段,常见于详情页的信息展示。
-
-## API
-
-### DescriptionList
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| layout    | 布局方式                                 | Enum{'horizontal', 'vertical'}  | 'horizontal' |
-| col       | 指定信息最多分几列展示,最终一行几列由 col 配置结合[响应式规则](/components/DescriptionList#响应式规则)决定          | number(0 < col <= 4)  | 3 |
-| title     | 列表标题                                 | ReactNode  | - |
-| gutter    | 列表项间距,单位为 `px`                    | number  | 32 |
-| size     | 列表型号,可以设置为 `large` `small`        | Enum{'large', 'small'}  | - |
-
-#### 响应式规则
-
-| 窗口宽度             | 展示列数                                      | 
-|---------------------|---------------------------------------------|
-| `≥768px`           |  `col`                                       |
-| `≥576px`           |  `col < 2 ? col : 2`                         |
-| `<576px`           |  `1`                                         |
-
-### DescriptionList.Description
-
-| 参数      | 说明                                      | 类型         | 默认值 |
-|----------|------------------------------------------|-------------|-------|
-| term     | 列表项标题                                 | ReactNode  | - |
-
-
-

-- 
To stop receiving notification emails like this one, please contact
hanahmily@apache.org.