Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cloud apps #4590

Merged
merged 44 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
eeb28fc
add CA create Linode skeleton (#4577)
martinmckenna Feb 27, 2019
06c64f9
CA-XXX Add Distros tab (#4579)
Jskobos Feb 28, 2019
ae54506
add subtabs (#4581)
martinmckenna Feb 28, 2019
228d0b0
CA: Add my images tab (#4582)
Jskobos Mar 1, 2019
fd964b0
Add Cloudapps icons to src/assets (#4587)
Jskobos Mar 4, 2019
1d9c9c2
fix tabs render bug (#4592)
martinmckenna Mar 4, 2019
fad9c74
Reset creation state on tab change (#4595)
Jskobos Mar 4, 2019
d34cb68
add error state to creation flow (#4596)
martinmckenna Mar 4, 2019
0efb931
CA: Move SSH HOC to container (#4597)
Jskobos Mar 4, 2019
3576840
CLAPPS - Tab State in Redux (#4598)
martinmckenna Mar 4, 2019
00867d9
CLAPPS: Add Images subtab (#4599)
Jskobos Mar 4, 2019
8901f9c
CLAPPS - fix dynamic label (#4601)
martinmckenna Mar 5, 2019
717adaf
CLAPPS Add create from backups tab (#4603)
Jskobos Mar 5, 2019
36de696
CA-606 Nested Tab Panel Updates (#4586)
WilkinsKa1 Mar 6, 2019
ebb32d8
CLAPPS: Add Community StackScripts panel (#4612)
Jskobos Mar 7, 2019
aacc1f4
CLAPPS - Create from App (#4604)
martinmckenna Mar 7, 2019
4593be4
CLAPPS Map UDF error fields (#4619)
Jskobos Mar 8, 2019
bd66cbe
Apps UI Edits (#4611)
WilkinsKa1 Mar 8, 2019
a8b98cc
CLAPPS: Fix StackScript routing (#4625)
Jskobos Mar 11, 2019
e5c80fa
M3-2512 Move Apps Logos (#4633)
martinmckenna Mar 12, 2019
7cca6e1
M3 clapps icons (#4644)
Jskobos Mar 13, 2019
4450270
Apps UDF Improvements (#4629)
WilkinsKa1 Mar 14, 2019
1d48d88
leverage one-click-apps endpoint (#4659)
martinmckenna Mar 15, 2019
5c04179
pass down stackscript id (#4668)
martinmckenna Mar 18, 2019
ef0f07f
Update Rust icon (#4671)
Jskobos Mar 18, 2019
9082c01
M3 Fix clapps advanced option bug (#4669)
Jskobos Mar 18, 2019
c1830db
CLAPPS: Add defaultImage logic (#4674)
Jskobos Mar 18, 2019
dee3ad7
Cloud Apps - Bug Fixes (#4677)
martinmckenna Mar 19, 2019
9218f31
adding missing class to empty linodes to clone container (#4688)
WilkinsKa1 Mar 19, 2019
baaa970
appease tests and correct types
martinmckenna Mar 20, 2019
38e2b08
fix some more typings
martinmckenna Mar 20, 2019
a704e3a
fix paginated select linode panel
martinmckenna Mar 20, 2019
f5e9070
un-skip tests
martinmckenna Mar 20, 2019
e148b08
cleanup tests
martinmckenna Mar 20, 2019
de0d2a5
remove capuk helper
martinmckenna Mar 20, 2019
e13050b
fix RenderGuard issues
martinmckenna Mar 20, 2019
2ebed59
fix typography issues on create from image
martinmckenna Mar 20, 2019
e8e9560
defaulting expansion panel for optional udfs to be open
Mar 22, 2019
c1f34b7
Rename files to remove CA convention (#4714)
Jskobos Mar 25, 2019
25b3516
Remove creation type from auto-generated label (#4715)
Jskobos Mar 25, 2019
5efcaf7
[Cloud Apps] Unit Testing (#4708)
martinmckenna Mar 26, 2019
0e1d4b4
destructure props (#4713)
martinmckenna Mar 26, 2019
4399104
One-click app feedback (#4720)
Jskobos Mar 26, 2019
576be80
[Cloud Apps] - StackScript Updates (#4709)
martinmckenna Mar 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/assets/Ark@1x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/assets/CSGO2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 17 additions & 3 deletions public/assets/Rust.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/assets/Terraria.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions src/__data__/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,30 @@ export const images: Linode.Image[] = [
description: null
}
];

export const privateImages: Linode.Image[] = [
{
created_by: 'linode',
deprecated: false,
id: 'linode/debian8.7',
vendor: 'Debian',
size: 1100,
type: 'manual',
created: '2017-08-15T22:28:13',
is_public: false,
label: 'Debian 8.7',
description: null
},
{
created_by: 'linode',
deprecated: false,
id: 'linode/containerlinux',
vendor: 'CoreOS',
size: 3000,
type: 'manual',
created: '2017-08-15T22:28:13',
is_public: false,
label: 'Container Linux',
description: null
}
];
40 changes: 26 additions & 14 deletions src/components/AccessPanel/AccessPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import * as classNames from 'classnames';
import * as React from 'react';
import { compose } from 'recompose';
import CheckBox from 'src/components/CheckBox';
import Paper from 'src/components/core/Paper';
import {
Expand All @@ -11,7 +13,7 @@ import TableHead from 'src/components/core/TableHead';
import TableRow from 'src/components/core/TableRow';
import Notice from 'src/components/Notice';
import PasswordInput from 'src/components/PasswordInput';
import RenderGuard from 'src/components/RenderGuard';
import RenderGuard, { RenderGuardProps } from 'src/components/RenderGuard';
import Table from 'src/components/Table';
import TableCell from 'src/components/TableCell';
import TableHeader from 'src/components/TableHeader';
Expand Down Expand Up @@ -59,11 +61,6 @@ const styles: StyleRulesCallback<ClassNames> = theme => ({

const styled = withStyles(styles);

export interface Disabled {
disabled?: boolean;
reason?: string;
}

interface Props {
password: string | null;
error?: string;
Expand All @@ -74,7 +71,10 @@ interface Props {
required?: boolean;
placeholder?: string;
users?: UserSSHKeyObject[];
passwordFieldDisabled?: Disabled;
disabled?: boolean;
disabledReason?: string;
hideStrengthLabel?: boolean;
className?: string;
}

export interface UserSSHKeyObject {
Expand All @@ -100,24 +100,33 @@ class AccessPanel extends React.Component<CombinedProps> {
required,
placeholder,
users,
passwordFieldDisabled
disabled,
disabledReason,
hideStrengthLabel,
className
} = this.props;

return (
<Paper className={classes.root}>
<Paper
className={classNames(
{
[classes.root]: true
},
className
)}
>
<div className={!noPadding ? classes.inner : ''} data-qa-password-input>
{error && <Notice text={error} error />}
<PasswordInput
required={required}
disabled={passwordFieldDisabled && passwordFieldDisabled.disabled}
disabledReason={
passwordFieldDisabled && passwordFieldDisabled.reason
}
disabled={disabled}
disabledReason={disabledReason || ''}
autoComplete="new-password"
value={this.props.password || ''}
label={label || 'Root Password'}
placeholder={placeholder || 'Enter a password.'}
onChange={this.handleChange}
hideStrengthLabel={hideStrengthLabel}
/>
{users && users.length > 0 && this.renderUserSSHKeyTable(users)}
</div>
Expand Down Expand Up @@ -175,4 +184,7 @@ class AccessPanel extends React.Component<CombinedProps> {
this.props.handleChange(e.target.value);
}

export default styled(RenderGuard<CombinedProps>(AccessPanel));
export default compose<CombinedProps, Props & RenderGuardProps>(
RenderGuard,
styled
)(AccessPanel);
2 changes: 0 additions & 2 deletions src/components/AccessPanel/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import AccessPanel, {
Disabled as _Disabled,
UserSSHKeyObject as _UserSSHKeyObject
} from './AccessPanel';

/* tslint:disable */
export interface Disabled extends _Disabled {}
export interface UserSSHKeyObject extends _UserSSHKeyObject {}
export default AccessPanel;
21 changes: 2 additions & 19 deletions src/components/CheckoutBar/CheckoutBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as classNames from 'classnames';
import * as React from 'react';
import { StickyProps } from 'react-sticky';
import Button from 'src/components/Button';
import {
StyleRulesCallback,
Expand Down Expand Up @@ -67,13 +66,12 @@ interface Props {
onDeploy: () => void;
heading: string;
calculatedPrice?: number;
isSticky?: boolean;
disabled?: boolean;
isMakingRequest?: boolean;
displaySections?: { title: string; details?: string | number }[];
}

type CombinedProps = Props & StickyProps & WithStyles<ClassNames>;
type CombinedProps = Props & WithStyles<ClassNames>;

class CheckoutBar extends React.Component<CombinedProps> {
static defaultProps: Partial<Props> = {
Expand All @@ -82,13 +80,6 @@ class CheckoutBar extends React.Component<CombinedProps> {

render() {
const {
/**
* Note:
* This 'style' prop is what gives us the "sticky" styles. Other special
* props are available, see https://github.com/captivationsoftware/react-sticky
*/
style,
isSticky,
classes,
onDeploy,
heading,
Expand All @@ -98,16 +89,8 @@ class CheckoutBar extends React.Component<CombinedProps> {
isMakingRequest
} = this.props;

let finalStyle;
if (isSticky) {
finalStyle = {
...style,
paddingTop: 24
};
}

return (
<div className={classes.root} style={finalStyle}>
<div className={classes.root}>
<Typography
role="header"
variant="h2"
Expand Down
8 changes: 6 additions & 2 deletions src/components/LabelAndTagsPanel/LabelAndTagsPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as React from 'react';
import { compose } from 'recompose';
import Paper from 'src/components/core/Paper';
import {
StyleRulesCallback,
WithStyles,
withStyles
} from 'src/components/core/styles';
import Notice from 'src/components/Notice';
import RenderGuard from 'src/components/RenderGuard';
import RenderGuard, { RenderGuardProps } from 'src/components/RenderGuard';
import TagsInput, { TagsInputProps } from 'src/components/TagsInput';
import TextField, { Props as TextFieldProps } from 'src/components/TextField';

Expand Down Expand Up @@ -63,4 +64,7 @@ export class InfoPanel extends React.Component<CombinedProps> {
}
}

export default styled(RenderGuard<CombinedProps>(InfoPanel));
export default compose<CombinedProps, Props & RenderGuardProps>(
RenderGuard,
styled
)(InfoPanel);
21 changes: 15 additions & 6 deletions src/components/PasswordInput/PasswordInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Props = TextFieldProps & {
value?: string;
required?: boolean;
disabledReason?: string;
hideStrengthLabel?: boolean;
};

interface State {
Expand Down Expand Up @@ -67,7 +68,14 @@ class PasswordInput extends React.Component<CombinedProps, State> {

render() {
const { strength } = this.state;
const { classes, value, required, disabledReason, ...rest } = this.props;
const {
classes,
value,
required,
disabledReason,
hideStrengthLabel,
...rest
} = this.props;

return (
<React.Fragment>
Expand All @@ -82,11 +90,12 @@ class PasswordInput extends React.Component<CombinedProps, State> {
required={required}
/>
</Grid>
{
<Grid item xs={12} className={`${classes.strengthIndicator} py0`}>
<StrengthIndicator strength={strength} />
</Grid>
}
<Grid item xs={12} className={`${classes.strengthIndicator} py0`}>
<StrengthIndicator
strength={strength}
hideStrengthLabel={hideStrengthLabel}
/>
</Grid>
</Grid>
<Typography variant="body1" className={classes.infoText}>
Password must be at least 6 characters and contain each of the
Expand Down
7 changes: 5 additions & 2 deletions src/components/PasswordInput/StrengthIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Grid from 'src/components/Grid';

interface Props {
strength: null | 0 | 1 | 2 | 3;
hideStrengthLabel?: boolean;
}
type ClassNames = 'root' | 'block' | 'strengthText' | 'strengthLabel';

Expand Down Expand Up @@ -49,7 +50,7 @@ const styled = withStyles<ClassNames>(styles);
type CombinedProps = Props & WithStyles<ClassNames>;

const StrengthIndicator: React.StatelessComponent<CombinedProps> = props => {
const { classes, strength } = props;
const { classes, strength, hideStrengthLabel } = props;

return (
<Grid
Expand All @@ -75,7 +76,9 @@ const StrengthIndicator: React.StatelessComponent<CombinedProps> = props => {
className={classes.strengthText}
data-qa-password-strength
>
<span className={classes.strengthLabel}>Strength:</span>
{!hideStrengthLabel && (
<span className={classes.strengthLabel}>Strength:</span>
)}
{strength
? (strength === 1 && ' Weak') ||
(strength === 2 && ' Fair') ||
Expand Down
Loading