diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..8a7130ab2 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: dashboard Deploy + +on: + pull_request: + push: + branches: + - master + +jobs: + build_and_deploy_job: + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - + name: Checkout Code + uses: actions/checkout@v2 + with: + submodules: recursive + - + name: Setup Node + uses: actions/setup-node@v2.4.0 + with: + node-version: "16" + - + name: Setup Dependencies + run: yarn install + - + name: Build Site + run: npm run build + - + name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + publish_branch: dist + publish_dir: ./dist + diff --git a/src/index.less b/src/index.less index 094d0a3e2..8a6eb80c0 100644 --- a/src/index.less +++ b/src/index.less @@ -25,13 +25,16 @@ body, .plug-content-wrap { padding: 24px } - .open{ + + .open { color: #14c974; } - .close{ + + .close { color: #ff586d; } - .ant-btn-danger{ + + .ant-btn-danger { background: #f5222d !important; color: #fff !important; } @@ -57,6 +60,7 @@ ol { :global(.edit) { cursor: pointer; color: @primary-color; + &:hover { color: @primary-color; } @@ -64,6 +68,7 @@ ol { :global(.searchblock) { display: flex !important; + button { margin-left: 30px; } @@ -84,12 +89,16 @@ ol { justify-content: space-between; line-height: 40px; padding: 0 20px; + border-radius: 5px; + box-shadow: 1px 2px 2px rgba(191, 189, 189, 0.5); height: 40px; background: #fff; + h3 { font-size: 16px; overflow: hidden; } + button { margin-top: 4px; } @@ -109,7 +118,9 @@ body { :global { .ant-spin-container { overflow: visible !important; + box-shadow: 1px 2px 2px rgba(191, 189, 189, 0.5); } + .global-spin { width: 100%; margin: 40px 0 !important; @@ -135,4 +146,4 @@ body { .ant-modal { max-width: calc(100vw - 32px); } -} +} \ No newline at end of file diff --git a/src/routes/Plugin/Common/index.js b/src/routes/Plugin/Common/index.js index 37897db9f..7478db8c3 100644 --- a/src/routes/Plugin/Common/index.js +++ b/src/routes/Plugin/Common/index.js @@ -48,15 +48,15 @@ export default class Common extends Component { componentDidMount() { const { dispatch, plugins } = this.props; - const { selectorPage,selectorPageSize} = this.state; + const { selectorPage, selectorPageSize } = this.state; if (plugins && plugins.length > 0) { - this.getAllSelectors(selectorPage,selectorPageSize, plugins); + this.getAllSelectors(selectorPage, selectorPageSize, plugins); } else { dispatch({ type: "global/fetchPlugins", payload: { callback: pluginList => { - this.getAllSelectors(selectorPage,selectorPageSize, pluginList); + this.getAllSelectors(selectorPage, selectorPageSize, pluginList); } } }); @@ -66,7 +66,7 @@ export default class Common extends Component { componentDidUpdate(prevProps) { const preId = prevProps.match.params.id; const newId = this.props.match.params.id; - const {selectorPage,selectorPageSize} = this.state; + const { selectorPage, selectorPageSize } = this.state; if (newId !== preId) { const { dispatch } = this.props; dispatch({ @@ -74,13 +74,13 @@ export default class Common extends Component { }); if (prevProps.plugins && prevProps.plugins.length > 0) { - this.getAllSelectors(selectorPage,selectorPageSize, prevProps.plugins); + this.getAllSelectors(selectorPage, selectorPageSize, prevProps.plugins); } else { dispatch({ type: "global/fetchPlugins", payload: { callback: pluginList => { - this.getAllSelectors(selectorPage,selectorPageSize, pluginList); + this.getAllSelectors(selectorPage, selectorPageSize, pluginList); } } }); @@ -112,7 +112,7 @@ export default class Common extends Component { }); }; - getAllRules = (page,pageSize) => { + getAllRules = (page, pageSize) => { const { dispatch, currentSelector } = this.props; const { ruleName } = this.state; const selectorId = currentSelector ? currentSelector.id : ""; @@ -163,12 +163,12 @@ export default class Common extends Component { searchSelector = () => { const { plugins } = this.props; - const {selectorPage,selectorPageSize} = this.state; - this.getAllSelectors(selectorPage,selectorPageSize, plugins); + const { selectorPage, selectorPageSize } = this.state; + this.getAllSelectors(selectorPage, selectorPageSize, plugins); }; addSelector = () => { - const { selectorPage,selectorPageSize } = this.state; + const { selectorPage, selectorPageSize } = this.state; const { dispatch, plugins } = this.props; let name = this.props.match.params ? this.props.match.params.id : ""; const plugin = this.getPlugin(plugins, name); @@ -203,12 +203,12 @@ export default class Common extends Component { searchRule = () => { this.setState({ rulePage: 1 }); - const {rulePageSize } = this.state; - this.getAllRules(1,rulePageSize); + const { rulePageSize } = this.state; + this.getAllRules(1, rulePageSize); }; addRule = () => { - const { rulePage,rulePageSize, pluginId } = this.state; + const { rulePage, rulePageSize, pluginId } = this.state; const { dispatch, currentSelector, plugins } = this.props; let name = this.props.match.params ? this.props.match.params.id : ""; const plugin = this.getPlugin(plugins, name); @@ -249,7 +249,7 @@ export default class Common extends Component { editSelector = record => { const { dispatch, plugins } = this.props; - const { selectorPage,selectorPageSize } = this.state; + const { selectorPage, selectorPageSize } = this.state; let name = this.props.match.params ? this.props.match.params.id : ""; const plugin = this.getPlugin(plugins, name); const { id: pluginId, config } = plugin; @@ -295,7 +295,7 @@ export default class Common extends Component { deleteSelector = record => { const { dispatch, plugins } = this.props; - const { selectorPage,selectorPageSize } = this.state; + const { selectorPage, selectorPageSize } = this.state; let name = this.props.match.params ? this.props.match.params.id : ""; const pluginId = this.getPluginId(plugins, name); dispatch({ @@ -314,25 +314,25 @@ export default class Common extends Component { pageSelectorChange = page => { this.setState({ selectorPage: page }); const { plugins } = this.props; - const {selectorPageSize} = this.state; - this.getAllSelectors(page,selectorPageSize, plugins); + const { selectorPageSize } = this.state; + this.getAllSelectors(page, selectorPageSize, plugins); }; - pageSelectorChangeSize = (currentPage,pageSize) => { + pageSelectorChangeSize = (currentPage, pageSize) => { const { plugins } = this.props; - this.setState({ selectorPage: 1, selectorPageSize: pageSize}); + this.setState({ selectorPage: 1, selectorPageSize: pageSize }); this.getAllSelectors(1, pageSize, plugins); }; pageRuleChange = page => { - this.setState({ rulePage: page}); + this.setState({ rulePage: page }); const { rulePageSize } = this.state; - this.getAllRules(page,rulePageSize); + this.getAllRules(page, rulePageSize); }; - pageRuleChangeSize = (currentPage,pageSize) => { - this.setState({rulePage: 1, rulePageSize: pageSize}); - this.getAllRules(1,pageSize); + pageRuleChangeSize = (currentPage, pageSize) => { + this.setState({ rulePage: 1, rulePageSize: pageSize }); + this.getAllRules(1, pageSize); }; // select @@ -358,7 +358,7 @@ export default class Common extends Component { editRule = record => { const { dispatch, currentSelector, plugins } = this.props; - const { rulePage,rulePageSize, pluginId } = this.state; + const { rulePage, rulePageSize, pluginId } = this.state; let name = this.props.match.params ? this.props.match.params.id : ""; const plugin = this.getPlugin(plugins, name); const { config } = plugin; @@ -407,7 +407,7 @@ export default class Common extends Component { deleteRule = record => { const { dispatch, currentSelector, ruleList } = this.props; - const { rulePage,rulePageSize } = this.state; + const { rulePage, rulePageSize } = this.state; const currentPage = rulePage > 1 && ruleList.length === 1 ? rulePage - 1 : rulePage; dispatch({ @@ -616,12 +616,12 @@ export default class Common extends Component {
-

{getIntlContent("SHENYU.PLUGIN.SELECTOR.LIST.TITLE")}

+

{getIntlContent("SHENYU.PLUGIN.SELECTOR.LIST.TITLE")}

{ e.preventDefault(); - const searchCont= this.props.form.getFieldsValue() + const searchCont = this.props.form.getFieldsValue() this.props.onClick(searchCont) }; @@ -33,18 +34,18 @@ class InlineSearch extends React.Component { const { getFieldDecorator } = this.props.form; return (
- + {getFieldDecorator('appKey', { - initialValue:null + initialValue: null })( , )} - + {getFieldDecorator('phone', { - initialValue:null + initialValue: null })( , )} - +