@ant-design/icons#HistoryOutlined JavaScript Examples

The following examples show how to use @ant-design/icons#HistoryOutlined. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.js    From bank-client with MIT License 5 votes vote down vote up
items = [
  {
    id: 1,
    name: routes.dashboard.name,
    path: routes.dashboard.path,
    icon: <DesktopOutlined />,
    disabled: false,
  },
  {
    id: 2,
    name: routes.payment.name,
    path: routes.payment.path,
    icon: <WalletOutlined />,
    disabled: false,
  },
  {
    id: 3,
    name: routes.history.name,
    path: routes.history.path,
    icon: <HistoryOutlined />,
    disabled: false,
  },
  {
    id: 4,
    name: 'Cards',
    path: '4',
    icon: <CreditCardOutlined />,
    disabled: true,
  },
  {
    id: 5,
    name: 'Credits',
    path: '5',
    icon: <LineChartOutlined />,
    disabled: true,
  },
  {
    id: 6,
    name: 'Deposits',
    path: '6',
    icon: <BankOutlined />,
    disabled: true,
  },
  {
    id: 7,
    name: routes.settings.name,
    path: routes.settings.path,
    icon: <SettingOutlined />,
    disabled: false,
  },
]
Example #2
Source File: index.jsx    From juno with Apache License 2.0 4 votes vote down vote up
function Files(props) {
  const {
    currentConfig,
    configList,
    configListLoading,
    currentContent,
    deleteConfig,
    aid,
    env,
    loadConfigList,
    appName,
    k8sClusters,
  } = props;
  let { zoneList } = props;
  const fileChanged = currentConfig && currentConfig.content !== currentContent;
  useEffect(() => {
    if (props.appName && props.env) {
      loadConfigList(props.appName, props.env);
    }
  }, []);

  k8sClusters.forEach((cluster) => {
    if (
      cluster.env.indexOf(env) > -1 &&
      zoneList.findIndex((zone) => zone.zone_code === cluster.zone_code) < 0
    ) {
      zoneList.push({
        zone_code: cluster.zone_code,
        zone_name: cluster.zone_name,
      });
    }
  });

  const renderConfigListByZone = (zone) => {
    let configs = (configList || []).filter((item) => item.zone === zone);
    if (configs.length === 0) {
      return (
        <div className={styles.noConfigTip}>
          <StopOutlined />
          该Zone暂无配置
        </div>
      );
    }

    return configs.map((cfg, index) => {
      const active = cfg.id === currentConfig?.id;
      return (
        <li
          key={index}
          className={[styles.configItem, active && styles.configItemActive].join(' ')}
          onClick={() => {
            if (fileChanged) {
              confirm({
                title: '当前配置未保存',
                content: '当前文件修改未保存,切换配置后当前的修改将丢失。是否切换文件?',
                cancelText: '我点错了',
                okText: '确认',
                onOk: () => {
                  props.loadConfigDetail(cfg.id);
                },
              });
            } else {
              props.loadConfigDetail(cfg.id);
            }
          }}
        >
          <div className={styles.configListTextItem}>
            <div>
              {cfg.config_status === 1 ? (
                <Tag color="green">已发布</Tag>
              ) : cfg.config_status === 2 ? (
                <Tag color="yellow">未发布</Tag>
              ) : (
                ''
              )}
              {cfg.name}.{cfg.format}
            </div>
            <div>
              {currentConfig &&
                currentConfig.content !== currentContent &&
                cfg.id === currentConfig.id && <span className={styles.notSavedTip}>未保存</span>}
            </div>
          </div>
          <div>
            <div onClick={(ev) => ev.stopPropagation()}>
              <Popconfirm
                title={'谨慎操作,删除后无法找回.确定删除?'}
                onConfirm={(ev) => {
                  deleteConfig(cfg.id).then((r) => {
                    loadConfigList(props.appName, props.env);
                  });
                }}
              >
                <OptionButton type={'text'}>
                  <DeleteOutlined />
                </OptionButton>
              </Popconfirm>
            </div>
          </div>
        </li>
      );
    });
  };

  return (
    <div style={{ display: 'flex', flexDirection: 'column' }}>
      <div className={styles.options}>
        <OptionButton onClick={() => props.showCreateModal(true)} title={'新增配置'}>
          <FileOutlined />
        </OptionButton>
        {currentConfig && (
          <OptionButton title={'历史变更'} onClick={() => props.showHistoryModal(true)}>
            <HistoryOutlined />
          </OptionButton>
        )}
      </div>

      <ul className={styles.zoneList}>
        <ScrollArea style={{ height: '100%' }}>
          {configListLoading && (
            <div style={{ textAlign: 'center', paddingTop: '30px' }}>
              <Spin />
              <div>加载中</div>
            </div>
          )}

          {!configListLoading &&
            zoneList &&
            zoneList.map((zone, index) => {
              return (
                <li key={index}>
                  <div className={styles.zoneTitle}>{zone.zone_name}</div>
                  <ul className={styles.configList}>{renderConfigListByZone(zone.zone_code)}</ul>
                </li>
              );
            })}

          {!configListLoading && (!zoneList || !zoneList.length) && (
            <div className={styles.noConfigTip}>
              <StopOutlined />
              当前应用环境无机房
            </div>
          )}
        </ScrollArea>
      </ul>
    </div>
  );
}
Example #3
Source File: App.js    From art-dashboard-ui with Apache License 2.0 4 votes vote down vote up
render() {

        const { Header, Footer, Sider, Content } = Layout;

        const release_number_whats_new_cookie = Cookies.get("release_number_whats_new_cookie");
        const release_number_env = process.env.REACT_APP_RELEASE_NUMBER_WHATS_NEW;

        if(release_number_whats_new_cookie === undefined || release_number_whats_new_cookie !== release_number_env){
            this.openNotification();
            Cookies.set("release_number_whats_new_cookie", release_number_env);
        }



        return (

            <Router>
                <div>
                    <Layout>
                        <Sider collapsed={this.state.collapsed_sider}>
                            <div>
                                <Menu theme="dark" mode="inline" defaultSelectedKeys={['1']}>

                                    <Menu.Item key="release_status_menu_item" icon={<HistoryOutlined />}>
                                        <Link to="/release/status/?type=all">
                                            Release
                                        </Link>
                                    </Menu.Item>

                                    <SubMenu
                                        key="sub1"
                                        title={
                                            <span>
                                            <SettingOutlined />
                                            <span>Build</span>
                                            </span>
                                        }
                                    >

                                        <Menu.Item key="build_menu_item" icon={<HistoryOutlined />}>
                                            <Link to="/build/history">
                                                History
                                            </Link>
                                        </Menu.Item>


                                        <Menu.Item key="build_health_item" icon={<SmileOutlined/>} >
                                            <Link to="/health/daily/overview">
                                            Health
                                            </Link>
                                        </Menu.Item>


                                    </SubMenu>

                                    <Menu.Item key={"incidents"} icon={<FireFilled/>}>
                                        <Link to={"/incidents"}>
                                            Incidents
                                        </Link>
                                    </Menu.Item>

                                    <Menu.Item key={"whats_news"} icon={<ToolOutlined/>}>
                                        <Link to={"/help"}>
                                            Help
                                        </Link>
                                    </Menu.Item>

                                </Menu>
                            </div>
                        </Sider>
                        <Layout>
                            <Header style={{background: "white", height: "120px", float: "left"}}>
                                    <div className="left">
                                        {React.createElement(this.state.collapsed_sider ? MenuUnfoldOutlined : MenuFoldOutlined, {
                                            className: 'trigger',
                                            onClick: this.toggle_side,
                                        })}
                                    </div>
                                    <div className="center">
                                        <h1 style={{color: "#316DC1", margin: "20px"}}>OpenShift Release Portal</h1>
                                    </div>
                            </Header>
                            <Content>
                                <Switch>
                                    <Route component={Daily_overview_table} path="/health/daily/overview" exact/>
                                    <Route path="/build/history" exact component={Build_history_home} name="build_history"/>
                                    <Route path="/release/status/:branch" exact component={Release_home_page} name="release_status"/>
                                    <Route component={Daily_overview_expand_home} path="/health/daily/detail/:date" exact/>
                                    <Route path="/health/daily/build/:date" exact render={(props) => <Build_record_table {...props}/>} name="daily_build_by_date"/>
                                    <Route path="/help" exact component={Whatsnew_carousel}/>
                                    <Route path="/release/advisory/overview/:advisoryid" exact component={Advisory_Overview_Home} name="advisory_overview_home"/>
                                    <Route path="/incidents" exact component={Incident_home}/>
                                    <Redirect exact from="" to={"/release/status/"+process.env.REACT_APP_OPENSHIFT_VERSION_RELEASE_HOME_PAGE}/>

                                </Switch>
                            </Content>

                            <Footer style={{ textAlign: 'center' }}>
                                RedHat ©2020
                            </Footer>

                        </Layout>
                    </Layout>
                </div>
            </Router>
        );

    }