diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..a34be49ba
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,16 @@
+root = true
+
+[*.js]
+indent_style = space
+indent_size = 2
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+end_of_line = lf
+
+[*.go]
+indent_style = tab
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+end_of_line = lf
diff --git a/web/.eslintrc.js b/web/.eslintrc.js
index c778afbdf..235507f91 100644
--- a/web/.eslintrc.js
+++ b/web/.eslintrc.js
@@ -1,38 +1,33 @@
module.exports = {
- "extends": [
- "standard",
- "plugin:jest/recommended",
- "plugin:react/recommended",
- "prettier",
- "prettier/react"
- ],
- "plugins": [
- "react",
- "jest",
- "prettier"
- ],
- "parser": "babel-eslint",
- "parserOptions": {
- "ecmaVersion": 2016,
- "sourceType": "module",
- "ecmaFeatures": {
- "jsx": true
- }
- },
- "env": {
- "es6": true,
- "browser": true,
- "node": true,
- "jest/globals": true
- },
- "rules": {
- "react/prop-types": 1,
- "prettier/prettier": [
- "error",
- {
- "trailingComma": "all",
- "useTabs": true
- }
- ]
- }
+ extends: [
+ "standard",
+ "plugin:jest/recommended",
+ "plugin:react/recommended",
+ "prettier",
+ "prettier/react"
+ ],
+ plugins: ["react", "jest", "prettier"],
+ parser: "babel-eslint",
+ parserOptions: {
+ ecmaVersion: 2016,
+ sourceType: "module",
+ ecmaFeatures: {
+ jsx: true
+ }
+ },
+ env: {
+ es6: true,
+ browser: true,
+ node: true,
+ "jest/globals": true
+ },
+ rules: {
+ "react/prop-types": 1,
+ "prettier/prettier": [
+ "error",
+ {
+ trailingComma: "all",
+ }
+ ]
+ }
};
diff --git a/web/src/config/client/inject.js b/web/src/config/client/inject.js
index d1dc8451e..e5f3f9513 100644
--- a/web/src/config/client/inject.js
+++ b/web/src/config/client/inject.js
@@ -1,36 +1,36 @@
import React from "react";
export const drone = (client, Component) => {
- // @see https://github.com/yannickcr/eslint-plugin-react/issues/512
- // eslint-disable-next-line react/display-name
- const component = class extends React.Component {
- getChildContext() {
- return {
- drone: client,
- };
- }
+ // @see https://github.com/yannickcr/eslint-plugin-react/issues/512
+ // eslint-disable-next-line react/display-name
+ const component = class extends React.Component {
+ getChildContext() {
+ return {
+ drone: client,
+ };
+ }
- render() {
- return ;
- }
- };
+ render() {
+ return ;
+ }
+ };
- component.childContextTypes = {
- drone: (props, propName) => {},
- };
+ component.childContextTypes = {
+ drone: (props, propName) => {},
+ };
- return component;
+ return component;
};
export const inject = Component => {
- // @see https://github.com/yannickcr/eslint-plugin-react/issues/512
- // eslint-disable-next-line react/display-name
- const component = class extends React.Component {
- render() {
- this.props.drone = this.context.drone;
- return ;
- }
- };
+ // @see https://github.com/yannickcr/eslint-plugin-react/issues/512
+ // eslint-disable-next-line react/display-name
+ const component = class extends React.Component {
+ render() {
+ this.props.drone = this.context.drone;
+ return ;
+ }
+ };
- return component;
+ return component;
};
diff --git a/web/src/config/state.js b/web/src/config/state.js
index 80ca9b83c..bf5a8dfed 100644
--- a/web/src/config/state.js
+++ b/web/src/config/state.js
@@ -4,75 +4,75 @@ const user = window.DRONE_USER;
const sync = window.DRONE_SYNC;
const state = {
- follow: false,
- language: "en-US",
+ follow: false,
+ language: "en-US",
- user: {
- data: user,
- error: undefined,
- loaded: true,
- syncing: sync,
- },
+ user: {
+ data: user,
+ error: undefined,
+ loaded: true,
+ syncing: sync,
+ },
- feed: {
- loaded: false,
- error: undefined,
- data: {},
- },
+ feed: {
+ loaded: false,
+ error: undefined,
+ data: {},
+ },
- repos: {
- loaded: false,
- error: undefined,
- data: {},
- },
+ repos: {
+ loaded: false,
+ error: undefined,
+ data: {},
+ },
- secrets: {
- loaded: false,
- error: undefined,
- data: {},
- },
+ secrets: {
+ loaded: false,
+ error: undefined,
+ data: {},
+ },
- registry: {
- error: undefined,
- loaded: false,
- data: {},
- },
+ registry: {
+ error: undefined,
+ loaded: false,
+ data: {},
+ },
- builds: {
- loaded: false,
- error: undefined,
- data: {},
- },
+ builds: {
+ loaded: false,
+ error: undefined,
+ data: {},
+ },
- logs: {
- follow: false,
- loading: true,
- error: false,
- data: {},
- },
+ logs: {
+ follow: false,
+ loading: true,
+ error: false,
+ data: {},
+ },
- token: {
- value: undefined,
- error: undefined,
- loading: false,
- },
+ token: {
+ value: undefined,
+ error: undefined,
+ loading: false,
+ },
- message: {
- show: false,
- text: undefined,
- error: false,
- },
+ message: {
+ show: false,
+ text: undefined,
+ error: false,
+ },
- location: {
- protocol: window.location.protocol,
- host: window.location.host,
- },
+ location: {
+ protocol: window.location.protocol,
+ host: window.location.host,
+ },
};
const tree = new Baobab(state);
if (window) {
- window.tree = tree;
+ window.tree = tree;
}
export default tree;
diff --git a/web/src/index.js b/web/src/index.js
index 8f11a76a2..92a72f023 100644
--- a/web/src/index.js
+++ b/web/src/index.js
@@ -5,8 +5,8 @@ import { render } from "react-dom";
let root;
function init() {
- let App = require("./screens/drone").default;
- root = render(, document.body, root);
+ let App = require("./screens/drone").default;
+ root = render(, document.body, root);
}
init();
diff --git a/web/src/screens/drone.js b/web/src/screens/drone.js
index 3997e6134..574848f08 100644
--- a/web/src/screens/drone.js
+++ b/web/src/screens/drone.js
@@ -16,37 +16,37 @@ import { BrowserRouter, Route, Switch } from "react-router-dom";
import styles from "./drone.less";
if (module.hot) {
- require("preact/devtools");
+ require("preact/devtools");
}
class App extends Component {
- render() {
- return (
-
-
-
-
-
-
-
-
-
-
-
- );
- }
+ render() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
}
if (tree.exists(["user", "data"])) {
- fetchFeedOnce(tree, client);
- subscribeToFeedOnce(tree, client);
+ fetchFeedOnce(tree, client);
+ subscribeToFeedOnce(tree, client);
}
client.onerror = error => {
- console.error(error);
- if (error.status === 401) {
- tree.unset(["user", "data"]);
- }
+ console.error(error);
+ if (error.status === 401) {
+ tree.unset(["user", "data"]);
+ }
};
export default root(tree, drone(client, App));
diff --git a/web/src/screens/feed/components/list.js b/web/src/screens/feed/components/list.js
index 3efc6f2c5..4f7ab5e03 100644
--- a/web/src/screens/feed/components/list.js
+++ b/web/src/screens/feed/components/list.js
@@ -8,48 +8,48 @@ import styles from "./list.less";
import { StarIcon } from "shared/components/icons/index";
export const List = ({ children }) => (
- {children}
+ {children}
);
export class Item extends Component {
- constructor(props) {
- super(props);
+ constructor(props) {
+ super(props);
- this.handleFave = this.handleFave.bind(this);
- }
+ this.handleFave = this.handleFave.bind(this);
+ }
- handleFave(e) {
- e.preventDefault();
- this.props.onFave(this.props.item.full_name);
- }
+ handleFave(e) {
+ e.preventDefault();
+ this.props.onFave(this.props.item.full_name);
+ }
- render() {
- const { item, faved } = this.props;
- return (
-
-
-
-
-
-
{item.full_name}
-
- {item.status ? : }
-
-
+ render() {
+ const { item, faved } = this.props;
+ return (
+
+
+
+
+
+
{item.full_name}
+
+ {item.status ? : }
+
+
-
-
-
-
- );
- }
+
+
+
+
+ );
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return (
- this.props.item !== nextProps.item || this.props.faved !== nextProps.faved
- );
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return (
+ this.props.item !== nextProps.item || this.props.faved !== nextProps.faved
+ );
+ }
}
diff --git a/web/src/screens/feed/index.js b/web/src/screens/feed/index.js
index ac37bfc6a..7d6b54f57 100644
--- a/web/src/screens/feed/index.js
+++ b/web/src/screens/feed/index.js
@@ -14,173 +14,173 @@ import style from "./index.less";
import Collapsible from "react-collapsible";
const binding = (props, context) => {
- return { feed: ["feed"] };
+ return { feed: ["feed"] };
};
@inject
@branch(binding)
export default class Sidebar extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.setState({
- starred: JSON.parse(localStorage.getItem("starred") || "[]"),
- starredOpen: (localStorage.getItem("starredOpen") || "true") === "true",
- reposOpen: (localStorage.getItem("reposOpen") || "true") === "true",
- });
+ this.setState({
+ starred: JSON.parse(localStorage.getItem("starred") || "[]"),
+ starredOpen: (localStorage.getItem("starredOpen") || "true") === "true",
+ reposOpen: (localStorage.getItem("reposOpen") || "true") === "true",
+ });
- this.handleFilter = this.handleFilter.bind(this);
- this.toggleStarred = this.toggleItem.bind(this, "starredOpen");
- this.toggleAll = this.toggleItem.bind(this, "reposOpen");
- }
+ this.handleFilter = this.handleFilter.bind(this);
+ this.toggleStarred = this.toggleItem.bind(this, "starredOpen");
+ this.toggleAll = this.toggleItem.bind(this, "reposOpen");
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return (
- this.props.feed !== nextProps.feed ||
- this.state.filter !== nextState.filter ||
- this.state.starred.length !== nextState.starred.length
- );
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return (
+ this.props.feed !== nextProps.feed ||
+ this.state.filter !== nextState.filter ||
+ this.state.starred.length !== nextState.starred.length
+ );
+ }
- handleFilter(e) {
- this.setState({
- filter: e.target.value,
- });
- }
+ handleFilter(e) {
+ this.setState({
+ filter: e.target.value,
+ });
+ }
- toggleItem = item => {
- this.setState(state => {
- return { [item]: !state[item] };
- });
+ toggleItem = item => {
+ this.setState(state => {
+ return { [item]: !state[item] };
+ });
- localStorage.setItem(item, this.state[item]);
- };
+ localStorage.setItem(item, this.state[item]);
+ };
- renderFeed = (list, renderStarred) => {
- return (
-
- {list.map(item => this.renderItem(item, renderStarred))}
-
- );
- };
+ renderFeed = (list, renderStarred) => {
+ return (
+
+ {list.map(item => this.renderItem(item, renderStarred))}
+
+ );
+ };
- renderItem = (item, renderStarred) => {
- const starred = this.state.starred;
- if (renderStarred && !starred.includes(item.full_name)) {
- return null;
- }
- return (
-
-
-
- );
- };
+ renderItem = (item, renderStarred) => {
+ const starred = this.state.starred;
+ if (renderStarred && !starred.includes(item.full_name)) {
+ return null;
+ }
+ return (
+
+
+
+ );
+ };
- onFave = fullName => {
- if (!this.state.starred.includes(fullName)) {
- this.setState(state => {
- const list = state.starred.concat(fullName);
- return { starred: list };
- });
- } else {
- this.setState(state => {
- const list = state.starred.filter(v => v !== fullName);
- return { starred: list };
- });
- }
+ onFave = fullName => {
+ if (!this.state.starred.includes(fullName)) {
+ this.setState(state => {
+ const list = state.starred.concat(fullName);
+ return { starred: list };
+ });
+ } else {
+ this.setState(state => {
+ const list = state.starred.filter(v => v !== fullName);
+ return { starred: list };
+ });
+ }
- localStorage.setItem("starred", JSON.stringify(this.state.starred));
- };
+ localStorage.setItem("starred", JSON.stringify(this.state.starred));
+ };
- render() {
- const { feed } = this.props;
- const { filter } = this.state;
+ render() {
+ const { feed } = this.props;
+ const { filter } = this.state;
- const list = feed.data ? Object.values(feed.data) : [];
+ const list = feed.data ? Object.values(feed.data) : [];
- const filterFunc = item => {
- return !filter || item.full_name.indexOf(filter) !== -1;
- };
+ const filterFunc = item => {
+ return !filter || item.full_name.indexOf(filter) !== -1;
+ };
- const filtered = list.filter(filterFunc).sort(compareFeedItem);
- const starredOpen = this.state.starredOpen;
- const reposOpen = this.state.reposOpen;
- return (
-
- {LOGO}
-
- {feed.loaded === false ? (
- LOADING
- ) : feed.error ? (
- ERROR
- ) : list.length === 0 ? (
- EMPTY
- ) : (
- this.renderFeed(list, true)
- )}
-
-
-
- {feed.loaded === false ? (
- LOADING
- ) : feed.error ? (
- ERROR
- ) : list.length === 0 ? (
- EMPTY
- ) : filtered.length > 0 ? (
- this.renderFeed(filtered.sort(compareFeedItem), false)
- ) : (
- NO_MATCHES
- )}
-
-
- );
- }
+ const filtered = list.filter(filterFunc).sort(compareFeedItem);
+ const starredOpen = this.state.starredOpen;
+ const reposOpen = this.state.reposOpen;
+ return (
+
+ {LOGO}
+
+ {feed.loaded === false ? (
+ LOADING
+ ) : feed.error ? (
+ ERROR
+ ) : list.length === 0 ? (
+ EMPTY
+ ) : (
+ this.renderFeed(list, true)
+ )}
+
+
+
+ {feed.loaded === false ? (
+ LOADING
+ ) : feed.error ? (
+ ERROR
+ ) : list.length === 0 ? (
+ EMPTY
+ ) : filtered.length > 0 ? (
+ this.renderFeed(filtered.sort(compareFeedItem), false)
+ ) : (
+ NO_MATCHES
+ )}
+
+
+ );
+ }
}
const LOGO = (
-
-
-
- Woodpecker{window.DRONE_VERSION}
-
-
-
- Docs
-
-
-
-
+
+
+
+ Woodpecker{window.DRONE_VERSION}
+
+
+
+ Docs
+
+
+
+
);
const LOADING = Loading
;
@@ -190,7 +190,7 @@ const EMPTY = Your build feed is empty
;
const NO_MATCHES = No results found
;
const ERROR = (
-
- Oops. It looks like there was a problem loading your feed
-
+
+ Oops. It looks like there was a problem loading your feed
+
);
diff --git a/web/src/screens/layout.js b/web/src/screens/layout.js
index 7754fb069..785792ef0 100644
--- a/web/src/screens/layout.js
+++ b/web/src/screens/layout.js
@@ -30,198 +30,195 @@ import { Drawer, DOCK_RIGHT } from "shared/components/drawer/drawer";
import styles from "./layout.less";
const binding = (props, context) => {
- return {
- user: ["user"],
- message: ["message"],
- sidebar: ["sidebar"],
- menu: ["menu"],
- };
+ return {
+ user: ["user"],
+ message: ["message"],
+ sidebar: ["sidebar"],
+ menu: ["menu"],
+ };
};
const mapScreenSizeToProps = screenSize => {
- return {
- isTablet: screenSize["small"],
- isMobile: screenSize["mobile"],
- isDesktop: screenSize["> small"],
- };
+ return {
+ isTablet: screenSize["small"],
+ isMobile: screenSize["mobile"],
+ isDesktop: screenSize["> small"],
+ };
};
@inject
@branch(binding)
@connectScreenSize(mapScreenSizeToProps)
export default class Default extends Component {
- constructor(props, context) {
- super(props, context);
- this.state = {
- menu: false,
- feed: false,
- };
+ constructor(props, context) {
+ super(props, context);
+ this.state = {
+ menu: false,
+ feed: false,
+ };
- this.openMenu = this.openMenu.bind(this);
- this.closeMenu = this.closeMenu.bind(this);
- this.closeSnackbar = this.closeSnackbar.bind(this);
- }
+ this.openMenu = this.openMenu.bind(this);
+ this.closeMenu = this.closeMenu.bind(this);
+ this.closeSnackbar = this.closeSnackbar.bind(this);
+ }
- componentWillReceiveProps(nextProps) {
- if (nextProps.location !== this.props.location) {
- this.closeMenu(true);
- }
- }
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.location !== this.props.location) {
+ this.closeMenu(true);
+ }
+ }
- openMenu() {
- this.props.dispatch(tree => {
- tree.set(["menu"], true);
- });
- }
+ openMenu() {
+ this.props.dispatch(tree => {
+ tree.set(["menu"], true);
+ });
+ }
- closeMenu() {
- this.props.dispatch(tree => {
- tree.set(["menu"], false);
- });
- }
+ closeMenu() {
+ this.props.dispatch(tree => {
+ tree.set(["menu"], false);
+ });
+ }
- render() {
- const { user, message, menu } = this.props;
+ render() {
+ const { user, message, menu } = this.props;
- const classes = classnames(!user || !user.data ? styles.guest : null);
- return (
-
-
-
-
-
-
-
- {!user || !user.data ? (
-
- Click to Login
-
- ) : (
-
- )}
-
-
-
-
-
-
-
- {user && user.data ? (
-
-
-
- ) : (
- undefined
- )}
- {user && user.data ? (
-
- ) : (
-
- )}
-
+ const classes = classnames(!user || !user.data ? styles.guest : null);
+ return (
+
+
+
+
+
+
+
+ {!user || !user.data ? (
+
+ Click to Login
+
+ ) : (
+
+ )}
+
+
+
+
+
+
+
+ {user && user.data ? (
+
+
+
+ ) : (
+ undefined
+ )}
+ {user && user.data ? (
+
+ ) : (
+
+ )}
+
-
-
-
- BuildMenu
-
-
-
-
-
+
+
+
+
+ BuildMenu
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
- -
- Repositories
-
- -
- Token
-
-
-
-
-
-
- );
- }
+
+
+
+ -
+ Repositories
+
+ -
+ Token
+
+
+
+
+
+
+ );
+ }
- closeSnackbar() {
- this.props.dispatch(tree => {
- tree.unset(["message", "text"]);
- });
- }
+ closeSnackbar() {
+ this.props.dispatch(tree => {
+ tree.unset(["message", "text"]);
+ });
+ }
}
diff --git a/web/src/screens/login/screens/error/index.js b/web/src/screens/login/screens/error/index.js
index 7f398b297..d7a65bb97 100644
--- a/web/src/screens/login/screens/error/index.js
+++ b/web/src/screens/login/screens/error/index.js
@@ -7,28 +7,28 @@ import styles from "./index.less";
const DEFAULT_ERROR = "The system failed to process your Login request.";
class Error extends Component {
- render() {
- const parsed = queryString.parse(window.location.search);
- let error = DEFAULT_ERROR;
+ render() {
+ const parsed = queryString.parse(window.location.search);
+ let error = DEFAULT_ERROR;
- switch (parsed.code || parsed.error) {
- case "oauth_error":
- break;
- case "access_denied":
- break;
- }
+ switch (parsed.code || parsed.error) {
+ case "oauth_error":
+ break;
+ case "access_denied":
+ break;
+ }
- return (
-
- );
- }
+ return (
+
+ );
+ }
}
export default Error;
diff --git a/web/src/screens/login/screens/form/index.js b/web/src/screens/login/screens/form/index.js
index eaa970e3c..7434ccdb6 100644
--- a/web/src/screens/login/screens/form/index.js
+++ b/web/src/screens/login/screens/form/index.js
@@ -3,19 +3,19 @@ import React from "react";
import styles from "./index.less";
const LoginForm = props => (
-
+
);
export default LoginForm;
diff --git a/web/src/screens/redirect.js b/web/src/screens/redirect.js
index a8a01e08c..1b36f7d38 100644
--- a/web/src/screens/redirect.js
+++ b/web/src/screens/redirect.js
@@ -4,38 +4,38 @@ import { branch } from "baobab-react/higher-order";
import { Message } from "shared/components/sync";
const binding = (props, context) => {
- return {
- feed: ["feed"],
- user: ["user", "data"],
- syncing: ["user", "syncing"],
- };
+ return {
+ feed: ["feed"],
+ user: ["user", "data"],
+ syncing: ["user", "syncing"],
+ };
};
@branch(binding)
export default class RedirectRoot extends Component {
- componentWillReceiveProps(nextProps) {
- const { user } = nextProps;
- if (!user && window) {
- window.location.href = "/login?url=" + window.location.href;
- }
- }
+ componentWillReceiveProps(nextProps) {
+ const { user } = nextProps;
+ if (!user && window) {
+ window.location.href = "/login?url=" + window.location.href;
+ }
+ }
- render() {
- const { user, syncing } = this.props;
- const { latest, loaded } = this.props.feed;
+ render() {
+ const { user, syncing } = this.props;
+ const { latest, loaded } = this.props.feed;
- return !loaded && syncing ? (
-
- ) : !loaded ? (
- undefined
- ) : !user ? (
- undefined
- ) : !latest ? (
-
- ) : !latest.number ? (
-
- ) : (
-
- );
- }
+ return !loaded && syncing ? (
+
+ ) : !loaded ? (
+ undefined
+ ) : !user ? (
+ undefined
+ ) : !latest ? (
+
+ ) : !latest.number ? (
+
+ ) : (
+
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/build/components/approval.js b/web/src/screens/repo/screens/build/components/approval.js
index 1a19321a9..9936cfc4b 100644
--- a/web/src/screens/repo/screens/build/components/approval.js
+++ b/web/src/screens/repo/screens/build/components/approval.js
@@ -2,9 +2,9 @@ import React from "react";
import style from "./approval.less";
export const Approval = ({ onapprove, ondecline }) => (
-
-
Pipeline execution is blocked pending administrator approval
-
-
-
+
+
Pipeline execution is blocked pending administrator approval
+
+
+
);
diff --git a/web/src/screens/repo/screens/build/components/details.js b/web/src/screens/repo/screens/build/components/details.js
index c1f05ec1e..6917feea5 100644
--- a/web/src/screens/repo/screens/build/components/details.js
+++ b/web/src/screens/repo/screens/build/components/details.js
@@ -7,36 +7,36 @@ import { StatusLabel } from "shared/components/status";
import styles from "./details.less";
export class Details extends Component {
- render() {
- const { build } = this.props;
+ render() {
+ const { build } = this.props;
- return (
-
-
+ return (
+
+
-
+
-
+
-
-
- );
- }
+
+
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/build/components/elapsed.js b/web/src/screens/repo/screens/build/components/elapsed.js
index 0d94e5753..e3b7ec18c 100644
--- a/web/src/screens/repo/screens/build/components/elapsed.js
+++ b/web/src/screens/repo/screens/build/components/elapsed.js
@@ -1,48 +1,48 @@
import React, { Component } from "react";
export class Elapsed extends Component {
- constructor(props, context) {
- super(props);
+ constructor(props, context) {
+ super(props);
- this.state = {
- elapsed: 0,
- };
+ this.state = {
+ elapsed: 0,
+ };
- this.tick = this.tick.bind(this);
- }
+ this.tick = this.tick.bind(this);
+ }
- componentDidMount() {
- this.timer = setInterval(this.tick, 1000);
- }
+ componentDidMount() {
+ this.timer = setInterval(this.tick, 1000);
+ }
- componentWillUnmount() {
- clearInterval(this.timer);
- }
+ componentWillUnmount() {
+ clearInterval(this.timer);
+ }
- tick() {
- const { start } = this.props;
- const stop = ~~(Date.now() / 1000);
- this.setState({
- elapsed: stop - start,
- });
- }
+ tick() {
+ const { start } = this.props;
+ const stop = ~~(Date.now() / 1000);
+ this.setState({
+ elapsed: stop - start,
+ });
+ }
- render() {
- const { elapsed } = this.state;
- const date = new Date(null);
- date.setSeconds(elapsed);
- return (
-
- );
- }
+ render() {
+ const { elapsed } = this.state;
+ const date = new Date(null);
+ date.setSeconds(elapsed);
+ return (
+
+ );
+ }
}
/*
@@ -53,11 +53,11 @@ export class Elapsed extends Component {
* @return {string}
*/
export const formatTime = (end, start) => {
- const diff = end - start;
- const date = new Date(null);
- date.setSeconds(diff);
+ const diff = end - start;
+ const date = new Date(null);
+ date.setSeconds(diff);
- return diff > 3600
- ? date.toISOString().substr(11, 8)
- : date.toISOString().substr(14, 5);
+ return diff > 3600
+ ? date.toISOString().substr(11, 8)
+ : date.toISOString().substr(14, 5);
};
diff --git a/web/src/screens/repo/screens/build/components/procs.js b/web/src/screens/repo/screens/build/components/procs.js
index a32392139..a2b9c9f4e 100644
--- a/web/src/screens/repo/screens/build/components/procs.js
+++ b/web/src/screens/repo/screens/build/components/procs.js
@@ -8,69 +8,69 @@ import { default as Status, StatusText } from "shared/components/status";
import styles from "./procs.less";
const renderEnviron = data => {
- return (
-
- {data[0]}={data[1]}
-
- );
+ return (
+
+ {data[0]}={data[1]}
+
+ );
};
const ProcListHolder = ({ vars, renderName, children }) => (
-
- {renderName && vars.name !== "drone" ? (
-
-
-
- ) : null}
- {vars.environ ? (
-
-
-
- ) : null}
- {children}
-
+
+ {renderName && vars.name !== "drone" ? (
+
+
+
+ ) : null}
+ {vars.environ ? (
+
+
+
+ ) : null}
+ {children}
+
);
export class ProcList extends Component {
- render() {
- const { repo, build, rootProc, selectedProc, renderName } = this.props;
- return (
-
- {this.props.rootProc.children.map(function(child) {
- return (
-
-
-
- );
- })}
-
- );
- }
+ render() {
+ const { repo, build, rootProc, selectedProc, renderName } = this.props;
+ return (
+
+ {this.props.rootProc.children.map(function(child) {
+ return (
+
+
+
+ );
+ })}
+
+ );
+ }
}
export const ProcListItem = ({ name, start, finish, state, selected }) => (
-
-
{name}
- {finish ? (
-
- ) : (
-
- )}
-
-
-
-
+
+
{name}
+ {finish ? (
+
+ ) : (
+
+ )}
+
+
+
+
);
diff --git a/web/src/screens/repo/screens/build/index.js b/web/src/screens/repo/screens/build/index.js
index 13effc7a7..c63c96a03 100644
--- a/web/src/screens/repo/screens/build/index.js
+++ b/web/src/screens/repo/screens/build/index.js
@@ -3,9 +3,9 @@ import { Link } from "react-router-dom";
import { fetchBuild, approveBuild, declineBuild } from "shared/utils/build";
import {
- STATUS_BLOCKED,
- STATUS_DECLINED,
- STATUS_ERROR,
+ STATUS_BLOCKED,
+ STATUS_DECLINED,
+ STATUS_ERROR,
} from "shared/constants/status";
import { findChildProcess } from "shared/utils/proc";
@@ -23,235 +23,235 @@ import Output from "./logs";
import styles from "./index.less";
const binding = (props, context) => {
- const { owner, repo, build } = props.match.params;
- const slug = `${owner}/${repo}`;
- const number = parseInt(build);
+ const { owner, repo, build } = props.match.params;
+ const slug = `${owner}/${repo}`;
+ const number = parseInt(build);
- return {
- repo: ["repos", "data", slug],
- build: ["builds", "data", slug, number],
- };
+ return {
+ repo: ["repos", "data", slug],
+ build: ["builds", "data", slug, number],
+ };
};
@inject
@branch(binding)
export default class BuildLogs extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.handleApprove = this.handleApprove.bind(this);
- this.handleDecline = this.handleDecline.bind(this);
- }
+ this.handleApprove = this.handleApprove.bind(this);
+ this.handleDecline = this.handleDecline.bind(this);
+ }
- componentWillMount() {
- this.synchronize(this.props);
- }
+ componentWillMount() {
+ this.synchronize(this.props);
+ }
- handleApprove() {
- const { repo, build, drone } = this.props;
- this.props.dispatch(
- approveBuild,
- drone,
- repo.owner,
- repo.name,
- build.number,
- );
- }
+ handleApprove() {
+ const { repo, build, drone } = this.props;
+ this.props.dispatch(
+ approveBuild,
+ drone,
+ repo.owner,
+ repo.name,
+ build.number,
+ );
+ }
- handleDecline() {
- const { repo, build, drone } = this.props;
- this.props.dispatch(
- declineBuild,
- drone,
- repo.owner,
- repo.name,
- build.number,
- );
- }
+ handleDecline() {
+ const { repo, build, drone } = this.props;
+ this.props.dispatch(
+ declineBuild,
+ drone,
+ repo.owner,
+ repo.name,
+ build.number,
+ );
+ }
- componentWillUpdate(nextProps) {
- if (this.props.match.url !== nextProps.match.url) {
- this.synchronize(nextProps);
- }
- }
+ componentWillUpdate(nextProps) {
+ if (this.props.match.url !== nextProps.match.url) {
+ this.synchronize(nextProps);
+ }
+ }
- synchronize(props) {
- if (!props.repo) {
- this.props.dispatch(
- fetchRepository,
- props.drone,
- props.match.params.owner,
- props.match.params.repo,
- );
- }
- if (!props.build || !props.build.procs) {
- this.props.dispatch(
- fetchBuild,
- props.drone,
- props.match.params.owner,
- props.match.params.repo,
- props.match.params.build,
- );
- }
- }
+ synchronize(props) {
+ if (!props.repo) {
+ this.props.dispatch(
+ fetchRepository,
+ props.drone,
+ props.match.params.owner,
+ props.match.params.repo,
+ );
+ }
+ if (!props.build || !props.build.procs) {
+ this.props.dispatch(
+ fetchBuild,
+ props.drone,
+ props.match.params.owner,
+ props.match.params.repo,
+ props.match.params.build,
+ );
+ }
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return this.props !== nextProps;
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return this.props !== nextProps;
+ }
- render() {
- const { repo, build } = this.props;
+ render() {
+ const { repo, build } = this.props;
- if (!build || !repo) {
- return this.renderLoading();
- }
+ if (!build || !repo) {
+ return this.renderLoading();
+ }
- if (build.status === STATUS_DECLINED || build.status === STATUS_ERROR) {
- return this.renderError();
- }
+ if (build.status === STATUS_DECLINED || build.status === STATUS_ERROR) {
+ return this.renderError();
+ }
- if (build.status === STATUS_BLOCKED) {
- return this.renderBlocked();
- }
+ if (build.status === STATUS_BLOCKED) {
+ return this.renderBlocked();
+ }
- if (!build.procs) {
- return this.renderLoading();
- }
+ if (!build.procs) {
+ return this.renderLoading();
+ }
- return this.renderSimple();
- }
+ return this.renderSimple();
+ }
- renderLoading() {
- return (
-
- );
- }
+ renderLoading() {
+ return (
+
+ );
+ }
- renderBlocked() {
- const { build } = this.props;
- return (
-
- );
- }
+ renderBlocked() {
+ const { build } = this.props;
+ return (
+
+ );
+ }
- renderError() {
- const { build } = this.props;
- return (
-
-
-
-
-
-
-
- {build.status === STATUS_ERROR ? (
- build.error
- ) : (
- "Pipeline execution was declined"
- )}
-
-
-
-
- );
- }
+ renderError() {
+ const { build } = this.props;
+ return (
+
+
+
+
+
+
+
+ {build.status === STATUS_ERROR ? (
+ build.error
+ ) : (
+ "Pipeline execution was declined"
+ )}
+
+
+
+
+ );
+ }
- highlightedLine() {
- if (location.hash.startsWith("#L")) {
- return parseInt(location.hash.substr(2)) - 1;
- }
+ highlightedLine() {
+ if (location.hash.startsWith("#L")) {
+ return parseInt(location.hash.substr(2)) - 1;
+ }
- return undefined;
- }
+ return undefined;
+ }
- renderSimple() {
- // if (nextProps.build.procs[0].children !== undefined){
- // return null;
- // }
+ renderSimple() {
+ // if (nextProps.build.procs[0].children !== undefined){
+ // return null;
+ // }
- const { repo, build, match } = this.props;
- const selectedProc = match.params.proc
- ? findChildProcess(build.procs, match.params.proc)
- : build.procs[0].children[0];
- const selectedProcParent = findChildProcess(build.procs, selectedProc.ppid);
- const highlighted = this.highlightedLine();
+ const { repo, build, match } = this.props;
+ const selectedProc = match.params.proc
+ ? findChildProcess(build.procs, match.params.proc)
+ : build.procs[0].children[0];
+ const selectedProcParent = findChildProcess(build.procs, selectedProc.ppid);
+ const highlighted = this.highlightedLine();
- return (
-
-
-
-
-
- {build.procs.map(function(rootProc) {
- return (
-
- );
- })}
-
-
-
- {selectedProc && selectedProc.error ? (
-
{selectedProc.error}
- ) : null}
- {selectedProcParent && selectedProcParent.error ? (
-
{selectedProcParent.error}
- ) : null}
-
-
-
-
- );
- }
+ return (
+
+
+
+
+
+ {build.procs.map(function(rootProc) {
+ return (
+
+ );
+ })}
+
+
+
+ {selectedProc && selectedProc.error ? (
+
{selectedProc.error}
+ ) : null}
+ {selectedProcParent && selectedProcParent.error ? (
+
{selectedProcParent.error}
+ ) : null}
+
+
+
+
+ );
+ }
}
export class BuildLogsTitle extends Component {
- render() {
- const { owner, repo, build } = this.props.match.params;
- return (
-
- {owner} / {repo}
- ,
- SEPARATOR,
-
- {build}
- ,
- ]}
- />
- );
- }
+ render() {
+ const { owner, repo, build } = this.props.match.params;
+ return (
+
+ {owner} / {repo}
+ ,
+ SEPARATOR,
+
+ {build}
+ ,
+ ]}
+ />
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/build/logs/components/anchor.js b/web/src/screens/repo/screens/build/logs/components/anchor.js
index 5c2179a93..17370fcd8 100644
--- a/web/src/screens/repo/screens/build/logs/components/anchor.js
+++ b/web/src/screens/repo/screens/build/logs/components/anchor.js
@@ -7,9 +7,9 @@ export const Top = () => ;
export const Bottom = () => ;
export const scrollToTop = () => {
- document.querySelector(`.${styles.top}`).scrollIntoView();
+ document.querySelector(`.${styles.top}`).scrollIntoView();
};
export const scrollToBottom = () => {
- document.querySelector(`.${styles.bottom}`).scrollIntoView();
+ document.querySelector(`.${styles.bottom}`).scrollIntoView();
};
diff --git a/web/src/screens/repo/screens/build/logs/components/term.js b/web/src/screens/repo/screens/build/logs/components/term.js
index da9e1244e..6fc74d5be 100644
--- a/web/src/screens/repo/screens/build/logs/components/term.js
+++ b/web/src/screens/repo/screens/build/logs/components/term.js
@@ -7,81 +7,81 @@ let formatter = new AnsiUp();
formatter.use_classes = true;
class Term extends Component {
- render() {
- const { lines, exitcode, highlighted } = this.props;
- return (
-
- {lines.map(line => renderTermLine(line, highlighted))}
- {exitcode !== undefined ? renderExitCode(exitcode) : undefined}
-
- );
- }
+ render() {
+ const { lines, exitcode, highlighted } = this.props;
+ return (
+
+ {lines.map(line => renderTermLine(line, highlighted))}
+ {exitcode !== undefined ? renderExitCode(exitcode) : undefined}
+
+ );
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return (
- this.props.lines !== nextProps.lines ||
- this.props.exitcode !== nextProps.exitcode ||
- this.props.highlighted !== nextProps.highlighted
- );
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return (
+ this.props.lines !== nextProps.lines ||
+ this.props.exitcode !== nextProps.exitcode ||
+ this.props.highlighted !== nextProps.highlighted
+ );
+ }
}
class TermLine extends Component {
- render() {
- const { line, highlighted } = this.props;
- return (
- (this.ref = ref) : null}
- >
-
-
- {line.pos + 1}
-
-
-
-
{line.time || 0}s
-
- );
- }
+ render() {
+ const { line, highlighted } = this.props;
+ return (
+ (this.ref = ref) : null}
+ >
+
+
+ {line.pos + 1}
+
+
+
+
{line.time || 0}s
+
+ );
+ }
- componentDidMount() {
- if (this.ref !== undefined) {
- scrollToRef(this.ref);
- }
- }
+ componentDidMount() {
+ if (this.ref !== undefined) {
+ scrollToRef(this.ref);
+ }
+ }
- get colored() {
- return formatter.ansi_to_html(this.props.line.out || "");
- }
+ get colored() {
+ return formatter.ansi_to_html(this.props.line.out || "");
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return (
- this.props.line.out !== nextProps.line.out ||
- this.props.highlighted !== nextProps.highlighted
- );
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return (
+ this.props.line.out !== nextProps.line.out ||
+ this.props.highlighted !== nextProps.highlighted
+ );
+ }
}
const renderTermLine = (line, highlighted) => {
- return ;
+ return ;
};
const renderExitCode = code => {
- return exit code {code}
;
+ return exit code {code}
;
};
const TermError = () => {
- return (
-
- Oops. There was a problem loading the logs.
-
- );
+ return (
+
+ Oops. There was a problem loading the logs.
+
+ );
};
const TermLoading = () => {
- return Loading ...
;
+ return Loading ...
;
};
const scrollToRef = ref => window.scrollTo(0, ref.offsetTop - 100);
diff --git a/web/src/screens/repo/screens/build/logs/index.js b/web/src/screens/repo/screens/build/logs/index.js
index f9ae79926..384ab3af2 100644
--- a/web/src/screens/repo/screens/build/logs/index.js
+++ b/web/src/screens/repo/screens/build/logs/index.js
@@ -14,104 +14,104 @@ import { ExpandIcon, PauseIcon, PlayIcon } from "shared/components/icons/index";
import styles from "./index.less";
const binding = (props, context) => {
- const { owner, repo, build } = props.match.params;
- const slug = repositorySlug(owner, repo);
- const number = parseInt(build);
- const pid = parseInt(props.proc.pid);
+ const { owner, repo, build } = props.match.params;
+ const slug = repositorySlug(owner, repo);
+ const number = parseInt(build);
+ const pid = parseInt(props.proc.pid);
- return {
- logs: ["logs", "data", slug, number, pid, "data"],
- eof: ["logs", "data", slug, number, pid, "eof"],
- loading: ["logs", "data", slug, number, pid, "loading"],
- error: ["logs", "data", slug, number, pid, "error"],
- follow: ["logs", "follow"],
- };
+ return {
+ logs: ["logs", "data", slug, number, pid, "data"],
+ eof: ["logs", "data", slug, number, pid, "eof"],
+ loading: ["logs", "data", slug, number, pid, "loading"],
+ error: ["logs", "data", slug, number, pid, "error"],
+ follow: ["logs", "follow"],
+ };
};
@inject
@branch(binding)
export default class Output extends Component {
- constructor(props, context) {
- super(props, context);
- this.handleFollow = this.handleFollow.bind(this);
- }
+ constructor(props, context) {
+ super(props, context);
+ this.handleFollow = this.handleFollow.bind(this);
+ }
- componentWillMount() {
- if (this.props.proc) {
- this.componentWillUpdate(this.props);
- }
- }
+ componentWillMount() {
+ if (this.props.proc) {
+ this.componentWillUpdate(this.props);
+ }
+ }
- componentWillUpdate(nextProps) {
- const { loading, logs, eof, error } = nextProps;
- const routeChange = this.props.match.url !== nextProps.match.url;
+ componentWillUpdate(nextProps) {
+ const { loading, logs, eof, error } = nextProps;
+ const routeChange = this.props.match.url !== nextProps.match.url;
- if (loading || error || (logs && eof)) {
- return;
- }
+ if (loading || error || (logs && eof)) {
+ return;
+ }
- if (assertProcFinished(nextProps.proc)) {
- return this.props.dispatch(
- fetchLogs,
- nextProps.drone,
- nextProps.match.params.owner,
- nextProps.match.params.repo,
- nextProps.build.number,
- nextProps.proc.pid,
- );
- }
+ if (assertProcFinished(nextProps.proc)) {
+ return this.props.dispatch(
+ fetchLogs,
+ nextProps.drone,
+ nextProps.match.params.owner,
+ nextProps.match.params.repo,
+ nextProps.build.number,
+ nextProps.proc.pid,
+ );
+ }
- if (assertProcRunning(nextProps.proc) && (!logs || routeChange)) {
- this.props.dispatch(
- subscribeToLogs,
- nextProps.drone,
- nextProps.match.params.owner,
- nextProps.match.params.repo,
- nextProps.build.number,
- nextProps.proc,
- );
- }
- }
+ if (assertProcRunning(nextProps.proc) && (!logs || routeChange)) {
+ this.props.dispatch(
+ subscribeToLogs,
+ nextProps.drone,
+ nextProps.match.params.owner,
+ nextProps.match.params.repo,
+ nextProps.build.number,
+ nextProps.proc,
+ );
+ }
+ }
- componentDidUpdate() {
- if (this.props.follow) {
- scrollToBottom();
- }
- }
+ componentDidUpdate() {
+ if (this.props.follow) {
+ scrollToBottom();
+ }
+ }
- handleFollow() {
- this.props.dispatch(toggleLogs, !this.props.follow);
- }
+ handleFollow() {
+ this.props.dispatch(toggleLogs, !this.props.follow);
+ }
- render() {
- const { logs, error, proc, loading, follow, highlighted } = this.props;
+ render() {
+ const { logs, error, proc, loading, follow, highlighted } = this.props;
- if (loading || !proc) {
- return ;
- }
+ if (loading || !proc) {
+ return ;
+ }
- if (error) {
- return ;
- }
+ if (error) {
+ return ;
+ }
- return (
-
- );
- }
+ return (
+
+ );
+ }
}
/**
@@ -119,25 +119,25 @@ export default class Output extends Component {
* to follow, unfollow, scroll to top and scroll to bottom.
*/
const Actions = ({ following, running, onfollow, onunfollow }) => (
-
- {running && !following ? (
-
- ) : null}
+
+ {running && !following ? (
+
+ ) : null}
- {running && following ? (
-
- ) : null}
+ {running && following ? (
+
+ ) : null}
-
+
-
-
+
+
);
diff --git a/web/src/screens/repo/screens/build/menu.js b/web/src/screens/repo/screens/build/menu.js
index 32a865c37..51780d055 100644
--- a/web/src/screens/repo/screens/build/menu.js
+++ b/web/src/screens/repo/screens/build/menu.js
@@ -10,69 +10,69 @@ import { branch } from "baobab-react/higher-order";
import { inject } from "config/client/inject";
const binding = (props, context) => {
- const { owner, repo, build } = props.match.params;
- const slug = repositorySlug(owner, repo);
- const number = parseInt(build);
- return {
- repo: ["repos", "data", slug],
- build: ["builds", "data", slug, number],
- };
+ const { owner, repo, build } = props.match.params;
+ const slug = repositorySlug(owner, repo);
+ const number = parseInt(build);
+ return {
+ repo: ["repos", "data", slug],
+ build: ["builds", "data", slug, number],
+ };
};
@inject
@branch(binding)
export default class BuildMenu extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.handleCancel = this.handleCancel.bind(this);
- this.handleRestart = this.handleRestart.bind(this);
- }
+ this.handleCancel = this.handleCancel.bind(this);
+ this.handleRestart = this.handleRestart.bind(this);
+ }
- handleRestart() {
- const { dispatch, drone, repo, build } = this.props;
- dispatch(restartBuild, drone, repo.owner, repo.name, build.number);
- }
+ handleRestart() {
+ const { dispatch, drone, repo, build } = this.props;
+ dispatch(restartBuild, drone, repo.owner, repo.name, build.number);
+ }
- handleCancel() {
- const { dispatch, drone, repo, build, match } = this.props;
- const proc = findChildProcess(build.procs, match.params.proc || 2);
+ handleCancel() {
+ const { dispatch, drone, repo, build, match } = this.props;
+ const proc = findChildProcess(build.procs, match.params.proc || 2);
- dispatch(
- cancelBuild,
- drone,
- repo.owner,
- repo.name,
- build.number,
- proc.ppid,
- );
- }
+ dispatch(
+ cancelBuild,
+ drone,
+ repo.owner,
+ repo.name,
+ build.number,
+ proc.ppid,
+ );
+ }
- render() {
- const { build } = this.props;
+ render() {
+ const { build } = this.props;
- const rightSide = !build ? (
- undefined
- ) : (
-
- {build.status === "pending" || build.status === "running" ? (
-
- ) : (
-
- )}
-
- );
+ const rightSide = !build ? (
+ undefined
+ ) : (
+
+ {build.status === "pending" || build.status === "running" ? (
+
+ ) : (
+
+ )}
+
+ );
- return (
-
-
-
- );
- }
+ return (
+
+
+
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/builds/components/list.js b/web/src/screens/repo/screens/builds/components/list.js
index b5a1eaa6f..4dd30e974 100644
--- a/web/src/screens/repo/screens/builds/components/list.js
+++ b/web/src/screens/repo/screens/builds/components/list.js
@@ -8,48 +8,48 @@ import BuildMeta from "shared/components/build_event";
import styles from "./list.less";
export const List = ({ children }) => (
- {children}
+ {children}
);
export class Item extends Component {
- render() {
- const { build } = this.props;
- return (
-
-
-
-
+ render() {
+ const { build } = this.props;
+ return (
+
+
+
+
-
-
{build.message.split("\n")[0]}
-
+
+
{build.message.split("\n")[0]}
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
-
-
-
-
- );
- }
+
+
+
+
+
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/builds/header.js b/web/src/screens/repo/screens/builds/header.js
index eb36f3664..e82650c6f 100644
--- a/web/src/screens/repo/screens/builds/header.js
+++ b/web/src/screens/repo/screens/builds/header.js
@@ -3,18 +3,18 @@ import { Link } from "react-router-dom";
import Breadcrumb from "shared/components/breadcrumb";
export default class Header extends Component {
- render() {
- const { owner, repo } = this.props.match.params;
- return (
-
-
- {owner} / {repo}
- ,
- ]}
- />
-
- );
- }
+ render() {
+ const { owner, repo } = this.props.match.params;
+ return (
+
+
+ {owner} / {repo}
+ ,
+ ]}
+ />
+
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/builds/index.js b/web/src/screens/repo/screens/builds/index.js
index e2aa0008d..a6ebb867d 100644
--- a/web/src/screens/repo/screens/builds/index.js
+++ b/web/src/screens/repo/screens/builds/index.js
@@ -11,114 +11,114 @@ import { inject } from "config/client/inject";
import styles from "./index.less";
const binding = (props, context) => {
- const { owner, repo } = props.match.params;
- const slug = repositorySlug(owner, repo);
- return {
- repo: ["repos", "data", slug],
- builds: ["builds", "data", slug],
- loaded: ["builds", "loaded"],
- error: ["builds", "error"],
- };
+ const { owner, repo } = props.match.params;
+ const slug = repositorySlug(owner, repo);
+ return {
+ repo: ["repos", "data", slug],
+ builds: ["builds", "data", slug],
+ loaded: ["builds", "loaded"],
+ error: ["builds", "error"],
+ };
};
@inject
@branch(binding)
export default class Main extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.fetchNextBuildPage = this.fetchNextBuildPage.bind(this);
- }
+ this.fetchNextBuildPage = this.fetchNextBuildPage.bind(this);
+ }
- componentWillMount() {
- this.synchronize(this.props);
- }
+ componentWillMount() {
+ this.synchronize(this.props);
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return (
- this.props.repo !== nextProps.repo ||
- (nextProps.builds !== undefined &&
- this.props.builds !== nextProps.builds) ||
- this.props.error !== nextProps.error ||
- this.props.loaded !== nextProps.loaded
- );
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return (
+ this.props.repo !== nextProps.repo ||
+ (nextProps.builds !== undefined &&
+ this.props.builds !== nextProps.builds) ||
+ this.props.error !== nextProps.error ||
+ this.props.loaded !== nextProps.loaded
+ );
+ }
- componentWillUpdate(nextProps) {
- if (this.props.match.url !== nextProps.match.url) {
- this.synchronize(nextProps);
- }
- }
+ componentWillUpdate(nextProps) {
+ if (this.props.match.url !== nextProps.match.url) {
+ this.synchronize(nextProps);
+ }
+ }
- componentDidUpdate(prevProps) {
- if (this.props.location !== prevProps.location) {
- window.scrollTo(0, 0);
- }
- }
+ componentDidUpdate(prevProps) {
+ if (this.props.location !== prevProps.location) {
+ window.scrollTo(0, 0);
+ }
+ }
- synchronize(props) {
- const { drone, dispatch, match, repo } = props;
+ synchronize(props) {
+ const { drone, dispatch, match, repo } = props;
- if (!repo) {
- dispatch(fetchRepository, drone, match.params.owner, match.params.repo);
- }
+ if (!repo) {
+ dispatch(fetchRepository, drone, match.params.owner, match.params.repo);
+ }
- dispatch(fetchBuildList, drone, match.params.owner, match.params.repo);
- }
+ dispatch(fetchBuildList, drone, match.params.owner, match.params.repo);
+ }
- fetchNextBuildPage(buildList) {
- const { drone, dispatch, match } = this.props;
- const page = Math.floor(buildList.length / 50) + 1;
+ fetchNextBuildPage(buildList) {
+ const { drone, dispatch, match } = this.props;
+ const page = Math.floor(buildList.length / 50) + 1;
- dispatch(
- fetchBuildList,
- drone,
- match.params.owner,
- match.params.repo,
- page,
- );
- }
+ dispatch(
+ fetchBuildList,
+ drone,
+ match.params.owner,
+ match.params.repo,
+ page,
+ );
+ }
- render() {
- const { repo, builds, loaded, error } = this.props;
- const list = Object.values(builds || {});
+ render() {
+ const { repo, builds, loaded, error } = this.props;
+ const list = Object.values(builds || {});
- function renderBuild(build) {
- return (
-
-
-
- );
- }
+ function renderBuild(build) {
+ return (
+
+
+
+ );
+ }
- if (error) {
- return Not Found
;
- }
+ if (error) {
+ return Not Found
;
+ }
- if (!loaded && list.length === 0) {
- return Loading
;
- }
+ if (!loaded && list.length === 0) {
+ return Loading
;
+ }
- if (!repo) {
- return Loading
;
- }
+ if (!repo) {
+ return Loading
;
+ }
- if (list.length === 0) {
- return Build list is empty
;
- }
+ if (list.length === 0) {
+ return Build list is empty
;
+ }
- return (
-
- {list.sort(compareBuild).map(renderBuild)}
- {list.length < repo.last_build && (
-
- )}
-
- );
- }
+ return (
+
+ {list.sort(compareBuild).map(renderBuild)}
+ {list.length < repo.last_build && (
+
+ )}
+
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/builds/menu.js b/web/src/screens/repo/screens/builds/menu.js
index c1a0ef4ad..71788860d 100644
--- a/web/src/screens/repo/screens/builds/menu.js
+++ b/web/src/screens/repo/screens/builds/menu.js
@@ -2,14 +2,14 @@ import React, { Component } from "react";
import Menu from "shared/components/menu";
export default class RepoMenu extends Component {
- render() {
- const { owner, repo } = this.props.match.params;
- const menu = [
- { to: `/${owner}/${repo}`, label: "Builds" },
- { to: `/${owner}/${repo}/settings/secrets`, label: "Secrets" },
- { to: `/${owner}/${repo}/settings/registry`, label: "Registry" },
- { to: `/${owner}/${repo}/settings`, label: "Settings" },
- ];
- return ;
- }
+ render() {
+ const { owner, repo } = this.props.match.params;
+ const menu = [
+ { to: `/${owner}/${repo}`, label: "Builds" },
+ { to: `/${owner}/${repo}/settings/secrets`, label: "Secrets" },
+ { to: `/${owner}/${repo}/settings/registry`, label: "Registry" },
+ { to: `/${owner}/${repo}/settings`, label: "Settings" },
+ ];
+ return ;
+ }
}
diff --git a/web/src/screens/repo/screens/registry/components/form.js b/web/src/screens/repo/screens/registry/components/form.js
index 4354320f5..b9e71592f 100644
--- a/web/src/screens/repo/screens/registry/components/form.js
+++ b/web/src/screens/repo/screens/registry/components/form.js
@@ -2,79 +2,79 @@ import React, { Component } from "react";
import styles from "./form.less";
export class Form extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.state = {
- address: "",
- username: "",
- password: "",
- };
+ this.state = {
+ address: "",
+ username: "",
+ password: "",
+ };
- this._handleAddressChange = this._handleAddressChange.bind(this);
- this._handleUsernameChange = this._handleUsernameChange.bind(this);
- this._handlePasswordChange = this._handlePasswordChange.bind(this);
- this._handleSubmit = this._handleSubmit.bind(this);
+ this._handleAddressChange = this._handleAddressChange.bind(this);
+ this._handleUsernameChange = this._handleUsernameChange.bind(this);
+ this._handlePasswordChange = this._handlePasswordChange.bind(this);
+ this._handleSubmit = this._handleSubmit.bind(this);
- this.clear = this.clear.bind(this);
- }
+ this.clear = this.clear.bind(this);
+ }
- _handleAddressChange(event) {
- this.setState({ address: event.target.value });
- }
+ _handleAddressChange(event) {
+ this.setState({ address: event.target.value });
+ }
- _handleUsernameChange(event) {
- this.setState({ username: event.target.value });
- }
+ _handleUsernameChange(event) {
+ this.setState({ username: event.target.value });
+ }
- _handlePasswordChange(event) {
- this.setState({ password: event.target.value });
- }
+ _handlePasswordChange(event) {
+ this.setState({ password: event.target.value });
+ }
- _handleSubmit() {
- const { onsubmit } = this.props;
+ _handleSubmit() {
+ const { onsubmit } = this.props;
- const detail = {
- address: this.state.address,
- username: this.state.username,
- password: this.state.password,
- };
+ const detail = {
+ address: this.state.address,
+ username: this.state.username,
+ password: this.state.password,
+ };
- onsubmit({ detail });
- this.clear();
- }
+ onsubmit({ detail });
+ this.clear();
+ }
- clear() {
- this.setState({ address: "" });
- this.setState({ username: "" });
- this.setState({ password: "" });
- }
+ clear() {
+ this.setState({ address: "" });
+ this.setState({ username: "" });
+ this.setState({ password: "" });
+ }
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/registry/components/list.js b/web/src/screens/repo/screens/registry/components/list.js
index 66b8b971c..db084782b 100644
--- a/web/src/screens/repo/screens/registry/components/list.js
+++ b/web/src/screens/repo/screens/registry/components/list.js
@@ -2,14 +2,14 @@ import React from "react";
import styles from "./list.less";
export const List = ({ children }) => (
- {children}
+ {children}
);
export const Item = props => (
-
-
{props.name}
-
-
-
-
+
+
{props.name}
+
+
+
+
);
diff --git a/web/src/screens/repo/screens/registry/index.js b/web/src/screens/repo/screens/registry/index.js
index d8d78965f..fe6fbd0e0 100644
--- a/web/src/screens/repo/screens/registry/index.js
+++ b/web/src/screens/repo/screens/registry/index.js
@@ -2,9 +2,9 @@ import React, { Component } from "react";
import { repositorySlug } from "shared/utils/repository";
import {
- fetchRegistryList,
- createRegistry,
- deleteRegistry,
+ fetchRegistryList,
+ createRegistry,
+ deleteRegistry,
} from "shared/utils/registry";
import { branch } from "baobab-react/higher-order";
@@ -15,89 +15,89 @@ import { List, Item, Form } from "./components";
import styles from "./index.less";
const binding = (props, context) => {
- const { owner, repo } = props.match.params;
- const slug = repositorySlug(owner, repo);
- return {
- loaded: ["registry", "loaded"],
- registries: ["registry", "data", slug],
- };
+ const { owner, repo } = props.match.params;
+ const slug = repositorySlug(owner, repo);
+ return {
+ loaded: ["registry", "loaded"],
+ registries: ["registry", "data", slug],
+ };
};
@inject
@branch(binding)
export default class RepoRegistry extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.handleDelete = this.handleDelete.bind(this);
- this.handleSave = this.handleSave.bind(this);
- }
+ this.handleDelete = this.handleDelete.bind(this);
+ this.handleSave = this.handleSave.bind(this);
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return this.props.registries !== nextProps.registries;
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return this.props.registries !== nextProps.registries;
+ }
- componentWillMount() {
- const { dispatch, drone, match } = this.props;
- const { owner, repo } = match.params;
- dispatch(fetchRegistryList, drone, owner, repo);
- }
+ componentWillMount() {
+ const { dispatch, drone, match } = this.props;
+ const { owner, repo } = match.params;
+ dispatch(fetchRegistryList, drone, owner, repo);
+ }
- handleSave(e) {
- const { dispatch, drone, match } = this.props;
- const { owner, repo } = match.params;
- const registry = {
- address: e.detail.address,
- username: e.detail.username,
- password: e.detail.password,
- };
+ handleSave(e) {
+ const { dispatch, drone, match } = this.props;
+ const { owner, repo } = match.params;
+ const registry = {
+ address: e.detail.address,
+ username: e.detail.username,
+ password: e.detail.password,
+ };
- dispatch(createRegistry, drone, owner, repo, registry);
- }
+ dispatch(createRegistry, drone, owner, repo, registry);
+ }
- handleDelete(registry) {
- const { dispatch, drone, match } = this.props;
- const { owner, repo } = match.params;
- dispatch(deleteRegistry, drone, owner, repo, registry.address);
- }
+ handleDelete(registry) {
+ const { dispatch, drone, match } = this.props;
+ const { owner, repo } = match.params;
+ dispatch(deleteRegistry, drone, owner, repo, registry.address);
+ }
- render() {
- const { registries, loaded } = this.props;
+ render() {
+ const { registries, loaded } = this.props;
- if (!loaded) {
- return LOADING;
- }
+ if (!loaded) {
+ return LOADING;
+ }
- return (
-
-
- {Object.keys(registries || {}).length === 0 ? EMPTY : undefined}
-
- {Object.values(registries || {}).map(renderRegistry.bind(this))}
-
-
+ return (
+
+
+ {Object.keys(registries || {}).length === 0 ? EMPTY : undefined}
+
+ {Object.values(registries || {}).map(renderRegistry.bind(this))}
+
+
-
-
-
-
- );
- }
+
+
+
+
+ );
+ }
}
function renderRegistry(registry) {
- return (
-
- );
+ return (
+
+ );
}
const LOADING = Loading
;
const EMPTY = (
-
- There are no registry credentials for this repository.
-
+
+ There are no registry credentials for this repository.
+
);
diff --git a/web/src/screens/repo/screens/secrets/components/form.js b/web/src/screens/repo/screens/secrets/components/form.js
index a3e244942..183e7520d 100644
--- a/web/src/screens/repo/screens/secrets/components/form.js
+++ b/web/src/screens/repo/screens/secrets/components/form.js
@@ -1,140 +1,140 @@
import React, { Component } from "react";
import {
- EVENT_PUSH,
- EVENT_TAG,
- EVENT_PULL_REQUEST,
- EVENT_DEPLOY,
+ EVENT_PUSH,
+ EVENT_TAG,
+ EVENT_PULL_REQUEST,
+ EVENT_DEPLOY,
} from "shared/constants/events";
import styles from "./form.less";
export class Form extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.state = {
- name: "",
- value: "",
- event: [EVENT_PUSH, EVENT_TAG, EVENT_DEPLOY],
- };
+ this.state = {
+ name: "",
+ value: "",
+ event: [EVENT_PUSH, EVENT_TAG, EVENT_DEPLOY],
+ };
- this._handleNameChange = this._handleNameChange.bind(this);
- this._handleValueChange = this._handleValueChange.bind(this);
- this._handleEventChange = this._handleEventChange.bind(this);
- this._handleSubmit = this._handleSubmit.bind(this);
+ this._handleNameChange = this._handleNameChange.bind(this);
+ this._handleValueChange = this._handleValueChange.bind(this);
+ this._handleEventChange = this._handleEventChange.bind(this);
+ this._handleSubmit = this._handleSubmit.bind(this);
- this.clear = this.clear.bind(this);
- }
+ this.clear = this.clear.bind(this);
+ }
- _handleNameChange(event) {
- this.setState({ name: event.target.value });
- }
+ _handleNameChange(event) {
+ this.setState({ name: event.target.value });
+ }
- _handleValueChange(event) {
- this.setState({ value: event.target.value });
- }
+ _handleValueChange(event) {
+ this.setState({ value: event.target.value });
+ }
- _handleEventChange(event) {
- const selected = this.state.event;
- let index;
+ _handleEventChange(event) {
+ const selected = this.state.event;
+ let index;
- if (event.target.checked) {
- selected.push(event.target.value);
- } else {
- index = selected.indexOf(event.target.value);
- selected.splice(index, 1);
- }
+ if (event.target.checked) {
+ selected.push(event.target.value);
+ } else {
+ index = selected.indexOf(event.target.value);
+ selected.splice(index, 1);
+ }
- this.setState({ event: selected });
- }
+ this.setState({ event: selected });
+ }
- _handleSubmit() {
- const { onsubmit } = this.props;
+ _handleSubmit() {
+ const { onsubmit } = this.props;
- const detail = {
- name: this.state.name,
- value: this.state.value,
- event: this.state.event,
- };
+ const detail = {
+ name: this.state.name,
+ value: this.state.value,
+ event: this.state.event,
+ };
- onsubmit({ detail });
- this.clear();
- }
+ onsubmit({ detail });
+ this.clear();
+ }
- clear() {
- this.setState({ name: "" });
- this.setState({ value: "" });
- this.setState({ event: [EVENT_PUSH, EVENT_TAG, EVENT_DEPLOY] });
- }
+ clear() {
+ this.setState({ name: "" });
+ this.setState({ value: "" });
+ this.setState({ event: [EVENT_PUSH, EVENT_TAG, EVENT_DEPLOY] });
+ }
- render() {
- let checked = this.state.event.reduce((map, event) => {
- map[event] = true;
- return map;
- }, {});
+ render() {
+ let checked = this.state.event.reduce((map, event) => {
+ map[event] = true;
+ return map;
+ }, {});
- return (
-
- );
- }
+ return (
+
+ );
+ }
}
diff --git a/web/src/screens/repo/screens/secrets/components/list.js b/web/src/screens/repo/screens/secrets/components/list.js
index f2fd4325b..7fb80ba78 100644
--- a/web/src/screens/repo/screens/secrets/components/list.js
+++ b/web/src/screens/repo/screens/secrets/components/list.js
@@ -4,17 +4,17 @@ import styles from "./list.less";
export const List = ({ children }) => {children}
;
export const Item = props => (
-
-
- {props.name}
-
{props.event ? props.event.map(renderEvent) : null}
-
-
-
-
-
+
+
+ {props.name}
+
{props.event ? props.event.map(renderEvent) : null}
+
+
+
+
+
);
const renderEvent = event => {
- return {event};
+ return {event};
};
diff --git a/web/src/screens/repo/screens/secrets/index.js b/web/src/screens/repo/screens/secrets/index.js
index 7f0f9c672..c07dddac1 100644
--- a/web/src/screens/repo/screens/secrets/index.js
+++ b/web/src/screens/repo/screens/secrets/index.js
@@ -2,9 +2,9 @@ import React, { Component } from "react";
import { repositorySlug } from "shared/utils/repository";
import {
- fetchSecretList,
- createSecret,
- deleteSecret,
+ fetchSecretList,
+ createSecret,
+ deleteSecret,
} from "shared/utils/secrets";
import { branch } from "baobab-react/higher-order";
@@ -15,85 +15,85 @@ import { List, Item, Form } from "./components";
import styles from "./index.less";
const binding = (props, context) => {
- const { owner, repo } = props.match.params;
- const slug = repositorySlug(owner, repo);
- return {
- loaded: ["secrets", "loaded"],
- secrets: ["secrets", "data", slug],
- };
+ const { owner, repo } = props.match.params;
+ const slug = repositorySlug(owner, repo);
+ return {
+ loaded: ["secrets", "loaded"],
+ secrets: ["secrets", "data", slug],
+ };
};
@inject
@branch(binding)
export default class RepoSecrets extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.handleSave = this.handleSave.bind(this);
- }
+ this.handleSave = this.handleSave.bind(this);
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return this.props.secrets !== nextProps.secrets;
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return this.props.secrets !== nextProps.secrets;
+ }
- componentWillMount() {
- const { owner, repo } = this.props.match.params;
- this.props.dispatch(fetchSecretList, this.props.drone, owner, repo);
- }
+ componentWillMount() {
+ const { owner, repo } = this.props.match.params;
+ this.props.dispatch(fetchSecretList, this.props.drone, owner, repo);
+ }
- handleSave(e) {
- const { dispatch, drone, match } = this.props;
- const { owner, repo } = match.params;
- const secret = {
- name: e.detail.name,
- value: e.detail.value,
- event: e.detail.event,
- };
+ handleSave(e) {
+ const { dispatch, drone, match } = this.props;
+ const { owner, repo } = match.params;
+ const secret = {
+ name: e.detail.name,
+ value: e.detail.value,
+ event: e.detail.event,
+ };
- dispatch(createSecret, drone, owner, repo, secret);
- }
+ dispatch(createSecret, drone, owner, repo, secret);
+ }
- handleDelete(secret) {
- const { dispatch, drone, match } = this.props;
- const { owner, repo } = match.params;
- dispatch(deleteSecret, drone, owner, repo, secret.name);
- }
+ handleDelete(secret) {
+ const { dispatch, drone, match } = this.props;
+ const { owner, repo } = match.params;
+ dispatch(deleteSecret, drone, owner, repo, secret.name);
+ }
- render() {
- const { secrets, loaded } = this.props;
+ render() {
+ const { secrets, loaded } = this.props;
- if (!loaded) {
- return LOADING;
- }
+ if (!loaded) {
+ return LOADING;
+ }
- return (
-
-
- {Object.keys(secrets || {}).length === 0 ? EMPTY : undefined}
-
- {Object.values(secrets || {}).map(renderSecret.bind(this))}
-
-
-
-
-
-
- );
- }
+ return (
+
+
+ {Object.keys(secrets || {}).length === 0 ? EMPTY : undefined}
+
+ {Object.values(secrets || {}).map(renderSecret.bind(this))}
+
+
+
+
+
+
+ );
+ }
}
function renderSecret(secret) {
- return (
-
- );
+ return (
+
+ );
}
const LOADING = Loading
;
const EMPTY = (
- There are no secrets for this repository.
+ There are no secrets for this repository.
);
diff --git a/web/src/screens/repo/screens/settings/index.js b/web/src/screens/repo/screens/settings/index.js
index 5bff47b90..a7acc8a16 100644
--- a/web/src/screens/repo/screens/settings/index.js
+++ b/web/src/screens/repo/screens/settings/index.js
@@ -4,241 +4,241 @@ import { branch } from "baobab-react/higher-order";
import { inject } from "config/client/inject";
import {
- fetchRepository,
- updateRepository,
- repositorySlug,
+ fetchRepository,
+ updateRepository,
+ repositorySlug,
} from "shared/utils/repository";
import {
- VISIBILITY_PUBLIC,
- VISIBILITY_PRIVATE,
- VISIBILITY_INTERNAL,
+ VISIBILITY_PUBLIC,
+ VISIBILITY_PRIVATE,
+ VISIBILITY_INTERNAL,
} from "shared/constants/visibility";
import styles from "./index.less";
const binding = (props, context) => {
- const { owner, repo } = props.match.params;
- const slug = repositorySlug(owner, repo);
- return {
- user: ["user", "data"],
- repo: ["repos", "data", slug],
- };
+ const { owner, repo } = props.match.params;
+ const slug = repositorySlug(owner, repo);
+ return {
+ user: ["user", "data"],
+ repo: ["repos", "data", slug],
+ };
};
@inject
@branch(binding)
export default class Settings extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.handlePushChange = this.handlePushChange.bind(this);
- this.handlePullChange = this.handlePullChange.bind(this);
- this.handleTagChange = this.handleTagChange.bind(this);
- this.handleDeployChange = this.handleDeployChange.bind(this);
- this.handleTrustedChange = this.handleTrustedChange.bind(this);
- this.handleProtectedChange = this.handleProtectedChange.bind(this);
- this.handleVisibilityChange = this.handleVisibilityChange.bind(this);
- this.handleTimeoutChange = this.handleTimeoutChange.bind(this);
- this.handlePathChange = this.handlePathChange.bind(this);
- this.handleFallbackChange = this.handleFallbackChange.bind(this);
- this.handleChange = this.handleChange.bind(this);
- }
+ this.handlePushChange = this.handlePushChange.bind(this);
+ this.handlePullChange = this.handlePullChange.bind(this);
+ this.handleTagChange = this.handleTagChange.bind(this);
+ this.handleDeployChange = this.handleDeployChange.bind(this);
+ this.handleTrustedChange = this.handleTrustedChange.bind(this);
+ this.handleProtectedChange = this.handleProtectedChange.bind(this);
+ this.handleVisibilityChange = this.handleVisibilityChange.bind(this);
+ this.handleTimeoutChange = this.handleTimeoutChange.bind(this);
+ this.handlePathChange = this.handlePathChange.bind(this);
+ this.handleFallbackChange = this.handleFallbackChange.bind(this);
+ this.handleChange = this.handleChange.bind(this);
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return this.props.repo !== nextProps.repo;
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return this.props.repo !== nextProps.repo;
+ }
- componentWillMount() {
- const { drone, dispatch, match, repo } = this.props;
+ componentWillMount() {
+ const { drone, dispatch, match, repo } = this.props;
- if (!repo) {
- dispatch(fetchRepository, drone, match.params.owner, match.params.repo);
- }
- }
+ if (!repo) {
+ dispatch(fetchRepository, drone, match.params.owner, match.params.repo);
+ }
+ }
- render() {
- const { repo } = this.props;
+ render() {
+ const { repo } = this.props;
- if (!repo) {
- return undefined;
- }
+ if (!repo) {
+ return undefined;
+ }
- return (
-
-
-
+ return (
+
- );
- }
+
+
+ );
+ }
- handlePushChange(e) {
- this.handleChange("allow_push", e.target.checked);
- }
+ handlePushChange(e) {
+ this.handleChange("allow_push", e.target.checked);
+ }
- handlePullChange(e) {
- this.handleChange("allow_pr", e.target.checked);
- }
+ handlePullChange(e) {
+ this.handleChange("allow_pr", e.target.checked);
+ }
- handleTagChange(e) {
- this.handleChange("allow_tag", e.target.checked);
- }
+ handleTagChange(e) {
+ this.handleChange("allow_tag", e.target.checked);
+ }
- handleDeployChange(e) {
- this.handleChange("allow_deploy", e.target.checked);
- }
+ handleDeployChange(e) {
+ this.handleChange("allow_deploy", e.target.checked);
+ }
- handleTrustedChange(e) {
- this.handleChange("trusted", e.target.checked);
- }
+ handleTrustedChange(e) {
+ this.handleChange("trusted", e.target.checked);
+ }
- handleProtectedChange(e) {
- this.handleChange("gated", e.target.checked);
- }
+ handleProtectedChange(e) {
+ this.handleChange("gated", e.target.checked);
+ }
- handleVisibilityChange(e) {
- this.handleChange("visibility", e.target.value);
- }
+ handleVisibilityChange(e) {
+ this.handleChange("visibility", e.target.value);
+ }
- handleTimeoutChange(e) {
- this.handleChange("timeout", parseInt(e.target.value));
- }
+ handleTimeoutChange(e) {
+ this.handleChange("timeout", parseInt(e.target.value));
+ }
- handlePathChange(e) {
- this.handleChange("config_file", e.target.value);
- }
+ handlePathChange(e) {
+ this.handleChange("config_file", e.target.value);
+ }
- handleFallbackChange(e) {
- this.handleChange("fallback", e.target.checked);
- }
+ handleFallbackChange(e) {
+ this.handleChange("fallback", e.target.checked);
+ }
- handleChange(prop, value) {
- const { dispatch, drone, repo } = this.props;
- let data = {};
- data[prop] = value;
- dispatch(updateRepository, drone, repo.owner, repo.name, data);
- }
+ handleChange(prop, value) {
+ const { dispatch, drone, repo } = this.props;
+ let data = {};
+ data[prop] = value;
+ dispatch(updateRepository, drone, repo.owner, repo.name, data);
+ }
}
diff --git a/web/src/screens/titles.js b/web/src/screens/titles.js
index d37f35986..9c20e5d4c 100644
--- a/web/src/screens/titles.js
+++ b/web/src/screens/titles.js
@@ -5,15 +5,15 @@ import Title from "react-title-component";
// @see https://github.com/yannickcr/eslint-plugin-react/issues/512
// eslint-disable-next-line react/display-name
export default function() {
- return (
-
-
-
-
-
-
-
- );
+ return (
+
+
+
+
+
+
+
+ );
}
const accountTitle = () => ;
@@ -23,7 +23,7 @@ const accountRepos = () => ;
const loginTitle = () => ;
const repoTitle = ({ match }) => (
-
+
);
const defautTitle = () => ;
diff --git a/web/src/screens/user/screens/repos/components/list.js b/web/src/screens/user/screens/repos/components/list.js
index e14954ddc..36f2a2485 100644
--- a/web/src/screens/user/screens/repos/components/list.js
+++ b/web/src/screens/user/screens/repos/components/list.js
@@ -7,34 +7,34 @@ import { Switch } from "./switch";
import styles from "./list.less";
export const List = ({ children }) => (
- {children}
+ {children}
);
export class Item extends Component {
- render() {
- const { owner, name, active, link, onchange } = this.props;
- return (
-
-
- {owner}/{name}
-
-
-
-
-
-
-
-
-
-
- );
- }
+ render() {
+ const { owner, name, active, link, onchange } = this.props;
+ return (
+
+
+ {owner}/{name}
+
+
+
+
+
+
+
+
+
+
+ );
+ }
- shouldComponentUpdate(nextProps) {
- return (
- this.props.owner !== nextProps.owner ||
- this.props.name !== nextProps.name ||
- this.props.active !== nextProps.active
- );
- }
+ shouldComponentUpdate(nextProps) {
+ return (
+ this.props.owner !== nextProps.owner ||
+ this.props.name !== nextProps.name ||
+ this.props.active !== nextProps.active
+ );
+ }
}
diff --git a/web/src/screens/user/screens/repos/components/switch.js b/web/src/screens/user/screens/repos/components/switch.js
index a969f5986..b65629548 100644
--- a/web/src/screens/user/screens/repos/components/switch.js
+++ b/web/src/screens/user/screens/repos/components/switch.js
@@ -2,12 +2,12 @@ import React, { Component } from "react";
import styles from "./switch.less";
export class Switch extends Component {
- render() {
- const { checked, onchange } = this.props;
- return (
-
- );
- }
+ render() {
+ const { checked, onchange } = this.props;
+ return (
+
+ );
+ }
}
diff --git a/web/src/screens/user/screens/repos/index.js b/web/src/screens/user/screens/repos/index.js
index 917cde929..18876cddd 100644
--- a/web/src/screens/user/screens/repos/index.js
+++ b/web/src/screens/user/screens/repos/index.js
@@ -4,9 +4,9 @@ import { branch } from "baobab-react/higher-order";
import { inject } from "config/client/inject";
import {
- fetchRepostoryList,
- disableRepository,
- enableRepository,
+ fetchRepostoryList,
+ disableRepository,
+ enableRepository,
} from "shared/utils/repository";
import { List, Item } from "./components";
@@ -15,105 +15,105 @@ import Breadcrumb, { SEPARATOR } from "shared/components/breadcrumb";
import styles from "./index.less";
const binding = (props, context) => {
- return {
- repos: ["repos", "data"],
- loaded: ["repos", "loaded"],
- error: ["repos", "error"],
- };
+ return {
+ repos: ["repos", "data"],
+ loaded: ["repos", "loaded"],
+ error: ["repos", "error"],
+ };
};
@inject
@branch(binding)
export default class UserRepos extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.handleFilter = this.handleFilter.bind(this);
- this.renderItem = this.renderItem.bind(this);
- this.handleToggle = this.handleToggle.bind(this);
- }
+ this.handleFilter = this.handleFilter.bind(this);
+ this.renderItem = this.renderItem.bind(this);
+ this.handleToggle = this.handleToggle.bind(this);
+ }
- handleFilter(e) {
- this.setState({
- search: e.target.value,
- });
- }
+ handleFilter(e) {
+ this.setState({
+ search: e.target.value,
+ });
+ }
- handleToggle(repo, e) {
- const { dispatch, drone } = this.props;
- if (e.target.checked) {
- dispatch(enableRepository, drone, repo.owner, repo.name);
- } else {
- dispatch(disableRepository, drone, repo.owner, repo.name);
- }
- }
+ handleToggle(repo, e) {
+ const { dispatch, drone } = this.props;
+ if (e.target.checked) {
+ dispatch(enableRepository, drone, repo.owner, repo.name);
+ } else {
+ dispatch(disableRepository, drone, repo.owner, repo.name);
+ }
+ }
- componentWillMount() {
- if (!this._dispatched) {
- this._dispatched = true;
- this.props.dispatch(fetchRepostoryList, this.props.drone);
- }
- }
+ componentWillMount() {
+ if (!this._dispatched) {
+ this._dispatched = true;
+ this.props.dispatch(fetchRepostoryList, this.props.drone);
+ }
+ }
- shouldComponentUpdate(nextProps, nextState) {
- return (
- this.props.repos !== nextProps.repos ||
- this.state.search !== nextState.search
- );
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return (
+ this.props.repos !== nextProps.repos ||
+ this.state.search !== nextState.search
+ );
+ }
- render() {
- const { repos, loaded, error } = this.props;
- const { search } = this.state;
- const list = Object.values(repos || {});
+ render() {
+ const { repos, loaded, error } = this.props;
+ const { search } = this.state;
+ const list = Object.values(repos || {});
- if (error) {
- return ERROR;
- }
+ if (error) {
+ return ERROR;
+ }
- if (!loaded) {
- return LOADING;
- }
+ if (!loaded) {
+ return LOADING;
+ }
- if (list.length === 0) {
- return EMPTY;
- }
+ if (list.length === 0) {
+ return EMPTY;
+ }
- const filter = repo => {
- return !search || repo.full_name.indexOf(search) !== -1;
- };
+ const filter = repo => {
+ return !search || repo.full_name.indexOf(search) !== -1;
+ };
- const filtered = list.filter(filter);
+ const filtered = list.filter(filter);
- return (
-
-
-
-
-
- {filtered.length === 0 ? NO_MATCHES : null}
- {list.filter(filter).map(this.renderItem)}
-
-
- );
- }
+ return (
+
+
+
+
+
+ {filtered.length === 0 ? NO_MATCHES : null}
+ {list.filter(filter).map(this.renderItem)}
+
+
+ );
+ }
- renderItem(repo) {
- return (
-
- );
- }
+ renderItem(repo) {
+ return (
+
+ );
+ }
}
const LOADING = Loading
;
@@ -126,12 +126,12 @@ const ERROR = Error
;
/* eslint-disable react/jsx-key */
export class UserRepoTitle extends Component {
- render() {
- return (
- Account, SEPARATOR, Repositories]}
- />
- );
- }
+ render() {
+ return (
+ Account, SEPARATOR, Repositories]}
+ />
+ );
+ }
}
/* eslint-enable react/jsx-key */
diff --git a/web/src/screens/user/screens/repos/menu.js b/web/src/screens/user/screens/repos/menu.js
index 5613c83b8..28a467d12 100644
--- a/web/src/screens/user/screens/repos/menu.js
+++ b/web/src/screens/user/screens/repos/menu.js
@@ -6,36 +6,36 @@ import { SyncIcon } from "shared/components/icons";
import Menu from "shared/components/menu";
const binding = (props, context) => {
- return {
- repos: ["repos"],
- };
+ return {
+ repos: ["repos"],
+ };
};
@inject
@branch(binding)
export default class UserReposMenu extends Component {
- constructor(props, context) {
- super(props, context);
+ constructor(props, context) {
+ super(props, context);
- this.handleClick = this.handleClick.bind(this);
- }
+ this.handleClick = this.handleClick.bind(this);
+ }
- handleClick() {
- const { dispatch, drone } = this.props;
- dispatch(syncRepostoryList, drone);
- }
+ handleClick() {
+ const { dispatch, drone } = this.props;
+ dispatch(syncRepostoryList, drone);
+ }
- render() {
- const { loaded } = this.props.repos;
- const right = (
-
- );
+ render() {
+ const { loaded } = this.props.repos;
+ const right = (
+
+ );
- return ;
- }
+ return ;
+ }
}
diff --git a/web/src/screens/user/screens/tokens/index.js b/web/src/screens/user/screens/tokens/index.js
index 4477d7d1b..c6b3e12b3 100644
--- a/web/src/screens/user/screens/tokens/index.js
+++ b/web/src/screens/user/screens/tokens/index.js
@@ -6,53 +6,53 @@ import { inject } from "config/client/inject";
import styles from "./index.less";
const binding = (props, context) => {
- return {
- location: ["location"],
- token: ["token"],
- };
+ return {
+ location: ["location"],
+ token: ["token"],
+ };
};
@inject
@branch(binding)
export default class Tokens extends Component {
- shouldComponentUpdate(nextProps, nextState) {
- return (
- this.props.location !== nextProps.location ||
- this.props.token !== nextProps.token
- );
- }
+ shouldComponentUpdate(nextProps, nextState) {
+ return (
+ this.props.location !== nextProps.location ||
+ this.props.token !== nextProps.token
+ );
+ }
- componentWillMount() {
- const { drone, dispatch } = this.props;
+ componentWillMount() {
+ const { drone, dispatch } = this.props;
- dispatch(generateToken, drone);
- }
+ dispatch(generateToken, drone);
+ }
- render() {
- const { location, token } = this.props;
+ render() {
+ const { location, token } = this.props;
- if (!location || !token) {
- return Loading
;
- }
- return (
-
-
Your Personal Token:
-
{token}
-
Example API Usage:
-
{usageWithCURL(location, token)}
-
Example CLI Usage:
-
{usageWithCLI(location, token)}
-
- );
- }
+ if (!location || !token) {
+ return Loading
;
+ }
+ return (
+
+
Your Personal Token:
+
{token}
+
Example API Usage:
+
{usageWithCURL(location, token)}
+
Example CLI Usage:
+
{usageWithCLI(location, token)}
+
+ );
+ }
}
const usageWithCURL = (location, token) => {
- return `curl -i ${location.protocol}//${location.host}/api/user -H "Authorization: Bearer ${token}"`;
+ return `curl -i ${location.protocol}//${location.host}/api/user -H "Authorization: Bearer ${token}"`;
};
const usageWithCLI = (location, token) => {
- return `export DRONE_SERVER=${location.protocol}//${location.host}
+ return `export DRONE_SERVER=${location.protocol}//${location.host}
export DRONE_TOKEN=${token}
drone info`;
diff --git a/web/src/shared/components/__tests__/status.test.js b/web/src/shared/components/__tests__/status.test.js
index ccf7d609f..10285ee70 100644
--- a/web/src/shared/components/__tests__/status.test.js
+++ b/web/src/shared/components/__tests__/status.test.js
@@ -3,30 +3,30 @@ import { mount } from "enzyme";
import Status from "../status";
import {
- STATUS_FAILURE,
- STATUS_RUNNING,
- STATUS_SUCCESS,
+ STATUS_FAILURE,
+ STATUS_RUNNING,
+ STATUS_SUCCESS,
} from "shared/constants/status";
jest.dontMock("../status");
describe("Status component", () => {
- test("updates on status change", () => {
- const status = mount();
- const instance = status.instance();
+ test("updates on status change", () => {
+ const status = mount();
+ const instance = status.instance();
- expect(
- instance.shouldComponentUpdate({ status: STATUS_FAILURE }),
- ).toBeFalsy();
- expect(
- instance.shouldComponentUpdate({ status: STATUS_SUCCESS }),
- ).toBeTruthy();
- expect(status.hasClass("failure")).toBeTruthy();
- });
+ expect(
+ instance.shouldComponentUpdate({ status: STATUS_FAILURE }),
+ ).toBeFalsy();
+ expect(
+ instance.shouldComponentUpdate({ status: STATUS_SUCCESS }),
+ ).toBeTruthy();
+ expect(status.hasClass("failure")).toBeTruthy();
+ });
- test("uses the status as the class name", () => {
- const status = mount();
+ test("uses the status as the class name", () => {
+ const status = mount();
- expect(status.hasClass("running")).toBeTruthy();
- });
+ expect(status.hasClass("running")).toBeTruthy();
+ });
});
diff --git a/web/src/shared/components/avatar.js b/web/src/shared/components/avatar.js
index 98b225eb3..4d38e2461 100644
--- a/web/src/shared/components/avatar.js
+++ b/web/src/shared/components/avatar.js
@@ -2,11 +2,11 @@ import React, { Component } from "react";
import styles from "./avatar.less";
export default class Avatar extends Component {
- render() {
- const image = this.props.image;
- const style = {
- backgroundImage: `url(${image})`,
- };
- return ;
- }
+ render() {
+ const image = this.props.image;
+ const style = {
+ backgroundImage: `url(${image})`,
+ };
+ return ;
+ }
}
diff --git a/web/src/shared/components/breadcrumb.js b/web/src/shared/components/breadcrumb.js
index d6b314a06..736b18d30 100644
--- a/web/src/shared/components/breadcrumb.js
+++ b/web/src/shared/components/breadcrumb.js
@@ -10,12 +10,12 @@ export const BACK_BUTTON = ;
// helper function to render a list item.
const renderItem = (element, index) => {
- return {element};
+ return {element};
};
export default class Breadcrumb extends Component {
- render() {
- const { elements } = this.props;
- return {elements.map(renderItem)}
;
- }
+ render() {
+ const { elements } = this.props;
+ return {elements.map(renderItem)}
;
+ }
}
diff --git a/web/src/shared/components/build_event.js b/web/src/shared/components/build_event.js
index 3bff114ab..0d62e0938 100644
--- a/web/src/shared/components/build_event.js
+++ b/web/src/shared/components/build_event.js
@@ -1,70 +1,70 @@
import React, { Component } from "react";
import {
- BranchIcon,
- CommitIcon,
- DeployIcon,
- LaunchIcon,
- MergeIcon,
- TagIcon,
+ BranchIcon,
+ CommitIcon,
+ DeployIcon,
+ LaunchIcon,
+ MergeIcon,
+ TagIcon,
} from "shared/components/icons/index";
import {
- EVENT_TAG,
- EVENT_PULL_REQUEST,
- EVENT_DEPLOY,
+ EVENT_TAG,
+ EVENT_PULL_REQUEST,
+ EVENT_DEPLOY,
} from "shared/constants/events";
import styles from "./build_event.less";
export default class BuildEvent extends Component {
- render() {
- const { event, branch, commit, refs, refspec, link, target } = this.props;
+ render() {
+ const { event, branch, commit, refs, refspec, link, target } = this.props;
- return (
-
-
-
-
-
-
{commit && commit.substr(0, 10)}
-
-
-
- {event === EVENT_TAG ? (
-
- ) : event === EVENT_PULL_REQUEST ? (
-
- ) : event === EVENT_DEPLOY ? (
-
- ) : (
-
- )}
-
-
- {event === EVENT_TAG && refs ? (
- trimTagRef(refs)
- ) : event === EVENT_PULL_REQUEST && refspec ? (
- trimMergeRef(refs)
- ) : event === EVENT_DEPLOY && target ? (
- target
- ) : (
- branch
- )}
-
-
-
-
-
-
- );
- }
+ return (
+
+
+
+
+
+
{commit && commit.substr(0, 10)}
+
+
+
+ {event === EVENT_TAG ? (
+
+ ) : event === EVENT_PULL_REQUEST ? (
+
+ ) : event === EVENT_DEPLOY ? (
+
+ ) : (
+
+ )}
+
+
+ {event === EVENT_TAG && refs ? (
+ trimTagRef(refs)
+ ) : event === EVENT_PULL_REQUEST && refspec ? (
+ trimMergeRef(refs)
+ ) : event === EVENT_DEPLOY && target ? (
+ target
+ ) : (
+ branch
+ )}
+
+
+
+
+
+
+ );
+ }
}
const trimMergeRef = ref => {
- return ref.match(/\d/g) || ref;
+ return ref.match(/\d/g) || ref;
};
const trimTagRef = ref => {
- return ref.startsWith("refs/tags/") ? ref.substr(10) : ref;
+ return ref.startsWith("refs/tags/") ? ref.substr(10) : ref;
};
// push
diff --git a/web/src/shared/components/build_time.js b/web/src/shared/components/build_time.js
index 40e4551e0..22d3cf0b0 100644
--- a/web/src/shared/components/build_time.js
+++ b/web/src/shared/components/build_time.js
@@ -7,31 +7,31 @@ import Duration from "./duration";
import styles from "./build_time.less";
export default class Runtime extends Component {
- render() {
- const { start, finish } = this.props;
- return (
-
-
-
-
-
-
-
- {finish ? (
-
- ) : start ? (
-
- ) : (
- --
- )}
-
-
-
- );
- }
+ render() {
+ const { start, finish } = this.props;
+ return (
+
+
+
+
+
+
+
+ {finish ? (
+
+ ) : start ? (
+
+ ) : (
+ --
+ )}
+
+
+
+ );
+ }
}
diff --git a/web/src/shared/components/drawer/drawer.js b/web/src/shared/components/drawer/drawer.js
index 75670a071..e3e814a02 100644
--- a/web/src/shared/components/drawer/drawer.js
+++ b/web/src/shared/components/drawer/drawer.js
@@ -7,56 +7,56 @@ export const DOCK_LEFT = styles.left;
export const DOCK_RIGHT = styles.right;
export class Drawer extends Component {
- render() {
- const { open, position } = this.props;
+ render() {
+ const { open, position } = this.props;
- let classes = [styles.drawer];
- if (open) {
- classes.push(styles.open);
- }
- if (position) {
- classes.push(position);
- }
+ let classes = [styles.drawer];
+ if (open) {
+ classes.push(styles.open);
+ }
+ if (position) {
+ classes.push(position);
+ }
- var child = open ? (
-
- ) : null;
+ var child = open ? (
+
+ ) : null;
- return (
-
-
- {child}
-
-
{this.props.children}
-
- );
- }
+ return (
+
+
+ {child}
+
+
{this.props.children}
+
+ );
+ }
}
export class CloseButton extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
export class MenuButton extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/duration.js b/web/src/shared/components/duration.js
index 07a875af2..6ea6236d6 100644
--- a/web/src/shared/components/duration.js
+++ b/web/src/shared/components/duration.js
@@ -2,9 +2,9 @@ import humanizeDuration from "humanize-duration";
import React from "react";
export default class Duration extends React.Component {
- render() {
- const { start, finished } = this.props;
+ render() {
+ const { start, finished } = this.props;
- return ;
- }
+ return ;
+ }
}
diff --git a/web/src/shared/components/icons/back.js b/web/src/shared/components/icons/back.js
index d2bb30a52..09f1bedcb 100644
--- a/web/src/shared/components/icons/back.js
+++ b/web/src/shared/components/icons/back.js
@@ -1,17 +1,17 @@
import React, { Component } from "react";
export default class BackIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/branch.js b/web/src/shared/components/icons/branch.js
index 09b5e4de2..922ef6a21 100644
--- a/web/src/shared/components/icons/branch.js
+++ b/web/src/shared/components/icons/branch.js
@@ -1,11 +1,11 @@
import React, { Component } from "react";
export default class BranchIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/check.js b/web/src/shared/components/icons/check.js
index 8eed935b1..9c6f40a9d 100644
--- a/web/src/shared/components/icons/check.js
+++ b/web/src/shared/components/icons/check.js
@@ -1,17 +1,17 @@
import React, { Component } from "react";
export default class CheckIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/clock.js b/web/src/shared/components/icons/clock.js
index 1e971cb62..e898d4f9a 100644
--- a/web/src/shared/components/icons/clock.js
+++ b/web/src/shared/components/icons/clock.js
@@ -1,17 +1,17 @@
import React, { Component } from "react";
export default class ClockIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/close.js b/web/src/shared/components/icons/close.js
index 18c985726..4ca13e78d 100644
--- a/web/src/shared/components/icons/close.js
+++ b/web/src/shared/components/icons/close.js
@@ -1,17 +1,17 @@
import React, { Component } from "react";
export default class CloseIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/commit.js b/web/src/shared/components/icons/commit.js
index 3dbbfe20b..36a07b68a 100644
--- a/web/src/shared/components/icons/commit.js
+++ b/web/src/shared/components/icons/commit.js
@@ -1,16 +1,16 @@
import React, { Component } from "react";
export default class CommitIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/deploy.js b/web/src/shared/components/icons/deploy.js
index 273803157..dbabeb0fc 100644
--- a/web/src/shared/components/icons/deploy.js
+++ b/web/src/shared/components/icons/deploy.js
@@ -1,11 +1,11 @@
import React, { Component } from "react";
export default class DeployIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/expand.js b/web/src/shared/components/icons/expand.js
index 87a9c05f6..d74ba5819 100644
--- a/web/src/shared/components/icons/expand.js
+++ b/web/src/shared/components/icons/expand.js
@@ -1,17 +1,17 @@
import React, { Component } from "react";
export default class ExpandIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/index.js b/web/src/shared/components/icons/index.js
index bc5de0359..52574d93a 100644
--- a/web/src/shared/components/icons/index.js
+++ b/web/src/shared/components/icons/index.js
@@ -21,25 +21,25 @@ import TagIcon from "./tag";
import TimelapseIcon from "./timelapse";
export {
- BackIcon,
- BranchIcon,
- CheckIcon,
- CloseIcon,
- ClockIcon,
- CommitIcon,
- DeployIcon,
- ExpandIcon,
- LaunchIcon,
- LinkIcon,
- MenuIcon,
- MergeIcon,
- PauseIcon,
- PlayIcon,
- RefreshIcon,
- RemoveIcon,
- ScheduleIcon,
- StarIcon,
- SyncIcon,
- TagIcon,
- TimelapseIcon,
+ BackIcon,
+ BranchIcon,
+ CheckIcon,
+ CloseIcon,
+ ClockIcon,
+ CommitIcon,
+ DeployIcon,
+ ExpandIcon,
+ LaunchIcon,
+ LinkIcon,
+ MenuIcon,
+ MergeIcon,
+ PauseIcon,
+ PlayIcon,
+ RefreshIcon,
+ RemoveIcon,
+ ScheduleIcon,
+ StarIcon,
+ SyncIcon,
+ TagIcon,
+ TimelapseIcon,
};
diff --git a/web/src/shared/components/icons/launch.js b/web/src/shared/components/icons/launch.js
index b9633fd88..f53e44ebe 100644
--- a/web/src/shared/components/icons/launch.js
+++ b/web/src/shared/components/icons/launch.js
@@ -1,12 +1,12 @@
import React, { Component } from "react";
export default class LaunchIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/link.js b/web/src/shared/components/icons/link.js
index 749eec60f..e38f93f60 100644
--- a/web/src/shared/components/icons/link.js
+++ b/web/src/shared/components/icons/link.js
@@ -1,17 +1,17 @@
import React, { Component } from "react";
export default class LinkIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/menu.js b/web/src/shared/components/icons/menu.js
index 24aa4752e..60f1d1c8a 100644
--- a/web/src/shared/components/icons/menu.js
+++ b/web/src/shared/components/icons/menu.js
@@ -1,17 +1,17 @@
import React, { Component } from "react";
export default class MenuIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
diff --git a/web/src/shared/components/icons/merge.js b/web/src/shared/components/icons/merge.js
index a45e5b3c3..92dfb8cbe 100644
--- a/web/src/shared/components/icons/merge.js
+++ b/web/src/shared/components/icons/merge.js
@@ -1,13 +1,13 @@
import React, { Component } from "react";
export default class MergeIcon extends Component {
- render() {
- return (
-
- );
- }
+ render() {
+ return (
+
+ );
+ }
}
//