mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +02:00
chore: fix linting with hoisted eslint
This commit is contained in:
parent
4923f39463
commit
6cfeae136d
2
.gitignore
vendored
2
.gitignore
vendored
@ -158,3 +158,5 @@ _todo
|
|||||||
packages/*/dist
|
packages/*/dist
|
||||||
packages/*/buid
|
packages/*/buid
|
||||||
packages/ui-toolkit/styleguide/
|
packages/ui-toolkit/styleguide/
|
||||||
|
packages/*/package-lock.json
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"version": "independent",
|
"version": "independent",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"hoist": true,
|
"hoist": true,
|
||||||
"nohoist": ["graphi"],
|
"nohoist": ["graphi", "eslint", "jest", "jest-cli", "react-scripts"],
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
]
|
]
|
||||||
|
@ -13,12 +13,14 @@
|
|||||||
"format-staged": "./scripts/format --staged",
|
"format-staged": "./scripts/format --staged",
|
||||||
"lint-license": "./scripts/license-to-fail",
|
"lint-license": "./scripts/license-to-fail",
|
||||||
"lint-docs": "./scripts/quality-docs",
|
"lint-docs": "./scripts/quality-docs",
|
||||||
"lint:root": "eslint scripts/* --fix",
|
"lint-ci:root": "echo 0 `# eslint scripts/* --format junit --output-file $CIRCLE_TEST_REPORTS/lint/container-pilot-dashboard.xml`",
|
||||||
|
"lint:root": "echo 0 `# eslint scripts/* --fix`",
|
||||||
|
"lint-ci:packages": "lerna run lint-ci",
|
||||||
"lint:packages": "lerna run lint",
|
"lint:packages": "lerna run lint",
|
||||||
|
"lint-ci": "redrun -s lint-ci:*",
|
||||||
"lint": "redrun -s lint:*",
|
"lint": "redrun -s lint:*",
|
||||||
|
"test-ci": "lerna run test-ci",
|
||||||
"test": "lerna run test",
|
"test": "lerna run test",
|
||||||
"lint-ci": "eslint scripts/* --format junit --output-file $CIRCLE_TEST_REPORTS/lint/container-pilot-dashboard.xml",
|
|
||||||
"test-ci": "echo 0",
|
|
||||||
"clean": "lerna clean --yes",
|
"clean": "lerna clean --yes",
|
||||||
"bootstrap": "lerna bootstrap",
|
"bootstrap": "lerna bootstrap",
|
||||||
"dev": "redrun -p dev:*",
|
"dev": "redrun -p dev:*",
|
||||||
|
@ -5,11 +5,13 @@ const { GraphQLID, GraphQLBoolean, GraphQLString } = require('graphql');
|
|||||||
|
|
||||||
module.exports.createFirewallRule = {
|
module.exports.createFirewallRule = {
|
||||||
type: FirewallRuleType,
|
type: FirewallRuleType,
|
||||||
description: "Adds a new firewall rule for the specified account. This rule will be added to all the account's instances where it may be necessary",
|
description:
|
||||||
|
"Adds a new firewall rule for the specified account. This rule will be added to all the account's instances where it may be necessary",
|
||||||
args: {
|
args: {
|
||||||
enabled: {
|
enabled: {
|
||||||
type: GraphQLBoolean,
|
type: GraphQLBoolean,
|
||||||
description: 'Indicates if the rule is enabled (optional, false by default)'
|
description:
|
||||||
|
'Indicates if the rule is enabled (optional, false by default)'
|
||||||
},
|
},
|
||||||
rule: {
|
rule: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
@ -31,7 +33,8 @@ module.exports.createFirewallRule = {
|
|||||||
|
|
||||||
module.exports.updateFirewallRule = {
|
module.exports.updateFirewallRule = {
|
||||||
type: FirewallRuleType,
|
type: FirewallRuleType,
|
||||||
description: 'Updates the given rule record and -- depending on rule contents -- adds/removes/updates the rule on all the required instances',
|
description:
|
||||||
|
'Updates the given rule record and -- depending on rule contents -- adds/removes/updates the rule on all the required instances',
|
||||||
args: {
|
args: {
|
||||||
id: {
|
id: {
|
||||||
type: GraphQLID,
|
type: GraphQLID,
|
||||||
@ -39,7 +42,8 @@ module.exports.updateFirewallRule = {
|
|||||||
},
|
},
|
||||||
enabled: {
|
enabled: {
|
||||||
type: GraphQLBoolean,
|
type: GraphQLBoolean,
|
||||||
description: 'Indicates if the rule is enabled (optional, false by default)'
|
description:
|
||||||
|
'Indicates if the rule is enabled (optional, false by default)'
|
||||||
},
|
},
|
||||||
rule: {
|
rule: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
@ -85,7 +89,8 @@ module.exports.disableFirewallRule = {
|
|||||||
|
|
||||||
module.exports.deleteFirewallRule = {
|
module.exports.deleteFirewallRule = {
|
||||||
type: FirewallRuleType,
|
type: FirewallRuleType,
|
||||||
description: 'Removes the given firewall rule from all the required instances',
|
description:
|
||||||
|
'Removes the given firewall rule from all the required instances',
|
||||||
args: {
|
args: {
|
||||||
id: {
|
id: {
|
||||||
type: GraphQLID,
|
type: GraphQLID,
|
||||||
|
@ -15,35 +15,43 @@ module.exports.createImage = {
|
|||||||
args: {
|
args: {
|
||||||
machine: {
|
machine: {
|
||||||
type: new GraphQLNonNull(GraphQLID),
|
type: new GraphQLNonNull(GraphQLID),
|
||||||
description: 'The prepared and stopped instance UUID from which the image is to be created'
|
description:
|
||||||
|
'The prepared and stopped instance UUID from which the image is to be created'
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
type: new GraphQLNonNull(GraphQLString),
|
type: new GraphQLNonNull(GraphQLString),
|
||||||
description: 'The name of the custom image, e.g. "my-image". Maximum 512 characters. However, typical names should be much shorter, e.g. 5-20 characters'
|
description:
|
||||||
|
'The name of the custom image, e.g. "my-image". Maximum 512 characters. However, typical names should be much shorter, e.g. 5-20 characters'
|
||||||
},
|
},
|
||||||
version: {
|
version: {
|
||||||
type: new GraphQLNonNull(GraphQLString),
|
type: new GraphQLNonNull(GraphQLString),
|
||||||
description: 'The version of the custom image, e.g. "1.0.0". Maximum 128 characters'
|
description:
|
||||||
|
'The version of the custom image, e.g. "1.0.0". Maximum 128 characters'
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'A short prose description of this image. Maximum 512 characters'
|
description:
|
||||||
|
'A short prose description of this image. Maximum 512 characters'
|
||||||
},
|
},
|
||||||
homepage: {
|
homepage: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Homepage URL where users can find more information about the image. Maximum 128 characters'
|
description:
|
||||||
|
'Homepage URL where users can find more information about the image. Maximum 128 characters'
|
||||||
},
|
},
|
||||||
eula: {
|
eula: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'URL of the End User License Agreement (EULA) for the image. Maximum 128 characters'
|
description:
|
||||||
|
'URL of the End User License Agreement (EULA) for the image. Maximum 128 characters'
|
||||||
},
|
},
|
||||||
acl: {
|
acl: {
|
||||||
type: new GraphQLList(GraphQLID),
|
type: new GraphQLList(GraphQLID),
|
||||||
description: 'An array of user/account UUIDs to which to give read access to a private image. I.e. this is only relevant for images with public === false'
|
description:
|
||||||
|
'An array of user/account UUIDs to which to give read access to a private image. I.e. this is only relevant for images with public === false'
|
||||||
},
|
},
|
||||||
tags: {
|
tags: {
|
||||||
type: DynamicObjectType,
|
type: DynamicObjectType,
|
||||||
description: 'An object of key/value pairs that allows clients to categorize images by any given criteria'
|
description:
|
||||||
|
'An object of key/value pairs that allows clients to categorize images by any given criteria'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve: (root, args) => {
|
resolve: (root, args) => {
|
||||||
|
@ -5,7 +5,8 @@ const { GraphQLNonNull, GraphQLString, GraphQLID } = require('graphql');
|
|||||||
|
|
||||||
module.exports.createKey = {
|
module.exports.createKey = {
|
||||||
type: KeyType,
|
type: KeyType,
|
||||||
description: 'Uploads a new OpenSSH key to Triton for use in HTTP signing and SSH',
|
description:
|
||||||
|
'Uploads a new OpenSSH key to Triton for use in HTTP signing and SSH',
|
||||||
args: {
|
args: {
|
||||||
name: {
|
name: {
|
||||||
type: new GraphQLNonNull(GraphQLString)
|
type: new GraphQLNonNull(GraphQLString)
|
||||||
@ -15,7 +16,8 @@ module.exports.createKey = {
|
|||||||
},
|
},
|
||||||
userId: {
|
userId: {
|
||||||
type: GraphQLID,
|
type: GraphQLID,
|
||||||
description: 'UserId to add this key to. Leaving this in blank will add the key to the account'
|
description:
|
||||||
|
'UserId to add this key to. Leaving this in blank will add the key to the account'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve: (root, args) => {
|
resolve: (root, args) => {
|
||||||
@ -36,7 +38,8 @@ module.exports.deleteKey = {
|
|||||||
},
|
},
|
||||||
userId: {
|
userId: {
|
||||||
type: GraphQLID,
|
type: GraphQLID,
|
||||||
description: 'UserId who this key belongs to. Leaving this in blank will delete an account key'
|
description:
|
||||||
|
'UserId who this key belongs to. Leaving this in blank will delete an account key'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve: (root, args) => {
|
resolve: (root, args) => {
|
||||||
|
@ -16,11 +16,13 @@ module.exports.createMachine = {
|
|||||||
args: {
|
args: {
|
||||||
name: {
|
name: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Friendly name for this instance; default is the first 8 characters of the machine id'
|
description:
|
||||||
|
'Friendly name for this instance; default is the first 8 characters of the machine id'
|
||||||
},
|
},
|
||||||
package: {
|
package: {
|
||||||
type: new GraphQLNonNull(GraphQLString),
|
type: new GraphQLNonNull(GraphQLString),
|
||||||
description: 'Id of the package to use on provisioning, obtained from ListPackages'
|
description:
|
||||||
|
'Id of the package to use on provisioning, obtained from ListPackages'
|
||||||
},
|
},
|
||||||
image: {
|
image: {
|
||||||
type: new GraphQLNonNull(GraphQLString),
|
type: new GraphQLNonNull(GraphQLString),
|
||||||
@ -32,11 +34,13 @@ module.exports.createMachine = {
|
|||||||
},
|
},
|
||||||
locality: {
|
locality: {
|
||||||
type: MachineType.locality,
|
type: MachineType.locality,
|
||||||
description: 'Optionally specify which instances the new instance should be near or far from'
|
description:
|
||||||
|
'Optionally specify which instances the new instance should be near or far from'
|
||||||
},
|
},
|
||||||
metadata: {
|
metadata: {
|
||||||
type: DynamicObjectType,
|
type: DynamicObjectType,
|
||||||
description: 'An arbitrary set of metadata key/value pairs can be set at provision time'
|
description:
|
||||||
|
'An arbitrary set of metadata key/value pairs can be set at provision time'
|
||||||
},
|
},
|
||||||
tags: {
|
tags: {
|
||||||
type: DynamicObjectType,
|
type: DynamicObjectType,
|
||||||
@ -44,7 +48,8 @@ module.exports.createMachine = {
|
|||||||
},
|
},
|
||||||
firewallEnabled: {
|
firewallEnabled: {
|
||||||
type: GraphQLBoolean,
|
type: GraphQLBoolean,
|
||||||
description: 'Completely enable or disable firewall for this instance. Default is false'
|
description:
|
||||||
|
'Completely enable or disable firewall for this instance. Default is false'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve: (root, args) => {
|
resolve: (root, args) => {
|
||||||
@ -98,7 +103,8 @@ module.exports.startMachine = {
|
|||||||
|
|
||||||
module.exports.startMachineFromSnapshot = {
|
module.exports.startMachineFromSnapshot = {
|
||||||
type: MachineType,
|
type: MachineType,
|
||||||
description: 'If an instance is in the "stopped" state, you can choose to start the instance from the referenced snapshot',
|
description:
|
||||||
|
'If an instance is in the "stopped" state, you can choose to start the instance from the referenced snapshot',
|
||||||
args: {
|
args: {
|
||||||
id: {
|
id: {
|
||||||
type: new GraphQLNonNull(GraphQLID),
|
type: new GraphQLNonNull(GraphQLID),
|
||||||
@ -176,7 +182,8 @@ module.exports.deleteMachine = {
|
|||||||
|
|
||||||
module.exports.auditMachine = {
|
module.exports.auditMachine = {
|
||||||
type: new GraphQLList(DynamicObjectType),
|
type: new GraphQLList(DynamicObjectType),
|
||||||
description: "Provides a list of an instance's accomplished actions. Results are sorted from newest to oldest action",
|
description:
|
||||||
|
"Provides a list of an instance's accomplished actions. Results are sorted from newest to oldest action",
|
||||||
args: {
|
args: {
|
||||||
id: {
|
id: {
|
||||||
type: new GraphQLNonNull(GraphQLID),
|
type: new GraphQLNonNull(GraphQLID),
|
||||||
@ -309,7 +316,8 @@ module.exports.deleteMachineTags = {
|
|||||||
},
|
},
|
||||||
tag: {
|
tag: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Tag name to remove. If value is not supplied, all machine tags are removed'
|
description:
|
||||||
|
'Tag name to remove. If value is not supplied, all machine tags are removed'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve: (root, args) => {
|
resolve: (root, args) => {
|
||||||
|
@ -18,7 +18,8 @@ module.exports.createPolicy = {
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
type: new GraphQLNonNull(new GraphQLList(GraphQLString)),
|
type: new GraphQLNonNull(new GraphQLList(GraphQLString)),
|
||||||
description: 'One or more Aperture sentences to be added to the current policy'
|
description:
|
||||||
|
'One or more Aperture sentences to be added to the current policy'
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
@ -32,7 +33,8 @@ module.exports.createPolicy = {
|
|||||||
|
|
||||||
module.exports.updatePolicy = {
|
module.exports.updatePolicy = {
|
||||||
type: PolicyType,
|
type: PolicyType,
|
||||||
description: 'Upgrades an existing account policy. Everything but id can be modified',
|
description:
|
||||||
|
'Upgrades an existing account policy. Everything but id can be modified',
|
||||||
args: {
|
args: {
|
||||||
id: {
|
id: {
|
||||||
type: new GraphQLNonNull(GraphQLID)
|
type: new GraphQLNonNull(GraphQLID)
|
||||||
@ -43,7 +45,8 @@ module.exports.updatePolicy = {
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
type: new GraphQLNonNull(new GraphQLList(GraphQLString)),
|
type: new GraphQLNonNull(new GraphQLList(GraphQLString)),
|
||||||
description: 'One or more Aperture sentences to be added to the current policy'
|
description:
|
||||||
|
'One or more Aperture sentences to be added to the current policy'
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
|
@ -22,11 +22,13 @@ module.exports.createRole = {
|
|||||||
},
|
},
|
||||||
members: {
|
members: {
|
||||||
type: new GraphQLList(GraphQLString),
|
type: new GraphQLList(GraphQLString),
|
||||||
description: "This account's user logins to be added to this role (Optional)"
|
description:
|
||||||
|
"This account's user logins to be added to this role (Optional)"
|
||||||
},
|
},
|
||||||
defaultMembers: {
|
defaultMembers: {
|
||||||
type: new GraphQLList(GraphQLString),
|
type: new GraphQLList(GraphQLString),
|
||||||
description: "This account's user logins to be added to this role and have it enabled by default (Optional)"
|
description:
|
||||||
|
"This account's user logins to be added to this role and have it enabled by default (Optional)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve: (root, args) => {
|
resolve: (root, args) => {
|
||||||
@ -51,11 +53,13 @@ module.exports.updateRole = {
|
|||||||
},
|
},
|
||||||
members: {
|
members: {
|
||||||
type: new GraphQLList(GraphQLString),
|
type: new GraphQLList(GraphQLString),
|
||||||
description: "This account's user logins to be added to this role (Optional)"
|
description:
|
||||||
|
"This account's user logins to be added to this role (Optional)"
|
||||||
},
|
},
|
||||||
defaultMembers: {
|
defaultMembers: {
|
||||||
type: new GraphQLList(GraphQLString),
|
type: new GraphQLList(GraphQLString),
|
||||||
description: "This account's user logins to be added to this role and have it enabled by default (Optional)"
|
description:
|
||||||
|
"This account's user logins to be added to this role and have it enabled by default (Optional)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve: (root, args) => {
|
resolve: (root, args) => {
|
||||||
@ -80,7 +84,8 @@ module.exports.deleteRole = {
|
|||||||
|
|
||||||
module.exports.setRoleTags = {
|
module.exports.setRoleTags = {
|
||||||
type: RoleType.tag,
|
type: RoleType.tag,
|
||||||
description: "Sets the given role tags to the provided resource path. resource_path can be the path to any of the CloudAPI resources described in this document: account, keys, users, roles, policies, user's ssh keys, datacenters, images, packages, instances, analytics, instrumentations, firewall rules and networks.",
|
description:
|
||||||
|
"Sets the given role tags to the provided resource path. resource_path can be the path to any of the CloudAPI resources described in this document: account, keys, users, roles, policies, user's ssh keys, datacenters, images, packages, instances, analytics, instrumentations, firewall rules and networks.",
|
||||||
args: {
|
args: {
|
||||||
resource: {
|
resource: {
|
||||||
type: new GraphQLNonNull(GraphQLString),
|
type: new GraphQLNonNull(GraphQLString),
|
||||||
|
@ -29,7 +29,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
state: {
|
state: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Filter on image state. By default only active images are shown. Use "all" to list all images'
|
description:
|
||||||
|
'Filter on image state. By default only active images are shown. Use "all" to list all images'
|
||||||
},
|
},
|
||||||
owner: {
|
owner: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
|
@ -16,7 +16,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Machine name to find (will make your list size 1, or 0 if nothing found)'
|
description:
|
||||||
|
'Machine name to find (will make your list size 1, or 0 if nothing found)'
|
||||||
},
|
},
|
||||||
image: {
|
image: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
@ -36,7 +37,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
first: {
|
first: {
|
||||||
type: GraphQLInt,
|
type: GraphQLInt,
|
||||||
description: 'Return a max of N instances; default is 1000 (which is also the maximum allowable result set size)'
|
description:
|
||||||
|
'Return a max of N instances; default is 1000 (which is also the maximum allowable result set size)'
|
||||||
},
|
},
|
||||||
after: {
|
after: {
|
||||||
type: GraphQLInt,
|
type: GraphQLInt,
|
||||||
@ -48,11 +50,13 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
docker: {
|
docker: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Whether to only list Docker instances, or only non-Docker instances, if present. Defaults to showing all instances.'
|
description:
|
||||||
|
'Whether to only list Docker instances, or only non-Docker instances, if present. Defaults to showing all instances.'
|
||||||
},
|
},
|
||||||
credentials: {
|
credentials: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Whether to include the generated credentials for instances, if present. Defaults to false'
|
description:
|
||||||
|
'Whether to include the generated credentials for instances, if present. Defaults to false'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve(root, args) {
|
resolve(root, args) {
|
||||||
|
@ -29,7 +29,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
lwps: {
|
lwps: {
|
||||||
type: GraphQLInt,
|
type: GraphQLInt,
|
||||||
description: 'Filter on maximum number of light-weight processes (threads) allowed'
|
description:
|
||||||
|
'Filter on maximum number of light-weight processes (threads) allowed'
|
||||||
},
|
},
|
||||||
vcpus: {
|
vcpus: {
|
||||||
type: GraphQLInt,
|
type: GraphQLInt,
|
||||||
|
@ -7,19 +7,23 @@ const CallerType = new GraphQLObjectType({
|
|||||||
fields: {
|
fields: {
|
||||||
type: {
|
type: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Authentication type for the action request. One of "basic", "operator", "signature" or "token"'
|
description:
|
||||||
|
'Authentication type for the action request. One of "basic", "operator", "signature" or "token"'
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'When the authentication type is "basic", this member will be present and include user login'
|
description:
|
||||||
|
'When the authentication type is "basic", this member will be present and include user login'
|
||||||
},
|
},
|
||||||
ip: {
|
ip: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'The IP addresses this from which the action was requested. Not present if type is "operator"'
|
description:
|
||||||
|
'The IP addresses this from which the action was requested. Not present if type is "operator"'
|
||||||
},
|
},
|
||||||
keyId: {
|
keyId: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'When authentication type is either "signature" or "token", SSH key identifier'
|
description:
|
||||||
|
'When authentication type is either "signature" or "token", SSH key identifier'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -33,7 +37,8 @@ module.exports = new GraphQLObjectType({
|
|||||||
},
|
},
|
||||||
parameters: {
|
parameters: {
|
||||||
type: DynamicObjectType,
|
type: DynamicObjectType,
|
||||||
description: 'The original set of parameters sent when the action was requested'
|
description:
|
||||||
|
'The original set of parameters sent when the action was requested'
|
||||||
},
|
},
|
||||||
success: {
|
success: {
|
||||||
type: GraphQLBoolean,
|
type: GraphQLBoolean,
|
||||||
|
@ -14,7 +14,8 @@ const ErrorType = new GraphQLObjectType({
|
|||||||
fields: {
|
fields: {
|
||||||
code: {
|
code: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'A CamelCase string code for this error, e.g. "PrepareImageDidNotRun". See GetImage docs for a table of error.code values'
|
description:
|
||||||
|
'A CamelCase string code for this error, e.g. "PrepareImageDidNotRun". See GetImage docs for a table of error.code values'
|
||||||
},
|
},
|
||||||
message: {
|
message: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
@ -28,11 +29,13 @@ const ImageFileType = new GraphQLObjectType({
|
|||||||
fields: {
|
fields: {
|
||||||
compression: {
|
compression: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'The type of file compression used for the image file. One of "bzip2", "gzip", "none"'
|
description:
|
||||||
|
'The type of file compression used for the image file. One of "bzip2", "gzip", "none"'
|
||||||
},
|
},
|
||||||
sha1: {
|
sha1: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'SHA-1 hex digest of the file content. Used for corruption checking'
|
description:
|
||||||
|
'SHA-1 hex digest of the file content. Used for corruption checking'
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
type: GraphQLInt,
|
type: GraphQLInt,
|
||||||
@ -43,7 +46,8 @@ const ImageFileType = new GraphQLObjectType({
|
|||||||
|
|
||||||
module.exports = new GraphQLObjectType({
|
module.exports = new GraphQLObjectType({
|
||||||
name: 'ImageType',
|
name: 'ImageType',
|
||||||
description: 'An image contains the software packages that will be available on newly-provisioned instance. In the case of hardware virtual machines, the image also includes the operating system',
|
description:
|
||||||
|
'An image contains the software packages that will be available on newly-provisioned instance. In the case of hardware virtual machines, the image also includes the operating system',
|
||||||
fields: {
|
fields: {
|
||||||
id: {
|
id: {
|
||||||
type: GraphQLID,
|
type: GraphQLID,
|
||||||
@ -67,15 +71,18 @@ module.exports = new GraphQLObjectType({
|
|||||||
},
|
},
|
||||||
requirements: {
|
requirements: {
|
||||||
type: DynamicObjectType,
|
type: DynamicObjectType,
|
||||||
description: 'Contains a grouping of various minimum requirements for provisioning an instance with this image. For example "password" indicates that a password must be provided'
|
description:
|
||||||
|
'Contains a grouping of various minimum requirements for provisioning an instance with this image. For example "password" indicates that a password must be provided'
|
||||||
},
|
},
|
||||||
homepage: {
|
homepage: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'The URL for a web page with more detailed information for this image'
|
description:
|
||||||
|
'The URL for a web page with more detailed information for this image'
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
type: new GraphQLList(ImageFileType),
|
type: new GraphQLList(ImageFileType),
|
||||||
description: 'An array of image files that make up each image. Currently only a single file per image is supported'
|
description:
|
||||||
|
'An array of image files that make up each image. Currently only a single file per image is supported'
|
||||||
},
|
},
|
||||||
publishedAt: {
|
publishedAt: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
@ -94,11 +101,13 @@ module.exports = new GraphQLObjectType({
|
|||||||
},
|
},
|
||||||
state: {
|
state: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'The current state of the image. One of "active", "unactivated", "disabled", "creating", "failed"'
|
description:
|
||||||
|
'The current state of the image. One of "active", "unactivated", "disabled", "creating", "failed"'
|
||||||
},
|
},
|
||||||
tags: {
|
tags: {
|
||||||
type: DynamicObjectType,
|
type: DynamicObjectType,
|
||||||
description: 'An object of key/value pairs that allows clients to categorize images by any given criteria'
|
description:
|
||||||
|
'An object of key/value pairs that allows clients to categorize images by any given criteria'
|
||||||
},
|
},
|
||||||
eula: {
|
eula: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
@ -106,11 +115,13 @@ module.exports = new GraphQLObjectType({
|
|||||||
},
|
},
|
||||||
acl: {
|
acl: {
|
||||||
type: new GraphQLList(GraphQLString),
|
type: new GraphQLList(GraphQLString),
|
||||||
description: 'Access Control List. An array of account UUIDs given access to a private image. The field is only relevant to private images'
|
description:
|
||||||
|
'Access Control List. An array of account UUIDs given access to a private image. The field is only relevant to private images'
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
type: ErrorType,
|
type: ErrorType,
|
||||||
description: 'If state=="failed", resulting from CreateImageFromMachine failure, then there may be an error object of the form {"code": "<string error code>", "message": "<string desc>"}'
|
description:
|
||||||
|
'If state=="failed", resulting from CreateImageFromMachine failure, then there may be an error object of the form {"code": "<string error code>", "message": "<string desc>"}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -14,7 +14,8 @@ const {
|
|||||||
|
|
||||||
module.exports = new GraphQLObjectType({
|
module.exports = new GraphQLObjectType({
|
||||||
name: 'MachineType',
|
name: 'MachineType',
|
||||||
description: 'An image contains the software packages that will be available on newly-provisioned instance. In the case of hardware virtual machines, the image also includes the operating system',
|
description:
|
||||||
|
'An image contains the software packages that will be available on newly-provisioned instance. In the case of hardware virtual machines, the image also includes the operating system',
|
||||||
// Function to allow circular dependencies
|
// Function to allow circular dependencies
|
||||||
fields: () => ({
|
fields: () => ({
|
||||||
id: {
|
id: {
|
||||||
|
@ -10,7 +10,8 @@ const {
|
|||||||
|
|
||||||
module.exports = new GraphQLObjectType({
|
module.exports = new GraphQLObjectType({
|
||||||
name: 'NetworkType',
|
name: 'NetworkType',
|
||||||
description: 'Logical networks in Triton model core network configurations to enable Triton to define Virtual Network Interfaces and IP addresses for instances',
|
description:
|
||||||
|
'Logical networks in Triton model core network configurations to enable Triton to define Virtual Network Interfaces and IP addresses for instances',
|
||||||
fields: {
|
fields: {
|
||||||
id: {
|
id: {
|
||||||
type: GraphQLID,
|
type: GraphQLID,
|
||||||
|
@ -2,7 +2,8 @@ const { GraphQLBoolean, GraphQLObjectType, GraphQLString } = require('graphql');
|
|||||||
|
|
||||||
module.exports = new GraphQLObjectType({
|
module.exports = new GraphQLObjectType({
|
||||||
name: 'NicType',
|
name: 'NicType',
|
||||||
description: 'Logical networks are used both on head nodes and compute nodes, and are associated with physical interfaces by using a system called NIC Tags',
|
description:
|
||||||
|
'Logical networks are used both on head nodes and compute nodes, and are associated with physical interfaces by using a system called NIC Tags',
|
||||||
fields: {
|
fields: {
|
||||||
ip: {
|
ip: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
@ -29,7 +30,8 @@ module.exports = new GraphQLObjectType({
|
|||||||
},
|
},
|
||||||
state: {
|
state: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
description: 'Describes the state of the NIC (e.g. provisioning, running, or stopped)'
|
description:
|
||||||
|
'Describes the state of the NIC (e.g. provisioning, running, or stopped)'
|
||||||
},
|
},
|
||||||
network: {
|
network: {
|
||||||
type: GraphQLString,
|
type: GraphQLString,
|
||||||
|
@ -7,7 +7,8 @@ const {
|
|||||||
|
|
||||||
module.exports = new GraphQLObjectType({
|
module.exports = new GraphQLObjectType({
|
||||||
name: 'RoleType',
|
name: 'RoleType',
|
||||||
description: 'Roles are lists of users and policies. Roles describe which users are allowed access according to the policies',
|
description:
|
||||||
|
'Roles are lists of users and policies. Roles describe which users are allowed access according to the policies',
|
||||||
fields: {
|
fields: {
|
||||||
id: {
|
id: {
|
||||||
type: GraphQLID,
|
type: GraphQLID,
|
||||||
@ -27,7 +28,8 @@ module.exports = new GraphQLObjectType({
|
|||||||
},
|
},
|
||||||
defaultMembers: {
|
defaultMembers: {
|
||||||
type: new GraphQLList(GraphQLString),
|
type: new GraphQLList(GraphQLString),
|
||||||
description: "This account's user logins this role applies to by default (Optional)"
|
description:
|
||||||
|
"This account's user logins this role applies to by default (Optional)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "joyent-portal",
|
"extends": "joyent-portal",
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-console": 0
|
"no-console": 0,
|
||||||
|
"new-cap": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-frontend.xml",
|
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-frontend.xml",
|
||||||
"lint-ci": "redrun -p lint-ci:*",
|
"lint-ci": "redrun -p lint-ci:*",
|
||||||
"test": "NODE_ENV=test ./test/run --env=jsdom",
|
"test": "NODE_ENV=test ./test/run --env=jsdom",
|
||||||
"test-ci": "NODE_ENV=test JEST_JUNIT_OUTPUT=$CIRCLE_TEST_REPORTS/test/cp-frontend.xml ./test/run --env=jsdom --coverage --coverageDirectory=$CIRCLE_ARTIFACTS/cp-frontend --testResultsProcessor='./node_modules/jest-junit'",
|
"test-ci": "NODE_ENV=test JEST_JUNIT_OUTPUT=$CIRCLE_TEST_REPORTS/test/cp-frontend.xml ./test/run --env=jsdom --coverage --coverageDirectory=$CIRCLE_ARTIFACTS/cp-frontend --testResultsProcessor=$(node -e \"console.log(require.resolve('jest-junit'))\")",
|
||||||
"postinstall": "node scripts/postinstall"
|
"postinstall": "node scripts/postinstall"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -23,6 +23,7 @@
|
|||||||
"apr-intercept": "^1.0.4",
|
"apr-intercept": "^1.0.4",
|
||||||
"constant-case": "^2.0.0",
|
"constant-case": "^2.0.0",
|
||||||
"graphql-tag": "^2.2.2",
|
"graphql-tag": "^2.2.2",
|
||||||
|
"jest-cli": "^20.0.4",
|
||||||
"joyent-manifest-editor": "^1.0.0",
|
"joyent-manifest-editor": "^1.0.0",
|
||||||
"joyent-ui-toolkit": "^1.1.0",
|
"joyent-ui-toolkit": "^1.1.0",
|
||||||
"lodash.isstring": "^4.0.1",
|
"lodash.isstring": "^4.0.1",
|
||||||
|
@ -4,6 +4,7 @@ const forEach = require('apr-for-each');
|
|||||||
const find = require('apr-find');
|
const find = require('apr-find');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
|
const ROOT = path.join(__dirname, '../node_modules/react-scripts/config');
|
||||||
const configs = ['webpack.config.dev', 'webpack.config.prod'];
|
const configs = ['webpack.config.dev', 'webpack.config.prod'];
|
||||||
|
|
||||||
const toCopy = [
|
const toCopy = [
|
||||||
@ -12,8 +13,6 @@ const toCopy = [
|
|||||||
'webpack.config.prod'
|
'webpack.config.prod'
|
||||||
];
|
];
|
||||||
|
|
||||||
let ROOT;
|
|
||||||
|
|
||||||
const backup = async file => {
|
const backup = async file => {
|
||||||
const backupPath = path.join(ROOT, `${file}.original.js`);
|
const backupPath = path.join(ROOT, `${file}.original.js`);
|
||||||
const backupExists = await exists(backupPath);
|
const backupExists = await exists(backupPath);
|
||||||
@ -37,15 +36,6 @@ const copy = async file => {
|
|||||||
|
|
||||||
main(
|
main(
|
||||||
(async () => {
|
(async () => {
|
||||||
ROOT = await find([
|
|
||||||
path.join(__dirname, '../node_modules/react-scripts/config'),
|
|
||||||
path.join(__dirname, '../../../node_modules/react-scripts/config')
|
|
||||||
], exists);
|
|
||||||
|
|
||||||
if (!ROOT) {
|
|
||||||
throw new Error('react-scripts not found');
|
|
||||||
}
|
|
||||||
|
|
||||||
await forEach(configs, backup);
|
await forEach(configs, backup);
|
||||||
await forEach(toCopy, copy);
|
await forEach(toCopy, copy);
|
||||||
})()
|
})()
|
||||||
|
@ -3,7 +3,6 @@ import { reduxForm } from 'redux-form';
|
|||||||
import { compose, graphql } from 'react-apollo';
|
import { compose, graphql } from 'react-apollo';
|
||||||
import { Redirect } from 'react-router-dom';
|
import { Redirect } from 'react-router-dom';
|
||||||
import intercept from 'apr-intercept';
|
import intercept from 'apr-intercept';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import paramCase from 'param-case';
|
import paramCase from 'param-case';
|
||||||
|
|
||||||
import DeploymentGroupBySlug from '@graphql/DeploymentGroupBySlug.gql';
|
import DeploymentGroupBySlug from '@graphql/DeploymentGroupBySlug.gql';
|
||||||
@ -29,6 +28,7 @@ const validateName = async ({ name = '' }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (data.deploymentGroups.length) {
|
if (data.deploymentGroups.length) {
|
||||||
|
// eslint-disable-next-line no-throw-literal
|
||||||
throw { name: `"${name}" already exists!` };
|
throw { name: `"${name}" already exists!` };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -132,7 +132,7 @@ class DeploymentGroupCreate extends Component {
|
|||||||
const { manifest } = this.state;
|
const { manifest } = this.state;
|
||||||
const { provisionManifest } = this.props;
|
const { provisionManifest } = this.props;
|
||||||
|
|
||||||
const [err, { data }] = await intercept(
|
const [err] = await intercept(
|
||||||
provisionManifest({
|
provisionManifest({
|
||||||
deploymentGroupId,
|
deploymentGroupId,
|
||||||
type: 'COMPOSE',
|
type: 'COMPOSE',
|
||||||
|
@ -1,6 +1,85 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`renders <Header /> without throwing 1`] = `
|
exports[`renders <Header /> without throwing 1`] = `
|
||||||
|
.iKAUmn {
|
||||||
|
font-family: "Libre Franklin",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica,sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
-webkit-text-transform: uppercase;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: ;
|
||||||
|
font-size: 1.8125rem;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.eVSukw {
|
||||||
|
-webkit-flex: 1 1 auto;
|
||||||
|
-ms-flex: 1 1 auto;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
-webkit-align-self: stretch;
|
||||||
|
-ms-flex-item-align: stretch;
|
||||||
|
align-self: stretch;
|
||||||
|
-webkit-order: 0;
|
||||||
|
-ms-flex-order: 0;
|
||||||
|
order: 0;
|
||||||
|
padding: 0.9375rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.facVTr {
|
||||||
|
font-family: "Libre Franklin",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica,sans-serif;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.5rem;
|
||||||
|
font-size: 0.9375rem;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
color: ;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hnPDgK {
|
||||||
|
-webkit-flex: 0 1 auto;
|
||||||
|
-ms-flex: 0 1 auto;
|
||||||
|
flex: 0 1 auto;
|
||||||
|
-webkit-align-self: auto;
|
||||||
|
-ms-flex-item-align: auto;
|
||||||
|
align-self: auto;
|
||||||
|
-webkit-order: 0;
|
||||||
|
-ms-flex-order: 0;
|
||||||
|
order: 0;
|
||||||
|
padding: 0.9375rem 0;
|
||||||
|
width: 6.25rem;
|
||||||
|
max-width: 6.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fAWQXE {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-flex-direction: row;
|
||||||
|
-ms-flex-direction: row;
|
||||||
|
flex-direction: row;
|
||||||
|
-webkit-flex-wrap: nowrap;
|
||||||
|
-ms-flex-wrap: nowrap;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
-webkit-box-pack: space-between;
|
||||||
|
-webkit-justify-content: space-between;
|
||||||
|
-ms-flex-pack: space-between;
|
||||||
|
justify-content: space-between;
|
||||||
|
-webkit-align-content: stretch;
|
||||||
|
-ms-flex-line-pack: stretch;
|
||||||
|
align-content: stretch;
|
||||||
|
-webkit-align-items: stretch;
|
||||||
|
-webkit-box-align: stretch;
|
||||||
|
-ms-flex-align: stretch;
|
||||||
|
align-items: stretch;
|
||||||
|
background-color: ;
|
||||||
|
max-height: 3.3125rem;
|
||||||
|
min-height: 3.3125rem;
|
||||||
|
padding: 0 1.125rem;
|
||||||
|
line-height: 1.5625rem;
|
||||||
|
}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="header__Header-cywcLi fAWQXE"
|
className="header__Header-cywcLi fAWQXE"
|
||||||
>
|
>
|
||||||
@ -8,14 +87,14 @@ exports[`renders <Header /> without throwing 1`] = `
|
|||||||
className="brand__Box-cSEQoZ eVSukw"
|
className="brand__Box-cSEQoZ eVSukw"
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
className="sc-chPdSV giFJbY"
|
className="sc-kkGfuU iKAUmn"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="/"
|
href="/"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
className="sc-bdVaJa kujeyI"
|
className="sc-hSdWYo iogIsy"
|
||||||
src="test-file-mock"
|
src="test-file-mock"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
@ -25,14 +104,14 @@ exports[`renders <Header /> without throwing 1`] = `
|
|||||||
className="item__Box-hzIdkQ hnPDgK"
|
className="item__Box-hzIdkQ hnPDgK"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
className="sc-kgoBCf dYRxpA"
|
className="sc-iAyFgw facVTr"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="item__Box-hzIdkQ hnPDgK"
|
className="item__Box-hzIdkQ hnPDgK"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
className="sc-kgoBCf dYRxpA"
|
className="sc-iAyFgw facVTr"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
* @jest-environment node
|
* @jest-environment node
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// import 'jest-styled-components';
|
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import renderer from 'react-test-renderer';
|
import renderer from 'react-test-renderer';
|
||||||
|
import 'jest-styled-components';
|
||||||
|
|
||||||
import Header from '@components/navigation/header';
|
import Header from '@components/navigation/header';
|
||||||
import { Router } from './mocks';
|
import { Router } from './mocks';
|
||||||
|
|
||||||
it('renders <Header /> without throwing', () => {
|
it('renders <Header /> without throwing', () => {
|
||||||
const tree = renderer.create(<Router><Header /></Router>).toJSON();
|
const tree = renderer.create(<Router><Header /></Router>).toJSON();
|
||||||
expect(tree).toMatchSnapshot();
|
expect(tree).toMatchStyledComponentsSnapshot();
|
||||||
});
|
});
|
||||||
|
@ -2,6 +2,5 @@ import React from 'react';
|
|||||||
import { client, store } from '@state/store';
|
import { client, store } from '@state/store';
|
||||||
import { ApolloProvider } from 'react-apollo';
|
import { ApolloProvider } from 'react-apollo';
|
||||||
|
|
||||||
export default ({ children }) => (
|
export default ({ children }) =>
|
||||||
<ApolloProvider client={client} store={store}>{children}</ApolloProvider>
|
<ApolloProvider client={client} store={store}>{children}</ApolloProvider>;
|
||||||
);
|
|
||||||
|
@ -2,6 +2,5 @@ import React from 'react';
|
|||||||
import { ThemeProvider } from 'styled-components';
|
import { ThemeProvider } from 'styled-components';
|
||||||
import { theme } from 'joyent-ui-toolkit';
|
import { theme } from 'joyent-ui-toolkit';
|
||||||
|
|
||||||
export default ({ children }) => (
|
export default ({ children }) =>
|
||||||
<ThemeProvider theme={theme}>{children}</ThemeProvider>
|
<ThemeProvider theme={theme}>{children}</ThemeProvider>;
|
||||||
);
|
|
||||||
|
@ -10,14 +10,26 @@
|
|||||||
"test": "echo 0",
|
"test": "echo 0",
|
||||||
"test-ci": "echo 0"
|
"test-ci": "echo 0"
|
||||||
},
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"babel-eslint": "^7.2.3",
|
||||||
|
"eslint": "^3.19.0",
|
||||||
|
"eslint-config-prettier": "^2.1.1",
|
||||||
|
"eslint-config-react-app": "^1.0.4",
|
||||||
|
"eslint-config-xo-space": "^0.16.0",
|
||||||
|
"eslint-plugin-flowtype": "^2.34.0",
|
||||||
|
"eslint-plugin-import": "^2.3.0",
|
||||||
|
"eslint-plugin-jsx-a11y": "^5.0.3",
|
||||||
|
"eslint-plugin-prettier": "^2.1.1",
|
||||||
|
"eslint-plugin-react": "^7.0.1"
|
||||||
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"babel-eslint": "^7.2.3",
|
"babel-eslint": "^7.2.3",
|
||||||
"eslint": "^3.19.0",
|
"eslint": "^3.19.0",
|
||||||
"eslint-config-prettier": "^2.1.1",
|
"eslint-config-prettier": "^2.1.1",
|
||||||
"eslint-config-react-app": "^0.6.2",
|
"eslint-config-react-app": "^1.0.4",
|
||||||
"eslint-config-xo-space": "^0.16.0",
|
"eslint-config-xo-space": "^0.16.0",
|
||||||
"eslint-plugin-flowtype": "^2.33.0",
|
"eslint-plugin-flowtype": "^2.34.0",
|
||||||
"eslint-plugin-import": "^2.2.0",
|
"eslint-plugin-import": "^2.3.0",
|
||||||
"eslint-plugin-jsx-a11y": "^5.0.3",
|
"eslint-plugin-jsx-a11y": "^5.0.3",
|
||||||
"eslint-plugin-prettier": "^2.1.1",
|
"eslint-plugin-prettier": "^2.1.1",
|
||||||
"eslint-plugin-react": "^7.0.1"
|
"eslint-plugin-react": "^7.0.1"
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/manifest-editor.xml",
|
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/manifest-editor.xml",
|
||||||
"lint": "redrun -s lint:*",
|
"lint": "redrun -s lint:*",
|
||||||
"lint-ci": "redrun -p lint-ci:*",
|
"lint-ci": "redrun -p lint-ci:*",
|
||||||
"test": "echo 0 # bup && NODE_ENV=test jest --coverage",
|
"test": "echo 0 `# bup && NODE_ENV=test jest --coverage`",
|
||||||
"test-ci": "echo 0 # NODE_ENV=test JEST_JUNIT_OUTPUT=$CIRCLE_TEST_REPORTS/test/manifest-editor.xml jest --coverage --coverageDirectory=$CIRCLE_ARTIFACTS/manifest-editor --testResultsProcessor='./node_modules/jest-junit'",
|
"test-ci": "echo 0 `# NODE_ENV=test JEST_JUNIT_OUTPUT=$CIRCLE_TEST_REPORTS/test/manifest-editor.xml jest --coverage --coverageDirectory=$CIRCLE_ARTIFACTS/manifest-editor --testResultsProcessor=$(node -e \"console.log(require.resolve('jest-junit'))\")`",
|
||||||
"build": "bup",
|
"build": "bup",
|
||||||
"prepublish": "redrun build"
|
"prepublish": "redrun build"
|
||||||
},
|
},
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
"lint": "redrun -s lint:*",
|
"lint": "redrun -s lint:*",
|
||||||
"lint-ci": "redrun -p lint-ci:*",
|
"lint-ci": "redrun -p lint-ci:*",
|
||||||
"test": "bup && NODE_ENV=test jest --coverage",
|
"test": "bup && NODE_ENV=test jest --coverage",
|
||||||
"test-ci": "NODE_ENV=test JEST_JUNIT_OUTPUT=$CIRCLE_TEST_REPORTS/test/normalized-styled-components.xml jest --coverage --coverageDirectory=$CIRCLE_ARTIFACTS/normalized-styled-components --testResultsProcessor='./node_modules/jest-junit'",
|
"test-ci": "NODE_ENV=test JEST_JUNIT_OUTPUT=$CIRCLE_TEST_REPORTS/test/normalized-styled-components.xml jest --coverage --coverageDirectory=$CIRCLE_ARTIFACTS/normalized-styled-components --testResultsProcessor=$(node -e \"console.log(require.resolve('jest-junit'))\")",
|
||||||
"build": "bup",
|
"build": "bup",
|
||||||
"prepublish": "redrun build"
|
"prepublish": "redrun build"
|
||||||
},
|
},
|
||||||
@ -46,6 +46,7 @@
|
|||||||
"jest-snapshot": "^20.0.3",
|
"jest-snapshot": "^20.0.3",
|
||||||
"jest-styled-components": "^3.0.0-2",
|
"jest-styled-components": "^3.0.0-2",
|
||||||
"react": "^15.5.4",
|
"react": "^15.5.4",
|
||||||
|
"react-scripts": "^1.0.7",
|
||||||
"react-test-renderer": "^15.5.4",
|
"react-test-renderer": "^15.5.4",
|
||||||
"redrun": "^5.9.14",
|
"redrun": "^5.9.14",
|
||||||
"strip-ansi": "^3.0.1",
|
"strip-ansi": "^3.0.1",
|
||||||
@ -60,7 +61,19 @@
|
|||||||
"styled-components": "*"
|
"styled-components": "*"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
|
"testEnvironment": "jsdom",
|
||||||
|
"testRegex": "test/index.js",
|
||||||
|
"setupFiles": [
|
||||||
|
"<rootDir>/node_modules/react-scripts/config/polyfills.js"
|
||||||
|
],
|
||||||
"testEnvironment": "node",
|
"testEnvironment": "node",
|
||||||
"testRegex": "test/index.js"
|
"transform": {
|
||||||
|
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/react-scripts/config/jest/babelTransform.js",
|
||||||
|
"^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/node_modules/react-scripts/config/jest/fileTransform.js"
|
||||||
|
},
|
||||||
|
"transformIgnorePatterns": [
|
||||||
|
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
|
||||||
|
],
|
||||||
|
"rootDir": "."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`renders <A /> correctly 1`] = `
|
exports[`renders <A /> correctly 1`] = `
|
||||||
.lovCuy {
|
.jleQxG {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
-webkit-text-decoration-skip: objects;
|
||||||
text-decoration-skip: objects;
|
text-decoration-skip: objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
<a
|
<a
|
||||||
className="src__A-ecpVJh lovCuy"
|
className="sc-gqjmRU jleQxG"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -15,215 +16,216 @@ exports[`renders <Abbr /> correctly 1`] = `
|
|||||||
|
|
||||||
|
|
||||||
<abbr
|
<abbr
|
||||||
className="src__Abbr-bAnqpS gtMeep"
|
className="sc-VigVT ijOVMO"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Article /> correctly 1`] = `
|
exports[`renders <Article /> correctly 1`] = `
|
||||||
.ikMeRt {
|
.fpcbkF {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<article
|
<article
|
||||||
className="src__Article-cKDuAy ikMeRt"
|
className="sc-bdVaJa fpcbkF"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Aside /> correctly 1`] = `
|
exports[`renders <Aside /> correctly 1`] = `
|
||||||
.ijRwfR {
|
.gbieAY {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<aside
|
<aside
|
||||||
className="src__Aside-blfygu ijRwfR"
|
className="sc-bwzfXH gbieAY"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Audio /> correctly 1`] = `
|
exports[`renders <Audio /> correctly 1`] = `
|
||||||
.eYhVCs {
|
.SYMpT {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.eYhVCs:not([controls]) {
|
.SYMpT:not([controls]) {
|
||||||
display: none;
|
display: none;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
<audio
|
<audio
|
||||||
className="src__Audio-cpeMhj eYhVCs"
|
className="sc-ckVGcZ SYMpT"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <B /> correctly 1`] = `
|
exports[`renders <B /> correctly 1`] = `
|
||||||
.dLmUSQ {
|
.vhpOG {
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
<b
|
<b
|
||||||
className="src__B-kYcTRm dLmUSQ"
|
className="sc-jTzLTM vhpOG"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Button /> correctly 1`] = `
|
exports[`renders <Button /> correctly 1`] = `
|
||||||
.iRzzDR {
|
.efaqoE {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
-webkit-text-transform: none;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
-webkit-appearance: button;
|
-webkit-appearance: button;
|
||||||
-moz-appearance: button;
|
-moz-appearance: button;
|
||||||
appearance: button;
|
appearance: button;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iRzzDR::-moz-focus-inner,
|
.efaqoE::-moz-focus-inner,
|
||||||
.iRzzDR[type="button"]::-moz-focus-inner,
|
.efaqoE[type="button"]::-moz-focus-inner,
|
||||||
.iRzzDR[type="reset"]::-moz-focus-inner,
|
.efaqoE[type="reset"]::-moz-focus-inner,
|
||||||
.iRzzDR[type="submit"]::-moz-focus-inner {
|
.efaqoE[type="submit"]::-moz-focus-inner {
|
||||||
border-style: none;
|
border-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iRzzDR:-moz-focusring,
|
.efaqoE:-moz-focusring,
|
||||||
.iRzzDR[type="button"]:-moz-focusring,
|
.efaqoE[type="button"]:-moz-focusring,
|
||||||
.iRzzDR[type="reset"]:-moz-focusring,
|
.efaqoE[type="reset"]:-moz-focusring,
|
||||||
.iRzzDR[type="submit"]:-moz-focusring {
|
.efaqoE[type="submit"]:-moz-focusring {
|
||||||
outline: 0.0625rem dotted ButtonText;
|
outline: 0.0625rem dotted ButtonText;
|
||||||
}
|
}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
className="src__Button-bjtQYq iRzzDR"
|
className="sc-kEYyzF efaqoE"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Canvas /> correctly 1`] = `
|
exports[`renders <Canvas /> correctly 1`] = `
|
||||||
.bTMtpB {
|
.gIGqrW {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<canvas
|
<canvas
|
||||||
className="src__Canvas-dHWBuw bTMtpB"
|
className="sc-gPEVay gIGqrW"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Code /> correctly 1`] = `
|
exports[`renders <Code /> correctly 1`] = `
|
||||||
.bFMmpU {
|
.NmzmU {
|
||||||
font-family: monospace, monospace;
|
font-family: monospace, monospace;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
<code
|
<code
|
||||||
className="src__Code-jYaiac bFMmpU"
|
className="sc-jzJRlG NmzmU"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Details /> correctly 1`] = `
|
exports[`renders <Details /> correctly 1`] = `
|
||||||
.eLTDBU {
|
.kSeyxS {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<details
|
<details
|
||||||
className="src__Details-bMPFts eLTDBU"
|
className="sc-cMljjf kSeyxS"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Dfn /> correctly 1`] = `
|
exports[`renders <Dfn /> correctly 1`] = `
|
||||||
.giuCOS {
|
.lcACZG {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
<dfn
|
<dfn
|
||||||
className="src__Dfn-ffMPxK giuCOS"
|
className="sc-chPdSV lcACZG"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Fieldset /> correctly 1`] = `
|
exports[`renders <Fieldset /> correctly 1`] = `
|
||||||
.gKnJJb {
|
.dLqrpE {
|
||||||
padding: 0.35em 0.75em 0.625em;
|
padding: 0.35em 0.75em 0.625em;
|
||||||
}
|
}
|
||||||
|
|
||||||
<fieldset
|
<fieldset
|
||||||
className="src__Fieldset-fInase gKnJJb"
|
className="sc-cvbbAY dLqrpE"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <FigCaption /> correctly 1`] = `
|
exports[`renders <FigCaption /> correctly 1`] = `
|
||||||
.epAseh {
|
.fGYiaS {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<figcaption
|
<figcaption
|
||||||
className="src__FigCaption-hoDWbO epAseh"
|
className="sc-bZQynM fGYiaS"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Figure /> correctly 1`] = `
|
exports[`renders <Figure /> correctly 1`] = `
|
||||||
.kYFPua {
|
.fpLcXm {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 1rem 2.5rem;
|
margin: 1rem 2.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
<figure
|
<figure
|
||||||
className="src__Figure-MvZXy kYFPua"
|
className="sc-gzVnrw fpLcXm"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Footer /> correctly 1`] = `
|
exports[`renders <Footer /> correctly 1`] = `
|
||||||
.fzGbIX {
|
.dMAkQL {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<footer
|
<footer
|
||||||
className="src__Footer-cICHrI fzGbIX"
|
className="sc-htpNat dMAkQL"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <H1 /> correctly 1`] = `
|
exports[`renders <H1 /> correctly 1`] = `
|
||||||
.cdoVsj {
|
.itlxbG {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
margin: 0.625rem 0;
|
margin: 0.625rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
<h1
|
<h1
|
||||||
className="src__H1-kNUGse cdoVsj"
|
className="sc-dnqmqq itlxbG"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Header /> correctly 1`] = `
|
exports[`renders <Header /> correctly 1`] = `
|
||||||
.cXQwqY {
|
.imCjfa {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<header
|
<header
|
||||||
className="src__Header-bIhUgD cXQwqY"
|
className="sc-bxivhb imCjfa"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Hr /> correctly 1`] = `
|
exports[`renders <Hr /> correctly 1`] = `
|
||||||
.gzArFj {
|
.jvTISp {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
height: 0;
|
height: 0;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
<hr
|
<hr
|
||||||
className="src__Hr-jTIkCb gzArFj"
|
className="sc-iwsKbI jvTISp"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Img /> correctly 1`] = `
|
exports[`renders <Img /> correctly 1`] = `
|
||||||
.ivJkKO {
|
.gLFqHa {
|
||||||
border-style: none;
|
border-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
<img
|
<img
|
||||||
className="src__Img-gjPRNy ivJkKO"
|
className="sc-eNQAEJ gLFqHa"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Input /> correctly 1`] = `
|
exports[`renders <Input /> correctly 1`] = `
|
||||||
.kPJKsw {
|
.gtmtGl {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
@ -231,7 +233,7 @@ exports[`renders <Input /> correctly 1`] = `
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kPJKsw::-webkit-file-upload-button {
|
.gtmtGl::-webkit-file-upload-button {
|
||||||
-webkit-appearance: button;
|
-webkit-appearance: button;
|
||||||
-moz-appearance: button;
|
-moz-appearance: button;
|
||||||
appearance: button;
|
appearance: button;
|
||||||
@ -239,23 +241,23 @@ exports[`renders <Input /> correctly 1`] = `
|
|||||||
}
|
}
|
||||||
|
|
||||||
<input
|
<input
|
||||||
className="src__Input-fEcOwi kPJKsw"
|
className="sc-kkGfuU gtmtGl"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Kbd /> correctly 1`] = `
|
exports[`renders <Kbd /> correctly 1`] = `
|
||||||
.isVSTd {
|
.cNQErp {
|
||||||
font-family: monospace, monospace;
|
font-family: monospace, monospace;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
<kbd
|
<kbd
|
||||||
className="src__Kbd-dxUERL isVSTd"
|
className="sc-cSHVUG cNQErp"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Legend /> correctly 1`] = `
|
exports[`renders <Legend /> correctly 1`] = `
|
||||||
.dJEAnh {
|
.iBvQlR {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
display: table;
|
display: table;
|
||||||
@ -265,53 +267,53 @@ exports[`renders <Legend /> correctly 1`] = `
|
|||||||
}
|
}
|
||||||
|
|
||||||
<legend
|
<legend
|
||||||
className="src__Legend-bAhEow dJEAnh"
|
className="sc-jWBwVP iBvQlR"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Main /> correctly 1`] = `
|
exports[`renders <Main /> correctly 1`] = `
|
||||||
.gwWdmq {
|
.kGbKV {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<main
|
<main
|
||||||
className="src__Main-btYlaf gwWdmq"
|
className="sc-htoDjs kGbKV"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Mark /> correctly 1`] = `
|
exports[`renders <Mark /> correctly 1`] = `
|
||||||
.juvXfj {
|
.gUcHXP {
|
||||||
background-color: #ff0;
|
background-color: #ff0;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
<mark
|
<mark
|
||||||
className="src__Mark-gsydcK juvXfj"
|
className="sc-kgoBCf gUcHXP"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Menu /> correctly 1`] = `
|
exports[`renders <Menu /> correctly 1`] = `
|
||||||
.jRYaVX {
|
.EtDOy {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<menu
|
<menu
|
||||||
className="src__Menu-jiUApB jRYaVX"
|
className="sc-jAaTju EtDOy"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Nav /> correctly 1`] = `
|
exports[`renders <Nav /> correctly 1`] = `
|
||||||
.eayfNy {
|
.kXFzZl {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<nav
|
<nav
|
||||||
className="src__Nav-iOoeuf eayfNy"
|
className="sc-ifAKCX kXFzZl"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Optgroup /> correctly 1`] = `
|
exports[`renders <Optgroup /> correctly 1`] = `
|
||||||
.iFSmzs {
|
.bwvGAC {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
@ -319,89 +321,90 @@ exports[`renders <Optgroup /> correctly 1`] = `
|
|||||||
}
|
}
|
||||||
|
|
||||||
<optgroup
|
<optgroup
|
||||||
className="src__Optgroup-Phlfn iFSmzs"
|
className="sc-iAyFgw bwvGAC"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Pre /> correctly 1`] = `
|
exports[`renders <Pre /> correctly 1`] = `
|
||||||
.beuufU {
|
.ePyiae {
|
||||||
font-family: monospace, monospace;
|
font-family: monospace, monospace;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
<pre
|
<pre
|
||||||
className="src__Pre-fkXllC beuufU"
|
className="sc-gZMcBi ePyiae"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Progress /> correctly 1`] = `
|
exports[`renders <Progress /> correctly 1`] = `
|
||||||
.bEoZpq {
|
.irOoVX {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
<progress
|
<progress
|
||||||
className="src__Progress-fidndm bEoZpq"
|
className="sc-brqgnP irOoVX"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Samp /> correctly 1`] = `
|
exports[`renders <Samp /> correctly 1`] = `
|
||||||
.ktmDsn {
|
.brPjlW {
|
||||||
font-family: monospace, monospace;
|
font-family: monospace, monospace;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
<samp
|
<samp
|
||||||
className="src__Samp-fCgRqV ktmDsn"
|
className="sc-kAzzGY brPjlW"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Section /> correctly 1`] = `
|
exports[`renders <Section /> correctly 1`] = `
|
||||||
.eLknUB {
|
.kyfnqM {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<section
|
<section
|
||||||
className="src__Section-dZUgTN eLknUB"
|
className="sc-EHOje kyfnqM"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Select /> correctly 1`] = `
|
exports[`renders <Select /> correctly 1`] = `
|
||||||
.ekFIkW {
|
.kskmSD {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
-webkit-text-transform: none;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
<select
|
<select
|
||||||
className="src__Select-kkUZlk ekFIkW"
|
className="sc-hSdWYo kskmSD"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Small /> correctly 1`] = `
|
exports[`renders <Small /> correctly 1`] = `
|
||||||
.herZpY {
|
.eNDzVi {
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
<small
|
<small
|
||||||
className="src__Small-gOuvkQ herZpY"
|
className="sc-kGXeez eNDzVi"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Strong /> correctly 1`] = `
|
exports[`renders <Strong /> correctly 1`] = `
|
||||||
.gABlxY {
|
.liZvtt {
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
<strong
|
<strong
|
||||||
className="src__Strong-laomNI gABlxY"
|
className="sc-fjdhpX liZvtt"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Sub /> correctly 1`] = `
|
exports[`renders <Sub /> correctly 1`] = `
|
||||||
.jzNWGj {
|
.bfYNTw {
|
||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -410,22 +413,22 @@ exports[`renders <Sub /> correctly 1`] = `
|
|||||||
}
|
}
|
||||||
|
|
||||||
<sub
|
<sub
|
||||||
className="src__Sub-jswKaB jzNWGj"
|
className="sc-kpOJdX bfYNTw"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Summary /> correctly 1`] = `
|
exports[`renders <Summary /> correctly 1`] = `
|
||||||
.jeqMzv {
|
.chrtFK {
|
||||||
display: list-item;
|
display: list-item;
|
||||||
}
|
}
|
||||||
|
|
||||||
<summary
|
<summary
|
||||||
className="src__Summary-cPdbBK jeqMzv"
|
className="sc-jDwBTQ chrtFK"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Sup /> correctly 1`] = `
|
exports[`renders <Sup /> correctly 1`] = `
|
||||||
.iqVsOf {
|
.hZcmXd {
|
||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -434,22 +437,22 @@ exports[`renders <Sup /> correctly 1`] = `
|
|||||||
}
|
}
|
||||||
|
|
||||||
<sup
|
<sup
|
||||||
className="src__Sup-eHQeoX iqVsOf"
|
className="sc-dxgOiQ hZcmXd"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Svg /> correctly 1`] = `
|
exports[`renders <Svg /> correctly 1`] = `
|
||||||
.chrnMV:not(:root) {
|
.GnRoM:not(:root) {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
<svg
|
<svg
|
||||||
className="src__Svg-kcnftw chrnMV"
|
className="sc-hMqMXs GnRoM"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Textarea /> correctly 1`] = `
|
exports[`renders <Textarea /> correctly 1`] = `
|
||||||
.bCxsrI {
|
.bDTEgL {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
@ -458,16 +461,16 @@ exports[`renders <Textarea /> correctly 1`] = `
|
|||||||
}
|
}
|
||||||
|
|
||||||
<textarea
|
<textarea
|
||||||
className="src__Textarea-jjPykp bCxsrI"
|
className="sc-eHgmQL bDTEgL"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders <Video /> correctly 1`] = `
|
exports[`renders <Video /> correctly 1`] = `
|
||||||
.dpXJul {
|
.bkGlpl {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
<video
|
<video
|
||||||
className="src__Video-ggHrOn dpXJul"
|
className="sc-jKJlTe bkGlpl"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
@ -43,7 +43,7 @@ import {
|
|||||||
Menu,
|
Menu,
|
||||||
Summary,
|
Summary,
|
||||||
Canvas
|
Canvas
|
||||||
} from '../';
|
} from '../src/';
|
||||||
|
|
||||||
it('renders <Article /> correctly', () => {
|
it('renders <Article /> correctly', () => {
|
||||||
const tree = renderer.create(<Article />).toJSON();
|
const tree = renderer.create(<Article />).toJSON();
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"lint": "belly-button --fix",
|
"lint": "belly-button --fix",
|
||||||
"lint-ci": "belly-button",
|
"lint-ci": "belly-button",
|
||||||
"test": "lab -c",
|
"test": "lab -c",
|
||||||
"test-ci": "echo 0 # lab -c -r console -o stdout -r tap -o $CIRCLE_TEST_REPORTS/test/portal-data.xml"
|
"test-ci": "echo 0 `# lab -c -r console -o stdout -r tap -o $CIRCLE_TEST_REPORTS/test/portal-data.xml`"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "wyatt",
|
"author": "wyatt",
|
||||||
|
@ -5,7 +5,9 @@ export const borderRadius = remcalc(4);
|
|||||||
export const bottomShaddow = `0 ${remcalc(2)} 0 0 rgba(0, 0, 0, 0.05)`;
|
export const bottomShaddow = `0 ${remcalc(2)} 0 0 rgba(0, 0, 0, 0.05)`;
|
||||||
export const bottomShaddowDarker = `0 ${remcalc(2)} 0 0 rgba(0, 0, 0, 0.1)`;
|
export const bottomShaddowDarker = `0 ${remcalc(2)} 0 0 rgba(0, 0, 0, 0.1)`;
|
||||||
export const insetShaddow = `inset 0 ${remcalc(3)} 0 0 rgba(0, 0, 0, 0.05)`;
|
export const insetShaddow = `inset 0 ${remcalc(3)} 0 0 rgba(0, 0, 0, 0.05)`;
|
||||||
export const tooltipShadow = `0 ${remcalc(2)} ${remcalc(6)} ${remcalc(1)} rgba(0, 0, 0, 0.1)`;
|
export const tooltipShadow = `0 ${remcalc(2)} ${remcalc(6)} ${remcalc(
|
||||||
|
1
|
||||||
|
)} rgba(0, 0, 0, 0.1)`;
|
||||||
|
|
||||||
export const border = {
|
export const border = {
|
||||||
checked: css`${remcalc(1)} solid ${props => props.theme.primary}`,
|
checked: css`${remcalc(1)} solid ${props => props.theme.primary}`,
|
||||||
|
@ -32,7 +32,7 @@ const InnerDescription = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const Description = ({ children, ...rest }) => {
|
const Description = ({ children, ...rest }) => {
|
||||||
const render = ({ collapsed = false }) => (
|
const render = ({ collapsed = false }) =>
|
||||||
<StyledTitle
|
<StyledTitle
|
||||||
collapsed={collapsed}
|
collapsed={collapsed}
|
||||||
name="card-description"
|
name="card-description"
|
||||||
@ -42,8 +42,7 @@ const Description = ({ children, ...rest }) => {
|
|||||||
<InnerDescription collapsed={collapsed}>
|
<InnerDescription collapsed={collapsed}>
|
||||||
{children}
|
{children}
|
||||||
</InnerDescription>
|
</InnerDescription>
|
||||||
</StyledTitle>
|
</StyledTitle>;
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Subscriber channel="card">
|
<Subscriber channel="card">
|
||||||
|
@ -9,10 +9,9 @@ const StyledView = View.extend`
|
|||||||
background-color: ${props => props.grey};
|
background-color: ${props => props.grey};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const GroupView = ({ children, ...rest }) => (
|
const GroupView = ({ children, ...rest }) =>
|
||||||
<StyledView {...rest}>
|
<StyledView {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</StyledView>
|
</StyledView>;
|
||||||
);
|
|
||||||
|
|
||||||
export default Baseline(GroupView);
|
export default Baseline(GroupView);
|
||||||
|
@ -71,7 +71,7 @@ const StyledCircle = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const Options = ({ children, ...rest }) => {
|
const Options = ({ children, ...rest }) => {
|
||||||
const render = ({ fromHeader = false, collapsed = false }) => (
|
const render = ({ fromHeader = false, collapsed = false }) =>
|
||||||
<StyledNav fromHeader={fromHeader} name="card-options">
|
<StyledNav fromHeader={fromHeader} name="card-options">
|
||||||
<StyledButton
|
<StyledButton
|
||||||
secondary={!fromHeader}
|
secondary={!fromHeader}
|
||||||
@ -85,8 +85,7 @@ const Options = ({ children, ...rest }) => {
|
|||||||
<StyledCircle secondary={!fromHeader} />
|
<StyledCircle secondary={!fromHeader} />
|
||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
</StyledButton>
|
</StyledButton>
|
||||||
</StyledNav>
|
</StyledNav>;
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Subscriber channel="card">
|
<Subscriber channel="card">
|
||||||
|
@ -22,11 +22,10 @@ const StyledCol = Col.extend`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const Outlet = ({ children, ...rest }) => {
|
const Outlet = ({ children, ...rest }) => {
|
||||||
const render = ({ collapsed = false }) => (
|
const render = ({ collapsed = false }) =>
|
||||||
<StyledCol name="card-outlet" collapsed={collapsed} xs={6} {...rest}>
|
<StyledCol name="card-outlet" collapsed={collapsed} xs={6} {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</StyledCol>
|
</StyledCol>;
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Subscriber channel="card">
|
<Subscriber channel="card">
|
||||||
|
@ -43,7 +43,7 @@ const StyledTitle = Title.extend`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const Subtitle = ({ children, ...props }) => {
|
const Subtitle = ({ children, ...props }) => {
|
||||||
const render = ({ fromHeader = false, collapsed = false }) => (
|
const render = ({ fromHeader = false, collapsed = false }) =>
|
||||||
<StyledTitle
|
<StyledTitle
|
||||||
name="card-subtitle"
|
name="card-subtitle"
|
||||||
fromHeader={fromHeader}
|
fromHeader={fromHeader}
|
||||||
@ -53,8 +53,7 @@ const Subtitle = ({ children, ...props }) => {
|
|||||||
<Span fromHeader={fromHeader} collapsed={collapsed}>
|
<Span fromHeader={fromHeader} collapsed={collapsed}>
|
||||||
{children}
|
{children}
|
||||||
</Span>
|
</Span>
|
||||||
</StyledTitle>
|
</StyledTitle>;
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Subscriber channel="card">
|
<Subscriber channel="card">
|
||||||
|
@ -51,7 +51,7 @@ const Span = styled.span`
|
|||||||
const Title = ({ children, ...rest }) => {
|
const Title = ({ children, ...rest }) => {
|
||||||
const _children = isString(children) ? <Span>{children}</Span> : children;
|
const _children = isString(children) ? <Span>{children}</Span> : children;
|
||||||
|
|
||||||
const render = ({ collapsed = false, fromHeader = false }) => (
|
const render = ({ collapsed = false, fromHeader = false }) =>
|
||||||
<Container
|
<Container
|
||||||
collapsed={collapsed}
|
collapsed={collapsed}
|
||||||
fromHeader={fromHeader}
|
fromHeader={fromHeader}
|
||||||
@ -60,8 +60,7 @@ const Title = ({ children, ...rest }) => {
|
|||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
{_children}
|
{_children}
|
||||||
</Container>
|
</Container>;
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Subscriber channel="card">
|
<Subscriber channel="card">
|
||||||
|
@ -14,8 +14,7 @@ const Checkbox = Baseline(
|
|||||||
/**
|
/**
|
||||||
* @example ./usage-checkbox.md
|
* @example ./usage-checkbox.md
|
||||||
*/
|
*/
|
||||||
export default ({ children, ...rest }) => (
|
export default ({ children, ...rest }) =>
|
||||||
<Checkbox {...rest}>
|
<Checkbox {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</Checkbox>
|
</Checkbox>;
|
||||||
);
|
|
||||||
|
@ -34,23 +34,13 @@ class FormGroup extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { name = rndId(), reduxForm = false, ...rest } = this.props;
|
||||||
name = rndId(),
|
|
||||||
reduxForm = false,
|
|
||||||
...rest
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
if (!reduxForm) {
|
if (!reduxForm) {
|
||||||
return this.renderGroup({});
|
return this.renderGroup({});
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <Field name={name} component={this.renderGroup} {...rest} />;
|
||||||
<Field
|
|
||||||
name={name}
|
|
||||||
component={this.renderGroup}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,7 @@ const Input = Baseline(BaseInput(Stylable('input')));
|
|||||||
/**
|
/**
|
||||||
* @example ./usage-input.md
|
* @example ./usage-input.md
|
||||||
*/
|
*/
|
||||||
export default ({ children, ...rest }) => (
|
export default ({ children, ...rest }) =>
|
||||||
<Input {...rest}>
|
<Input {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</Input>
|
</Input>;
|
||||||
);
|
|
||||||
|
@ -16,11 +16,11 @@ const Ul = styled.ul`
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const RadioItem = BaseInput(({ children, id, ...rest }) => (
|
const RadioItem = BaseInput(({ children, id, ...rest }) =>
|
||||||
<Li {...rest}>
|
<Li {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</Li>
|
</Li>
|
||||||
));
|
);
|
||||||
|
|
||||||
const Radio = Baseline(
|
const Radio = Baseline(
|
||||||
BaseToggle({
|
BaseToggle({
|
||||||
@ -32,10 +32,9 @@ const Radio = Baseline(
|
|||||||
/**
|
/**
|
||||||
* @example ./usage-radio.md
|
* @example ./usage-radio.md
|
||||||
*/
|
*/
|
||||||
export default ({ children, ...rest }) => (
|
export default ({ children, ...rest }) =>
|
||||||
<Radio {...rest}>
|
<Radio {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</Radio>
|
</Radio>;
|
||||||
);
|
|
||||||
|
|
||||||
export const RadioList = Baseline(Ul);
|
export const RadioList = Baseline(Ul);
|
||||||
|
@ -7,8 +7,7 @@ const Select = Baseline(BaseInput(Stylable('select')));
|
|||||||
/**
|
/**
|
||||||
* @example ./usage-select.md
|
* @example ./usage-select.md
|
||||||
*/
|
*/
|
||||||
export default ({ children, ...rest }) => (
|
export default ({ children, ...rest }) =>
|
||||||
<Select {...rest}>
|
<Select {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</Select>
|
</Select>;
|
||||||
);
|
|
||||||
|
@ -130,11 +130,10 @@ const BaseToggle = BaseInput(({ children, ...rest }) => {
|
|||||||
/**
|
/**
|
||||||
* @example ./usage-toggle.md
|
* @example ./usage-toggle.md
|
||||||
*/
|
*/
|
||||||
const Toggle = ({ children, ...rest }) => (
|
const Toggle = ({ children, ...rest }) =>
|
||||||
<BaseToggle {...rest}>
|
<BaseToggle {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</BaseToggle>
|
</BaseToggle>;
|
||||||
);
|
|
||||||
|
|
||||||
export default Baseline(Toggle);
|
export default Baseline(Toggle);
|
||||||
|
|
||||||
|
@ -19,10 +19,9 @@ const Box = styled.div`
|
|||||||
padding: ${remcalc(15)} 0;
|
padding: ${remcalc(15)} 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default ({ children, ...rest }) => (
|
export default ({ children, ...rest }) =>
|
||||||
<Box {...rest}>
|
<Box {...rest}>
|
||||||
<Brand>
|
<Brand>
|
||||||
{children}
|
{children}
|
||||||
</Brand>
|
</Brand>
|
||||||
</Box>
|
</Box>;
|
||||||
);
|
|
||||||
|
@ -20,11 +20,10 @@ const Header = styled.div`
|
|||||||
/**
|
/**
|
||||||
* @example ./usage.md
|
* @example ./usage.md
|
||||||
*/
|
*/
|
||||||
export default ({ children, ...rest }) => (
|
export default ({ children, ...rest }) =>
|
||||||
<Header {...rest}>
|
<Header {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</Header>
|
</Header>;
|
||||||
);
|
|
||||||
|
|
||||||
export { default as Brand } from './brand';
|
export { default as Brand } from './brand';
|
||||||
export { default as Item } from './item';
|
export { default as Item } from './item';
|
||||||
|
@ -23,10 +23,9 @@ const Box = styled.div`
|
|||||||
max-width: ${remcalc(100)};
|
max-width: ${remcalc(100)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default ({ children, ...rest }) => (
|
export default ({ children, ...rest }) =>
|
||||||
<Box {...rest}>
|
<Box {...rest}>
|
||||||
<Text>
|
<Text>
|
||||||
{children}
|
{children}
|
||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>;
|
||||||
);
|
|
||||||
|
@ -26,10 +26,9 @@ const StyledLi = styled.li`
|
|||||||
/**
|
/**
|
||||||
* @example ./usage.md
|
* @example ./usage.md
|
||||||
*/
|
*/
|
||||||
const Li = ({ children, ...rest }) => (
|
const Li = ({ children, ...rest }) =>
|
||||||
<StyledLi {...rest}>
|
<StyledLi {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</StyledLi>
|
</StyledLi>;
|
||||||
);
|
|
||||||
|
|
||||||
export default Baseline(Li);
|
export default Baseline(Li);
|
||||||
|
@ -15,10 +15,9 @@ const StyledUl = styled.ul`
|
|||||||
/**
|
/**
|
||||||
* @example ./usage.md
|
* @example ./usage.md
|
||||||
*/
|
*/
|
||||||
const Ul = ({ children, ...rest }) => (
|
const Ul = ({ children, ...rest }) =>
|
||||||
<StyledUl {...rest}>
|
<StyledUl {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</StyledUl>
|
</StyledUl>;
|
||||||
);
|
|
||||||
|
|
||||||
export default Baseline(Ul);
|
export default Baseline(Ul);
|
||||||
|
@ -55,7 +55,7 @@ const borderColor = hex =>
|
|||||||
])
|
])
|
||||||
.toHexString();
|
.toHexString();
|
||||||
|
|
||||||
const Color = ({ name, hex }) => (
|
const Color = ({ name, hex }) =>
|
||||||
<Box border={borderColor(hex)}>
|
<Box border={borderColor(hex)}>
|
||||||
<Preview hex={hex} />
|
<Preview hex={hex} />
|
||||||
<InnerBox background={hex} text={mostReadable(hex)}>
|
<InnerBox background={hex} text={mostReadable(hex)}>
|
||||||
@ -71,8 +71,7 @@ const Color = ({ name, hex }) => (
|
|||||||
<Strong>Hex</Strong>: <br /><code>{hex.toUpperCase()}</code>
|
<Strong>Hex</Strong>: <br /><code>{hex.toUpperCase()}</code>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</InnerBox>
|
</InnerBox>
|
||||||
</Box>
|
</Box>;
|
||||||
);
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const colors = Object.keys(theme)
|
const colors = Object.keys(theme)
|
||||||
@ -83,11 +82,11 @@ export default () => {
|
|||||||
|
|
||||||
return _a >= _b ? -1 : 1;
|
return _a >= _b ? -1 : 1;
|
||||||
})
|
})
|
||||||
.map(name => (
|
.map(name =>
|
||||||
<Col key={name} xs={4}>
|
<Col key={name} xs={4}>
|
||||||
<Color name={name} hex={theme[name]} />
|
<Color name={name} hex={theme[name]} />
|
||||||
</Col>
|
</Col>
|
||||||
));
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -34,10 +34,9 @@ const StyledButton = styled(Button)`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const TooltipButton = props => (
|
const TooltipButton = props =>
|
||||||
<li>
|
<li>
|
||||||
<StyledButton {...props} />
|
<StyledButton {...props} />
|
||||||
</li>
|
</li>;
|
||||||
);
|
|
||||||
|
|
||||||
export default TooltipButton;
|
export default TooltipButton;
|
||||||
|
@ -196,7 +196,7 @@ class Topology extends React.Component {
|
|||||||
this.setDragInfo(false);
|
this.setDragInfo(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderedNode = (n, index) => (
|
const renderedNode = (n, index) =>
|
||||||
<TopologyNode
|
<TopologyNode
|
||||||
key={index}
|
key={index}
|
||||||
data={n}
|
data={n}
|
||||||
@ -205,16 +205,13 @@ class Topology extends React.Component {
|
|||||||
onNodeTitleClick={onNodeTitleClick}
|
onNodeTitleClick={onNodeTitleClick}
|
||||||
onQuickActions={onQuickActionsClick}
|
onQuickActions={onQuickActionsClick}
|
||||||
connected={n.id !== 'consul'}
|
connected={n.id !== 'consul'}
|
||||||
/>
|
/>;
|
||||||
);
|
|
||||||
|
|
||||||
const renderedLink = (l, index) => (
|
const renderedLink = (l, index) =>
|
||||||
<TopologyLink key={index} data={l} index={index} />
|
<TopologyLink key={index} data={l} index={index} />;
|
||||||
);
|
|
||||||
|
|
||||||
const renderedLinkArrow = (l, index) => (
|
const renderedLinkArrow = (l, index) =>
|
||||||
<TopologyLinkArrow key={index} data={l} index={index} />
|
<TopologyLinkArrow key={index} data={l} index={index} />;
|
||||||
);
|
|
||||||
|
|
||||||
const renderedNodes = this.dragInfo && this.dragInfo.dragging
|
const renderedNodes = this.dragInfo && this.dragInfo.dragging
|
||||||
? nodesData
|
? nodesData
|
||||||
|
@ -12,7 +12,7 @@ const NodeButton = ({ connected, onButtonClick, index }) => {
|
|||||||
const buttonCircleY =
|
const buttonCircleY =
|
||||||
(height - buttonCircleRadius * 4 - buttonCircleSpacing * 2) / 2;
|
(height - buttonCircleRadius * 4 - buttonCircleSpacing * 2) / 2;
|
||||||
|
|
||||||
const buttonCircles = [1, 2, 3].map((item, index) => (
|
const buttonCircles = [1, 2, 3].map((item, index) =>
|
||||||
<GraphButtonCircle
|
<GraphButtonCircle
|
||||||
cx={width / 2}
|
cx={width / 2}
|
||||||
cy={
|
cy={
|
||||||
@ -22,7 +22,7 @@ const NodeButton = ({ connected, onButtonClick, index }) => {
|
|||||||
r={2}
|
r={2}
|
||||||
connected={connected}
|
connected={connected}
|
||||||
/>
|
/>
|
||||||
));
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<g transform={`translate(${x}, ${y})`}>
|
<g transform={`translate(${x}, ${y})`}>
|
||||||
|
@ -67,7 +67,7 @@ const GraphNode = ({
|
|||||||
: {};
|
: {};
|
||||||
|
|
||||||
const nodeContent = data.children
|
const nodeContent = data.children
|
||||||
? data.children.map((d, i) => (
|
? data.children.map((d, i) =>
|
||||||
<GraphNodeContent
|
<GraphNodeContent
|
||||||
key={i}
|
key={i}
|
||||||
child
|
child
|
||||||
@ -75,7 +75,7 @@ const GraphNode = ({
|
|||||||
data={d}
|
data={d}
|
||||||
index={i}
|
index={i}
|
||||||
/>
|
/>
|
||||||
))
|
)
|
||||||
: <GraphNodeContent connected={connected} data={data} />;
|
: <GraphNodeContent connected={connected} data={data} />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -8,7 +8,7 @@ const GraphNodeMetrics = ({ connected, metrics, pos }) => {
|
|||||||
const { x, y } = pos;
|
const { x, y } = pos;
|
||||||
|
|
||||||
const metricSpacing = 18;
|
const metricSpacing = 18;
|
||||||
const metricsText = metrics.map((metric, index) => (
|
const metricsText = metrics.map((metric, index) =>
|
||||||
<GraphText
|
<GraphText
|
||||||
key={index}
|
key={index}
|
||||||
x={0}
|
x={0}
|
||||||
@ -17,7 +17,7 @@ const GraphNodeMetrics = ({ connected, metrics, pos }) => {
|
|||||||
>
|
>
|
||||||
{`${metric.name}: ${metric.value}`}
|
{`${metric.name}: ${metric.value}`}
|
||||||
</GraphText>
|
</GraphText>
|
||||||
));
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<g transform={`translate(${x}, ${y})`}>
|
<g transform={`translate(${x}, ${y})`}>
|
||||||
|
@ -5,7 +5,7 @@ import Constants from '../constants';
|
|||||||
import { GraphTitle, GraphHealthyCircle } from './shapes';
|
import { GraphTitle, GraphHealthyCircle } from './shapes';
|
||||||
import HeartIcon from './icon-heart.svg';
|
import HeartIcon from './icon-heart.svg';
|
||||||
|
|
||||||
const GraphNodeTitle = ({ connected, data, onNodeTitleClick }) => (
|
const GraphNodeTitle = ({ connected, data, onNodeTitleClick }) =>
|
||||||
<g>
|
<g>
|
||||||
<GraphTitle
|
<GraphTitle
|
||||||
x={Constants.paddingLeft}
|
x={Constants.paddingLeft}
|
||||||
@ -20,8 +20,7 @@ const GraphNodeTitle = ({ connected, data, onNodeTitleClick }) => (
|
|||||||
<GraphHealthyCircle cx={9} cy={9} r={9} />
|
<GraphHealthyCircle cx={9} cy={9} r={9} />
|
||||||
<HeartIcon />
|
<HeartIcon />
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>;
|
||||||
);
|
|
||||||
|
|
||||||
GraphNodeTitle.propTypes = {
|
GraphNodeTitle.propTypes = {
|
||||||
connected: PropTypes.bool,
|
connected: PropTypes.bool,
|
||||||
|
Loading…
Reference in New Issue
Block a user