Compare commits

...

935 Commits

Author SHA1 Message Date
johnytiago
078513f603 feat(instances): adds cli-details UI 2018-06-04 14:30:07 +01:00
Fábio Moreira
a1ff036db1 test(instances): updates snapshots 2018-06-04 12:48:09 +01:00
Fábio Moreira
fc81d666d0 feat(instances): CI - firewall responsive designs 2018-06-04 12:48:09 +01:00
Fábio Moreira
deb1a8436f feat(instances): user scripts responsive designs 2018-06-04 12:48:09 +01:00
Fábio Moreira
cad1431e79 feat(instances): CI - metadata resposive 2018-06-04 12:48:09 +01:00
Fábio Moreira
2f9d135319 feat(instances): CI - Responsive behavior for tags #1121 2018-06-04 12:48:09 +01:00
Fábio Moreira
c268d88a4d feat(instances): create instance - networks responsive next button 2018-06-04 12:48:09 +01:00
Fábio Moreira
6698a8eacb feat(ui-toolkit): key-value responsive 2018-06-04 12:48:09 +01:00
Fábio Moreira
1e8e89b3c8 feat(instances): theme resizer 2018-06-04 12:48:09 +01:00
Sérgio Ramos
063e40859d feat(sg): bootstrap 2018-06-04 11:46:08 +01:00
Sérgio Ramos
fc84358dff feat(templates): bootstrap 2018-06-04 11:46:08 +01:00
Fábio Moreira
6736caaf45
Implement responsive designs for CI: Networks (#1438)
* feat(instances): network section responive behaviour

* feat(instances): adjust network info container width

* test(instances): update network step snapshot

* test(instances): update network step snapshots
2018-05-28 13:38:21 +01:00
Fábio Moreira
5cb02d709c feat(instances): responsive layout for instance name card
fixes #1118
2018-05-24 10:34:55 +01:00
Fábio Moreira
b66f761a9e
#1406 - implement responsive rules on create instance (#1432)
* fix(instances): swap absolute media query value for defined breakpoint

* feat(ui-toolkit): update breakpoints

* feat(ui-toolkit): view container padding and max width

* feat(ui-toolkit): responsive image selector

* fix(ui-toolkit): delay parallax header hiding

* feat(instances): responsive rules for package selection

* test(instances): update snapshots

* fix(instances): use color variables on package card

* fix(instances): import breakpoints from ui-toolkit

* feat(instances): package selection for mobile or desktop version

* feat(instances): remove unnecessary col css props

* test(instances): update snapshots

* test(instances): update resource widgets snaphots
2018-05-23 12:41:40 +01:00
johnytiago
8422cdfe8c feat(instances): QA Instance Managment bug fixes. closes #1423 2018-05-21 11:37:26 +01:00
Joao Tiago
109988536b feat(instances): Fixes collase typo 2018-05-18 13:48:09 +01:00
johnytiago
d75ae0f14f feat(instances): Adds font antialiasing. closes #1418 2018-05-18 13:47:27 +01:00
johnytiago
5c98a4cecb feat(instances): refactor card headers #1417 2018-05-17 20:01:44 +01:00
johnytiago
0189822a08 feat(instances): bug fixes #1387 2018-05-17 18:14:00 +01:00
johnytiago
5d46689869 feat(instances): Adds better element ids 2018-05-17 18:03:08 +01:00
johnytiago
04cb9c32f8 feat(instances): Firewall empty state update, more QA 2018-05-17 17:50:11 +01:00
Fábio Moreira
8e6adb1ef4 test: update snapshots 2018-05-16 17:06:21 +01:00
Fábio Moreira
a1154b2520 feat(ui-toolkit): improve parallax scroll behaviour 2018-05-16 17:06:21 +01:00
Fábio Moreira
155a065281 feat(ui-toolkit): update spacing guidelines 2018-05-16 17:06:21 +01:00
Fábio Moreira
f388e52549 fix(ui-toolkit): add margin to playground tab headers 2018-05-16 17:06:21 +01:00
Fábio Moreira
882085a170 feat(ui-toolkit): skip parallax header after user scrolls 2018-05-16 17:06:21 +01:00
Fábio Moreira
77fd895b6c feat(ui-toolkit): add parallax header after scroll 2018-05-16 17:06:21 +01:00
Fábio Moreira
bd332423be feat(ui-toolkit): define next section for empty link 2018-05-16 17:06:21 +01:00
Fábio Moreira
91e1fb192b feat(ui-toolkit): refator bottomNav to work for subSections 2018-05-16 17:06:21 +01:00
Fábio Moreira
88fe0ea92d feat(ui-toolkit): replace bottom nav arrows with html entities 2018-05-16 17:06:21 +01:00
Fábio Moreira
8bb4c31aba feat(ui-toolkit): add bottom nav to jump to previous or next session 2018-05-16 17:06:21 +01:00
Fábio Moreira
867e9b35a0 fix(instances): change packages text and link 2018-05-11 12:58:56 +01:00
Fábio Moreira
574c3add4e fix(ui-toolkit): remove horizontal scroll on styleguide #1384 2018-05-11 12:58:27 +01:00
Fábio Moreira
c233b0d757 fix(ui-toolkit): styleguide minor bugs 2018-05-11 12:58:27 +01:00
johnytiago
84b2d67d2c feat(instances): Adds Counts, Updates Firewall 2018-05-11 12:57:39 +01:00
johnytiago
062ff0ba67 feat(instances): status icon cross, cns tags color 2018-05-11 12:57:39 +01:00
Sérgio Ramos
b00baa7028 fix(instances): don't send cns names unless they exist 2018-05-09 14:24:07 +01:00
Fábio Moreira
588b833045 fix(ui-toolkit): replace styled card with card component on section 2018-05-09 12:17:20 +01:00
Sérgio Ramos
b3edb3aa02 fix(instances): handle name/identity aff props 2018-05-09 12:06:10 +01:00
Sérgio Ramos
542b491b52 refactor(instances): s/network/networks 2018-05-09 11:36:16 +01:00
Sérgio Ramos
7d8b478d20 test(instances): update snapshots 2018-05-09 11:29:17 +01:00
Joao Tiago
7531e503f2 fix(instances): Save -> Next, Create takes to name card (#1411) 2018-05-09 11:27:33 +01:00
Sérgio Ramos
d1b2ba0002 fix(instances): add Next button to fw 2018-05-09 11:22:27 +01:00
Sérgio Ramos
98a8b2eb5b fix(instances): send tags when creating instance 2018-05-09 11:21:40 +01:00
Sérgio Ramos
de356e1fbe fix(instances): send user-script when creating instance 2018-05-09 11:11:03 +01:00
Sérgio Ramos
f9c89cbccc fix(instances): send network ids when creating instance 2018-05-09 10:57:37 +01:00
johnytiago
1317894f27 feat(instances): wip networks, tags 2018-05-09 10:52:31 +01:00
Sérgio Ramos
f007889283 fix: try to serve a static route before maping assets 2018-05-09 10:34:49 +01:00
Sérgio Ramos
831be94521 build: fix ssr build 2018-05-09 00:03:57 +01:00
Sérgio Ramos
e321c20906 fix(instances): s/userScript/user-script 2018-05-08 18:02:01 +01:00
Sérgio Ramos
429ad17262 refactor(instances): better disabled/isValid handling 2018-05-08 17:55:06 +01:00
Sérgio Ramos
d591d93547 fix: prevent image card from growing to much 2018-05-08 16:55:18 +01:00
Sérgio Ramos
33d3d4343d fix: add margins to section-list/menu 2018-05-08 16:00:11 +01:00
johnytiago
32d5cdc293 refactor(instances): refactor create instance flow
fixes #1354
2018-05-08 15:32:10 +01:00
johnytiago
316773d9b7 feat(ui-toolkit): remove all margins
fixes #1156
2018-05-08 15:32:10 +01:00
Sérgio Ramos
0ae1290a5e feat: support ssr on bundle 2018-05-07 13:34:10 +01:00
Sérgio Ramos
3f75f812fa feat: add support for react-helmet 2018-05-07 12:09:12 +01:00
Fábio Moreira
25223e7324 feat(instances): update firewall text
fixes #1375
2018-05-04 14:50:47 +01:00
Fábio Moreira
7651dff619 feat(instances): update metadata link to docs
fixes  #1363
2018-05-04 12:25:18 +01:00
Sérgio Ramos
be18478f6c fix(ui-toolkit): disable LodashModuleReplacementPlugin in styleguide 2018-05-03 11:30:58 +01:00
geek
b929370124 fix: 404 on not found 2018-04-10 18:54:14 +01:00
Sérgio Ramos
e61399aa26 build(navigation): bump version 2018-04-10 15:56:17 +01:00
Sérgio Ramos
b429bc15ec fix(instances): add missing dependencies 2018-04-10 14:57:45 +01:00
Sérgio Ramos
1cd91b234f fix(instances): revert private 2018-04-09 19:08:32 +01:00
Sérgio Ramos
21317db964 fix(instances): add missing apollo-client dependency 2018-04-09 19:07:33 +01:00
Sérgio Ramos
95e420c419 feat(navigation): add support for account services 2018-04-06 16:10:15 +01:00
Sérgio Ramos
c413677b0e feat(instances): remove snapshots/package from instance list query 2018-04-05 18:00:09 +01:00
Sérgio Ramos
f73a9f4eca fix(bundle): handle namespaces 2018-04-05 17:58:53 +01:00
Sara Vieira
682f9db749 docs(ui-toolkit): add parallax
fixes #1225
2018-04-05 14:29:22 +01:00
Sara Vieira
5d274a419a feat(instances): add change name 2018-03-29 15:15:49 +01:00
Sérgio Ramos
0b9c464bb0 fix(navigation): correct logout href 2018-03-29 14:49:23 +01:00
Sara Vieira
e2a3fb73df feat(ui-toolkit): add principles 2018-03-29 13:50:43 +01:00
Sérgio Ramos
154b4cfeb6 fix(instances): support all fw rules 2018-03-28 16:32:09 +01:00
Sara Vieira
cac551beaf feat(navigation): add user dropdown 2018-03-28 15:31:40 +01:00
Sara Vieira
495af5702d feat(ui-toolkit): add header and sidebar 2018-03-28 14:42:39 +01:00
Sérgio Ramos
2accde1b4f fix(navigation): fix grid missing width in production 2018-03-27 16:43:55 +01:00
Sérgio Ramos
39d4e0b853 feat(navigation): no hardcoded datacenter 2018-03-27 15:39:46 +01:00
Sérgio Ramos
281f9ef60e feat(navigation): hide/show account depending on data 2018-03-26 20:35:10 +01:00
Wyatt Preul
b51f135703 fix(navigation): remove unused dep 2018-03-26 20:25:53 +01:00
geek
30b996fc48 fix: include cookie for nav requests 2018-03-26 20:21:53 +01:00
Sérgio Ramos
023e8242b7 test(instances): update snapshots 2018-03-26 20:18:37 +01:00
Sérgio Ramos
1298652193 fix: set correct protocol in ssr 2018-03-26 17:49:55 +01:00
Sara Vieira
86e60e6c5f build(navigation): integrate namespaces and fonts 2018-03-26 17:49:55 +01:00
Sérgio Ramos
76c6d18695 chore: change static logic to integrate with broader architecture 2018-03-23 18:20:54 +00:00
Sara Vieira
2937a37cdb docs(ui-toolkit): make toolkit render in separate pages 2018-03-23 17:46:42 +00:00
geek
35325cc573 fix: /{console}/graphql 2018-03-22 14:46:34 +00:00
Sara Vieira
7f0658e246 feat(instances): route objects id
fixes #1329
2018-03-21 17:35:51 +00:00
Sara Vieira
fab0bbfcc3 fix(instances): only use latest version of each image
fixes #1321
2018-03-21 16:19:17 +00:00
Sara Vieira
f5fbe0a169 fix(instances): make all prices 4 decimal points 2018-03-20 11:46:31 +00:00
Sara Vieira
9bdf02b1ba feat(ui-toolkit): add new components
references #1238

this includes:
 - add footer and frids
 - update colors
 - add tags
 - add empty table
 - add superscript
 - add toasts
2018-03-20 11:44:20 +00:00
Sara Vieira
55d5d24475 fix(ui-toolkit): don't grey out embedded selects
fixes #1273
2018-03-20 10:47:32 +00:00
Sara Vieira
95fc7092de feat(ui-toolkit): add popover button 2018-03-20 10:46:16 +00:00
Sérgio Ramos
63e7b31a4b feat(instances): instance list pagination 2018-03-16 20:19:37 +00:00
Sérgio Ramos
5f63a54ba5 feat(ui-toolkit): implement pagination components 2018-03-16 20:19:37 +00:00
Sérgio Ramos
1c967f1b9b feat(bundle): remove brok dependency 2018-03-16 20:19:37 +00:00
Sérgio Ramos
e95168bbf0 style: format 2018-03-15 19:05:02 +00:00
Sérgio Ramos
23ddc68ade style: global and simpler prettier config
this also removes precommit scripts because they were cumbersome
2018-03-15 19:02:55 +00:00
Sérgio Ramos
90d6b31264
feat(instances): remove not working aff features 2018-03-15 16:22:15 +00:00
Sérgio Ramos
2787f051e0 docs: document how to run the portal 2018-03-12 11:29:45 +00:00
Sérgio Ramos
d87c4e017b fix: namespace on chunks 2018-03-08 09:24:40 +00:00
Sérgio Ramos
d1fa4c7950 feat(navigation): sticky header 2018-03-08 09:24:40 +00:00
Sérgio Ramos
da59d5e808 feat: same-domain consoles 2018-03-08 09:24:40 +00:00
Wyatt Preul
b64dbb289d feat: set x-csrf-token header for requests 2018-03-06 10:39:34 +00:00
Sérgio Ramos
4a7956782b fix(instances): send the correct userscript to deploy 2018-03-02 15:42:29 +00:00
Sérgio Ramos
9eabff8a60 feat(instances): link user-scripts to metadata 2018-03-02 14:23:08 +00:00
Sérgio Ramos
4cf50a45c5 fix(instances): prompt to mutate instance on summary 2018-03-02 14:18:11 +00:00
Sérgio Ramos
81c119a066 fix(instances): set correct values when sorting packages 2018-03-02 14:11:02 +00:00
Sérgio Ramos
ec2f9fc141 fix(navigation): hide products-services 2018-03-02 14:10:32 +00:00
Sérgio Ramos
b6e7af2422 fix(instances): always get id when fetching resources 2018-03-02 14:09:17 +00:00
Sérgio Ramos
50faa9d9ac fix(my-joy-instances): truncate summary copy on Instance summary card
fixes #1296
2018-03-02 12:25:08 +00:00
Sérgio Ramos
3579c1d8f5 fix(my-joy-instances): fix breadcrumb routing to align with designs
fixes #1294
2018-03-02 12:21:46 +00:00
Sara Vieira
c673822cad feat(instances): show networks empty box 2018-03-02 12:16:37 +00:00
Sérgio Ramos
11c41272d0 test(instances): update snapshots 2018-03-02 12:10:18 +00:00
Sérgio Ramos
cb0b613034 fix(instances): fix fw submit value 2018-03-02 12:01:39 +00:00
Sérgio Ramos
ae866b401e fix(instances): handle Image label click 2018-03-02 11:52:46 +00:00
Sérgio Ramos
110c80f65f chore(instances): remove resize file 2018-03-02 11:52:28 +00:00
Sérgio Ramos
7f136cc8bc fix(instances): handle machines pagination in networks view 2018-03-02 11:49:16 +00:00
Sérgio Ramos
31b46b216f fix(instances): s/snapshots/instances in instances prompt 2018-03-02 11:48:55 +00:00
Sérgio Ramos
3769e0b5ba fix(instances): fix affinity rule parse 2018-03-02 11:41:42 +00:00
Sérgio Ramos
bf0a1a0ba0 feat: upgrade graphql with dc and pagination 2018-03-02 10:23:22 +00:00
Sérgio Ramos
c6b245aebc fix(instances): validation improvements
fixes #1292
2018-03-01 20:06:36 +00:00
Sérgio Ramos
d7f83c59fa feat: constants in IC (phase 1) 2018-03-01 17:23:03 +00:00
Sérgio Ramos
cd242d7505 feat: improved validation of attrs 2018-03-01 17:23:03 +00:00
Sara Vieira
9d10a3fa92 feat(my-joy-instances): simpler user scripts editor (#1289)
fixes #1187
2018-03-01 13:47:30 +00:00
Sérgio Ramos
abe7a58e3f
fix(images): filter images and tags
fixes #1285
2018-02-28 13:14:17 +00:00
Sérgio Ramos
577df6d187 fix(instances): search only by visible attrs 2018-02-28 12:34:36 +00:00
Sérgio Ramos
ce232b7d6a chore: rename navigation 2018-02-28 11:22:52 +00:00
Sérgio Ramos
e7cd8f7561 chore: cleanup deps and flows 2018-02-28 11:18:40 +00:00
Sérgio Ramos
33d6b2ecab fix(my-joy-beta): vms = true -> HVM 2018-02-27 15:23:29 +00:00
Sérgio Ramos
ac404ee33b fix(my-joy-beta): revert pkg selector in create-instance 2018-02-27 15:16:52 +00:00
Sérgio Ramos
584c8b2028 fix(my-joy-beta): mark optional sections as proceeded onEdit 2018-02-27 15:08:45 +00:00
Sara Vieira
25c2735bf4 fix(my-joy-beta): create instance package table alignments
fixes #1271
2018-02-27 14:40:35 +00:00
Sérgio Ramos
461d8697ca fix(my-joy-beta): fix tags/fw match
fixes #1267
2018-02-27 14:26:44 +00:00
Sara Vieira
d8618eab30 fix(my-joy-beta): copy tweaks
fixes #1275
2018-02-27 14:26:44 +00:00
Sara Vieira
255fd67f48 fix(my-joy-beta): fis badge position 2018-02-27 14:23:11 +00:00
Sara Vieira
6848302022 fix(my-joy-beta): copy tweaks
fixes #1275
2018-02-27 13:56:34 +00:00
Sara Vieira
943ef1daf6 fix(ui-toolkit): remove meta if no message 2018-02-27 13:41:36 +00:00
Sara Vieira
84f6faf693 fix(my-joy-beta): fix section-list scrolling
fixes #1266
2018-02-27 13:24:36 +00:00
Sérgio Ramos
e405d47cea fix(my-joy-beta): re-enable navbar 2018-02-27 11:51:41 +00:00
Sérgio Ramos
2b2e431830 fix(bundle): explicit keyId param to Api 2018-02-27 11:41:40 +00:00
Sérgio Ramos
e540425472 fix: require theme from toolkit, not state 2018-02-27 10:59:15 +00:00
Sérgio Ramos
a6b32631c4 fix(my-joy-beta): show snapshots mutation name 2018-02-26 19:45:07 +00:00
Sérgio Ramos
8b67cae8f3 test(my-joy-beta): fix failed merge 2018-02-26 19:13:09 +00:00
Sara Vieira
21c0bc70a3 fix(my-joy-beta): fix small bugs
fixes #1259
fixes #1255
2018-02-26 18:45:40 +00:00
Sérgio Ramos
1a8a91e41e feat(bundle): update cloudapi-gql dependency 2018-02-26 17:52:43 +00:00
Sara Vieira
99374a8170 feat(ui-toolkit): replace bold with semibold fonts 2018-02-26 15:54:25 +00:00
Sérgio Ramos
71c7743fef revert(my-joy-beta): use an older joyent-manifest-editor version 2018-02-26 15:20:56 +00:00
Sérgio Ramos
311dc6361b test(my-joy-beta): update snapshots 2018-02-26 14:43:16 +00:00
Sérgio Ramos
de5e7e9663 fix(my-joy-beta): show top border on <Empty /> when not in list 2018-02-26 14:43:16 +00:00
Sérgio Ramos
486fd8664f fix(my-joy-beta): small create image button (tmp) 2018-02-26 14:43:16 +00:00
Sérgio Ramos
b72714fc94 style(my-joy-beta): lint 2018-02-26 14:43:16 +00:00
Sérgio Ramos
5d333c57a6 revert(ui-tookit): messages full-width and no tip 2018-02-26 14:43:16 +00:00
Sara Vieira
8b36f40e9d feat(my-joy-beta): new image tabs on instance creation 2018-02-26 14:23:06 +00:00
Sara Vieira
5bd261ad6b fix(ui-toolkit): overhaul components
fixes #1226
2018-02-26 12:07:30 +00:00
Sérgio Ramos
f8675e4d8d feat(my-joy-beta): show public/private label in ips 2018-02-26 11:34:28 +00:00
Sérgio Ramos
318a510ee8 build(my-joy-beta): initial ssr support
fixes #1247
2018-02-26 10:16:17 +00:00
Sérgio Ramos
05550dd570 fix(my-joy-beta): use redux-form to handle package selection (revert) 2018-02-23 20:02:17 +00:00
Sara Vieira
7d618d9992 feat(my-joy-beta): add validation
fixes #1244
2018-02-23 17:57:13 +00:00
Sara Vieira
9e67c3ab67 fix(my-joy-beta): fix multiple bugs
fixes #1208
2018-02-23 15:59:12 +00:00
Sérgio Ramos
ef61bbce61 test(my-joy-beta): update snapshots 2018-02-22 02:22:00 +00:00
Sérgio Ramos
d13e23e15d fix(my-joy-beta): make logo click trigger change 2018-02-22 02:08:18 +00:00
Sérgio Ramos
4a8fa480c4 fix(my-joy-beta): remove table header bottom border 2018-02-22 02:08:03 +00:00
Sérgio Ramos
c7043f0b3a lint(my-joy-beta): remove unused var 2018-02-22 02:07:24 +00:00
Sérgio Ramos
6f36e62f92 chore: update snapshots
# Conflicts:
#	packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png
#	packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap
#	packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-images-name-stuff-image-name-stuff-1-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/snapshots-ui-js-item-mutating-1-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-1-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-instance-1-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-instance-2-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-state-provisioning-1-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-state-running-1-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-state-stopped-1-snap.png
#	packages/my-joy-beta/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap
#	packages/my-joy-beta/src/components/instances/__tests__/__snapshots__/summary.spec.js.snap
#	packages/my-joy-beta/src/containers/create-instance/__tests__/__snapshots__/metadata.spec.js.snap
#	packages/my-joy-beta/src/containers/create-instance/__tests__/__snapshots__/user-script.spec.js.snap
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/cns-ui-js-cns-loading-1-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/firewall-ui-js-firewall-loading-1-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/list-ui-js-list-loading-1-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-metadata-1-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/networks-ui-js-networks-loading-1-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-1-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-2-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-3-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-editing-removing-1-snap.png
#	packages/my-joy-beta/src/containers/instances/__tests__/__snapshots__/metadata.spec.js.snap
#	packages/my-joy-beta/src/containers/instances/__tests__/__snapshots__/summary.spec.js.snap
2018-02-22 01:22:27 +00:00
Sérgio Ramos
486d6f54f4 fix(my-joy-beta): 12px vertical-vidiver margin in summary 2018-02-22 01:04:57 +00:00
Sérgio Ramos
b5a29eb300 fix(my-joy-beta): s/Snapshot key/Snapshot name 2018-02-22 01:04:57 +00:00
Sérgio Ramos
ffe9d2321c fix(my-joy-beta): show instance name instead of package in summary 2018-02-22 01:04:57 +00:00
Sérgio Ramos
50c1b6e9b1 fix(my-joy-beta): fix affinity field sizes
# Conflicts:
#	packages/my-joy-beta/src/containers/create-instance/index.js
2018-02-22 01:04:50 +00:00
Sérgio Ramos
01e10c6962 fix(my-joy-beta): show create instance errors
# Conflicts:
#	packages/my-joy-beta/src/containers/create-instance/index.js
2018-02-22 01:03:37 +00:00
Sérgio Ramos
9d7e4e22d5 fix(my-joy-beta): fix pkg vcpus sort 2018-02-22 01:01:08 +00:00
Sérgio Ramos
3bfc7bd14b fix(my-joy-beta): validate tags and metadata 2018-02-22 01:01:08 +00:00
Sérgio Ramos
4593980883 feat(my-joy-beta): confirm some mutations 2018-02-22 01:01:08 +00:00
Sérgio Ramos
929fcf0ab4 fix(my-joy-beta): don't require proceeded to deploy
# Conflicts:
#	packages/my-joy-beta/src/containers/create-instance/index.js
#	packages/my-joy-beta/src/containers/create-instance/tags.js
#	yarn.lock
2018-02-22 01:01:01 +00:00
Sérgio Ramos
234a481c32 fix(my-joy-beta): remove weird char from metadata 2018-02-22 00:56:54 +00:00
Sérgio Ramos
a9c63c20a7 fix(my-joy-beta): update pkg list to match image type 2018-02-22 00:56:48 +00:00
Sérgio Ramos
17f58e4089 fix(my-joy-beta): credentials-same-origin on apollo-client
# Conflicts:
#	packages/my-joy-beta/package.json
2018-02-22 00:56:48 +00:00
Sérgio Ramos
cb9ee4644e build: build on install 2018-02-22 00:56:14 +00:00
Sérgio Ramos
9966143337 build: build on install 2018-02-19 15:00:54 +00:00
Sérgio Ramos
d879202b4e feat: create instance from image, and vice-versa 2018-02-16 19:12:50 +00:00
Sérgio Ramos
bf9a85e4fd feat(images): mutate tags 2018-02-16 19:12:50 +00:00
Sérgio Ramos
eae5345e62 chore: bump majors 2018-02-16 18:32:15 +00:00
Sérgio Ramos
a7ca59e4f2 fix(my-joy-beta): consisten onClick on create-instance headers 2018-02-16 18:22:31 +00:00
Sérgio Ramos
a1423ea53f fix(my-joy-beta): don't sort networks by selected 2018-02-16 18:22:31 +00:00
Sérgio Ramos
11b9f1978a fix(my-joy-beta): fix latest image selection 2018-02-16 18:22:31 +00:00
Sérgio Ramos
a5ea102ab3 chore(ui-toolkit): update react-bundle 2018-02-16 18:22:31 +00:00
Sérgio Ramos
99ceda9033 fix: add missing dependencies 2018-02-16 18:22:31 +00:00
Sara Vieira
a5eb142dcc fix(my-joy-beta): fix multiple small issues 2018-02-16 18:22:31 +00:00
Sara Vieira
bf5f0463e7 feat(images): delete image in summary and list
fixes #1204
2018-02-14 19:36:31 +00:00
Sérgio Ramos
a7283454b8 fix: add missing dependencies 2018-02-14 17:20:19 +00:00
Sara Vieira
e7a92656d6 fix(my-joy-beta): fix multiple small issues 2018-02-14 16:09:24 +00:00
Sara Vieira
4dc7b9179b fix(images): fix small bugs from QA
fixes #1202
2018-02-13 20:33:03 +00:00
Sara Vieira
29fc12d4dd feat(images): create image 2018-02-13 20:03:57 +00:00
Sara Vieira
ca1236fb80
fix(my-joy-beta): change menu name to cns (#1178) 2018-02-12 10:43:32 +00:00
Sara Vieira
1a53b0753c feat(images): prettify list 2018-02-09 14:16:42 +00:00
Sérgio Ramos
36756fe75b feat(images): bootstrap 2018-02-09 14:16:42 +00:00
Sara Vieira
80af7af938 fix(my-joy-beta): fix multiple small issues 2018-02-09 13:14:19 +00:00
Sara Vieira
533e7d875e
chore(my-joy-beta): add mixpanel 2018-02-06 16:02:37 +00:00
Sara Vieira
23e4554bf2 feat(ui-toolkit): add copiable field 2018-02-06 11:27:10 +00:00
Sara Vieira
de5fba81e3 feat(my-joy-beta): add empty state to instance list
fixes #765
2018-02-05 14:18:30 +00:00
Sara Vieira
5eff7e0883 fix(my-joy-beta): animation speed based on component height
fixes #1137
2018-02-05 13:50:43 +00:00
Sérgio Ramos
6ad179601e fix(my-joy-beta): set fw initial values only after loading 2018-02-05 13:00:23 +00:00
Sérgio Ramos
72d5c8b18f fix(my-joy-beta): when no cns services, remove tag 2018-02-05 12:54:53 +00:00
Sara Vieira
bae3e8145f chore(my-joy-beta): add hotjar 2018-02-02 17:19:36 +00:00
Sara Vieira
fe5d468fdf chore(my-joy-beta): add heap 2018-02-02 14:42:59 +00:00
Sérgio Ramos
49b831779c
docs: add more projects 2018-02-02 11:23:22 +00:00
Sara Vieira
0a427940a7 fix(my-joy-beta): multiple small fixes
fixes #1136
2018-02-01 15:33:58 +00:00
Sérgio Ramos
47f2aa06c6 fix(navigation): downgrade apollo-utilities because of regression 2018-02-01 12:30:02 +00:00
Sérgio Ramos
20b6525eda fix(my-joy-beta): adjust tag/metadata count margin 2018-02-01 10:55:36 +00:00
Sérgio Ramos
be7e9f6d03 fix(my-joy-beta): remove resize references 2018-02-01 10:55:20 +00:00
Sara Vieira
2cc953daae fix(my-joy-beta): small fixes 2018-02-01 10:38:12 +00:00
Sara Vieira
1c1909324f fix(my-joy-beta): fix selects in IE11 2018-01-31 15:50:53 +00:00
Sérgio Ramos
38d162843d fix(my-joy-beta): fix section spacings
fixes #1096
2018-01-31 15:06:21 +00:00
Sara Vieira
280842bd9f fix(my-joy-beta): fix vertical align in IE11
fixes #1094
fixes #1095
2018-01-31 12:44:06 +00:00
Sara Vieira
60128aef4a fix(my-joy-beta): display tags number when expanded 2018-01-31 12:15:07 +00:00
Sara Vieira
2e36b850ca fix(my-joy-beta): fix footer position
fixes #1045
2018-01-30 17:58:40 +00:00
Sara Vieira
89bddf5c3f feat(my-joy-beta): create instance step animations 2018-01-30 16:27:01 +00:00
Sérgio Ramos
18701442e1 fix(ui-toolkit): bulk actions on top
fixes #1043
2018-01-30 12:27:25 +00:00
Sérgio Ramos
684af7e18d
chore: add code of conduct 2018-01-30 12:06:24 +00:00
Sérgio Ramos
b504d637ed feat(ui-toolkit): implement native <sup> with badge
fixes #1049
fixes #1048
2018-01-30 11:03:40 +00:00
Sérgio Ramos
0ce87d3edd fix(my-joy-beta): simplify create-instance images implementation
fixes #1027
fixes #1028
2018-01-30 11:03:40 +00:00
Sérgio Ramos
26894e25d2 fix(my-joy-beta): use formlabel on package filters
fixes #1031
2018-01-30 11:03:40 +00:00
Sérgio Ramos
563a112d4f feat(my-joy-beta): revise card documentation
fixes #965
2018-01-30 11:03:40 +00:00
Sérgio Ramos
d625ed41b2 test(my-joy-beta): generate visual snapshots 2018-01-26 16:24:01 +00:00
Sérgio Ramos
6f25747e09 fix(ui-toolkit): remove FormMeta left margin
fixes #964
2018-01-26 15:57:18 +00:00
Sérgio Ramos
e425de2c67 fix(icons): remove unused icons
fixes #970
2018-01-26 15:57:18 +00:00
Sérgio Ramos
ad09744371 fix(ui-toolkit): overhaul of Message according to designs
fixes #967
2018-01-26 15:57:18 +00:00
Sérgio Ramos
955b5e12e2 fix(ui-toolkit): fix tooltip font-size and padding
fixes #971
2018-01-26 15:57:18 +00:00
Sérgio Ramos
b8b64bfa17 feat(my-joy-beta): imc user-script initial implementation
fixes #1109
2018-01-25 18:23:29 +00:00
Sérgio Ramos
055b58106a fix(my-joy-beta): hide special tags and metadata
fixes #1106
fixes #1107
2018-01-25 17:38:13 +00:00
Sérgio Ramos
81b46b8c53 fix(ui-toolkit): fix disabled popover color in webkit
fixes #1050
2018-01-25 17:24:56 +00:00
Sérgio Ramos
15213ba6ce fix(my-joy-beta): adjust select inputs width in affinity
fixes #1090
2018-01-25 17:16:09 +00:00
Sérgio Ramos
2ebace64c0 fix(my-joy-beta): monospace instance name on network details
fixes #1089
2018-01-25 16:50:10 +00:00
Sérgio Ramos
c39536677b feat(navigation): fetch products from api
fixes #1101
2018-01-25 16:41:00 +00:00
Sérgio Ramos
467edd24e2 fix(my-joy-beta): hvm by default
fixes #1044
2018-01-25 16:41:00 +00:00
Sérgio Ramos
598ab0d071 fix(my-joy-beta): remove artifact above toolbar cta
fixes #1047
2018-01-25 16:41:00 +00:00
Sérgio Ramos
31d88baf44 feat(my-joy-beta): imc fw rules
fixes #1075
2018-01-24 23:02:07 +00:00
Sérgio Ramos
52d651a598 feat(my-joy-beta): imc cns
fixes #1076
fixes #886
2018-01-24 22:46:46 +00:00
Sérgio Ramos
396af2d2e6 fix(my-joy-beta): use the correct vars when deploying 2018-01-24 14:16:47 +00:00
Sérgio Ramos
f539c1eaca fix(my-joy-beta): omit open/expanded from metadata/tags 2018-01-24 11:55:04 +00:00
Sérgio Ramos
0681fb05fe fix(my-joy-beta): polyfill Number.isFinite 2018-01-24 11:35:06 +00:00
Sérgio Ramos
7d02fb8777 fix(my-joy-beta): more String.prototype.includes polyfills 2018-01-24 11:28:42 +00:00
Sérgio Ramos
0706548ed5 fix(my-joy-beta): polyfill String.prototype.includes 2018-01-24 11:21:27 +00:00
Sérgio Ramos
4760db95ff fix: update dependencies for ie11 compat 2018-01-23 21:07:08 +00:00
Wyatt Preul
db420b1f5a docs(navigation): rename 2018-01-23 16:23:04 +00:00
Sara Vieira
a1ddd37546 fix(my-joy-beta): grey out inactive firewalls
fixes #1053
2018-01-23 14:33:55 +00:00
Sara Vieira
2f87ec96ff fix(my-joy-beta): create instance - metadata ui improvements
fixes #1010
2018-01-23 14:16:28 +00:00
Sérgio Ramos
b1a5290615 fix: add x-ua-compatible meta header tag 2018-01-23 13:58:25 +00:00
Sérgio Ramos
8d7455c07c feat(my-joy-beta): imc networks
fixes #1074
2018-01-23 13:55:36 +00:00
Sara Vieira
bbfa427a92 fix(my-joy-beta): order and check default networks
fixes #928
2018-01-23 11:13:13 +00:00
Sara Vieira
a33b586e42 fix(my-joy-beta): don't expand metadada kv when in other section
fixes #1052
2018-01-22 15:39:52 +00:00
Sara Vieira
8c8dd1758d fix(my-joy-beta): remove filter input placeholder
fixes #1046
2018-01-22 15:19:31 +00:00
Sérgio Ramos
0d207f01e8
feat(my-joy-beta): create instance user scripts
fixes #984
2018-01-19 17:37:31 +00:00
Sérgio Ramos
e650a070a4 feat(bundle): support sso 2018-01-19 11:16:08 +00:00
Sérgio Ramos
67f36a464b fix(my-joy-beta): create instance deploy ux improvements
fixes #1015
2018-01-18 15:16:13 +00:00
Sara Vieira
57eecf0552 fix(my-joy-beta): create instance improve firewall ui
fixes #1012
2018-01-18 14:51:22 +00:00
Sara Vieira
780814aef9 fix(my-joy-beta): create instance - fix image ui
fixes #1005
2018-01-18 13:42:55 +00:00
Sérgio Ramos
9fba1860b0 fix(my-joy-beta): sanitize and validate instance name
fixes #1009
2018-01-18 13:18:37 +00:00
Sara Vieira
ccf704a1ee fix(my-joy-beta): fix tag spacing
fixes #1008
2018-01-18 13:09:25 +00:00
Sara Vieira
75767714ba fix(my-joy-beta): onBlur=null to avoid double click on next
fixes #1029
2018-01-18 11:16:56 +00:00
Sara Vieira
0e342afd13 fix(my-joy-beta): create instance - cns ui fixes
fixes #1013
2018-01-17 20:11:42 +00:00
Sérgio Ramos
c5a8006636 test: compile after installing 2018-01-17 19:59:42 +00:00
Sérgio Ramos
380cded0bb fix: run tests in stream and add mocks 2018-01-17 19:54:56 +00:00
Sérgio Ramos
da38cd444a test: update snapshots 2018-01-17 19:40:10 +00:00
Sérgio Ramos
c75bb9328d feat(navigation): initial commit 2018-01-17 19:10:39 +00:00
Sara Vieira
03766d7fd8 fix(ui-toolkit): disabled cursor on disabled input
fixes #963
2018-01-16 18:21:16 +00:00
Sara Vieira
39d038fa73 fix(my-joy-beta): create instance - networks ui fixes
fixes #1011
2018-01-16 17:45:19 +00:00
Sara Vieira
35c50de56b fix(my-joy-beta): create instance - packages ui fixes
fixes #1007
2018-01-16 15:34:54 +00:00
Sara Vieira
74a4b82006 fix(my-joy-beta): create instance - general ui fixes
fixes #1016
2018-01-16 11:54:22 +00:00
Sara Vieira
5266b5d485 fix(my-joy-beta): create instance - affinity ui fixes
fixes #1014
2018-01-16 11:23:00 +00:00
Sérgio Ramos
2e3dfb3444 build(icons): version bump 2018-01-15 18:25:56 +00:00
Sara Vieira
4bd89561c4 fix(my-joy-beta): create instance - name ui fixes
fixes #1004
2018-01-15 17:34:15 +00:00
Sara Vieira
67c79c4629 fix(my-joy-beta): create instance - 8 col descriptions 2018-01-15 17:23:32 +00:00
Sérgio Ramos
9432bfd1a3 feat(my-joy-beta): create instance submit
fixes #989

# Conflicts:
#	packages/my-joy-beta/src/containers/create-instance/index.js
2018-01-12 17:42:28 +00:00
Sérgio Ramos
54d4b61250 feat(my-joy-beta): create instance firewall
fixes #986
2018-01-12 15:31:01 +00:00
Sara Vieira
069e56f921 feat(my-joy-beta): create instance affinity
fixes #988
2018-01-12 15:25:26 +00:00
Sérgio Ramos
5ff8d7165c feat(my-joy-beta): don't show names when no cns 2018-01-11 20:35:26 +00:00
Sara Vieira
ffb3215611 feat(my-joy-beta): create instance cns
fixes #987
2018-01-11 20:26:42 +00:00
Sérgio Ramos
f489e34402 feat(my-joy-beta): create instance networks
fixes #985
2018-01-11 20:15:47 +00:00
Sara Vieira
e12a0d4dd2 feat(my-joy-beta): create packages in create instance page
fixes #981
2018-01-11 13:27:16 +00:00
Sérgio Ramos
ed801eba0a feat(my-joy-beta): tags and metadata in instance creation
fixes #983
fixes #982
2018-01-10 16:30:54 +00:00
Sérgio Ramos
ca7e34c8f5
chore: fix guidelines link 2018-01-10 16:19:42 +00:00
Sara Vieira
2f92462be4 feat(my-joy-beta): image section in create instance 2018-01-09 18:14:20 +00:00
Sérgio Ramos
6bd073ff82 fix(ui-toolkit): fix form toggle infinite loop 2018-01-09 14:57:00 +00:00
Sara Vieira
98166047fd feat(my-joy-beta): create instane page starter 2018-01-08 19:16:12 +00:00
Sérgio Ramos
5a8c8e8fb2 fix(my-joy-beta): keep loading when removing 2018-01-08 15:05:48 +00:00
Sérgio Ramos
6fb2dc85e6 test: update snapshots 2018-01-08 15:05:48 +00:00
Sérgio Ramos
74d6968ce7 fix(my-joy-beta): fix play color 2018-01-08 15:05:48 +00:00
Sérgio Ramos
2c24ce536d fix(my-joy-beta): bolder metadata name 2018-01-08 15:05:48 +00:00
Sérgio Ramos
16733251a1 fix(my-joy-beta): pluralize 'pair' when appropriate 2018-01-08 15:05:48 +00:00
Sérgio Ramos
17d3563a42 fix(my-joy-beta): prevent race conditions when editing tags 2018-01-08 15:05:48 +00:00
Sérgio Ramos
a6f9b74f6f fix(my-joy-beta): don't show not ready sections 2018-01-08 15:05:48 +00:00
Sérgio Ramos
96297b8728 fix(my-joy-beta): don't use small buttons on toolbar action 2018-01-08 15:05:48 +00:00
Sérgio Ramos
28f44d943f fix(my-joy-beta): fix custom image on summary 2018-01-08 15:05:48 +00:00
Sérgio Ramos
a9ef5f91ba fix(my-joy-beta): revise and fix disabled/loading actions 2018-01-08 15:05:48 +00:00
Sérgio Ramos
0bccbc1988 fix(my-joy-beta): don't update header when editing keyValue 2018-01-08 15:05:48 +00:00
Sérgio Ramos
4678addd7a fix(my-joy-beta): add missing remove machine mutations 2018-01-08 15:05:48 +00:00
Sérgio Ramos
8f786ae278 build(my-joy-beta): remove styled-components babel plugin 2018-01-08 15:05:48 +00:00
Sérgio Ramos
3db639d2a9 fix(my-joy-beta): enable reboot quick action button 2018-01-08 15:05:48 +00:00
Sara Vieira
8701aaebda feat(icons): add and revise some icons
- Deletes moment as a dependency
 - Adds two new icons
 - Credits styleguidist
 - Fixes console warnings
2018-01-05 16:35:26 +00:00
Sara Vieira
3caaebb0e9 feat(my-joy-beta): revise snapshots implementation
according to new designs

fixes #872
2018-01-05 15:42:09 +00:00
Inayaili de León Persson
8eecebfe47 docs(ui-toolkit): pdated functional icons docs 2018-01-03 15:37:06 +00:00
Inayaili de León Persson
9d10faabe8 docs(ui-tookit): updated icons docs
- Typo in separate
- Updated start of text
2018-01-03 15:36:19 +00:00
Inayaili de León Persson
72c358aea7 docs(ui-toolkit): updated buttons docs
- American spelling of colour
- Consistent naming of in-paragraph anchor
- Fixed typo in embedded
2018-01-03 14:46:20 +00:00
Inayaili de León Persson
9cc0150696 docs(ui-toolkit): updated typography docs
- American spelling of neighbourhood
- Unpluralised "leading"
- Singular "body"
2018-01-03 14:28:44 +00:00
Inayaili de León Persson
9c16a0c7ed Updated color.js copy (#959)
- Missing apostrophe in Triton
- Changed start of Action Colors para
- Changed start of Greys para
2018-01-03 14:22:01 +00:00
Sara Vieira
02b9f88315 fix(icons): fix play icon
fixes #951
2017-12-22 16:01:35 +00:00
Sara Vieira
eec4821dee feat(ui-toolkit): remove basealign
BREAKING CHANGE
2017-12-22 15:16:40 +00:00
Sérgio Ramos
2d847da1d4 fix(my-joy-beta): re-connect popover actions 2017-12-22 14:58:16 +00:00
Sérgio Ramos
e9c833d1ea fix(ui-toolkit): show column on bp greater than xs 2017-12-22 14:58:16 +00:00
Sérgio Ramos
6fa74685f1 fix(ui-toolkit): fix border of popover tip 2017-12-22 14:58:16 +00:00
Sara Vieira
e297eb7669 fix(my-joy-beta): fix small tag bugs 2017-12-22 14:51:38 +00:00
Sérgio Ramos
a62b95072f test(my-joy-beta): test list, metadata, tags, and home 2017-12-22 14:51:08 +00:00
Sérgio Ramos
8f7694f7f4 feat(my-joy-beta): revise Tags to use new KeyValue 2017-12-22 14:51:07 +00:00
Sérgio Ramos
2538453d98 feat(my-joy-beta): revise Metadata and KeyValue implementations
fixes #908
2017-12-22 14:51:07 +00:00
Sérgio Ramos
c184066f26 build: pin graphql resolution 2017-12-22 02:16:36 +00:00
Sérgio Ramos
4b84756e47 fix(my-joy-beta): fix regressions introduced by removing Title 2017-12-22 02:11:50 +00:00
Sara Vieira
0a409f0924 test(ui-toolkit): initial tests 2017-12-22 01:08:27 +00:00
Sara Vieira
3bef7378e8 refactor(ui-toolkit): use currentcolor to fallback to color definition 2017-12-18 15:40:31 +00:00
Sara Vieira
5d502df2d4 fix(ui-toolkit): workaround color bug in safari 2017-12-18 14:31:35 +00:00
Sara Vieira
f6c2802b32 feat(ui-toolkit): remove progress-bar
BREAKING CHANGE
2017-12-18 13:42:56 +00:00
Sara Vieira
d0769903a3 fix(ui-toolkit): fix small bugs 2017-12-18 11:25:50 +00:00
Sérgio Ramos
882cb68ec2 feat(ui-toolkit): a more reusable ui-toolkit
- remove dependencies on redux-form, react-router-dom, and react-redux.
 - work with every font, and don't bundle fonts
 - don't bundle editor
2017-12-15 15:23:38 +00:00
Sérgio Ramos
1a2b278c32 style: lint and format 2017-12-15 14:53:59 +00:00
Sara Vieira
890e093656 docs(ui-toolkit): new styleguide layout 2017-12-15 14:39:37 +00:00
Sara Vieira
8c604df1d2 feat(my-joy-beta): instance tags
fixes #905
2017-12-06 15:35:22 +00:00
Sara Vieira
bba8c99ee6 fix(ui-toolkit): header, button, and checkbox. new toggle 2017-12-06 15:03:40 +00:00
Sérgio Ramos
6f226b5d7d feat(ui-toolkit): embed arrow icon in table (#916) 2017-12-06 10:34:15 +00:00
Sérgio Ramos
cc5bb78dc4 fix(my-joy-beta): show quick-actions left border 2017-12-04 18:24:53 +00:00
Sérgio Ramos
9cf7a94e17 feat(my-joy-beta): instance list
fixes #869 #871
2017-12-04 18:04:19 +00:00
Sara Vieira
c087f0bd9f
feat(my-joy-beta): instance home
fixes #814
2017-11-28 14:50:55 +00:00
Sérgio Ramos
506048a64a build(icons): watch icons on dev 2017-11-28 14:46:27 +00:00
Sérgio Ramos
195a24dc5e feat(icons): add action icons 2017-11-28 13:57:10 +00:00
Sérgio Ramos
f0a64cf8af feat(ui-toolkit): detach icons into its own package 2017-11-24 15:09:08 +00:00
Sérgio Ramos
f863dc792b build: don't clean examples 2017-11-23 16:56:59 +00:00
Sara Vieira
36de79324b feat(create-instance): affinity prototype 2017-11-22 12:13:33 +00:00
Sara Vieira
48b9aef8cb feat(ui-toolkit): remove slider
BREAKING
2017-11-20 11:34:53 +00:00
Sara Vieira
0be8553e29 feat(create-instance): revised feedback changes 2017-11-20 11:33:50 +00:00
Sérgio Ramos
42b4c6230e feat(ui-toolkit): fluid Breadcrumb with bottom-border (#884) 2017-11-16 13:17:24 +00:00
Sérgio Ramos
c983f9f9ca style: prettify 2017-11-16 12:14:36 +00:00
Sérgio Ramos
897e56b772 test(my-joy-beta): update metadata/tags snapshots 2017-11-16 12:14:36 +00:00
Sérgio Ramos
3e650addcb feat(ui-toolkit): fluid Header 2017-11-16 12:14:36 +00:00
Sara Vieira
607d2ae8cb feat: new tables and affinity prototype 2017-11-16 10:47:32 +00:00
Sérgio Ramos
c47333ed1b feat: tags and metadata new ui and mutations 2017-11-14 16:03:30 +00:00
Sérgio Ramos
34db52d541 docs: add cloudapi-gql repo link 2017-11-02 16:54:33 +00:00
Sérgio Ramos
d8f0dec487 chore: detach cloudapi-gql
related: #842
2017-11-02 16:50:43 +00:00
Sérgio Ramos
8a0a0a4457 feat(ui-toolkit): abstract view-container in the Header implementation
* feat(ui-toolkit): abstract view-container in the Header implementation

* fix(ui-toolkit): import react in triton-beta logo

this fixes a missing import error because svgs are compiled to react components

* style(ui-toolkit): convert px leftovers
2017-11-02 15:18:25 +00:00
Sérgio Ramos
28918fb464 style: lint and format 2017-11-02 13:33:43 +00:00
Sérgio Ramos
8bb9c18b9c fix: flatten directories array passed to globby
fixes run-staged-pkg globby call
2017-11-02 13:11:04 +00:00
Inayaili de León Persson
5d4b22070f
Removed bullet lists from titles 2017-11-01 17:54:46 +00:00
Inayaili de León Persson
e1ce2839b7
Update issue template
Removed bullet lists and made headings instead for clarity
2017-11-01 17:52:57 +00:00
Sérgio Ramos
75e5454b92 implement table components and integrate them (#822)
* feat: implement table components and integrate them

* fix(ui-toolkit): styleguide css

* fix(ui-toolkit): merge
2017-10-31 10:29:15 +00:00
Sérgio Ramos
d84f972fbe smaller and simpler Card api (#821)
* feat(ui-toolkit): smaller and simpler Card api

fixes: #809
fixes: #777

* feat(ui-toolkit) - Make adjustments to header (#824)

* feat(ui-toolkit) - Make adjustments to header

* feat(ui-toolkit) - Make adjustments to header

* add issue and pull request templates (#819)

* feat(all) - Add issue and pull ruequest templates

* Update PULL_REQUEST_TEMPLATE.md

* Create COMMIT_GUIDELINES.md

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update COMMIT_GUIDELINES.md

* feat(ui-toolkit): smaller and simpler Card api

fixes: #809
fixes: #777
2017-10-31 10:03:44 +00:00
Sara Vieira
f7eb8a276c
add issue and pull request templates (#819)
* feat(all) - Add issue and pull ruequest templates

* Update PULL_REQUEST_TEMPLATE.md

* Create COMMIT_GUIDELINES.md

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update COMMIT_GUIDELINES.md
2017-10-30 17:12:00 +00:00
Sara Vieira
5ebce8fdea
feat(ui-toolkit) - Make adjustments to header (#824)
* feat(ui-toolkit) - Make adjustments to header

* feat(ui-toolkit) - Make adjustments to header
2017-10-30 11:52:53 +00:00
Sara Vieira
bff7fe704e feat(my-joy-beta): make queries for dns
fixes #725
2017-10-25 18:09:02 +01:00
Sérgio Ramos
2b7a7d9221 fix: add missing eslint-plugin-markdown peer dependency 2017-10-25 16:02:49 +01:00
Sérgio Ramos
98b4a713a0 feat(ui-toolkit): tooltip and popover 2017-10-24 15:21:39 +01:00
Sara Vieira
854afa0c0d fix(boilerplate): fix install 2017-10-24 11:09:57 +01:00
Sara Vieira
ebcc19e8dd docs(ui-toolkit): Add demos to all toolkit components
fixes #810
2017-10-23 15:09:49 +01:00
Sara Vieira
3c792c4150 feat(ui-toolkit): remove old chevron
fixes #782
2017-10-20 14:41:14 +01:00
Sérgio Ramos
6cf84c583c feat(boilerplate): create next-like boilerplate for quick prototypes
also, some cleanup

fixes #773
2017-10-19 22:15:52 +01:00
Sara Vieira
c1327083d3 docs: add react-topology and metrics-yall to readme 2017-10-19 22:14:59 +01:00
Sérgio Ramos
86cd1430af docs: add links to related repos 2017-10-18 10:17:06 +01:00
Sérgio Ramos
c823d3f967 build: define some yarn resolutions
this helps to build a flatter dependency tree
2017-10-17 16:34:56 +01:00
Sérgio Ramos
ee30f5e7bf feat(ui-toolkit): remove topology 2017-10-17 16:31:43 +01:00
Sérgio Ramos
af817cf059 build: ignore _env files in .gitignore 2017-10-17 15:52:47 +01:00
Sérgio Ramos
1054d42660 build: run dev/start in parallel with stream 2017-10-17 15:51:24 +01:00
Sérgio Ramos
fe3d5c1bb7 build(my-joyent): use joyent-react-scripts 2017-10-17 15:48:32 +01:00
Sara Vieira
fd17bf995b fix(ui-toolkit): update colors to match spec
fixes #768
2017-10-17 11:01:57 +01:00
Sara Vieira
772b097458 fix(my-joyent): fix reset filters on prototype
fixes #766
2017-10-17 11:00:21 +01:00
Sérgio Ramos
c15d7ae020 style: lint 2017-10-17 10:36:23 +01:00
Sérgio Ramos
dccfd35525 feat(my-joy-beta): improve metadata/tags whitespace 2017-10-17 10:36:23 +01:00
Sérgio Ramos
70577ca442 feat(ui-toolkit): allow long FormLabel's 2017-10-17 10:36:23 +01:00
Sérgio Ramos
f764b36479 fix(ui-toolkit): fix FormSelect fluid flag 2017-10-17 10:36:23 +01:00
Sérgio Ramos
18f2ace3e9 fix(ui-toolkit): don't pass input specific props to checkbox li 2017-10-17 10:36:23 +01:00
Sérgio Ramos
f055118c2a feat(ui-toolkit): text-overflow: ellipsis on input placeholder 2017-10-17 10:36:23 +01:00
Sérgio Ramos
8cdf8070e8 feat: list, create and start snapshots 2017-10-17 10:36:23 +01:00
Sérgio Ramos
55811372fb feat(my-joy-beta): add loading and error to instance list actions 2017-10-17 10:36:23 +01:00
Sérgio Ramos
966d326f3f feat(cloudapi-gql): add updated and created fields to Snapshot 2017-10-17 10:36:23 +01:00
Sérgio Ramos
1a3593c9ca feat: update triton logo 2017-10-17 10:36:23 +01:00
Sérgio Ramos
6f10428b0f feat: instances list actions 2017-10-13 10:47:16 +01:00
Sérgio Ramos
7536cdfc85 chore: update dependencies from rlated repos 2017-10-13 10:47:16 +01:00
Sérgio Ramos
e53a9360ee feat(ui-toolkit): composable CardInfo
fixes #732
2017-10-13 10:33:09 +01:00
Sérgio Ramos
85afe3a228 style: format markdown 2017-10-12 20:15:41 +01:00
Sérgio Ramos
549e08717a ci: don't run tests in pre-commit 2017-10-12 19:56:41 +01:00
Sérgio Ramos
52fdc0f7dd ci: don't exit(1) when pre-commiting partially staged files 2017-10-12 19:56:41 +01:00
Sérgio Ramos
8e26542b91 ci: don't force tests to run on pre-commit 2017-10-12 19:56:41 +01:00
Sara Vieira
12ec0c33ea fix(ui-tollkit): improve loading button styles
fixes #754
2017-10-12 19:55:05 +01:00
Sérgio Ramos
433d8db50a feat(ui-toolkit): composable Breadcrumb
fixes #734
2017-10-12 18:30:42 +01:00
Sara Vieira
8d584459d0 fix(ui-toolkit): Input/Select disabled styling
fixes #746
2017-10-11 15:56:24 +01:00
Sara Vieira
a761b7da31 feat(ui-toolkit): add syntax highlighting to styleguide
fixes #745
2017-10-11 12:01:26 +01:00
Sara Vieira
4baf6647d5 feat(ui-toolkit): toggles implementation according to spec 2017-10-10 11:15:35 +01:00
Sérgio Ramos
68834c31f4 chore: update dependencies (including react 16) 2017-10-09 19:27:46 +01:00
Sérgio Ramos
a70e93aee9 fix(my-joy-beta): fluid Select in instance list 2017-10-09 15:13:08 +01:00
Sérgio Ramos
e52ef9fbbb fix(ui-toolkit): fix missing withTheme declaration 2017-10-09 14:51:44 +01:00
Sérgio Ramos
b4abe731c5 chore: format 2017-10-09 14:51:44 +01:00
Sérgio Ramos
78ea172428 fix(my-joy-beta): use new Message API 2017-10-09 14:51:44 +01:00
Sérgio Ramos
4a668e7c32 feat(ui-toolkit): refactor Message into a more composable widget
fixes #733
2017-10-09 14:51:44 +01:00
Sérgio Ramos
4562b7cc21 chore: upgrade styled-is 2017-10-09 14:51:44 +01:00
Sérgio Ramos
dd32058c9d feat(my-joy-beta): sort and actions 2017-10-09 14:51:44 +01:00
Sérgio Ramos
3135f3b5a7 feat(cloudapi-gql): add rebootMachine mutation 2017-10-09 14:51:44 +01:00
Sérgio Ramos
37c865687b feat(cloudapi-gql): resolve Machine package 2017-10-09 14:51:44 +01:00
Sérgio Ramos
e3dbb9086c feat(cloudapi-gql): primary_ip Machine resolver 2017-10-09 14:51:44 +01:00
Sérgio Ramos
8259bfd284 feat(cloudapi-gql): add disableMachineFirewall schema mutation 2017-10-09 14:51:44 +01:00
Sara Vieira
cf2fb5e645 fix(ui-toolkit): fix cards implementation 2017-10-09 14:35:52 +01:00
Sara Vieira
8097d2f5ba fix(ui-toolkit): small fixes
- Adds sidebar design
 - Adds correct spacing to headers and text
 - Changes color design to look more like spec
 - Fixes papyrus font
 - Adds Roboto Mono as default code font
2017-10-04 18:30:10 +01:00
Inayaili de León Persson
525440c09b Copy updates to anchor readme (#714)
* Updates to get started

- Removed purpose.md
- Updated copy on contribute.md, faq.md and support.md

* Remove file structure and update structure

* Copy updates to anchors readme
2017-10-04 17:38:59 +01:00
Inayaili de León Persson
06ebc10ad2 Updated order of components and fallback font (#715) 2017-10-04 17:19:35 +01:00
Sara Vieira
6cd0b187e2 fix breadcrumb 2017-10-04 15:13:51 +01:00
Inayaili de León Persson
50a23cdb23 docs(ui-toolkit): remove structure.md and updated navigation 2017-10-04 14:27:57 +01:00
Inayaili de León Persson
6a67a6f1b5 doc(ui-toolkit): update copy on contribute, faq, and support 2017-10-04 12:17:31 +01:00
Sérgio Ramos
a3fc39c293 feat(my-joy-beta): remove affinity from instance sections 2017-10-03 16:30:41 +01:00
Sérgio Ramos
98cdf2a00b feat(my-joy-beta): add feed to instance sections 2017-10-03 16:30:27 +01:00
Sérgio Ramos
6c5a75fe89 feat(cloudapi-gql): add machine links 2017-10-03 16:29:56 +01:00
Sérgio Ramos
77540223ab fix(my-joy-beta): adapt to cloudapi-gql breaking changes 2017-10-03 16:05:01 +01:00
Sérgio Ramos
d3baebd25f feat(cloudapi-gql): transform objects on the type resolvers 2017-10-03 16:05:01 +01:00
Inayaili de León Persson
3d99fda795 Small formatting updates to download.md (#707) 2017-10-03 15:37:14 +01:00
Inayaili de León Persson
827f3d2ea0 Updated order of get started sections (#706) 2017-10-03 15:30:45 +01:00
Inayaili de León Persson
6f721f28c7 Update copy of overview.md (#705) 2017-10-03 15:25:04 +01:00
Sérgio Ramos
d93ca077bd chore(cloudapi-gql): s/joyent-portal-cloudapi-gql/cloudapi-gql 2017-10-03 15:02:27 +01:00
Sérgio Ramos
ed4ce42237 feat(gql-cloudapi): template tag schema re-write
- uniform api usage for some models (account/user, networks/vlans/fabrics, etc)
 - graphidoc, playground, faker, and voyager support
 - schema in a template tag and documented
 - apollo-errors
 - apollo-server-hapi and schema using graphql-tools/makeExecutableSchema
 - replace express with Hapi
 - eslint support for graphql
 - updated dependencies
2017-10-03 14:59:22 +01:00
Sérgio Ramos
b64f345e13 style: lint and format 2017-10-03 14:47:41 +01:00
Sérgio Ramos
09ef1cacde feat(my-joy-beta): initial tableview for networks and firewall 2017-10-03 14:47:41 +01:00
Sérgio Ramos
7a2a61a9db feat(my-joy-beta): only transform tags to array once 2017-10-03 14:47:41 +01:00
Sérgio Ramos
0c4f9e5080 feat(ui-toolkit): remove legacy flag from viewcontainer 2017-10-03 14:47:41 +01:00
Sérgio Ramos
0da6f30f38 feat(my-joy-beta): use editor on metadata 2017-10-03 14:47:41 +01:00
Sérgio Ramos
2291666d81 feat(my-joy-beta): show filter when loading machines 2017-10-03 14:47:41 +01:00
Sérgio Ramos
4447a9c610 feat(ui-toolkit): add editor component 2017-10-03 14:47:41 +01:00
Sérgio Ramos
83b11b198b feat(cloudapi): add metadata list resolver 2017-09-27 14:01:46 +01:00
Sérgio Ramos
bdb364b63d feat(my-joy-beta): navigation and tagoxony 2017-09-27 14:01:46 +01:00
Sara Vieira
3e0e7b2e5e feat(ui-toolkit): add more icons page 2017-09-26 17:07:45 +01:00
Sara Vieira
be4190d8cb feat(ui-toolkit): typography and getting started 2017-09-26 12:12:15 +01:00
Sara Vieira
d9ea30bbfb Update README.md 2017-09-25 14:55:46 +01:00
Sara Vieira
718bab3c78 feat(my-joyent): ssd/magnetic form 2017-09-25 14:47:00 +01:00
Sara Vieira
d315f7faa3 fix(joyent-portal): fix filters on group select 2017-09-22 13:15:33 +01:00
Sara Vieira
b76717d660 perf(my-joyent): make page faster and work offline 2017-09-20 17:35:26 +01:00
Sara Vieira
520205d1b9 fix(my-joyent): improve design fidelity 2017-09-20 10:35:44 +01:00
Sérgio Ramos
0ac04c897d feat(joyent-boilerplate): use joyent-react-scripts 2017-09-19 12:41:08 +01:00
Sérgio Ramos
0a8b025c7e chore: update lint conf 2017-09-19 11:20:43 +01:00
Sérgio Ramos
a6d69918fc style: format 2017-09-19 11:20:43 +01:00
Sérgio Ramos
097f57374a chore: update lockfile 2017-09-19 11:20:43 +01:00
Sérgio Ramos
7749f1eb62 chore: remove extracted packages 2017-09-19 10:34:50 +01:00
Sérgio Ramos
d36f869a64 build(normalized-styled-components): version bump 2017-09-19 10:34:50 +01:00
Sara Vieira
93b199e957 fix(my-joyent): sliders need to be reset 2017-09-18 18:23:17 +01:00
Sara Vieira
beb8141869 fix(my-joyent): fix package selection 2017-09-18 16:30:31 +01:00
Sara Vieira
3a425ee7e4 feat: blue highlight when a package is selected 2017-09-18 15:08:55 +01:00
Sara Vieira
621f4c72f4 feat: improved range slider 2017-09-18 12:12:01 +01:00
Sara Vieira
4c666bb438 fix(my-joyent): fix some inconsistencies in technical Prototype 2017-09-15 16:22:44 +01:00
Sara Vieira
5b1059882b feat(my-joyent): add group filtering 2017-09-14 17:50:22 +01:00
Sérgio Ramos
c234b70bf7 fix(manifest-editor): remove postinstall script 2017-09-14 17:03:00 +01:00
Sérgio Ramos
e842f73b41 chore: remove copilot packages (#680) 2017-09-14 10:49:41 -05:00
Wyatt Preul
1fb157240c bug: only get a single dg for id (#679)
* bug: only get a single dg for id

* chore: update versions
2017-09-14 10:00:54 -05:00
Sara Vieira
1e881f3148 feat(my-joyent): process packages in redux 2017-09-14 13:55:31 +01:00
Sara Vieira
884db125e0 feat(my-joyent): fetch packages and implement filters 2017-09-14 12:26:57 +01:00
Sérgio Ramos
3b427871cf feat: CNS env variables (#675) 2017-09-13 14:32:32 -05:00
Wyatt Preul
e70d80425a fix: only get a single dg for id 2017-09-13 19:30:45 +01:00
Sérgio Ramos
1fe36f0e1b feat(portal-api): create Service's before provisioning (#673) 2017-09-13 13:11:20 -05:00
Wyatt Preul
2ce08bbe30 fix: TypeError exception 2017-09-13 15:54:19 +01:00
Sérgio Ramos
9eda12e75d fix(portal-api): handle connection error 2017-09-13 10:39:12 +01:00
geek
a58be6be37 chore: more stable db connect/bootstrap 2017-09-13 10:10:51 +01:00
Wyatt Preul
87bd45b415 doc: include client cert step (#667) 2017-09-12 18:37:01 -07:00
Sérgio Ramos
71ff59cb55 build: update versions 2017-09-08 18:08:05 +01:00
Sara Vieira
ff23179bfd feat(my-joyent): add Header Section to My-joyent 2017-09-08 16:44:08 +01:00
Wyatt Preul
ba6666433e fix: fix key gen 2017-09-08 16:22:24 +01:00
Sara Vieira
d0e4bcd27e chore(ui-toolkit): add tertiary button 2017-09-08 13:01:37 +01:00
Sérgio Ramos
6aa2725cc8 test(cp-gql-mock-server): add logs to socket and http server lifecycle 2017-09-08 12:25:56 +01:00
Sara Vieira
08b97a430a chore(my-joyent): Update from conventional-changelog-lint to commitlint
:q

closes #641
2017-09-08 11:13:03 +01:00
Sérgio Ramos
5d7f7bcb00 style: ignore dist folders for lint 2017-09-08 10:56:07 +01:00
Sara Vieira
e2e6069749 feat(my-joyent): Adds boilerplate for my joyent
Create starting boilerplate for my joyent prototype
2017-09-08 10:38:32 +01:00
Sérgio Ramos
0083b29146 chore: update lockfile 2017-09-07 19:02:45 +01:00
Sérgio Ramos
38e558e9f8 fix(cp-frontend): remove leftover log 2017-09-07 19:02:45 +01:00
Sérgio Ramos
4cf174301a fix(ui-toolkit): s/postinstall/prepublish 2017-09-07 19:02:45 +01:00
Sérgio Ramos
d8ac561552 fix(cp-frontend): handle inexistent healthy status 2017-09-07 19:02:45 +01:00
Sérgio Ramos
1384d5b50a fix(ui-toolkit,cp-frontend): bold label only in Form 2017-09-07 19:02:45 +01:00
Sara Vieira
1ac0848ce2 chore(joyent-boilerplate): remove unused deps 2017-09-07 18:01:37 +01:00
Sara Vieira
c82a655375 feat(joyent-boilerplate): initial commit 2017-09-07 17:28:56 +01:00
Sérgio Ramos
19b1176435 style: lint 2017-09-07 16:29:41 +01:00
Sara Vieira
9df5afc607 test(cp-frontend): add more tests 2017-09-07 16:02:29 +01:00
Sara Vieira
d1bc04c528 fix(cp-frontend,ui-toolkit): increase synchrony between wireframes and code 2017-09-07 16:02:29 +01:00
geek
e1df4a14d3 feat: default domain in setup 2017-09-06 16:07:49 +01:00
Sérgio Ramos
3c3f6f1c65 fix(cp-frontend): don't fetchMoreMetrics if it's still loading 2017-09-06 11:46:45 +01:00
Sérgio Ramos
f5d9085531 chore(portal-api): version bump 2017-09-06 11:15:04 +01:00
Sérgio Ramos
fa0a6b9ffc fix(portal-api): update machine's primaryIp 2017-09-06 11:14:20 +01:00
Sérgio Ramos
cceacbebab style: format 2017-09-06 10:46:34 +01:00
Sérgio Ramos
d4aff642e3 fix(portal-api): 'Uuid' is not defined 2017-09-05 22:57:28 +01:00
Sérgio Ramos
fcd0e2820a fix(portal-api): fix branch health resolution 2017-09-05 22:22:41 +01:00
Sérgio Ramos
a6abc105a9 fix(cp-frontend): fix branches overriding services 2017-09-05 21:53:34 +01:00
Sérgio Ramos
bf86427609 fix(portal-api): don't propagate prometheus errors 2017-09-05 21:53:34 +01:00
geek
5ae0b20c86 feat: gen cert script added 2017-09-05 17:44:53 +01:00
Sérgio Ramos
5cbdb23e3f feat(cp-gql-mock-server): simulate loading times 2017-09-01 23:32:06 +01:00
geek
18c94f7f60 chore: update api images 2017-09-01 23:19:47 +01:00
Sérgio Ramos
8ee09f8716 fix(cp-frontend): fix chevron extend 2017-09-01 00:17:44 +01:00
Sérgio Ramos
f67da0aeef feat(cp-gql-schema): add primaryIp to Instance 2017-09-01 00:17:04 +01:00
Sérgio Ramos
a5a87a686e perf(portal-api): reduce triton calls (slow) 2017-09-01 00:16:25 +01:00
Sérgio Ramos
9be6a27012 chore: s/postinstall/prepublish 2017-08-31 17:45:56 +01:00
geek
81881e1019 chore: update to working rethink image 2017-08-31 16:38:53 +01:00
Sérgio Ramos
27ab4fa81b chore(ui-toolkit): update styleguidist 2017-08-31 15:46:27 +01:00
geek
e39e425db0 feat: support latest images 2017-08-31 10:14:46 +01:00
Sérgio Ramos
edcf2f3fa5 chore(cp-frontend): version bump 2017-08-30 19:23:54 +01:00
Sérgio Ramos
b2f0b4c205 chore: version bumps 2017-08-30 17:42:17 +01:00
Sérgio Ramos
2b46af7e2f style: format 2017-08-30 17:00:42 +01:00
Sérgio Ramos
9c4d69d586 feat(cp-frontend): only show GraphsContainer when metrics existent 2017-08-30 16:47:10 +01:00
Sérgio Ramos
8695a134d2 fix(portal-api): get current scale from db 2017-08-30 16:46:40 +01:00
Sérgio Ramos
3bcd712e42 fix(cp-frontend): downgrade react-router 2017-08-30 15:37:10 +01:00
Sérgio Ramos
fd2916f90e fix(portal-api): handle inexistent prometheus service 2017-08-30 15:15:56 +01:00
Sérgio Ramos
94c664fecc fix(cp-frontend): poll even when no services (service list) 2017-08-30 15:06:58 +01:00
Sérgio Ramos
d9ae6eb34a fix(cp-frontend): handle no previous metrics 2017-08-30 14:52:17 +01:00
Sérgio Ramos
0d659c94e8 style(cp-frontend): format 2017-08-30 14:09:34 +01:00
Sérgio Ramos
d08a8b00a9 fix(cp-frontend): handle no data in metrics loop 2017-08-30 14:02:27 +01:00
Sérgio Ramos
3db2cfaea5 fix(eslint-config-joyent-portal): add missing dependency 2017-08-30 12:37:02 +01:00
Sérgio Ramos
3ddeb0517e fix(cp-frontend): fix imported manifest notice 2017-08-30 12:30:50 +01:00
Sérgio Ramos
d30988f652 fix(ui-toolkit): proper use of HealthyIcon healthy prop 2017-08-30 12:24:43 +01:00
Sérgio Ramos
90975b30e3 feat(cp-frontend): change document title 2017-08-30 12:17:49 +01:00
Sérgio Ramos
468604058e style(cp-frontend): format 2017-08-30 12:17:21 +01:00
Sérgio Ramos
441d4118d7 feat(ui-toolkit): consistent health statuses 2017-08-30 12:12:08 +01:00
Sérgio Ramos
e986dcdc12 chore: update lock 2017-08-30 11:57:24 +01:00
Sérgio Ramos
9b647a77eb feat(cp-frontend): show service list even when error 2017-08-30 11:57:08 +01:00
Sérgio Ramos
666a9ad1e8 feat(portal-api): ignore metrics for stopped instances 2017-08-30 11:56:42 +01:00
Sérgio Ramos
827379806b fix(cp-frontend): custom getPreviousEnd 2017-08-30 11:40:15 +01:00
Sérgio Ramos
b918a5bb66 fix(cp-frontend): don't require metrics for topology 2017-08-30 10:46:28 +01:00
Sérgio Ramos
b89d1ad686 feat(cp-frontend): display metrics in service list 2017-08-30 10:20:05 +01:00
Sérgio Ramos
7f22dea0b8 fix(normalized-styled-components): update tests snapshots 2017-08-28 21:50:57 +01:00
Sérgio Ramos
17def8e304 style: static methods 2017-08-28 21:31:38 +01:00
Sérgio Ramos
c7938efd2f chore: update dependencies 2017-08-28 20:47:19 +01:00
Sérgio Ramos
cac9453154 style: format 2017-08-28 20:24:36 +01:00
Sérgio Ramos
d1af5eec1a feat(portal-api): check for public networks when fetching metrics 2017-08-28 20:05:58 +01:00
Sérgio Ramos
75ec47b234 fix(cp-frontend): update webpack patch 2017-08-28 20:04:55 +01:00
JUDIT GRESKOVITS
1eac90c79a feat: initial metrics implementation 2017-08-25 18:29:47 +01:00
geek
0d8a282248 chore(api): update deps/tests 2017-08-25 10:28:42 +01:00
Sérgio Ramos
983db9ede5 style(portal-api): format 2017-08-23 14:25:45 +01:00
Sérgio Ramos
5fbb94f54d fix(cp-frontend): fallback instance health 2017-08-23 14:18:49 +01:00
geek
77acb731ac feat: can query metrics on instance 2017-08-22 17:56:57 +01:00
Judit Greskovits
ce31f505a0 feat(cp-gql-mock-server, cp-gql-schema): Metrics to be a filed on instances (#607) 2017-08-22 10:17:33 -05:00
Sérgio Ramos
06fe7e1312 chore(cp-frontend): version bump 2017-08-22 14:40:56 +01:00
Sérgio Ramos
8d1a70e6e1 fix(portal-api): properly set server property in MachineWatcher 2017-08-22 14:38:42 +01:00
Sérgio Ramos
d8f727ef1a fix(portal-api): fallback dockerComposeHost to localhost 2017-08-22 14:38:42 +01:00
Sérgio Ramos
b5ea1580e5 fix(cp-frontend): handle manifests without env varibales 2017-08-22 14:38:42 +01:00
Sérgio Ramos
ccf1fd6f9a feat(cp-frontend): don't show env toggle when no variables set 2017-08-22 14:38:42 +01:00
geek
f38a0c5907 chore: updating to latest dep versions 2017-08-21 20:49:54 +01:00
JUDIT GRESKOVITS
3c0aa552f9 feat(cp-frontend): Add reducers and selectors unit tests 2017-08-21 18:48:39 +01:00
geek
5f97704c78 bug: boostrap/start when rethink/docker are ready 2017-08-21 18:05:57 +01:00
Sérgio Ramos
7cce1e6f8e fix(cp-gql-schema): typos 2017-08-21 17:46:26 +01:00
Sérgio Ramos
cc9dc08247 style(portal-api): format 2017-08-21 17:11:49 +01:00
Sérgio Ramos
663bc9be9d fix(portal-api): default rethinkdb host to localhost 2017-08-21 16:52:57 +01:00
Sérgio Ramos
291a771bd9 fix(cp-frontend): fix react-scripts patch 2017-08-21 16:52:28 +01:00
Sérgio Ramos
29e33ad174 chore: update lock 2017-08-21 16:52:01 +01:00
geek
7e0b4c8901 test: adding metric testing 2017-08-21 14:41:22 +01:00
geek
44fec7dfb1 feat(portal-api): retrieve metrics from prometheus 2017-08-21 14:41:22 +01:00
JUDIT GRESKOVITS
c104251ac3 feat(cp-frontend, ui-toolkit, cp-gql-mock-server): Add snapshot tests 2017-08-21 14:25:48 +01:00
geek
ad7d55544f chore: update version 2017-08-17 16:02:35 +01:00
geek
e5187ff4c5 feat: support metrics in schema and mock server 2017-08-17 16:02:35 +01:00
geek
55f387e247 feature: support latest prometheus image 2017-08-17 15:59:14 +01:00
geek
9f53c1fa17 chore(portal-api): fix tests 2017-08-17 15:59:14 +01:00
geek
454c37a3d6 chore(portal-api): create test containers 2017-08-17 15:59:14 +01:00
geek
7a1a890f1a feat: triton docker deployment support 2017-08-17 15:59:14 +01:00
JUDIT GRESKOVITS
bfd54d481a fix(cp-frontend): Remove nonexisting import 2017-08-14 12:02:02 +01:00
JUDIT GRESKOVITS
bc026b2341 feat(ui-toolkit, cp-frontend): Add clear status and health messaging and refactor tooltips use 2017-08-14 11:35:26 +01:00
JUDIT GRESKOVITS
24bee629e8 fix(cp-frontend): Fix error message typos 2017-08-08 12:05:38 +01:00
JUDIT GRESKOVITS
2fb4a77c96 feat(ui-toolkit, cp-fronted, portal-api): Env variables input redesign 2017-08-08 11:22:46 +01:00
JUDIT GRESKOVITS
2eb7f4197f feat(cp-gql-mock-server, cp-frontend): Add missing dg and service error messaging 2017-08-08 11:00:50 +01:00
Sérgio Ramos
0917d67b07 chore: use yarn workspaces 2017-08-04 00:51:24 +01:00
geek
0330699c05 chore: simplify frontend docker image 2017-08-03 23:00:01 +01:00
Sérgio Ramos
0cf61c628a fix(cp-frontend): handle error validating name 2017-08-03 13:42:39 +01:00
Sérgio Ramos
2b552360e0 fix(portal-api): update import logic to assign dg.services 2017-08-03 13:41:14 +01:00
Sérgio Ramos
0ec4acce1e style(portal-api): lint 2017-08-03 11:25:10 +01:00
geek
90b6031d96 feat: add getting start guide 2017-08-03 11:00:05 +01:00
Sérgio Ramos
dcb775a1fe test(cp-gql-mock-server): disable tests in ci
fix is in the works
2017-08-03 10:59:27 +01:00
Sérgio Ramos
b2803fcfed build: remove deployment stage 2017-08-03 10:57:09 +01:00
JUDIT GRESKOVITS
2f8ca24fa0 feat(cp-frontend): Add 404 to router and redirects for not matched routes 2017-08-02 21:12:07 +01:00
JUDIT GRESKOVITS
b1f76553ce feat(ui-toolkit, cp-frontend): Add error message component and error messages 2017-08-02 14:11:25 +01:00
geek
e5bbdadd6a feat: support TLS auth 2017-08-01 23:58:56 +01:00
geek
f896569f4c feat: remove traefik from balancing 2017-08-01 10:28:00 +01:00
Sérgio Ramos
7daf22b5b6 fix(ui-toolkit): remove erroneous character 2017-07-28 18:49:58 +01:00
Sérgio Ramos
9f3bdc6bf4 style(ui-toolkit): lint 2017-07-28 18:13:45 +01:00
Sérgio Ramos
92b9f09c01 feat(cp-frontend): uniform loading statuses and titles 2017-07-28 17:56:03 +01:00
Sérgio Ramos
935e9bacca feat(cp-frontend): sort services by name 2017-07-28 15:25:15 +01:00
Sérgio Ramos
391267d609 feat(cp-frontend): show diff loading msg when provisioning 2017-07-28 15:24:41 +01:00
Sérgio Ramos
820dcfd728 feat(cp-frontend): transitional states as disabled card 2017-07-27 18:50:01 +01:00
Sérgio Ramos
68685284ea feat(ui-toolkit): add disabled card mode 2017-07-27 18:50:01 +01:00
Sérgio Ramos
08745d4b12 fix(cp-gql-mock-server): change instance status to RUNNING after scale 2017-07-27 18:49:49 +01:00
Sérgio Ramos
dab0beedc0 feat(cp-frontend): don't show options when service is in a transitional state 2017-07-27 17:58:37 +01:00
Sérgio Ramos
763bf9ecc8 feat(cp-gql-schema): don't require scale or manifest in Version 2017-07-27 17:18:19 +01:00
Sérgio Ramos
d4877e8bb9 fix(cp-frontend): handle non existing service in scale 2017-07-27 17:13:03 +01:00
Sérgio Ramos
db58882a15 fix(ui-toolkit): make Card compatible with grid system 2017-07-26 16:27:12 +01:00
Sérgio Ramos
b865a1d118 style: lint 2017-07-26 15:41:01 +01:00
Sérgio Ramos
e8600b2c0d test(ui-toolkit): unit tests 2017-07-26 15:21:35 +01:00
Sérgio Ramos
de68427a0c test(cp-gql-mock-server): unit tests 2017-07-26 12:01:44 +01:00
Sérgio Ramos
1416f5821b chore: upgrade prettier 2017-07-26 11:44:49 +01:00
Sérgio Ramos
b5605db095 feat(portal-api): send "Not Found" errors hen entity is not found
This error is only sent when fetching a single entity, or when fetching multiple
with specific filters.
2017-07-26 11:15:53 +01:00
JUDIT GRESKOVITS
5c1b76c92f feat(cp-gql-mock-server): Add more examples of deployment groups 2017-07-21 16:55:55 +01:00
JUDIT GRESKOVITS
f5cf049fe0 feat(ui-toolkit, cp-frontend): Add button states to bin 2017-07-21 11:33:36 +01:00
Sérgio Ramos
ae5eaba2c1 fix(cp-frontend): poll until dg is available when editing manifest 2017-07-21 11:03:52 +01:00
Sérgio Ramos
5a8eb965ff fix(portal-api): don't return all services when no services 2017-07-21 10:13:24 +01:00
Sérgio Ramos
7f9c8b2847 fix(cp-frontend): allow provision without env 2017-07-21 10:13:24 +01:00
Sérgio Ramos
4df7549799 fix(portal-api): better handle dev enviroments 2017-07-21 10:13:24 +01:00
JUDIT GRESKOVITS
2f4e9d4a57 feat(ui-toolkit): Calculate subservices node sizes dynamically 2017-07-20 15:05:50 +01:00
Sérgio Ramos
dd1124a608 feat(cp-gql-schema): scale mutation 2017-07-20 12:33:44 +01:00
JUDIT GRESKOVITS
7f9eada428 feat(ui-toolkit, cp-frontend): Disable quick actions menu remove services filter add service 2017-07-20 12:00:37 +01:00
JUDIT GRESKOVITS
173b6c9307 feat(ui-toolkit, cp-frontend, cp-gql-mock-server): Mock deleting a deployment group and filter out deleted dgs and services on frontend 2017-07-19 17:48:13 +01:00
Sérgio Ramos
6882143a98 chore(portal-api): lint 2017-07-19 17:22:31 +01:00
Sérgio Ramos
0a8fa05498 feat(portal-api): set ACTIVE statuses for imported service/dg 2017-07-19 17:22:31 +01:00
Sérgio Ramos
4d8f6a1d4f feat(portal-api): properly expose branches 2017-07-19 17:22:31 +01:00
Sérgio Ramos
fdb24ebc13 feat(cp-gql-schema): rename watchers to watches 2017-07-19 17:22:31 +01:00
Sérgio Ramos
cdd6d98af4 feat(portal-api): rename watchers to watches 2017-07-19 17:22:31 +01:00
Sérgio Ramos
2ece20ead9 fix(manifest-editor): allow ini as mode in proptypes 2017-07-19 17:22:31 +01:00
Sérgio Ramos
ce847046bb refactor(cp-frontend): move dg/create to manifest/edit-or-create 2017-07-19 17:22:31 +01:00
Sérgio Ramos
66c4bdc520 feat(cp-gql-schema): add deleteDeploymentGroup mutation 2017-07-17 15:58:45 +01:00
Sérgio Ramos
9296d51075 feat(portal-api): support deleteDeploymentGroup 2017-07-17 15:58:45 +01:00
Sérgio Ramos
3ddc156c18 chore: update docker files 2017-07-17 15:45:26 +01:00
JUDIT GRESKOVITS
ee5a071bd9 feat(ui-toolkit, cp-frontend): Add ui to delete a deployment group 2017-07-17 14:28:58 +01:00
Sérgio Ramos
db378a6f3a fix(cp-frontend): remove rollback 2017-07-17 12:41:51 +01:00
Sérgio Ramos
08e87475f6 style(portal-api): lint 2017-07-17 12:41:51 +01:00
Sérgio Ramos
8fd37d6cf7 chore(ui-toolkit): upgrade redux-form 2017-07-17 12:41:51 +01:00
Sérgio Ramos
68084a257d feat(portal-api): add support for env_file's 2017-07-17 12:41:51 +01:00
Sérgio Ramos
441d7398a8 feat(docker-compose-client): send 'files' in options 2017-07-17 12:41:51 +01:00
Sérgio Ramos
6e5214fc07 feat(cp-gql-schema): add 'files' to Manifest 2017-07-17 12:41:51 +01:00
Sérgio Ramos
f68c2ae78a feat(cp-frontend): add and edit env_file's 2017-07-17 12:41:51 +01:00
Sérgio Ramos
0f74cb5453 chore: update lockfile 2017-07-17 10:57:35 +01:00
Sérgio Ramos
09ae91af93 feat(portal-api): add branches resolver 2017-07-17 10:57:35 +01:00
Sérgio Ramos
9802bba502 feat(cp-frontend): handle removal of parent property 2017-07-17 10:57:35 +01:00
Sérgio Ramos
92181a2df0 feat(cp-gql-mock-server): handle service branches 2017-07-17 10:57:35 +01:00
Sérgio Ramos
46a352d0c8 test(portal-api): add wip cp tests 2017-07-17 10:57:35 +01:00
Sérgio Ramos
5b169cc2a3 feat(cp-gql-schema): instead of parent, allow service childs 2017-07-17 10:57:35 +01:00
Sérgio Ramos
7b5cf714d2 feat(portal-api): support sub-services 2017-07-17 10:57:35 +01:00
JUDIT GRESKOVITS
7b8c4f1de9 feat(ui-toolkit, cp-frontend): Remove options button from instances list 2017-07-13 16:16:30 +01:00
JUDIT GRESKOVITS
fe760dcca6 fix(cp-frontend): Pass full paths to menu items 2017-07-13 14:34:38 +01:00
Sérgio Ramos
1533bf5d6e style(ui-toolkit): comment un-used variable 2017-07-12 14:37:34 +01:00
Sérgio Ramos
b97e5679bf fix(portal-api): assert dg.services when watching cp 2017-07-12 14:37:34 +01:00
Sérgio Ramos
eddc8712b0 fix(portal-api): prevent crash on cp-watcher when no services 2017-07-12 14:37:34 +01:00
JUDIT GRESKOVITS
2a34632269 feat(ui-toolkit, cp-frontend, cp-gql-mock-server): Display healthy / unhealthy statuses 2017-07-12 14:11:53 +01:00
JUDIT GRESKOVITS
abdd9f9f6a feat(ui-toolkit, cp-frontend): Allow topology nodes are displayed at top when not connected 2017-07-12 13:29:25 +01:00
Sérgio Ramos
be7bb5f871 feat: detect service connections and instance health 2017-07-12 11:14:18 +01:00
JUDIT GRESKOVITS
47e9982d7f feat(ui-toolkit, cp-frontend): Ensure colours are correct and check designs 2017-07-11 15:29:19 +01:00
JUDIT GRESKOVITS
06ab07a966 feat(joyent-ui-toolkit, joyent-cp-frontend): Display transitional service statuses 2017-07-10 10:13:33 +01:00
Sérgio Ramos
5ccd873a54 feat: environment stage 2017-07-07 11:35:18 +01:00
JUDIT GRESKOVITS
9730b5733a feat(cp-gql-mock-server): Implement transitional states 2017-07-06 16:39:22 +01:00
Sérgio Ramos
012a44c00a feat: track transitional states 2017-07-06 15:40:07 +01:00
JUDIT GRESKOVITS
1bf7913ac3 feat(ui-toolkit, cp-frontend): Ensure correct update of topology view 2017-07-06 11:40:10 +01:00
geek
28699d0061 chore: fixup logic for health checks 2017-06-30 21:11:21 +01:00
geek
9c8ea8c489 feat(portal-api): add instance status data 2017-06-30 21:11:21 +01:00
JUDIT GRESKOVITS
05d0420813 feat(ui-toolkit, cp-frontend): Display statuses on topology view 2017-06-30 11:53:32 +01:00
geek
6651208b2e chore: add missing dependency 2017-06-29 15:53:30 +01:00
geek
86a1149acd chore: merge changes from upstream 2017-06-29 15:53:30 +01:00
geek
f68ecddaa2 chore: create triton-compose 2017-06-29 15:53:30 +01:00
geek
f94ba08c06 feat(portal-api): populate ip addresses for instances 2017-06-29 15:53:30 +01:00
geek
da40ee11e8 chore: docker compose works with published images 2017-06-29 15:53:30 +01:00
Sérgio Ramos
548c7f5f7e feat(portal-api): replace dockerode with node-triton (#532) 2017-06-29 09:28:56 -05:00
Sérgio Ramos
9f3782558f fix(portal-api): fix bootstrap-data portal-data require 2017-06-29 11:33:32 +01:00
Sérgio Ramos
060e4186ce chore: update lockfile 2017-06-29 10:41:30 +01:00
JUDIT GRESKOVITS
ef6c166c56 feat(ui-toolkit, cp-frontend): Fix services list 2017-06-28 18:38:28 +01:00
geek
40f666adc2 chore: combine data/watch into api module 2017-06-28 18:34:50 +01:00
Sérgio Ramos
48549e5d38 multiple bug fixes (#528)
* fix(portal-data): don't fallback on service instances

* feat(portal-data): run delete service in background

* fix(portal-watch): throtle (by dg-service) changes resolver

* feat(portal-watch): resolve all machines on start

* fix(portal-watch): add missing dependency
2017-06-28 10:04:34 -05:00
Sérgio Ramos
8e56cb0ada style: lint 2017-06-28 12:08:46 +01:00
Sérgio Ramos
8717d19136 feat(portal-watch): don't filter by hash 2017-06-28 12:08:46 +01:00
Sérgio Ramos
bb99662976 fix(portal-data): don't fallback on service slug 2017-06-28 12:08:46 +01:00
Sérgio Ramos
a2e0100f5e fix(portal-data): infer container id from machine_id (they are not the same) 2017-06-28 12:08:46 +01:00
Sérgio Ramos
b3581a61d2 fix(portal-data): use 'serviceId' argmument instead of 'id' for scale() 2017-06-28 12:08:46 +01:00
Sérgio Ramos
f94a0869a6 fix(portal-data): don't integrate cp-client (for now) 2017-06-28 12:08:46 +01:00
Sérgio Ramos
19635e7a0a fix(portal-api): parse DOCKER_HOST for protocol, hostname, and port 2017-06-28 12:08:46 +01:00
Sérgio Ramos
15d689b0c2 feat(cp-frontend): remove leading '/' from services url 2017-06-28 12:08:46 +01:00
Sérgio Ramos
20052a4a13 feat(cp-frontend): remove scale modal after mutate response 2017-06-28 12:08:46 +01:00
Sérgio Ramos
6aec0d3f68 feat(cp-frontend): remove id from scale mutation 2017-06-28 12:08:46 +01:00
Sérgio Ramos
0172d32bad feat(cp-gql-schema): remove id from ServiceScale 2017-06-28 12:08:46 +01:00
Sérgio Ramos
4b7027295f feat(cp-frontend): integrate Progressbar into create/edit DG flow 2017-06-28 10:52:32 +01:00
robertzlatarski
5cade4e17d feat(ui-toolkit): initial Progressbar implementation 2017-06-28 10:52:32 +01:00
Sérgio Ramos
3aa88141d4 feat(portal-data): use internals.resolveCb 2017-06-28 10:18:10 +01:00
Sérgio Ramos
e8f05282fa feat(cp-frontend): add manifest notice for imported DG 2017-06-28 10:18:10 +01:00
Sérgio Ramos
cb908d33e5 refactor(portal-data): lint 2017-06-28 10:18:10 +01:00
Sérgio Ramos
d7a8a55d22 feat(cp-frontend): update instance status colors based on new InstanceStatus'es 2017-06-28 10:18:10 +01:00
Sérgio Ramos
2bc7ef3973 feat(portal-data): handle deleted based on new InstanceStatus'es 2017-06-28 10:18:10 +01:00
Sérgio Ramos
ce2a13e501 feat(cp-gql-schema): update InstanceStatus'es
based on:
 - 1bc3c1eeb5/lib/machines.js (L75-L116)
 - 280af75e07/docs/index.md (vm-states)
2017-06-28 10:18:10 +01:00
Sérgio Ramos
041d6bf73f feat(portal-data): if machine is deleted, remove it from Service 2017-06-28 10:18:10 +01:00
Sérgio Ramos
c438f07e56 feat(cp-gql-schema): add READY and STOPPING InstanceStatus'es 2017-06-28 10:18:10 +01:00
Sérgio Ramos
4e241191bf feat(cp-frontend): DeploymentGroup reprovision flow 2017-06-28 10:18:10 +01:00
Sérgio Ramos
3aa7ec54bb fix(portal-data): use version() when provisioning 2017-06-28 10:18:10 +01:00
Sérgio Ramos
3f1625aa5a feat(portal-data): expose version() in DeploymentGroup 2017-06-28 10:18:10 +01:00
Sérgio Ramos
05bc971a58 feat(portal-data): importable() don't list already imported DeploymentGroups 2017-06-28 10:18:10 +01:00
Sérgio Ramos
12fa092c3b feat(portal-data): set imported when creating imported DeploymentGroup 2017-06-28 10:18:10 +01:00
Sérgio Ramos
a150dabff2 feat(cp-gql-schema): add imported to DeploymentGroup 2017-06-28 10:18:10 +01:00
Sérgio Ramos
190601a999 feat(cp-gql-schema): add PROVISIONING to InstanceStatus 2017-06-28 10:18:10 +01:00
Sérgio Ramos
61bd88e437 feat(cp-gql-schema): expose Manifest in Version instead of manifestId 2017-06-28 10:18:10 +01:00
geek
aa853fe4c8 feat(portal-data): insert ip address in instance record 2017-06-27 20:47:10 +01:00
JUDIT GRESKOVITS
a14672355c fix(cp-frontend): Add missing empty instances component 2017-06-27 17:59:31 +01:00
JUDIT GRESKOVITS
8e90dbfa56 feat(cp-frontend, ui-toolkit): Resize nodes and topolgy 2017-06-27 17:48:03 +01:00
Sérgio Ramos
5dab93e59e feat(cp-gql-schema): add healthy attr to Instance (#520) 2017-06-26 10:56:08 -05:00
Sérgio Ramos
f2ad0da7e2 feat(cp-frontend): add status to instances 2017-06-26 16:25:38 +01:00
Sérgio Ramos
fc160e6a17 feat(cp-gql-schema): add FAILED InstanceStatus 2017-06-26 16:25:38 +01:00
Sérgio Ramos
8078471355 feat(cp-frontend): import existing project 2017-06-26 16:25:38 +01:00
Sérgio Ramos
7f1d731dc6 import existing deployment groups (#516)
* refactor: config() from mutation to query

* refactor(cp-frontend): remove unused dependency

* feat(portal-watch): expose getContainers() and compose tags

* fix(portal-watch): assert services by name AND hash

* feat(portal-data): expose importable and import APIs

* fix(portal-data): add missing dependencies

* feat(portal-api): expose import/importable

* feat(cp-gql-schema): add import/importable

* feat(cp-frontend): import existing project

* style(portal-watch): lint

* style(portal-data): lint

* chore: update lockfile
2017-06-26 09:29:12 -05:00
Sérgio Ramos
59043760b6 chore: remove legacy gql server 2017-06-26 14:27:17 +01:00
Sérgio Ramos
20b8b23cbb chore(cp-frontend): restore Dockerfile for demo compose 2017-06-26 14:26:55 +01:00
geek
b3926751ad chore: explicitly ask for key path 2017-06-26 13:59:14 +01:00
geek
892c5a4575 chore(frontend): move docker artificats into docker folder 2017-06-26 13:59:14 +01:00
geek
dfe3b66f53 chore: build from published modules 2017-06-26 13:59:14 +01:00
JUDIT GRESKOVITS
a373e4efa2 feat(cp-frontend, cp-gql-mock-server): add stop, start, delete to resolvers 2017-06-26 13:53:10 +01:00
Sérgio Ramos
2ea33c2a07 feat(cp-frontend): improve review stage of deployment group creation 2017-06-23 12:49:36 +01:00
Sérgio Ramos
627761e98d feat(portal-api): expose config mutation 2017-06-23 12:49:36 +01:00
Sérgio Ramos
885c6cfe5e feat(cp-gql-schema): add config() mutation 2017-06-23 12:49:36 +01:00
Sérgio Ramos
53cd13b561 feat(portal-data): add config() mutation 2017-06-23 12:49:36 +01:00
Sérgio Ramos
5fe14a7c5a fix(docker-compose-client): remove services attr from config() 2017-06-23 12:49:36 +01:00
geek
b47ebebf9e bug: copy keys for sdc 2017-06-22 22:30:40 +01:00
geek
d90c23cd38 chore(portal-api): copy env variables to _env file 2017-06-22 18:39:43 +01:00
geek
be842aba31 bug(portal-data): support compose reconnects 2017-06-22 18:12:39 +01:00
Sérgio Ramos
bc679d6ac6 feat(portal-api): integrate portal-watch (#510) 2017-06-22 12:09:13 -05:00
Sérgio Ramos
8530b24691 feat(joyent-cp-frontend): integrate toolkit's SectionList 2017-06-22 11:47:25 +01:00
Sérgio Ramos
1fcd1b9eed feat(joyent-ui-toolkit): implement SectionList 2017-06-22 11:47:25 +01:00
Sérgio Ramos
aa8d9f7a25 feat(eslint-config-joyent-portal): don't lint anything prettier related 2017-06-22 11:46:54 +01:00
Sérgio Ramos
c66164f37e feat(portal-api): fix indentation 2017-06-22 10:57:03 +01:00
Sérgio Ramos
920eaf0903 feat(joyent-cp-gql-mock-server): serve reqs under /api 2017-06-22 10:43:33 +01:00
geek
54a5c6a46e feat(cp-frontend): use nginx instead of serve 2017-06-22 10:43:29 +01:00
Sérgio Ramos
5a86686933 chore: update yarn.lock 2017-06-21 20:22:35 +01:00
Sérgio Ramos
101f4fb423 style(portal-api): fix lint 2017-06-21 20:12:57 +01:00
geek
7104e6e1a9 feat: add docker-compose-api to compose 2017-06-21 20:01:02 +01:00
geek
c30b688ee9 chore(portal-api): Bootstrap data 2017-06-21 17:17:47 +01:00
JUDIT GRESKOVITS
67aedbdc54 feat: Lint changed before commit, except if partially staged 2017-06-21 16:52:08 +01:00
Sérgio Ramos
77bb76bf1a style(portal-api): lint 2017-06-20 23:02:40 +01:00
geek
32b450c1b6 feat(portal-api): report metrics from hapi 2017-06-20 22:33:54 +01:00
geek
5e7bec0aa7 feat(portal-watch): initial implementation 2017-06-20 19:23:25 +01:00
Sérgio Ramos
8a4a40f7f4 ci: stop containers before pulling 2017-06-20 17:41:58 +01:00
Sérgio Ramos
30d369f194 ci: 'fix Unexpected string' 2017-06-20 16:49:36 +01:00
JUDIT GRESKOVITS
cb85b75a04 feat: Format changed before commit, except if partially staged 2017-06-20 16:36:22 +01:00
Sérgio Ramos
f78e170cb1 build: remove --build-arg 2017-06-20 16:25:18 +01:00
Sérgio Ramos
5307c1db1f build: change npm loglevel to info 2017-06-20 16:25:03 +01:00
Sérgio Ramos
f2bb72984d build: sync local and remote compose ports for frontend 2017-06-20 15:56:20 +01:00
Sérgio Ramos
5275b2c7df ci: don't build portal-api (for now) 2017-06-20 15:52:32 +01:00
Sérgio Ramos
914dbca77f build: force npm^4 2017-06-20 15:52:09 +01:00
Sérgio Ramos
76ee6b66ed build(cp-frontend): build assets on runtime 2017-06-20 15:45:50 +01:00
Sérgio Ramos
d4bedc0515 build: s/sensors.sh/sensors 2017-06-20 14:48:05 +01:00
Sérgio Ramos
7b02780472 build: remove redundant sensor 2017-06-20 14:44:40 +01:00
Sérgio Ramos
aaef6e64e1 build: ignore package-lock 2017-06-20 14:44:27 +01:00
Sérgio Ramos
67cb34f658 ci: upgrade node 2017-06-20 14:23:44 +01:00
geek
6cd39b2d8c build: extended support for containerpilot v3
with sensors and local-compose
2017-06-20 13:54:37 +01:00
geek
ffb66639d7 build(portal-api): dockerizing 2017-06-20 13:54:32 +01:00
robertzlatarski
3fc72f667e feat(joyent-ui-toolkit): Add dropdown component 2017-06-20 12:27:38 +01:00
Sérgio Ramos
edc5fcba87 style(joyent-cp-frontend): remove unused variables 2017-06-20 10:40:23 +01:00
Sérgio Ramos
eb37c7de49 feat(joyent-cp-frontend): integrate toolkit's Breadcrumb 2017-06-20 10:40:23 +01:00
Sérgio Ramos
e6b6f6a761 feat(joyent-ui-toolkit): implement Breadcrumb 2017-06-20 10:40:23 +01:00
Sérgio Ramos
b8dfb73959 build: update docker-compose ports 2017-06-20 01:11:15 +01:00
Sérgio Ramos
86662ae170 build: update config files to support containerpilot v3 2017-06-20 00:18:34 +01:00
Sérgio Ramos
33bca3c2bd build: remove --build-arg from docker-compose 2017-06-19 19:00:17 +01:00
Sérgio Ramos
d9d5e6be4e build: --yes when creating a triton profile 2017-06-19 16:15:18 +01:00
Sérgio Ramos
443752dc75 build: don't uglify 2017-06-19 15:29:33 +01:00
Sérgio Ramos
29b42fd4fc chore: remove packages' yarn-lock
related: https://github.com/lerna/lerna/issues/852
2017-06-19 13:50:10 +01:00
JUDIT GRESKOVITS
7e359e5836 feat: number input and mutations for restart, stop and start 2017-06-19 13:48:34 +01:00
Sérgio Ramos
0623c06fc7 build(joyent-ui-toolkit): build styleguide in dev 2017-06-17 00:42:31 +01:00
Sérgio Ramos
97a820688b fix(joyent-cp-frontend): destruct data in handleQuickActionsClick 2017-06-16 23:41:28 +01:00
Sérgio Ramos
dc5cd78f50 test(joyent-ui-toolkit): format with prettier 2017-06-16 23:34:30 +01:00
Sérgio Ramos
487e96e261 test(joyent-cp-frontend): disable ci tests (for now) 2017-06-16 23:18:23 +01:00
Sérgio Ramos
054306bb73 fix(joyent-cp-frontend): warn on debugger 2017-06-16 23:13:48 +01:00
Sérgio Ramos
c65706c0ab fix(joyent-cp-frontend): send event when calling onQuickActionsClick 2017-06-16 23:13:12 +01:00
Sérgio Ramos
eeb4fde251 fix(joyent-cp-frontend): fix prettier errors 2017-06-16 23:03:35 +01:00
Sérgio Ramos
ce3f63eaae fix(joyent-cp-frontend): patch react-scripts to use eslintrc 2017-06-16 23:01:06 +01:00
Sérgio Ramos
b22121cb93 fix: downgrade eslint 2017-06-16 22:45:45 +01:00
Sérgio Ramos
40c3ec24bd fix(joyent-ui-toolkit): add missing reduce-css-calc dependency 2017-06-16 22:45:24 +01:00
Sérgio Ramos
871893598f chore: restore removed packages 2017-06-16 21:46:36 +01:00
Sérgio Ramos
18be101068 chore: re-align dependencies 2017-06-16 21:08:33 +01:00
JUDIT GRESKOVITS
bd2bf728c6 feat(joyent-cp-frontend,joyent-ui-toolkit,joyent-cp-gql-mock-data): Scaling and delete modals 2017-06-16 15:19:30 +01:00
JUDIT GRESKOVITS
e0dc31610d Yarn lock again 2017-06-16 15:15:15 +01:00
Sérgio Ramos
9243ecdfab fix(joyent-ui-toolkit): don't hoist react-styleguidist 2017-06-16 14:52:46 +01:00
JUDIT GRESKOVITS
a5be52edc9 Yarn lock 2017-06-16 14:22:01 +01:00
Sérgio Ramos
03e19d4a6a fix(cp-gql-mock-server): return object for deploymentGroup() 2017-06-16 13:41:30 +01:00
Sérgio Ramos
66c7e2d444 fix(docker-compose-client): bump version to match registry 2017-06-15 17:11:40 +01:00
Sérgio Ramos
6cfeae136d chore: fix linting with hoisted eslint 2017-06-15 17:11:40 +01:00
Sérgio Ramos
4923f39463 fix(joyent-cp-frontend): add polling interval to dg list 2017-06-15 17:11:40 +01:00
geek
376136f8dd feat(portal-data): instance start/stop/restart 2017-06-15 17:11:40 +01:00
geek
5220139fdb bug(portal-data): query by deployment slug works 2017-06-15 17:11:40 +01:00
Sérgio Ramos
1cc2330b22 feat(joyent-cp-frontend): create dg initial implementation 2017-06-15 17:11:40 +01:00
Sérgio Ramos
b5a8a8e23d fix(joyent-cp-gql-schema): don't require created and obj on Manifest 2017-06-15 17:11:40 +01:00
Sérgio Ramos
14ffdb9636 refactor(joyent-manifest-editor): react-codemirror as peer-dep
BREAKING CHANGE
2017-06-15 17:11:40 +01:00
Sérgio Ramos
75eded4b06 feat(joyent-manifest-editor): initial implementation 2017-06-15 17:11:40 +01:00
Sérgio Ramos
def5b7e54d feat(joyent-cp-gql-mock-server): add support for nested queries 2017-06-15 16:37:09 +01:00
geek
3c1763ceb4 feat(portal-data): instance sub-query, start/delete services 2017-06-09 00:04:46 +01:00
geek
1e157641b2 feat(portal-data): can stop services 2017-06-09 00:04:46 +01:00
geek
7e01748e8a feat(portal-data): support sub-queries 2017-06-08 13:46:46 +01:00
Sérgio Ramos
b6f6f1b2a8 fix(joyent-cp-frontend): fix fallback gql hostname 2017-06-07 16:56:33 +01:00
Sérgio Ramos
ebec51b965 feat(joyent-cp-gql-schema): add nested queries to more fields
- also, fix identation
 - remove redundant query type
2017-06-07 16:51:37 +01:00
Sérgio Ramos
6ab74d4216 test(joyent-cp-frontend): update Header snapshots 2017-06-07 15:09:49 +01:00
Sérgio Ramos
4ca5fc4f3b refactor(joyent-ui-toolkit): remove Header redundant properties 2017-06-07 15:09:49 +01:00
Sérgio Ramos
f17fae6a74 feat(joyent-cp-frontend): integrate toolkit's Header 2017-06-07 15:09:49 +01:00
Sérgio Ramos
56315d02c7 feat(joyent-ui-toolkit): implement Header component 2017-06-07 15:09:49 +01:00
Sérgio Ramos
1510341307 test(joyent-cp-frontend): bootstrap unit tests 2017-06-07 10:27:33 +01:00
Sérgio Ramos
ea27c18202 chore: remove legacy code 2017-06-06 12:00:37 +01:00
Sérgio Ramos
87b3d8e9f5 fix(joyent-ui-toolkit): force min-width of CardOptions 2017-06-06 11:57:12 +01:00
Sérgio Ramos
57bd1bc0fe docs: add instructions to start dev environment 2017-06-06 11:34:23 +01:00
Sérgio Ramos
3cd8e6b55a test(portal-data): disable (temp) ci tests 2017-06-06 11:19:05 +01:00
Sérgio Ramos
ad7aef77b7 docs: add yarn install instructions 2017-06-06 11:13:27 +01:00
Sérgio Ramos
527f046693 docs: initial getting started docs 2017-06-06 10:53:49 +01:00
geek
7b9a40a8f9 chore: bootstrap data for frontend 2017-06-06 10:38:59 +01:00
geek
9674394709 chore(portal-api): add start script to support frontend 2017-06-05 19:44:43 +01:00
geek
86b52a96f5 feat(portal-data): scaling is now supported 2017-06-05 19:44:43 +01:00
geek
123eafbb5c chore: lint cleanup in compose-client 2017-06-05 19:44:43 +01:00
geek
37bd108f40 feat: support scale and cb in docker 2017-06-03 00:20:49 +01:00
Sérgio Ramos
372665f978 build(joyent-ui-toolkit): compile styleguide and serve 2017-06-02 02:27:28 +01:00
Sérgio Ramos
3c7800aba1 fix(joyent-ui-toolkit): make CardHeader use full parent width 2017-06-02 02:15:06 +01:00
Sérgio Ramos
caf07a24d9 build(joyent-cp-frontend): build after setting ENV 2017-06-02 01:03:51 +01:00
Sérgio Ramos
5c34c94935 build: reference the right serve bin 2017-06-02 00:25:23 +01:00
Sérgio Ramos
6bc4d25521 build: don't yarn global 2017-06-01 23:50:13 +01:00
Sérgio Ramos
7dcf112309 style(joyent-cp-frontend): ignore build 2017-06-01 23:35:01 +01:00
Sérgio Ramos
2ce47eb669 build(joyent-cp-frontend): build for demo 2017-06-01 23:32:58 +01:00
Sérgio Ramos
af899f353d docs(docker-compose-client): add tag to server build 2017-06-01 22:53:57 +01:00
Sérgio Ramos
340dd41645 docs(docker-compose-client): document server setup 2017-06-01 22:51:45 +01:00
geek
caee178ad8 feat(portal-data): support manifest provision flow 2017-06-01 22:30:34 +01:00
Sérgio Ramos
7445a9a3e5 docs: fix demo links 2017-06-01 21:09:05 +01:00
Sérgio Ramos
c7faaffbfa fix(joyent-cp-gql-mock-server): enable cors 2017-06-01 18:28:40 +01:00
Sérgio Ramos
96fae2b95d ci: accept CIRCLE_BRANCH in all Dockerfiles 2017-06-01 17:20:25 +01:00
Sérgio Ramos
0503802282 ci: better run-parallel error log 2017-06-01 17:04:13 +01:00
Sérgio Ramos
46ff73d82a build: remove --build-arg from compose 2017-06-01 15:45:35 +01:00
Sérgio Ramos
0fd6884e68 ci: run test and lint in parallel 2017-06-01 15:45:23 +01:00
JUDIT GRESKOVITS
8cd863f394 fix(joyent-cp-frontend,joyent-ui-toolkit): Uuids become ids 2017-06-01 15:05:10 +01:00
Sérgio Ramos
53bec9df41 build: change docker build param order 2017-06-01 12:53:04 +01:00
Sérgio Ramos
a2967210a3 build: --build-arg on build, not up 2017-06-01 12:36:10 +01:00
Sérgio Ramos
539e1ea35e fix(joyent-cp-frontend): set REACT_APP_GQL_HOSTNAME 2017-06-01 12:10:14 +01:00
Sérgio Ramos
23871f351c docs: add demo links to readmes 2017-06-01 11:59:06 +01:00
JUDIT GRESKOVITS
cab7411454 feat(joyent-ui-toolkit,joyent-cp-frontend): Quick actions show and hide 2017-06-01 11:08:32 +01:00
Sérgio Ramos
c3b0dac605 build: share cns tag between frontend and mock-server 2017-06-01 02:38:15 +01:00
Sérgio Ramos
a9fef4683d build: use only cp- as the compose namespace 2017-06-01 02:29:39 +01:00
Sérgio Ramos
16199a4318 build: update cns names 2017-06-01 02:27:37 +01:00
Sérgio Ramos
cecb1d58ce build: revert rm docker email 2017-06-01 01:47:41 +01:00
Sérgio Ramos
9ab1d7b37b build: update docker compose 2017-06-01 01:28:03 +01:00
Sérgio Ramos
246cee7a8c build: force rm containers 2017-06-01 00:56:56 +01:00
Sérgio Ramos
190230de2f build: pull fresh images before up-ing 2017-06-01 00:32:12 +01:00
Sérgio Ramos
5a3294b32c build: stop and remove container before up-ing 2017-05-31 23:55:41 +01:00
Sérgio Ramos
3ffc3b9d1d build: force compose to recreate images 2017-05-31 23:19:26 +01:00
Sérgio Ramos
df5d8655f9 fix(joyent-cp-frontend): use a dynamic graphql hostname 2017-05-31 22:48:33 +01:00
Sérgio Ramos
39b6ca3a0d style: disable no-warning-comments instance 2017-05-31 22:41:45 +01:00
Sérgio Ramos
932e5d13f2 docs: document commit types 2017-05-31 22:37:10 +01:00
Sérgio Ramos
1b672c5667 docs: add container badges 2017-05-31 22:35:35 +01:00
Sérgio Ramos
81b34c8efe chore: add coverage to CI 2017-05-31 21:58:39 +01:00
geek
e879b7be97 feat(portal-data): include instance/package methods 2017-05-31 21:51:43 +01:00
Sérgio Ramos
0b1c5830d9 style: line-disable irrelevant handle-callback-err 2017-05-31 21:29:47 +01:00
Sérgio Ramos
a65f20ea45 style: line disable some eslint rules 2017-05-31 21:04:40 +01:00
Sérgio Ramos
e44471c1f1 fix(styled-is): add missing dependency - redrun 2017-05-31 20:57:17 +01:00
Sérgio Ramos
61d1df94c1 style: update root lint rules 2017-05-31 20:17:12 +01:00
Sérgio Ramos
0667ca8ad3 chore: different test targets for CI
this allows for junit reports and parallel executions
2017-05-31 20:04:12 +01:00
Sérgio Ramos
a0ea6d4a28 chore: prefix container names 2017-05-31 18:35:06 +01:00
Sérgio Ramos
a44c12dcdd fix: define SDC_ACCOUNT 2017-05-31 17:57:57 +01:00
Sérgio Ramos
ead66d38e6 fix(cp-gql-mock-server): schema compability 2017-05-31 17:09:06 +01:00
Sérgio Ramos
487f3dcc6d fix: correct push tag name 2017-05-31 16:34:00 +01:00
Sérgio Ramos
2687690407 fix: only setup triton when composing 2017-05-31 16:08:36 +01:00
geek
b6c6139023 chore(portal-data): add manifest and versions support 2017-05-31 15:43:20 +01:00
Sérgio Ramos
af86c0a4c4 chore: enable deploy 2017-05-31 15:33:45 +01:00
Sérgio Ramos
52a5a4b932 fix: properly write to triton create 2017-05-31 11:46:58 +01:00
Sérgio Ramos
e2245dd9c0 chore: create triton profile on deploy script 2017-05-31 11:32:15 +01:00
Sérgio Ramos
14df2c703c chore: install dependencies on deployment stage 2017-05-31 11:13:46 +01:00
Sérgio Ramos
ef8241ef5a fix: add missing --email to docker login 2017-05-31 11:04:25 +01:00
Sérgio Ramos
9081d50a0e chore: attach stdio to all deploy cmds 2017-05-31 10:38:19 +01:00
Sérgio Ramos
31d34c412b chore: use SDC_KEY_ID to create triton profile 2017-05-31 10:17:09 +01:00
Sérgio Ramos
20251ae0d0 chore: run deployment in a single script 2017-05-31 01:44:37 +01:00
Sérgio Ramos
1d463af70c fix: s/git/docker 2017-05-30 23:54:29 +01:00
Sérgio Ramos
6632d8c4e4 fix: s/push/git 2017-05-30 23:40:15 +01:00
Sérgio Ramos
b7371b355a chore: push image after build 2017-05-30 23:24:29 +01:00
geek
cf5f476898 chore: data layer 2017-05-30 20:18:45 +01:00
Sérgio Ramos
cb1dfa20f8 fix: s/bin/script build 2017-05-30 20:00:35 +01:00
Sérgio Ramos
6ad9c18683 chore: build packages before compose 2017-05-30 19:45:00 +01:00
Sérgio Ramos
96abc2a8bc fix: downgrade compose version 2017-05-30 19:04:51 +01:00
Sérgio Ramos
fdbfeb2e37 chore: setup docker-compose.yml 2017-05-30 18:54:20 +01:00
Sérgio Ramos
c957d419ee chore(joyent-ui-toolkit): ignore styleguide 2017-05-30 14:13:38 +01:00
JUDIT GRESKOVITS
cc16944dbe feat(joyent-ui-toolkit): Add tooltip 2017-05-30 14:06:18 +01:00
Sérgio Ramos
60f375cc4a chore: install rdb on CI env 2017-05-30 13:40:37 +01:00
Sérgio Ramos
82a667504a chore: allow to publish without release 2017-05-30 10:57:18 +01:00
Sérgio Ramos
cd3b394c1b chore: add missing dependency 2017-05-30 10:37:03 +01:00
Sérgio Ramos
efd87268da chore: use stdio option on execa 2017-05-29 23:04:51 +01:00
Sérgio Ramos
0dbd8a6b84 chore: improved publish script
- goes through the stages step by step
 - prompts the user to confirm some choices
 - smarter handling of tags and versions
2017-05-29 23:04:33 +01:00
Sérgio Ramos
b96e4321d4 feat(eslint-config): disable capitalized-comments 2017-05-26 19:26:54 +01:00
Sérgio Ramos
ec482796a9 chore: have local and remote tag name the same 2017-05-26 13:06:22 +01:00
Sérgio Ramos
6f2eb3cbb1 chore: add type to published tag names 2017-05-26 13:01:29 +01:00
Sérgio Ramos
33239dc2f6 chore(portal-api): exit 0 on test script
temporary. we need to work on installing rdb in CI so that the test can run
2017-05-26 12:27:12 +01:00
Sérgio Ramos
b1c0701804 chore(portal-data): exit 0 on test script
temporary. we need to work on installing rdb in CI so that the test can run
2017-05-26 12:16:12 +01:00
Sérgio Ramos
150a9e45ad style(portal-data): conform tests to belly-button 2017-05-26 12:03:00 +01:00
Sérgio Ramos
c327f9f1ef chore: handle empty files array in format-staged
if format-staged is run and after filtering by opt-out no files are left, it tries to format everything
2017-05-26 12:02:19 +01:00
Sérgio Ramos
ea478ca689 chore: install zqm in CI 2017-05-26 11:39:39 +01:00
Sérgio Ramos
7892aab05c chore: prepare after installing in CI 2017-05-26 11:33:32 +01:00
Sérgio Ramos
f252719aa1 chore: don't --prefer-offline in CI 2017-05-26 11:28:33 +01:00
Sérgio Ramos
c7567f3838 chore: initial circleci config 2017-05-26 11:17:00 +01:00
Sérgio Ramos
b665dec740 chore: actually publish
it was only listing updated packges
2017-05-26 10:36:16 +01:00
Sérgio Ramos
802dff3e42 chore: improve publish tag description 2017-05-26 10:35:27 +01:00
Sérgio Ramos
8974a0546f chore: when formatting staged files, also account for /scripts 2017-05-26 10:20:15 +01:00
Sérgio Ramos
06f17c828a chore: format /scripts 2017-05-26 10:20:10 +01:00
Sérgio Ramos
65a104f7d4 chore: implement a publish script
- checks whether branch is `master`
- checks whether the tree is clean
- checks whether HEAD doesn't match origin
- publishes using lerna
- updates root version based on --staging/--dev/--production flags
- tags tapo with name `${pkg.name}@${pkg.version}`
- pushes tag to origin

that creates and pushes a repo tag afterwards
2017-05-26 10:20:05 +01:00
Sérgio Ramos
9b3874ea56 chore: format, lint, and test scripts based on staged files
For lint and test, it detects the packages that the staged files affect and only
runs the corresponding `lint` and `test` scripts.

For format, it will run prettier through the Added/Modified js files.
2017-05-26 10:20:00 +01:00
Sérgio Ramos
8887fa3384 chore: properly handle full and relative paths in format 2017-05-26 10:19:54 +01:00
Sérgio Ramos
ca27ac2200 chore: enable changelog on root level 2017-05-26 10:19:48 +01:00
geek
1efcc32748 chore(portal-data): move portal-data to packages 2017-05-25 21:07:34 +01:00
Sérgio Ramos
fbaaca42f7 chore: don't run tests on pre-commit 2017-05-25 20:08:20 +01:00
Sérgio Ramos
5706ae1f95 chore: enable commit msg lint 2017-05-25 20:07:56 +01:00
Sérgio Ramos
b9aa47a7f4 chore: bootstrap on prepare instead of on postinstall
info: https://docs.npmjs.com/misc/scripts
2017-05-25 20:06:53 +01:00
Sérgio Ramos
66ad5499fb chore: enable lerna-wizard 2017-05-25 20:05:32 +01:00
Sérgio Ramos
7da2460b21 chore: allow packages to opt-out of prettier 2017-05-25 19:50:36 +01:00
geek
265b144cfa chore(portal-api): move portal-api to packages 2017-05-25 19:44:31 +01:00
JUDIT GRESKOVITS
d93ab9eb74 Merge branch 'master' of https://github.com/yldio/joyent-portal 2017-05-25 17:49:56 +01:00
JUDIT GRESKOVITS
5ffa07aeee feat(cp-frontend): Move portal query to header, display result, return user from mock server 2017-05-25 17:32:19 +01:00
Sérgio Ramos
e2c0845145 chore: publish
- cloudapi-gql@1.0.4
 - joyent-cp-frontend@1.1.0
 - joyent-cp-gql-mock-server@1.0.4
 - joyent-cp-gql-schema@1.0.4
 - joyent-cp-rdb-bootstrap@1.0.4
 - normalized-styled-components@1.0.5
 - pseudo-json-ast@1.0.6
 - pseudo-yaml-ast@1.0.6
 - remcalc@1.0.5
 - rnd-id@1.0.5
 - styled-is@1.0.7
 - joyent-ui-toolkit@1.1.0
 - unitcalc@1.0.5
2017-05-25 16:07:31 +01:00
Sérgio Ramos
f3e531dbd8 feat(cp-frontend,ui-toolkit): style inheritance using .extend (#458)
styled-components@2 exposes a new `.extend`[1] API. It is less problematic than
styled(Parent).

[1]: https://www.styled-components.com/docs/basics#extending-styles
2017-05-25 09:59:58 -05:00
Sérgio Ramos
91381bfe80 chore(cp-gql-mock-server): enable nodemon for dev 2017-05-25 15:57:57 +01:00
Sérgio Ramos
7bf95fd551 fix(ui-toolkit): compile on postinstall 2017-05-25 15:31:22 +01:00
Sérgio Ramos
d2ac10ae28 fix(cp-frontend): use postinstall hook to patch react-scripts
instead of `install`
2017-05-25 14:57:41 +01:00
Sérgio Ramos
11bb161bb2 chore: update lockfiles 2017-05-25 14:48:30 +01:00
Sérgio Ramos
73899b2784 fix(cp-frontend): gracefully handle multiple postinstall executions
checks if the webpack backup exists already before trying to create it
2017-05-25 14:41:29 +01:00
Sérgio Ramos
c45fb3ce41 chore: publish
- cloudapi-gql@1.0.3
 - joyent-cp-frontend@1.0.3
 - joyent-cp-gql-mock-server@1.0.3
 - joyent-cp-gql-schema@1.0.3
 - joyent-cp-rdb-bootstrap@1.0.3
 - normalized-styled-components@1.0.4
 - pseudo-json-ast@1.0.5
 - pseudo-yaml-ast@1.0.5
 - remcalc@1.0.4
 - rnd-id@1.0.4
 - styled-is@1.0.6
 - joyent-ui-toolkit@1.0.3
 - unitcalc@1.0.4
2017-05-25 14:21:02 +01:00
Sérgio Ramos
19f3678747 fix(ui-toolkit): copy fonts before compiling 2017-05-25 14:11:16 +01:00
Sérgio Ramos
44a2f2ea43 fix(styled-is): correct package entrypoints 2017-05-25 14:04:57 +01:00
Sérgio Ramos
185916e9bf chore: update dependencies 2017-05-25 13:47:44 +01:00
Sérgio Ramos
b7343d9810 chore: remove lint-license check from precommit 2017-05-25 13:21:25 +01:00
Sérgio Ramos
5fb69bec22 chore(cp-frontend): assert nsc imports are after sc's
nsc = normalized-styled-components
sc = styled-components
2017-05-25 13:15:18 +01:00
Sérgio Ramos
8295bd6882 chore: initial lerna setup
this shall be a progressive process
2017-05-25 10:56:50 +01:00
JUDIT GRESKOVITS
597f1b628b Merge branch 'master' of https://github.com/yldio/joyent-portal 2017-05-24 18:09:25 +01:00
JUDIT GRESKOVITS
845d9f4800 Add user type move portal query to header add services tooltip 2017-05-24 18:09:10 +01:00
geek
2e3a436594 Update graphi and map resolvers 2017-05-24 10:12:59 +01:00
JUDIT GRESKOVITS
ba5ccea851 Actually sorting out svgs 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
ab93794724 Fix svg imports again 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
80a417d33f Tidy 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
d429f820e9 Upgrade react-scripts 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
a8c34ee756 Add instances list 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
db4ac69452 Add services list view 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
7d39da51ed Sort out font 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
11751129b3 Update frontend to use updated schema 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
4b2e0f53ae Update resolvers accoring to latest schema 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
aa8bdf5eb2 Update schema w missing bits 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
4574e8b007 Update queries and add mutations to schema 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
b3463e7dab Update graphql schema 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
7cad8228ee Migration, menus, topology, inline svg 2017-05-23 17:23:37 +01:00
JUDIT GRESKOVITS
7e2bfce707 Rock and roll 2017-05-23 17:23:37 +01:00
geek
131923ca59 Use graphi 2017-05-23 10:37:01 +01:00
geek
99fb6f5057 Switch to updated schema 2017-05-23 10:37:01 +01:00
Sérgio Ramos
cf737aa2e7 integrate docker-compose-api into portal-data (#451)
this might break tests for now
2017-05-16 10:54:39 -05:00
geek
813fe9f814 version 1.0.0 2017-05-15 19:26:40 +01:00
geek
08d71eb356 Remove precommit hooks 2017-05-15 19:26:40 +01:00
geek
98f2329fa0 Initial implementation 2017-05-15 19:26:40 +01:00
geek
6ea3da5a9e Initial control tower impl 2017-05-15 19:26:40 +01:00
geek
06948c66d8 version 2017-05-15 14:37:06 +01:00
geek
b039fdad8b Better metrics insert and service changes 2017-05-15 14:37:06 +01:00
geek
559df105b6 Use portal-data module 2017-05-11 23:45:27 +01:00
geek
3fd18589a9 Initial portal-data 2017-05-11 23:45:27 +01:00
Sérgio Ramos
fd19fff435 compose demo 2017-05-11 16:42:55 +01:00
Sérgio Ramos
6365139253 docker-compose-client initial implementation 2017-05-11 16:39:55 +01:00
2242 changed files with 175371 additions and 946221 deletions

9
.eslintignore Normal file
View File

@ -0,0 +1,9 @@
artifacts
reports
.nyc_output
coverage
dist
styleguide
build
consoles/*/lib/app
node_modules

10
.eslintrc Normal file
View File

@ -0,0 +1,10 @@
{
"extends": "joyent-portal",
"rules": {
"no-console": 1,
"new-cap": 0,
"jsx-a11y/href-no-hash": 0,
"no-negated-condition": 1,
"camelcase": 1
}
}

1
.gitattributes vendored
View File

@ -1 +0,0 @@
*.sketch filter=lfs diff=lfs merge=lfs -text

25
.github/COMMIT_GUIDELINES.md vendored Normal file
View File

@ -0,0 +1,25 @@
# Commit Guidelines
```
<type><(scope)?>: <msg>
```
Where type is one of:
```
build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test
```
And where scope is one of ui-toolkit, my-joy-beta, cloudapi-gql, boilerplate, and create-instance.
_The recommended method to commit should be by running npm run commit._

17
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,17 @@
## I'm submitting a...
* [ ] bug report
* [ ] feature request
* [ ] design request
## What is the current behavior?
## If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
## What is the expected behavior?
## What is the motivation / use case for changing the behavior?
## If the current behavior is a bug, please provide your browser
## Other information

14
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,14 @@
**Please check if the PR fulfills these requirements**
* [ ] The commit message follows our [guidelines](https://github.com/yldio/joyent-portal/blob/master/.github/COMMIT_GUIDELINES.md)
* [ ] Tests for the changes have been added (for bug fixes / features)
**What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
**Does this PR close an issue?** (If not please create one)
**What is the new behavior (if this is a feature change)?**
**Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
**Other information**

19
.gitignore vendored
View File

@ -118,9 +118,6 @@ Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags
### Windows ###
# Windows image file caches
@ -154,3 +151,19 @@ $RECYCLE.BIN/
tap-xunit
/ui/dist
_todo
packages/*/dist
prototypes/*/dist
packages/*/buid
prototypes/*/buid
packages/*/.next
prototypes/*/.next
packages/ui-toolkit/styleguide/
packages/ui-toolkit/.snapguidist/
packages/*/package-lock.json
prototypes/*/package-lock.json
_env*
keys*
/packages/*/public/index.html
/consoles/*/public/index.html

24
.licensesrc.json Normal file
View File

@ -0,0 +1,24 @@
{
"ignoreDevDependencies": true,
"allowedPackages": [
{
"name": "colors",
"extraFieldsForDocumentation":
"Licence is MIT, but was not found by tool: https://github.com/Marak/colors.js/blob/v0.5.1/MIT-LICENSE.txt",
"date": "17 January 2017",
"reason": "MIT Licenced"
}
],
"allowedLicenses": [
"CC-BY-4.0",
"CC0-1.0",
"MIT",
"ISC",
"Apache",
"BSD",
"WTF",
"Public Domain",
"MPL",
"Unlicense"
]
}

29
.prettierignore Normal file
View File

@ -0,0 +1,29 @@
.git/*
.DS_Store
license
yarn.lock
.travis.yml
.yarnclean
.eslintignore
.prettierignore
.npmignore
.gitignore
.dockerignore
dist
build
packages/*/lib/app
consoles/*/lib/app
*.ico
*.html
*.log
*.svg
*.map
*.png
*.snap
*.ttf
*.sh
*.txt

31
.prettierrc Normal file
View File

@ -0,0 +1,31 @@
{
"bracketSpacing": true,
"jsxBracketSameLine": false,
"printWidth": 80,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false,
"overrides": [
{
"files": [
".prettierrc",
".eslintrc",
".babelrc",
".tern-project",
".stylelintrc",
".lighthouserc"
],
"options": {
"parser": "json"
}
},
{
"files": ["package.json"],
"options": {
"printWidth": 180
}
}
]
}

12
.tern-project Normal file
View File

@ -0,0 +1,12 @@
{
"libs": ["ecmascript", "browser"],
"plugins": {
"doc_comment": true,
"local-scope": true,
"jsx": true,
"node": true,
"webpack": {
"configPath": "./webpack/index.js"
}
}
}

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
language: node_js
node_js:
- '9'
script:
- yarn run test:ci

15
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3069/",
"webRoot": "${workspaceRoot}"
}
]
}

1
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1 @@
{}

36
.yarnclean Normal file
View File

@ -0,0 +1,36 @@
# test directories
__tests__
test
tests
powered-test
# asset directories
docs
doc
website
images
assets
# code coverage directories
coverage
.nyc_output
# build scripts
Makefile
Gulpfile.js
Gruntfile.js
# configs
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json
# misc
*.gz
*.md

View File

@ -1,33 +0,0 @@
## Development Workflow
### Small Feature Development
Contributors who have write access to the repository will practise continuous
delivery (CD as known from now on in this document).
We will define CD in this document as a method of developing a feature per commit
with an encapsulating test that proves that the functionality is working, the
contributor will test their code locally and if all is passing will push to *master*.
For contributors that do not have write access, follow the same conventions but
open a Pull Request instead.
### Large changesets
When larger changes need to be made, or the work that is carried out spans multiple
components / services of the application at the same time a single commit will
not suffice.
In this scenario, the contributor should open a pull request instead.
## Commit messages
Follow [Git blessed](http://chris.beams.io/posts/git-commit/)
1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how

View File

@ -1,57 +0,0 @@
.PHONY: check
check:
@yarn install --prefer-offline
-@./bin/setup
.PHONE: licence
licence:
./node_modules/.bin/license-to-fail ./licence.js
make licence-check
SUBDIRS := $(dir $(wildcard */Makefile))
TARGETS := install clean test test-ci lint lint-ci licence-check# whatever else, but must not contain '/'
# foo/.all bar/.all foo/.clean bar/.clean
SUBDIRS_TARGETS := \
$(foreach t,$(TARGETS),$(addsuffix $t,$(SUBDIRS)))
.PHONY: $(TARGETS) $(SUBDIRS_TARGETS)
# static pattern rule, expands into:
# all clean: %: foo/.% bar/.%
$(TARGETS): %: $(addsuffix %,$(SUBDIRS))
@echo 'Done "$*" target'
# here, for foo/.all:
# $(@D) is foo
# $(@F) is .all, with leading period
# $(@F:.%=%) is just all
$(SUBDIRS_TARGETS):
$(MAKE) --no-print-directory -C $(@D) $(@F:.%=%)
DIFF := $(lastword $(subst /, ,${CIRCLE_COMPARE_URL}))
CHANGED_FILES := $(subst /, , $(dir $(shell git diff --name-only $(DIFF))))
CHANGES := $(patsubst %, %/, $(sort $(filter $(subst /, ,$(SUBDIRS)), $(CHANGED_FILES))))
.PHONY: diff
diff:
echo $(CHANGES)
BUILDS := build push
# foo/.all bar/.all foo/.clean bar/.clean
BUILDS_TARGETS := \
$(foreach t,$(BUILDS),$(addsuffix $t,$(CHANGES)))
.PHONY: $(BUILDS) $(BUILDS_TARGETS)
# static pattern rule, expands into:
# all clean: %: foo/.% bar/.%
$(BUILDS): %: $(addsuffix %,$(CHANGES))
@echo 'Done "$*" target'
# here, for foo/.all:
# $(@D) is foo
# $(@F) is .all, with leading period
# $(@F:.%=%) is just all
$(BUILDS_TARGETS):
$(MAKE) --no-print-directory -C $(@D) $(@F:.%=%)

120
README.md
View File

@ -1,120 +0,0 @@
[![CircleCI](https://circleci.com/gh/yldio/joyent-portal.svg?style=shield&circle-token=0bbeaaafc4868c707ca0ed0568f5193a04daddb4)](https://circleci.com/gh/yldio/joyent-portal)
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)
# Prototype Triton Portal
This is a prototype project intended to explore some ideas that might contribute to new capabilities and a new user experience for managing applications on [Joyent's Triton](https://www.joyent.com/triton).
**This is not intended for general use and is completely unsupported.**
## Our Principles
We have designed this product with these principles in mind (to be completed).
## Our Design Library
We use inVision craft for our design components, you can downoad this library [here](https://drive.google.com/open?id=0Bw56g3tFwIuWOXNHUDZmRmQ3ZlE) and submit proposed changes to our Sketch wireframes [here](https://drive.google.com/open?id=0B1oWObk56wa5cE5iY2JWNmI2djg).
## Documentation
Our workshop meeting notes are kept in this [Google Drive folder](https://drive.google.com/open?id=0B1oWObk56wa5eklBNGFlWFRFOHM). Our meeting notes are kept in this [Google Drive folder](https://drive.google.com/open?id=0B1oWObk56wa5N1VzZjhZWWpDTTQ).
## Development
If you would like to contribute to the project, the recommended way to setup is to
insure that you have docker installed, and optionally have a triton account and profile
setup using the triton tool.
Currently requires [yarn](https://yarnpkg.com/en/docs/install) for installing dependencies,
as well as `docker` and `docker-compose` are installed correctly, this can be done by
running `make`, make continues without any errors, then you are good to go. [node-triton](https://github.com/joyent/node-triton)
is also needed if deployment to Triton is required.
```
make && make install
```
Then to run each individual component locally (subject to change).
## Setup
```sh
make
```
## Run services
To run the stack locally:
```sh
docker-compose -f local-compose.yml up -d
```
This will run the front-end at [http://127.0.0.1:8000](http://127.0.0.1:8000),
the UI framework at [http://127.0.0.1:8001](http://127.0.0.1:8001),
## Project Management
This project is using [Github Projects](https://www.youtube.com/watch?v=C6MGKHkNtxU) for organisation and development of the Joyent Dashboard.
## Repository Layout
Currently we are using this repository as a monolithic catch-all for all project communication, development and designs.
We will also include multiple PoC's of various bits of functionality from UI's prototypes to API development.
```
.
├── cloudapi-graphql
├── docs
├── frontend
├── nginx
├── ui
└── spikes
```
### cloudapi-graphql
An implementation of the [Joyent CloudAPI](https://apidocs.joyent.com/cloudapi/) in GraphQL.
### Docs
Documentation about the project, mainly focused on information for the technical runnings of this project.
Can be view online at the [documentation website](http://docs.svc.f4b20699-b323-4452-9091-977895896da6.eu-ams-1.triton.zone/)
### frontend
The client side code with a dev-server, this also includes the production server for the meantime, however we are looking at moving towards a deployment of the build artifacts to manta, and another server to host these assets.
### nginx
Nginx will be sitting in-front of the `ui` service, allowing the `ui` to scale out.
### ui
Code for the reusable UI framework.
### spikes
Implementation examples from spikes, this directory is experimental and is likely broken.
### Git LFS
- We are using Git LFS to track large files, such as design files in Sketch.
- Make sure you have this downloaded locally
`brew install git-lfs`
#### Helpful tips
- If there is an error cloning to a new machine, or there is an error cloning in the Circle CI process run `git lfs push origin master --all` from a machine that has it already checked out.
### Sketch Pre Commit
A pre-commit hook has been added to generate a PNG shot of each .sketch file "page".
To use, make sure the following are installed:
- [Sketch Toolbox](http://sketchtoolbox.com/)
- [Sketch Measure Plugin](https://github.com/utom/sketch-measure)
Then add following to your `.git/config`
```
[diff "sketchtool"]
textconv = "sketchtool dump"
cachetextconv = true
```

View File

@ -1,30 +0,0 @@
#! /usr/bin/env bash
#
# Prelude - make bash behave sanely
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
#
set -euo pipefail
# Beware of CDPATH gotchas causing cd not to work correctly when a user
# has set this in their environment
# https://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/
unset CDPATH
readonly INCLUDE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=bin/setup-tools
. "${INCLUDE}"/setup-tools
echo ">> running triton deploy with docker-compose"
ensure_command triton
ensure_triton_cns_is_enabled
get_triton_details
write_env_file
export DOCKER_HOST=$_DOCKER_HOST
export DOCKER_CERT_PATH=$_DOCKER_CERT_PATH
# Do not TLS verify for now, incompatibilities between circleci and joyent
export DOCKER_TLS_VERIFY=
docker-compose pull
COMPOSE_PROJECT_NAME=${CIRCLE_BRANCH} docker-compose up -d

View File

@ -1,10 +0,0 @@
#! /usr/bin/env bash
#
# Prelude - make bash behave sanely
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
#
set -euo pipefail
echo ">> Logging into $_DOCKER_REGISTRY"
docker login -e="." -u="$_DOCKER_LOGIN_USERNAME" -p="$_DOCKER_LOGIN_PASSWORD" "$_DOCKER_REGISTRY"

View File

@ -1,203 +0,0 @@
#! /usr/bin/env bash
#
# Prelude - make bash behave sanely
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
#
set -euo pipefail
IFS=$'\n\t'
#
# Globals
#
remember_git_start_and_end() {
HEAD="$(git rev-parse HEAD)"
ROOT="$(git log --pretty=format:%H | tail -n 1)"
}
#
# Utilities
#
die() {
local msg="$@"
[[ -z "${msg}" ]] || {
tput setaf 1 # red
tput bold
echo "${msg}"
tput sgr0 # reset
}
exit 1
}
error() {
local msg="$@"
echo -n '| '
tput setaf 1 # red
echo -n ' ✖'
tput sgr0 # reset
echo " ${msg}"
}
success() {
local msg="$@"
echo -n '| '
tput setaf 2 # green
echo -n ' ✓'
tput sgr0 # reset
echo " ${msg}"
}
log_commit() {
echo "○ $@"
}
# Check a command is present
ensure_command() {
local cmd="$1"
command -v "${cmd}" > /dev/null 2>&1 || {
die "Couldn't find required command: ${cmd}"
}
}
#
# Signal handling
#
cleanup() {
git reset --hard "${HEAD}" > /dev/null 2>&1
rm -f $$_commit_message
}
trap cleanup SIGHUP SIGINT SIGTERM
#
# Git helpers
#
# Go back one commit in history (first parent for merges)
step_back_one_commit() {
git reset --hard HEAD^ > /dev/null
log_commit "$(git rev-parse HEAD)"
}
current_commit_message() {
GIT_PAGER= git log --format=%B -n 1
}
current_commit_sha() {
git rev-parse HEAD
}
exit_if_not_git_repo() {
local gitroot="$(git rev-parse --show-toplevel 2> /dev/null)"
[[ "${gitroot}" == "" ]] && die 'Current directory is not in a repository'
return 0
}
#
# Checks
#
check_commit_message() {
local lineno=0
local length=0
local succeded=1
while read -r line ; do
let succeded=1
let lineno+=1
length=${#line}
[[ "${lineno}" -eq "1" ]] && {
[[ "${length}" -gt 50 ]] && {
error "Commit message: Subject line longer than 50 characters";
succeded=0
};
[[ ! "${line}" =~ ^[A-Z].*$ ]] && {
error "Commit message: Subject line not capitalised";
succeded=0
};
[[ "${line}" == *. ]] && {
error "Commit message: Subject line ended with a full stop";
succeded=0
};
}
[[ "${lineno}" -eq "2" ]] && [[ -n "${line}" ]] && {
error "Commit message: Subject line not separated by a blank line";
succeded=0;
};
[[ "${lineno}" -gt "1" ]] && [[ "${length}" -gt "72" ]] && {
error "Commit message: Body not wrapped at 72 characters";
succeded=0
};
done < $$_commit_message
[[ "${succeded}" -eq "1" ]] && success "Commit message"
return 0
}
run_checks() {
current_commit_message > $$_commit_message
check_commit_message
rm -f $$_commit_message
set +e
npm run lint > /dev/null 2>&1
if [[ "$?" -eq 0 ]]; then
success 'Lint'
else
error 'Lint: script did not exit successfully'
fi
npm test > /dev/null 2>&1
if [[ "$?" -eq 0 ]]; then
success 'Test'
else
error 'Test: script did not exit successfully'
fi
set -e
}
check_project() {
exit_if_not_git_repo
[[ -f './package.json' ]] || {
die 'This does not appear to be a node project'
}
[[ -z "$(json -f package.json 'scripts.lint')" ]] && {
die 'There is no lint script in the package.json'
}
[[ -z "$(json -f package.json 'scripts.test')" ]] && {
die 'There is no test script in the package.json'
}
return 0
}
traverse_history() {
while [[ "${ROOT}" != "$(current_commit_sha)" ]] ; do
run_checks
step_back_one_commit
done
}
#
# Main
#
ensure_command git
ensure_command tail
ensure_command npm
ensure_command json
check_project
remember_git_start_and_end
log_commit "HEAD: $(current_commit_sha)"
traverse_history
run_checks
log_commit "ROOT: $(current_commit_sha)"
cleanup
# vim: syntax=sh et ts=2 sts=2 sw=2

View File

@ -1,16 +0,0 @@
#! /usr/bin/env bash
#
# Prelude
#
set -euo pipefail
set -x
# Set internal field seperator to `/` to split up urls
IFS='/'
read -ra ADDR <<< "$CIRCLE_COMPARE_URL"
if [[ "$(git diff --name-only """${ADDR[-1]}""")" == *"ui/"* ]]
then
make -C ui publish | sed '/NPM_TOKEN/d'
fi

View File

@ -1,60 +0,0 @@
#! /usr/bin/env bash
#
# Prelude - make bash behave sanely
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
#
set -euo pipefail
# Make pushd & popd silent
pushd () {
command pushd "$@" > /dev/null
}
popd () {
command popd "$@" > /dev/null
}
export EXIT_CODE=0
function lint_changed() {
# Allow lint to be ran from outside of the root directory
local git_root
git_root=$(git rev-parse --show-cdup)
git_root=${git_root:-./}
local subdirs
subdirs=$(find "$git_root" -maxdepth 2 -mindepth 2 -name 'Makefile' -printf '%h\n')
for directory in $subdirs
do
pushd "$directory"
local npm_bin="node_modules/.bin"
local eslint="$npm_bin/eslint"
function lint() {
local to_lint
to_lint=$(git diff --staged --diff-filter=ACMTUXB --name-only -- '*.j'{s,sx})
echo $to_lint
echo $eslint
if [ "$to_lint" ]; then
$eslint "$to_lint" -c ".eslintrc" || EXIT_CODE=$?
fi
}
lint
popd
done
}
lint_changed
if [[ "$EXIT_CODE" -gt "0" ]]; then
exit $EXIT_CODE
fi
make test
echo "⚡️ changed files pass eslint! ⚡️"

View File

@ -1,23 +0,0 @@
#! /usr/bin/env bash
#
# Prelude
#
set -euo pipefail
IFS=$'\n\t'
# Beware of CDPATH gotchas causing cd not to work correctly when a user
# has set this in their environment
# https://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/
unset CDPATH
readonly INCLUDE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=bin/setup-tools
. "${INCLUDE}"/setup-tools
#
# Main
#
ensure_prerequisites
get_triton_details
check_docker_config
write_env_file

View File

@ -1,105 +0,0 @@
#! /usr/bin/env bash
# setup.sh - Checks that all the required tools are present and that they are
# appropriately configured for deploying to Triton.
#
# Adapted from https://github.com/autopilotpattern/mysql/blob/master/setup.sh
#
#
# Prelude
#
set -euo pipefail
IFS=$'\n\t'
#
# Utilities
#
die() {
local msg="$*"
[[ -z "${msg}" ]] || {
echo
tput setaf 1 # red
tput bold
echo "${msg}"
tput sgr0 # reset
}
exit 1
}
#
# Check functions
#
ensure_command() {
local cmd="$1"
command -v "${cmd}" > /dev/null 2>&1 || {
die "Couldn't find required command: ${cmd}"
}
}
get_triton_details() {
TRITON_USER=$(triton profile get | awk -F": " '/account:/{print $2}')
TRITON_DC=$(triton profile get | awk -F"/" '/url:/{print $3}' | awk -F'.' '{print $1}')
TRITON_URL=$(triton profile get | awk -F' ' '/url:/{print $2}')
TRITON_ACCOUNT=$(triton account get | awk -F": " '/id:/{print $2}')
TRITON_KEY=$(triton profile get | awk -F' ' '/keyId:/{print $2}')
}
check_docker_config() {
[[ "${DOCKER_HOST:=unset}" == "unset" ]] && {
echo "Run \"docker-compose -f local-compose.yml up\" to run locally"
return 0
}
return 0
}
ensure_docker_config_matches_triton_config_and_capture_triton_details() {
local docker_user
docker_user=$(docker info 2>&1 | awk -F": " '/SDCAccount:/{print $2}')
local docker_dc
docker_dc="$(echo "${DOCKER_HOST}" | awk -F"/" '{print $3}' | awk -F'.' '{print $1}')"
get_triton_details
[[ ! "$docker_user" = "$TRITON_USER" ]] || [[ ! "$docker_dc" = "$TRITON_DC" ]] && {
echo "Docker user: ${docker_user}"
echo "Triton user: ${TRITON_USER}"
echo "Docker data center: ${docker_dc}"
echo "Triton data center: ${TRITON_DC}"
die "Your Triton config does not match your Docker configuration."
}
return 0;
}
ensure_triton_cns_is_enabled() {
local triton_cns_enabled
triton_cns_enabled=$(triton account get | awk -F": " '/cns/{print $2}')
[[ "$triton_cns_enabled" == "true" ]] || {
die "Triton CNS is required and not enabled."
}
}
write_env_file() {
if [[ -f .env ]] ; then
echo "Env file already exists, not overwriting"
else
echo '# Consul discovery via Triton CNS' >> .env
[[ "${DOCKER_HOST:=unset}" == "*docker.joyent.com*" ]] || {
echo CONSUL="consul.svc.${TRITON_ACCOUNT}.${TRITON_DC}.cns.joyent.com" \
>> .env
}
echo SDC_KEY_ID=${TRITON_KEY} >> .env
echo SDC_ACCOUNT=${TRITON_ACCOUNT} >> .env
echo SDC_URL=${TRITON_URL} >> .env
echo >> .env
fi
}
ensure_prerequisites() {
ensure_command docker
ensure_command docker-compose
ensure_command triton
}
# vim: syntax=sh et ts=2 sts=2 sw=2

View File

@ -1,57 +0,0 @@
#!/usr/bin/env ruby
require 'fileutils'
PROGNAME = 'pre-commit (auto-generate sketch previews)'
def main
progress "Installing sketchtool"
system!(%W[/Applications/Sketch.app/Contents/Resources/sketchtool/install.sh])
progress "Looking for changed or added .sketch files"
diff_output = capture!(%W[git diff --name-only --cached --pretty=format:])
sketch_files = diff_output.split("\n").grep(/\.sketch\z/)
if sketch_files.empty?
progress "No sketch files to create preview images for in this commit!"
end
puts sketch_files
sketch_files.each do |f|
unless File.exist?(f)
progress "#{f} does not exist (anymore?)"
next
end
png_output_dir = f.sub(/\.sketch\z/, '') + '-sketch-previews'
progress "deleting old previews"
FileUtils.rm_rf(png_output_dir)
progress "exporting pages"
cmd = %W[sketchtool --overwriting=YES --output=#{png_output_dir} export pages #{f}]
system!(cmd)
progress "adding to git"
system!(%W[git add #{png_output_dir}])
end
end
def system!(cmd)
puts "running: #{cmd.join(' ')}"
abort failure_message(cmd) unless system(*cmd)
end
def capture!(cmd)
puts "capturing: #{cmd.join(' ')}"
result = IO.popen(cmd) { |io| io.read }
abort failure_message(cmd) unless $?.success?
result
end
def failure_message(cmd)
"#{PROGNAME}: command failed: #{cmd.join(' ')}"
end
def progress(msg)
puts "#{PROGNAME}: #{msg}"
end
main

8
bundle/.env.js Normal file
View File

@ -0,0 +1,8 @@
'use strict';
const { homedir } = require('os');
const { join } = require('path');
const { SDC_KEY_PATH } = process.env;
process.env.SDC_KEY_PATH = SDC_KEY_PATH || join(homedir(), './.ssh/id_rsa');

20
bundle/data/account.js Normal file
View File

@ -0,0 +1,20 @@
module.exports = [
{
name: 'Logout',
slug: 'logout',
description: 'Do the daggum logout',
url: '/logout'
},
{
name: 'Change Password',
slug: 'change-password',
description: 'Change yer own password',
url: '/password'
},
{
name: 'Account',
slug: 'account',
description: 'Your account information',
url: '/account'
}
];

89
bundle/data/categories.js Normal file
View File

@ -0,0 +1,89 @@
module.exports = [
{
name: 'Compute',
services: [
{
name: 'VMs & Containers',
slug: 'instances',
description: 'Run VMs and bare metal containers'
}
]
},
{
name: 'Network',
services: [
{
name: 'VLANs',
slug: 'vlans',
description: 'Wire your application your way'
},
{
name: 'Subnets',
slug: 'subnets',
description: 'A network for everything'
},
{
name: 'Firewall Rules',
slug: 'firewall',
description: 'Control the bits coming and going'
}
]
},
{
name: 'Storage',
services: [
{
name: 'Triton Object Storage',
slug: 'object-storage',
description: 'Modern cloud object storage',
tags: ["'note'='was Manta'"]
},
{
name: 'S3 Compatibility Bridge',
slug: 's3-bridge',
description: 'Modern storage, legacy compability'
},
{
name: 'Triton Volumes',
slug: 'volumes',
description: 'Network filesystems for your apps',
tags: ["'is-new'='true'"]
}
]
},
{
name: 'Access',
services: [
{
name: 'Role Based Access Control',
slug: 'rbac',
description: 'Manage users within your account'
}
]
},
{
name: 'Help & Support',
services: [
{
name: 'Service Status',
slug: 'status',
description: 'Find out about the status of our services'
},
{
name: 'Contact Support',
slug: 'contact-support',
description: 'Chat to us via phone or email'
},
{
name: 'Support Plans',
slug: 'support-plans',
description: 'Write here about Support Plans'
},
{
name: 'Getting Started',
slug: 'getting-started',
description: 'Write here about Getting Started'
}
]
}
];

86
bundle/data/regions.js Normal file
View File

@ -0,0 +1,86 @@
module.exports = [
{
name: 'Ashburn, Virginia, USA',
continent: 'NORTH_AMERICA',
datacenters: [
{
name: 'us-east-1',
url: 'http://localhost'
},
{
name: 'us-east-2',
url: 'http://localhost'
},
{
name: 'us-east-3',
url: 'http://localhost'
}
]
},
{
name: 'Las Vegas, Nevada, USA',
continent: 'NORTH_AMERICA',
datacenters: [
{
name: 'us-sw-1',
url: 'http://localhost'
}
]
},
{
name: 'Emeryville, California, USA',
continent: 'NORTH_AMERICA',
datacenters: [
{
name: 'us-west-1',
url: 'http://localhost'
}
]
},
{
name: 'Amsterdam, Netherlands',
continent: 'EUROPE',
datacenters: [
{
name: 'us-ams-1',
url: 'http://localhost'
}
]
},
{
name: 'Singapore',
continent: 'ASIA',
datacenters: [
{
name: 'ap-sg-1',
url: 'http://localhost'
},
{
name: 'ap-sg-2',
url: 'http://localhost'
},
{
name: 'ap-sg-3',
url: 'http://localhost'
}
]
},
{
name: 'Seoul, South Korea',
continent: 'ASIA',
datacenters: [
{
name: 'ap-kr-1',
url: 'http://localhost'
},
{
name: 'ap-kr-2',
url: 'http://localhost'
},
{
name: 'ap-kr-3',
url: 'http://localhost'
}
]
}
];

72
bundle/index.js Normal file
View File

@ -0,0 +1,72 @@
// Requires .env.js file with the following exports:
// SDC_URL, SDC_KEY_ID, SDC_KEY_PATH
require('./.env.js');
const Main = require('apr-main');
const Hapi = require('hapi');
const H2O2 = require('h2o2');
const Execa = require('execa');
const Path = require('path');
const Fs = require('fs');
const { PORT = 4000 } = process.env;
const ROOT = Path.join(__dirname, 'src');
const calcPort = i => Number(PORT) + Number(i) + 1;
const namespaces = Fs.readdirSync(ROOT)
.filter(filename => /.js$/.test(filename))
.map(filename => filename.replace(/.js$/, ''))
.filter(filename => !['index', 'server'].includes(filename));
const routes = namespaces.map((namespace, i) => ({
method: '*',
path: `/${namespace}/{params*}`,
handler: {
proxy: {
uri: `{protocol}://0.0.0.0:${calcPort(i)}/${namespace}/{params}`
}
}
}));
namespaces.forEach((namespace, i) => {
const child = Execa('node', [namespace], {
cwd: ROOT,
cleanup: true,
env: Object.assign({}, process.env, {
PORT: calcPort(i),
PREFIX: namespace
})
});
child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);
});
Main(async () => {
const server = Hapi.server({
port: PORT,
routes: {
cors: {
origin: ['*'],
credentials: true,
additionalHeaders: ['Cookie', 'X-CSRF-Token']
}
},
debug: {
log: ['error'],
request: ['error']
}
});
await server.register({
plugin: H2O2
});
routes.map(route => server.route(route));
await server.start();
// eslint-disable-next-line no-console
console.log(`server started at http://0.0.0.0:${server.info.port}`);
});

31
bundle/package.json Normal file
View File

@ -0,0 +1,31 @@
{
"name": "joyent-portal-bundle",
"version": "1.0.0",
"private": true,
"license": "MPL-2.0",
"scripts": {
"dev": "NODE_ENV=development PORT=4000 node index.js",
"build:test": "echo 0",
"build:lib": "echo 0",
"build:bundle": "echo 0",
"prepublish": "echo 0",
"test": "echo 0",
"test:ci": "echo 0"
},
"dependencies": {
"apr-main": "^4.0.3",
"cloudapi-gql": "^8.0.0",
"execa": "^0.10.0",
"graphi": "^5.7.0",
"h2o2": "^8.1.2",
"hapi": "^17.5.0",
"hapi-triton-auth": "^3.0.0",
"hapi-webconsole-nav": "^2.1.0",
"my-joy-images": "*",
"my-joy-instances": "*",
"my-joy-navigation": "*",
"my-joy-service-groups": "*",
"my-joy-templates": "*",
"tsg-graphql": "^1.0.0"
}
}

64
bundle/src/images.js Normal file
View File

@ -0,0 +1,64 @@
require('../.env.js');
const Main = require('apr-main');
const CloudApiGql = require('cloudapi-gql');
const Graphi = require('graphi');
const Url = require('url');
const Server = require('./server');
const Ui = require('my-joy-images');
const {
PORT = 4003,
BASE_URL = `http://0.0.0.0:${PORT}`,
PREFIX = 'images',
DC_NAME,
SDC_URL,
SDC_KEY_PATH,
SDC_ACCOUNT,
SDC_KEY_ID
} = process.env;
const dcName = DC_NAME || Url.parse(SDC_URL).host.split('.')[0];
const keyPath = SDC_KEY_PATH;
const keyId = `/${SDC_ACCOUNT}/keys/${SDC_KEY_ID}`;
const apiBaseUrl = SDC_URL;
Main(async () => {
const server = await Server({
PORT,
BASE_URL
});
await server.register([
{
plugin: Graphi,
options: {
graphqlPath: '/graphql',
graphiqlPath: '/graphiql',
authStrategy: 'sso'
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: CloudApiGql,
options: {
authStrategy: 'sso',
keyPath,
keyId,
apiBaseUrl,
dcName
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: Ui
}
]);
await server.start();
});

64
bundle/src/instances.js Normal file
View File

@ -0,0 +1,64 @@
require('../.env.js');
const Main = require('apr-main');
const CloudApiGql = require('cloudapi-gql');
const Graphi = require('graphi');
const Url = require('url');
const Server = require('./server');
const Ui = require('my-joy-instances');
const {
PORT = 4002,
BASE_URL = `http://0.0.0.0:${PORT}`,
PREFIX = 'instances',
DC_NAME,
SDC_URL,
SDC_KEY_PATH,
SDC_ACCOUNT,
SDC_KEY_ID
} = process.env;
const dcName = DC_NAME || Url.parse(SDC_URL).host.split('.')[0];
const keyPath = SDC_KEY_PATH;
const keyId = `/${SDC_ACCOUNT}/keys/${SDC_KEY_ID}`;
const apiBaseUrl = SDC_URL;
Main(async () => {
const server = await Server({
PORT,
BASE_URL
});
await server.register([
{
plugin: Graphi,
options: {
graphqlPath: '/graphql',
graphiqlPath: '/graphiql',
authStrategy: 'sso'
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: CloudApiGql,
options: {
authStrategy: 'sso',
keyPath,
keyId,
apiBaseUrl,
dcName
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: Ui
}
]);
await server.start();
});

72
bundle/src/navigation.js Normal file
View File

@ -0,0 +1,72 @@
require('../.env.js');
const Main = require('apr-main');
const Nav = require('hapi-webconsole-nav');
const Graphi = require('graphi');
const Url = require('url');
const Server = require('./server');
const Ui = require('my-joy-navigation');
const Regions = require('../data/regions');
const Categories = require('../data/categories');
const Account = require('../data/account');
const {
PORT = 4001,
BASE_URL = `http://0.0.0.0:${PORT}`,
PREFIX = 'navigation',
DC_NAME,
SDC_URL,
SDC_KEY_PATH,
SDC_ACCOUNT,
SDC_KEY_ID
} = process.env;
const dcName = DC_NAME || Url.parse(SDC_URL).host.split('.')[0];
const keyPath = SDC_KEY_PATH;
const keyId = `/${SDC_ACCOUNT}/keys/${SDC_KEY_ID}`;
const apiBaseUrl = SDC_URL;
const baseUrl = BASE_URL;
Main(async () => {
const server = await Server({
PORT,
BASE_URL
});
await server.register([
{
plugin: Graphi,
options: {
graphqlPath: '/graphql',
graphiqlPath: '/graphiql',
authStrategy: 'sso'
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: Nav,
options: {
keyPath,
keyId,
apiBaseUrl,
dcName,
baseUrl,
regions: Regions,
accountServices: Account,
categories: Categories
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: Ui
}
]);
await server.start();
});

84
bundle/src/server.js Normal file
View File

@ -0,0 +1,84 @@
require('../.env.js');
const Hapi = require('hapi');
const Sso = require('hapi-triton-auth');
const {
COOKIE_PASSWORD,
COOKIE_DOMAIN,
SDC_KEY_PATH,
SDC_ACCOUNT,
SDC_KEY_ID,
SDC_URL
} = process.env;
module.exports = async ({ PORT, BASE_URL }) => {
const keyPath = SDC_KEY_PATH;
const keyId = `/${SDC_ACCOUNT}/keys/${SDC_KEY_ID}`;
const apiBaseUrl = SDC_URL;
const ssoUrl = 'https://sso.joyent.com/login';
const baseUrl = BASE_URL;
const isDev = true;
const permissions = {
cloudapi: ['/my/*']
};
const cookie = {
password: COOKIE_PASSWORD,
domain: COOKIE_DOMAIN,
isSecure: false,
isHttpOnly: true,
ttl: 1000 * 60 * 60 // 1 hour
};
const server = Hapi.server({
port: PORT,
routes: {
cors: {
origin: ['*'],
credentials: true,
additionalHeaders: ['Cookie', 'X-CSRF-Token']
}
},
debug: {
log: ['error'],
request: ['error']
}
});
server.events.on('log', (event, tags) => {
if (tags.error) {
// eslint-disable-next-line no-console
console.log(event);
}
});
server.events.on('request', (request, event) => {
const { tags } = event;
if (tags.includes('error') && event.data && event.data.errors) {
event.data.errors.forEach(error => {
// eslint-disable-next-line no-console
console.log(error);
});
}
});
await server.register({
plugin: Sso,
options: {
keyPath,
keyId,
apiBaseUrl,
ssoUrl,
permissions,
baseUrl,
isDev,
cookie
}
});
server.auth.default('sso');
return server;
};

View File

@ -0,0 +1,78 @@
require('../.env.js');
const Main = require('apr-main');
const CloudApiGql = require('cloudapi-gql');
const Tsg = require('tsg-graphql');
const Graphi = require('graphi');
const Url = require('url');
const Server = require('./server');
const Ui = require('my-joy-service-groups');
const {
PORT = 4004,
BASE_URL = `http://0.0.0.0:${PORT}`,
PREFIX = 'service-groups',
DC_NAME,
TSG_URL = 'http://0.0.0.0:3000',
SDC_URL,
SDC_KEY_PATH,
SDC_ACCOUNT,
SDC_KEY_ID
} = process.env;
const dcName = DC_NAME || Url.parse(SDC_URL).host.split('.')[0];
const keyPath = SDC_KEY_PATH;
const keyId = `/${SDC_ACCOUNT}/keys/${SDC_KEY_ID}`;
Main(async () => {
const server = await Server({
PORT,
BASE_URL
});
await server.register([
{
plugin: Graphi,
options: {
graphqlPath: '/graphql',
graphiqlPath: '/graphiql',
authStrategy: 'sso'
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: Tsg,
options: {
authStrategy: 'sso',
keyPath,
keyId,
apiBaseUrl: TSG_URL,
dcName
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: CloudApiGql,
options: {
authStrategy: 'sso',
keyPath,
keyId,
apiBaseUrl: SDC_URL,
dcName
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: Ui
}
]);
await server.start();
});

78
bundle/src/templates.js Normal file
View File

@ -0,0 +1,78 @@
require('../.env.js');
const Main = require('apr-main');
const CloudApiGql = require('cloudapi-gql');
const Tsg = require('tsg-graphql');
const Graphi = require('graphi');
const Url = require('url');
const Server = require('./server');
const Ui = require('my-joy-templates');
const {
PORT = 4005,
BASE_URL = `http://0.0.0.0:${PORT}`,
PREFIX = 'templates',
DC_NAME,
TSG_URL = 'http://0.0.0.0:3000',
SDC_URL,
SDC_KEY_PATH,
SDC_ACCOUNT,
SDC_KEY_ID
} = process.env;
const dcName = DC_NAME || Url.parse(SDC_URL).host.split('.')[0];
const keyPath = SDC_KEY_PATH;
const keyId = `/${SDC_ACCOUNT}/keys/${SDC_KEY_ID}`;
Main(async () => {
const server = await Server({
PORT,
BASE_URL
});
await server.register([
{
plugin: Graphi,
options: {
graphqlPath: '/graphql',
graphiqlPath: '/graphiql',
authStrategy: 'sso'
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: Tsg,
options: {
authStrategy: 'sso',
keyPath,
keyId,
apiBaseUrl: TSG_URL,
dcName
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: CloudApiGql,
options: {
authStrategy: 'sso',
keyPath,
keyId,
apiBaseUrl: SDC_URL,
dcName
},
routes: {
prefix: `/${PREFIX}`
}
},
{
plugin: Ui
}
]);
await server.start();
});

View File

@ -1,51 +0,0 @@
## Customize the test machine
machine:
pre:
- git config --global user.email "circleci@joyent.zone"
- git config --global user.name "circlebot"
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
node:
version: 7.7.3
dependencies:
pre:
- sudo curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- yarn global add triton@4.15.0 || cat /home/ubuntu/.yarn-config/global/yarn-error.log
- echo '{"url":"https://eu-ams-1.api.joyent.com","account":"'$SDC_ACCOUNT'","keyId":"c3:30:35:9b:85:48:73:44:31:cc:4b:2e:6a:00:16:e2","name":"eu-ams-1","curr":true}' | triton profile create -f -
- triton env --docker eu-ams-1
- mkdir -p ${CIRCLE_TEST_REPORTS}/tap-xunit/
- echo -e "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
override:
- make && make install
# Install git-lfs - TODO: Move to make task
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
- sudo apt-get install git-lfs
- ssh git@github.com git-lfs-authenticate yldio/joyent-portal.git download
- git config credential.helper manager
- git lfs pull
test:
override:
- make -j2 lint-ci test-ci
deployment:
development:
branch: master
commands:
- ./bin/docker-login
- ./bin/on-changes-publish-ui
- make -j2 build
- make -j2 push
- ./bin/deploy
staging:
tag: /release.*/
commands:
- CIRCLE_BRANCH=staging ./bin/docker-login
- CIRCLE_BRANCH=staging ./bin/on-changes-publish-ui
- CIRCLE_BRANCH=staging make -j2 build
- CIRCLE_BRANCH=staging make -j2 push
- CIRCLE_BRANCH=staging ./bin/deploy

View File

@ -1,27 +0,0 @@
{
"extends": [
"eslint:recommended",
"prettier"
],
"plugins": [
"prettier"
],
"rules": {
"no-console": 0,
"prettier/prettier": ["error", {
"useTabs": false,
"printWidth": 80,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"parser": "flow",
"semi": true
}]
},
"env": {
"es6": true,
"node": true
}
}

View File

@ -1,50 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Vim files:
*.sw*
# Mac OS dirty files
.DS_Store

View File

@ -1 +0,0 @@
FROM quay.io/yldio/alpine-node-containerpilot:6.9.4-3

View File

@ -1,54 +0,0 @@
NAME := $(lastword $(subst /, ,$(CURDIR)))
bindir := $(shell yarn bin)
AVA := $(bindir)/ava
NYC := $(bindir)/nyc
.PHONY: install
install:
yarn install --prefer-offline
.PHONY: install-production
install-production:
yarn install --production --pure-lockfile --prefer-offline
.PHONY: clean
clean:
@rm -rf node_modules
.PHONY: test
test:
$(AVA) $(TEST_ARGS)
XUNIT_DIR := ${CIRCLE_TEST_REPORTS}/tap-xunit
XUNIT := $(bindir)/tap-xunit
XUNIT_OUTPUT := >> ${CIRCLE_TEST_REPORTS}/tap-xunit/xunit-$(NAME)
.PHONY: test-ci
test-ci:
mkdir -p $(XUNIT_DIR)
$(NYC) $(AVA) -t | $(XUNIT) $(XUNIT_OUTPUT).xml
.PHONY: start
start:
yarn run start
.PHONY: build
build:
docker build -t quay.io/yldio/joyent-dashboard-$(NAME):$(CIRCLE_BRANCH) .
.PHONY: push
push:
docker push quay.io/yldio/joyent-dashboard-$(NAME)
.PHONY: lint
lint:
$(bindir)/eslint .
.PHONY: lint-ci
lint-ci:
mkdir -p $(XUNIT_DIR)
-$(bindir)/eslint . --format tap | $(XUNIT) $(XUNIT_OUTPUT)-lint.xml
.PHONY: licence-check
licence-check:
../node_modules/.bin/license-to-fail ../licence.js

View File

@ -1,166 +0,0 @@
[![Docker Repository on Quay](https://quay.io/repository/yldio/joyent-dashboard-cloudapi-graphql/status?token=bddd694a-a913-4b66-b7bc-fb71992672c4 "Docker Repository on Quay")](https://quay.io/repository/yldio/joyent-dashboard-cloudapi-graphql)
# cloudapi-graphql
Proof-of-Concept of the [Joyent Cloud API](https://apidocs.joyent.com/cloudapi/) running on GraphQL.
## Setup
### Setup Credentials
Create `credentials.json`:
```json5
{
"url": "https://us-sw-1.api.joyentcloud.com",
"keyId": "", //public key fingerprint ex: 35:jh:42:56...
"account": "", // account ex: raoulmillais
"user": "" // sub-account ex: ramitos
}
```
Alternatively you can just use ENV variables:
```
SDC_URL
SDC_ACCOUNT
SDC_USER
SDC_KEY_ID
```
As a third option you can use a `.env` file.
### Install Dependencies and run
```bash
yarn install
yarn start
```
### Visit GraphiQL
Go-to http://0.0.0.0:4000/graphql to use the REPL with interactive documentation.
![GraphiQL](https://cloud.githubusercontent.com/assets/524382/19242455/1e371978-8f0b-11e6-9563-d6f5b93fa63c.png)
## API
- [x] Account
- [x] GetAccount
- [x] UpdateAccount
- [x] Keys
- [x] ListKeys
- [x] GetKey
- [x] CreateKey
- [x] DeleteKey
- [x] Users
- [x] ListUsers
- [x] GetUser
- [x] CreateUser
- [x] UpdateUser
- [ ] ChangeUserPassword
- [x] DeleteUser
- [x] Roles
- [x] ListRoles
- [x] GetRole
- [x] CreateRole
- [x] UpdateRole
- [x] DeleteRole
- [x] Role Tags
- [x] SetRoleTags
- [x] Policies
- [x] ListPolicies
- [x] GetPolicy
- [x] CreatePolicy
- [x] UpdatePolicy
- [x] DeletePolicy
- [x] User SSH Keys
- [x] ListUserKeys
- [x] GetUserKey
- [x] CreateUserKey
- [x] DeleteUserKey
- [ ] Config
- [ ] GetConfig
- [ ] UpdateConfig
- [x] Datacenters
- [x] ListDatacenters
- [x] GetDatacenter
- [x] Services
- [x] ListServices
- [x] Images
- [x] ListImages
- [x] GetImage
- [x] DeleteImage
- [x] ExportImage
- [x] CreateImageFromMachine
- [ ] UpdateImage
- [x] Packages
- [x] ListPackages
- [x] GetPackage
- [x] Instances
- [x] ListMachines
- [x] GetMachine
- [x] CreateMachine
- [x] StopMachine
- [x] StartMachine
- [x] RebootMachine
- [ ] ResizeMachine
- [ ] RenameMachine
- [x] EnableMachineFirewall
- [x] DisableMachineFirewall
- [x] CreateMachineSnapshot
- [x] StartMachineFromSnapshot
- [x] ListMachineSnapshots
- [x] GetMachineSnapshot
- [x] DeleteMachineSnapshot
- [ ] UpdateMachineMetadata
- [ ] ListMachineMetadata
- [ ] GetMachineMetadata
- [ ] DeleteMachineMetadata
- [ ] DeleteAllMachineMetadata
- [x] AddMachineTags
- [x] ReplaceMachineTags
- [ ] ListMachineTags
- [x] GetMachineTag
- [x] DeleteMachineTag
- [x] DeleteMachineTags
- [x] DeleteMachine
- [x] MachineAudit
- [ ] Analytics
- [ ] DescribeAnalytics
- [ ] ListInstrumentations
- [ ] GetInstrumentation
- [ ] GetInstrumentationValue
- [ ] GetInstrumentationHeatmap
- [ ] GetInstrumentationHeatmapDetails
- [ ] CreateInstrumentation
- [ ] DeleteInstrumentation
- [x] FirewallRules
- [x] Firewall Rule Syntax
- [x] ListFirewallRules
- [x] GetFirewallRule
- [x] CreateFirewallRule
- [x] UpdateFirewallRule
- [x] EnableFirewallRule
- [x] DisableFirewallRule
- [x] DeleteFirewallRule
- [x] ListMachineFirewallRules
- [x] ListFirewallRuleMachines
- [ ] Fabrics
- [ ] ListFabricVLANs
- [ ] CreateFabricVLAN
- [ ] GetFabricVLAN
- [ ] UpdateFabricVLAN
- [ ] DeleteFabricVLAN
- [ ] ListFabricNetworks
- [ ] CreateFabricNetwork
- [ ] GetFabricNetwork
- [ ] DeleteFabricNetwork
- [x] Networks
- [x] ListNetworks
- [x] GetNetwork
- [ ] Nics
- [ ] ListNics
- [ ] GetNic
- [ ] AddNic
- [ ] RemoveNic

View File

@ -1,38 +0,0 @@
{
"consul": "{{ .CONSUL }}:8500",
"services": [{
"name": "joyent-portal-cloudapi-graphql",
"port": 4000,
"health": "/usr/bin/curl -o /dev/null --fail -s http://localhost:4000/graphql",
"poll": 3,
"ttl": 10
}],
"telemetry": {
"port": 9090,
"sensors": [{
"name": "graphql_memory_percent",
"help": "percentage of memory used",
"type": "gauge",
"poll": 5,
"check": ["/bin/sensors", "memory"]
}, {
"name": "graphql_cpu_load",
"help": "cpu load",
"type": "gauge",
"poll": 5,
"check": ["/bin/sensors", "cpu"]
}, {
"name": "graphql_disk_capacity",
"help": "disk capacity",
"type": "gauge",
"poll": 60,
"check": ["/bin/sensors", "diskcapacity"]
}, {
"name": "graphql_disk_usage",
"help": "disk usage",
"type": "gauge",
"poll": 60,
"check": ["/bin/sensors", "diskusage"]
}]
}
}

View File

@ -1,31 +0,0 @@
{
"name": "cloudapi-graphql",
"private": true,
"license": "MPL-2.0",
"version": "1.0.0",
"main": "src/index.js",
"scripts": {
"lint": "eslint src --fix",
"start": "node src/index.js",
"test": "make test"
},
"dependencies": {
"bunyan": "^1.8.10",
"dotenv": "^4.0.0",
"express": "^4.15.2",
"express-graphql": "^0.6.4",
"got": "^6.7.1",
"graphql": "^0.9.3",
"smartdc-auth": "^2.5.2",
"triton": "^5.2.0"
},
"devDependencies": {
"ava": "^0.19.1",
"eslint": "^3.19.0",
"eslint-config-prettier": "^1.7.0",
"eslint-plugin-prettier": "^2.0.1",
"nyc": "^10.2.0",
"prettier": "^1.2.2",
"tap-xunit": "^1.7.0"
}
}

View File

@ -1,9 +0,0 @@
const request = require('./request');
module.exports.get = () => {
return request('getAccount');
};
module.exports.update = ctx => {
return request('updateAccount', ctx);
};

View File

@ -1,5 +0,0 @@
// const request = require('./request');
module.exports.get = () => {
// return request('', ctx);
};

View File

@ -1,5 +0,0 @@
const request = require('./request');
module.exports = () => {
return request('listDatacenters');
};

View File

@ -1,9 +0,0 @@
const request = require('./request');
module.exports.list = () => {
return request('listFirewallRules', {});
};
module.exports.get = ctx => {
return request('getFirewallRule', ctx);
};

View File

@ -1,37 +0,0 @@
const request = require('./request');
module.exports.list = () => {
return request('listFirewallRules', {});
};
module.exports.listByMachine = ctx => {
return request('listMachineFirewallRules', ctx);
};
module.exports.listMachines = ctx => {
return request('listFirewallRuleMachines', ctx);
};
module.exports.get = ctx => {
return request('getFirewallRule', ctx);
};
module.exports.create = ctx => {
return request('createFirewallRule', ctx);
};
module.exports.update = ctx => {
return request('updateFirewallRule', ctx);
};
module.exports.enable = ctx => {
return request('enableFirewallRule', ctx);
};
module.exports.disable = ctx => {
return request('disableFirewallRule', ctx);
};
module.exports.destroy = ctx => {
return request('deleteFirewallRule', ctx);
};

View File

@ -1,25 +0,0 @@
const request = require('./request');
module.exports.list = ctx => {
return request('listImages', ctx);
};
module.exports.get = ctx => {
return request('getImage', ctx);
};
module.exports.create = ctx => {
return request('createImageFromMachine', ctx);
};
// module.exports.update = (ctx) => {
// return request('UpdateImage', ctx);
// };
module.exports.destroy = uuid => {
return request('deleteImage', uuid);
};
// module.exports.xport = (uuid) => {
// return request('deleteImage', uuid);
// };

View File

@ -1,16 +0,0 @@
module.exports = {
account: require('./account'),
users: require('./users'),
policies: require('./policies'),
roles: require('./roles'),
keys: require('./keys'),
datacenters: require('./datacenters'),
services: require('./services'),
images: require('./images'),
packages: require('./packages'),
machines: require('./machines'),
firewallRules: require('./firewall-rules'),
// fabrics: require('./fabrics'),
networks: require('./networks'),
nics: require('./nics')
};

View File

@ -1,35 +0,0 @@
const request = require('./request');
module.exports = {
user: {
list: ctx => {
return request('listUserKeys', ctx);
},
get: ctx => {
return request('getUserKey', ctx);
},
create: ctx => {
return request('createUserKey', ctx);
},
destroy: ctx => {
return request('deleteUserKey', ctx);
}
},
account: {
list: () => {
return request('listKeys', {});
},
get: ctx => {
return request('getKey', ctx);
},
create: ctx => {
return request('createKey', ctx);
},
destroy: ctx => {
return request('deleteKey', ctx);
}
}
};

View File

@ -1,108 +0,0 @@
const request = require('./request');
const snapshots = {
list: ctx => {
return request('listMachineSnapshots', ctx);
},
get: ctx => {
return request('getMachineSnapshot', ctx);
},
create: ctx => {
return request('createMachineSnapshot', ctx);
},
destroy: ctx => {
return request('deleteMachineSnapshot', ctx);
}
};
const metadata = {
list: ctx => {
return request('', ctx);
},
get: ctx => {
return request('', ctx);
},
update: ctx => {
return request('', ctx);
},
destroy: ctx => {
return request('', ctx);
}
};
const firewall = {
enable: ctx => {
return request('enableMachineFirewall', ctx);
},
disable: ctx => {
return request('disableMachineFirewall', ctx);
}
};
const tags = {
list: ctx => {
return request('listMachineTags', ctx);
},
get: ctx => {
return request('getMachineTag', ctx);
},
add: ctx => {
return request('addMachineTags', ctx);
},
replace: ctx => {
return request('replaceMachineTags', ctx);
},
destroy: ctx => {
const method = ctx.tag ? 'deleteMachineTag' : 'deleteMachineTags';
return request(method, ctx);
}
};
module.exports.list = ctx => {
return request('listMachines', ctx);
};
module.exports.get = ctx => {
return request('getMachine', ctx);
};
module.exports.create = ctx => {
return request('createMachine', ctx);
};
module.exports.stop = ctx => {
return request('stopMachine', ctx);
};
module.exports.start = uuid => {
return request('startMachine', uuid);
};
module.exports.startFromSnapshot = ctx => {
return request('startMachineFromSnapshot', ctx);
};
module.exports.reboot = ctx => {
return request('rebootMachine', ctx);
};
module.exports.resize = ctx => {
return request('', ctx);
};
module.exports.rename = ctx => {
return request('', ctx);
};
module.exports.destroy = ctx => {
return request('deleteMachine', ctx);
};
module.exports.audit = ctx => {
return request('machineAudit', ctx);
};
module.exports.snapshots = snapshots;
module.exports.metadata = metadata;
module.exports.firewall = firewall;
module.exports.tags = tags;

View File

@ -1,9 +0,0 @@
const request = require('./request');
module.exports.list = () => {
return request('listNetworks');
};
module.exports.get = ctx => {
return request('getNetwork', ctx);
};

View File

@ -1,9 +0,0 @@
const request = require('./request');
module.exports.list = () => {
return request('listNics');
};
module.exports.get = ctx => {
return request('getNic', ctx);
};

View File

@ -1,9 +0,0 @@
const request = require('./request');
module.exports.list = ctx => {
return request('listPackages', ctx);
};
module.exports.get = ctx => {
return request('getPackage', ctx);
};

View File

@ -1,21 +0,0 @@
const request = require('./request');
module.exports.list = () => {
return request('listPolicies');
};
module.exports.get = ctx => {
return request('getPolicy', ctx);
};
module.exports.create = ctx => {
return request('createPolicy', ctx);
};
module.exports.update = ctx => {
return request('updatePolicy', ctx);
};
module.exports.destroy = ctx => {
return request('deletePolicy', ctx);
};

View File

@ -1,40 +0,0 @@
const credentials = require('../credentials');
const auth = require('smartdc-auth');
const cloudapi = require('triton/lib/cloudapi2');
const bunyan = require('bunyan');
const pkg = require('../../package.json');
var log = bunyan.createLogger({
name: pkg.name
});
var client = cloudapi.createClient({
log: log,
url: credentials.url,
account: credentials.account,
user: credentials.user,
sign: auth.cliSigner({
log: log,
keyId: credentials.keyId,
user: credentials.account,
subuser: credentials.user
})
});
module.exports = (method, args) => {
return new Promise((resolve, reject) => {
const fn = client[method].bind(client);
const cb = (err, res) => {
if (err) {
return reject(err);
}
resolve(res);
};
return args ? fn(args, cb) : fn(cb);
});
};
module.exports.client = client;

View File

@ -1,31 +0,0 @@
const request = require('./request');
module.exports.list = () => {
return request('listRoles');
};
module.exports.get = ctx => {
return request('getRole', ctx);
};
module.exports.create = ctx => {
return request('createRole', ctx);
};
module.exports.set = ctx => {
const id = ctx.id ? `/${ctx.id}` : '';
const resource = `/${request.client.account}/${ctx.resource}${id}`;
return request('setRoleTags', {
roleTags: ctx.role,
resource
});
};
module.exports.update = ctx => {
return request('updateRole', ctx);
};
module.exports.destroy = ctx => {
return request('deleteRole', ctx);
};

View File

@ -1,5 +0,0 @@
const request = require('./request');
module.exports = () => {
return request('listServices');
};

View File

@ -1,21 +0,0 @@
const request = require('./request');
module.exports.list = () => {
return request('listUsers');
};
module.exports.get = ctx => {
return request('getUser', ctx);
};
module.exports.create = ctx => {
return request('createUser', ctx);
};
module.exports.destroy = ctx => {
return request('deleteUser', ctx);
};
module.exports.update = ctx => {
return request('updateUser', ctx);
};

View File

@ -1,27 +0,0 @@
const json = (() => {
try {
const res = require('dotenv').config({
path: '../.env',
silent: true
});
if (res.error) {
throw res.error;
}
} catch (err) {
try {
return require('../credentials.json');
} catch (err) {
return {};
}
}
return {};
})();
module.exports = {
url: process.env.SDC_URL || json.SDC_URL || json.url || '',
account: process.env.SDC_ACCOUNT || json.SDC_ACCOUNT || json.account || '',
user: process.env.SDC_USER || json.SDC_USER || json.user || '',
keyId: process.env.SDC_KEY_ID || json.SDC_KEY_ID || json.keyId || ''
};

View File

@ -1,8 +0,0 @@
const graphqlHTTP = require('express-graphql');
const schema = require('./schema');
module.exports = graphqlHTTP(() => ({
schema: schema,
graphiql: true,
pretty: true
}));

View File

@ -1,14 +0,0 @@
const express = require('express');
const app = express();
app.use('/graphql', require('./endpoint'));
const server = app.listen(4000, err => {
if (err) {
console.error(err);
throw err;
}
console.log(`Listening at http://0.0.0.0:${server.address().port}/graphql`);
});

View File

@ -1,10 +0,0 @@
const graphql = require('graphql');
const mutation = require('./mutations');
const query = require('./queries');
const { GraphQLSchema } = graphql;
module.exports = new GraphQLSchema({
query,
mutation
});

View File

@ -1,56 +0,0 @@
const AccountType = require('../types/login');
const api = require('../../api');
const { GraphQLBoolean, GraphQLString } = require('graphql');
module.exports.updateAccount = {
type: AccountType,
description: 'Update your account details',
args: {
email: {
type: GraphQLString
},
company_name: {
type: GraphQLString
},
first_name: {
type: GraphQLString
},
last_name: {
type: GraphQLString
},
address: {
type: GraphQLString
},
postal_code: {
type: GraphQLString
},
city: {
type: GraphQLString
},
state: {
type: GraphQLString
},
country: {
type: GraphQLString
},
phone: {
type: GraphQLString
},
cns_enabled: {
type: GraphQLBoolean
}
},
resolve: (root, args) => {
return api.account.get().then(account => {
return api.account.update(
Object.assign(account, args, {
firstName: args.first_name || account.firstName,
lastName: args.first_name || account.lastName,
companyName: args.company_name || account.companyName,
postalCode: args.postal_code || account.postalCode
})
);
});
}
};

View File

@ -1,98 +0,0 @@
const FirewallRuleType = require('../types/firewall-rule');
const api = require('../../api');
const { GraphQLID, GraphQLBoolean, GraphQLString } = require('graphql');
module.exports.createFirewallRule = {
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",
args: {
enabled: {
type: GraphQLBoolean,
description: 'Indicates if the rule is enabled (optional, false by default)'
},
rule: {
type: GraphQLString,
description: 'Firewall rule text'
},
description: {
type: GraphQLString,
description: 'Human-readable description for the rule (optional)'
}
},
resolve: (root, args) => {
return api.firewallRules.create({
rule: args.rule,
description: args.description,
enabled: !!args.enabled
});
}
};
module.exports.updateFirewallRule = {
type: FirewallRuleType,
description: 'Updates the given rule record and -- depending on rule contents -- adds/removes/updates the rule on all the required instances',
args: {
id: {
type: GraphQLID,
description: 'Firewall rule id'
},
enabled: {
type: GraphQLBoolean,
description: 'Indicates if the rule is enabled (optional, false by default)'
},
rule: {
type: GraphQLString,
description: 'Firewall rule text'
},
description: {
type: GraphQLString,
description: 'Human-readable description for the rule (optional)'
}
},
resolve: (root, args) => {
return api.firewallRules.update(args);
}
};
module.exports.enableFirewallRule = {
type: FirewallRuleType,
description: 'Enables the given firewall rule if it is disabled',
args: {
id: {
type: GraphQLID,
description: 'Firewall rule id'
}
},
resolve: (root, args) => {
return api.firewallRules.enable(args);
}
};
module.exports.disableFirewallRule = {
type: FirewallRuleType,
description: 'Disables the given firewall rule if it is enabled',
args: {
id: {
type: GraphQLID,
description: 'Firewall rule id'
}
},
resolve: (root, args) => {
return api.firewallRules.disable(args);
}
};
module.exports.deleteFirewallRule = {
type: FirewallRuleType,
description: 'Removes the given firewall rule from all the required instances',
args: {
id: {
type: GraphQLID,
description: 'Firewall rule id'
}
},
resolve: (root, args) => {
return api.firewallRules.destroy(args);
}
};

View File

@ -1,54 +0,0 @@
const AccountType = require('../types/login');
const DynamicObjectType = require('../types/dynamic-object');
const api = require('../../api');
const {
GraphQLString,
GraphQLList,
GraphQLNonNull,
GraphQLID
} = require('graphql');
module.exports.createImage = {
type: AccountType,
description: 'Create a new custom image from an instance',
args: {
machine: {
type: new GraphQLNonNull(GraphQLID),
description: 'The prepared and stopped instance UUID from which the image is to be created'
},
name: {
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'
},
version: {
type: new GraphQLNonNull(GraphQLString),
description: 'The version of the custom image, e.g. "1.0.0". Maximum 128 characters'
},
description: {
type: GraphQLString,
description: 'A short prose description of this image. Maximum 512 characters'
},
homepage: {
type: GraphQLString,
description: 'Homepage URL where users can find more information about the image. Maximum 128 characters'
},
eula: {
type: GraphQLString,
description: 'URL of the End User License Agreement (EULA) for the image. Maximum 128 characters'
},
acl: {
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'
},
tags: {
type: DynamicObjectType,
description: 'An object of key/value pairs that allows clients to categorize images by any given criteria'
}
},
resolve: (root, args) => {
const { create } = api.images;
return create(args);
}
};

View File

@ -1,16 +0,0 @@
const { GraphQLObjectType } = require('graphql');
module.exports = new GraphQLObjectType({
name: 'RootMutationType',
fields: Object.assign(
require('./account'),
require('./keys'),
require('./users'),
require('./roles'),
require('./policies'),
require('./machines'),
require('./images'),
require('./firewall-rules'),
require('./snapshots')
)
});

View File

@ -1,49 +0,0 @@
const KeyType = require('../types/key');
const api = require('../../api');
const { GraphQLNonNull, GraphQLString, GraphQLID } = require('graphql');
module.exports.createKey = {
type: KeyType,
description: 'Uploads a new OpenSSH key to Triton for use in HTTP signing and SSH',
args: {
name: {
type: new GraphQLNonNull(GraphQLString)
},
key: {
type: new GraphQLNonNull(GraphQLString)
},
userId: {
type: GraphQLID,
description: 'UserId to add this key to. Leaving this in blank will add the key to the account'
}
},
resolve: (root, args) => {
const _api = args.userId ? api.keys.user : api.keys.account;
return _api.create(args);
}
};
module.exports.deleteKey = {
type: GraphQLID,
description: 'Deletes a single SSH key, by name or fingerprint',
args: {
name: {
type: GraphQLString
},
fingerprint: {
type: GraphQLString
},
userId: {
type: GraphQLID,
description: 'UserId who this key belongs to. Leaving this in blank will delete an account key'
}
},
resolve: (root, args) => {
const _api = args.userId ? api.keys.user : api.keys.account;
return _api.destroy(args).then(() => {
return args.name || args.fingerprint;
});
}
};

View File

@ -1,320 +0,0 @@
const MachineType = require('../types/machine');
const DynamicObjectType = require('../types/dynamic-object');
const api = require('../../api');
const {
GraphQLNonNull,
GraphQLString,
GraphQLBoolean,
GraphQLID,
GraphQLList
} = require('graphql');
module.exports.createMachine = {
type: MachineType,
description: 'Allows you to provision an instance',
args: {
name: {
type: GraphQLString,
description: 'Friendly name for this instance; default is the first 8 characters of the machine id'
},
package: {
type: new GraphQLNonNull(GraphQLString),
description: 'Id of the package to use on provisioning, obtained from ListPackages'
},
image: {
type: new GraphQLNonNull(GraphQLString),
description: 'The image UUID (from images { id })'
},
networks: {
type: new GraphQLList(GraphQLString),
description: 'Desired networks ids (from networks { id })'
},
locality: {
type: MachineType.locality,
description: 'Optionally specify which instances the new instance should be near or far from'
},
metadata: {
type: DynamicObjectType,
description: 'An arbitrary set of metadata key/value pairs can be set at provision time'
},
tags: {
type: DynamicObjectType,
description: 'An arbitrary set of tags can be set at provision time'
},
firewall_enabled: {
type: GraphQLBoolean,
description: 'Completely enable or disable firewall for this instance. Default is false'
}
},
resolve: (root, args) => {
const resolveNames = (obj = {}, namespace) => {
return Object.keys(obj).reduce((all, name) => {
return Object.assign(all, {
[`${namespace}.${name}`]: obj[name]
});
}, {});
};
const tags = resolveNames(args.tags, 'tag');
const metadata = resolveNames(args.tags, 'metadata');
const machine = Object.assign(
{
name: args.name,
package: args['package'],
image: args.image,
networks: args.networks,
locality: args.locality,
firewall_enabled: args.firewall_enabled
},
tags,
metadata
);
return api.machines.create(machine);
}
};
module.exports.startMachine = {
type: MachineType,
description: 'Allows you to boot up an instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
}
},
resolve: (root, args) => {
return api.machines.start(args.id).then(machine => {
if (machine) {
return machine;
}
return api.machines.get(args);
});
}
};
module.exports.startMachineFromSnapshot = {
type: MachineType,
description: 'If an instance is in the "stopped" state, you can choose to start the instance from the referenced snapshot',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
},
name: {
type: new GraphQLNonNull(GraphQLID),
description: 'The snapshot id'
}
},
resolve: (root, args) => {
return api.machines.startFromSnapshot(args).then(machine => {
if (machine) {
return machine;
}
return api.machines.get(args);
});
}
};
module.exports.stopMachine = {
type: MachineType,
description: 'Allows you to shut down an instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
}
},
resolve: (root, args) => {
return api.machines.stop(args.id).then(machine => {
if (machine) {
return machine;
}
return api.machines.get(args);
});
}
};
module.exports.rebootMachine = {
type: MachineType,
description: 'Allows you to reboot an instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
}
},
resolve: (root, args) => {
return api.machines.reboot(args.id).then(machine => {
if (machine) {
return machine;
}
return api.machines.get(args);
});
}
};
module.exports.deleteMachine = {
type: DynamicObjectType,
description: 'Allows you to completely destroy an instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
}
},
resolve: (root, args) => {
return api.machines.destroy(args.id);
}
};
module.exports.auditMachine = {
type: new GraphQLList(DynamicObjectType),
description: "Provides a list of an instance's accomplished actions. Results are sorted from newest to oldest action",
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
}
},
resolve: (root, args) => {
return api.machines.destroy(args.id);
}
};
module.exports.setMachineFirewall = {
type: MachineType,
description: 'Allows you to set the firewall state for an instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
},
enabled: {
type: new GraphQLNonNull(GraphQLBoolean)
}
},
resolve: (root, args) => {
const { firewall } = api.machines;
const fn = args.enabled ? firewall.enable : firewall.disable;
return fn(args.id).then(machine => {
if (machine) {
return machine;
}
return api.machines.get(args);
});
}
};
module.exports.enableMachineFirewall = {
type: MachineType,
description: 'Allows you to enable the firewall for an instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
}
},
resolve: (root, args) => {
const { firewall } = api.machines;
return firewall.enable(args.id).then(machine => {
if (machine) {
return machine;
}
return api.machines.get(args);
});
}
};
module.exports.disableMachineFirewall = {
type: MachineType,
description: 'Allows you to completely disable the firewall of an instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
}
},
resolve: (root, args) => {
const { firewall } = api.machines;
return firewall.disable(args.id).then(machine => {
if (machine) {
return machine;
}
return api.machines.get(args);
});
}
};
module.exports.addMachineTags = {
type: DynamicObjectType,
description: 'Set tags on the given instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
},
tags: {
type: new GraphQLNonNull(DynamicObjectType),
description: 'Tag name/value pairs'
}
},
resolve: (root, args) => {
const { tags } = api.machines;
return tags.add(args);
}
};
module.exports.replaceMachineTags = {
type: DynamicObjectType,
description: 'Fully replace all tags on an instance with the given tags',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
},
tags: {
type: new GraphQLNonNull(DynamicObjectType),
description: 'Tag name/value pairs'
}
},
resolve: (root, args) => {
const { tags } = api.machines;
return tags.replace(args);
}
};
module.exports.deleteMachineTags = {
type: DynamicObjectType,
description: 'Deletes tags from an instance',
args: {
id: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
},
tag: {
type: GraphQLString,
description: 'Tag name to remove. If value is not supplied, all machine tags are removed'
}
},
resolve: (root, args) => {
const { tags } = api.machines;
return tags.destroy(args);
}
};

View File

@ -1,71 +0,0 @@
const PolicyType = require('../types/policy');
const api = require('../../api');
const {
GraphQLNonNull,
GraphQLString,
GraphQLID,
GraphQLList
} = require('graphql');
module.exports.createPolicy = {
type: PolicyType,
description: 'Creates a new account policy',
args: {
name: {
type: new GraphQLNonNull(GraphQLString),
description: 'The policy name'
},
rules: {
type: new GraphQLNonNull(new GraphQLList(GraphQLString)),
description: 'One or more Aperture sentences to be added to the current policy'
},
description: {
type: GraphQLString,
description: 'A description for this policy (Optional)'
}
},
resolve: (root, args) => {
return api.policies.create(args);
}
};
module.exports.updatePolicy = {
type: PolicyType,
description: 'Upgrades an existing account policy. Everything but id can be modified',
args: {
id: {
type: new GraphQLNonNull(GraphQLID)
},
name: {
type: new GraphQLNonNull(GraphQLString),
description: 'The policy name'
},
rules: {
type: new GraphQLNonNull(new GraphQLList(GraphQLString)),
description: 'One or more Aperture sentences to be added to the current policy'
},
description: {
type: GraphQLString,
description: 'A description for this policy (Optional)'
}
},
resolve: (root, args) => {
return api.policies.update(args);
}
};
module.exports.deletePolicy = {
type: GraphQLID,
description: 'Delete an RBAC policy',
args: {
id: {
type: new GraphQLNonNull(GraphQLID)
}
},
resolve: (root, args) => {
return api.policies.destroy(args).then(() => {
return args.id;
});
}
};

View File

@ -1,103 +0,0 @@
const RoleType = require('../types/role');
const api = require('../../api');
const {
GraphQLNonNull,
GraphQLString,
GraphQLID,
GraphQLList
} = require('graphql');
module.exports.createRole = {
type: RoleType,
description: 'Create a new role for your account',
args: {
name: {
type: new GraphQLNonNull(GraphQLString),
description: "The role's name"
},
policies: {
type: new GraphQLList(GraphQLString),
description: "This account's policies to be given to this role (Optional)"
},
members: {
type: new GraphQLList(GraphQLString),
description: "This account's user logins to be added to this role (Optional)"
},
default_members: {
type: new GraphQLList(GraphQLString),
description: "This account's user logins to be added to this role and have it enabled by default (Optional)"
}
},
resolve: (root, args) => {
return api.roles.create(args);
}
};
module.exports.updateRole = {
type: RoleType,
description: 'Modifies an account role. Anything but id can be modified',
args: {
id: {
type: new GraphQLNonNull(GraphQLID)
},
name: {
type: GraphQLString,
description: "The role's name"
},
policies: {
type: new GraphQLList(GraphQLString),
description: "This account's policies to be given to this role (Optional)"
},
members: {
type: new GraphQLList(GraphQLString),
description: "This account's user logins to be added to this role (Optional)"
},
default_members: {
type: new GraphQLList(GraphQLString),
description: "This account's user logins to be added to this role and have it enabled by default (Optional)"
}
},
resolve: (root, args) => {
return api.roles.update(args);
}
};
module.exports.deleteRole = {
type: GraphQLID,
description: 'Remove a role',
args: {
id: {
type: new GraphQLNonNull(GraphQLID)
}
},
resolve: (root, args) => {
return api.roles.destroy(args).then(() => {
return args.id;
});
}
};
module.exports.setRoleTags = {
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.",
args: {
resource: {
type: new GraphQLNonNull(GraphQLString),
description: 'The resource type e.g. `machines`, `policies`...'
},
id: {
type: GraphQLID,
description: 'The resource id'
},
role: {
type: new GraphQLNonNull(new GraphQLList(GraphQLString)),
description: 'The list role-tags to be added to this resource'
}
},
resolve: (root, args) => {
const { set } = api.roles;
return set(args);
}
};

View File

@ -1,60 +0,0 @@
const SnapshotType = require('../types/snapshot');
const api = require('../../api');
const { GraphQLNonNull, GraphQLString, GraphQLID } = require('graphql');
module.exports.createSnapshot = {
type: SnapshotType,
description: 'Allows you to take a snapshot of a machine instance',
args: {
machine: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
},
name: {
type: GraphQLString,
description: 'The name to assign to the new snapshot'
}
},
resolve: (root, args) => {
const { snapshot: { create, get } } = api.machines;
const newArgs = {
id: args.machine,
name: args.name
};
return create(newArgs).then(snapshot => {
if (snapshot) {
return snapshot;
}
return get(newArgs);
});
}
};
module.exports.deleteSnapshot = {
type: GraphQLID,
description: 'Deletes the specified snapshot of an instance',
args: {
machine: {
type: new GraphQLNonNull(GraphQLID),
description: 'The machine id'
},
name: {
type: GraphQLString,
description: 'The name to assign to the new snapshot'
}
},
resolve: (root, args) => {
const { snapshot: { destroy } } = api.machines;
const newArgs = {
id: args.machine,
name: args.name
};
return destroy(newArgs).then(() => args.name);
}
};

View File

@ -1,144 +0,0 @@
const UserType = require('../types/login');
const api = require('../../api');
const { GraphQLNonNull, GraphQLString, GraphQLID } = require('graphql');
module.exports.createUser = {
type: UserType,
description: 'Creates a new user under an account',
args: {
login: {
type: new GraphQLNonNull(GraphQLString)
},
email: {
type: new GraphQLNonNull(GraphQLString)
},
password: {
type: new GraphQLNonNull(GraphQLString)
},
company_name: {
type: GraphQLString
},
first_name: {
type: GraphQLString
},
last_name: {
type: GraphQLString
},
address: {
type: GraphQLString
},
postal_code: {
type: GraphQLString
},
city: {
type: GraphQLString
},
state: {
type: GraphQLString
},
country: {
type: GraphQLString
},
phone: {
type: GraphQLString
}
},
resolve: (root, args) => {
return api.users.create(
Object.assign(args, {
firstName: args.first_name,
lastName: args.first_name,
companyName: args.company_name,
postalCode: args.postal_code
})
);
}
};
module.exports.deleteUser = {
type: GraphQLID,
description: 'Remove a user',
args: {
id: {
type: new GraphQLNonNull(GraphQLID)
}
},
resolve: (root, args) => {
return api.users.destroy(args).then(() => {
return args.id;
});
}
};
module.exports.updateUser = {
type: UserType,
description: "Update a user's modifiable properties",
args: {
id: {
type: new GraphQLNonNull(GraphQLID)
},
login: {
type: GraphQLString
},
email: {
type: GraphQLString
},
company_name: {
type: GraphQLString
},
first_name: {
type: GraphQLString
},
last_name: {
type: GraphQLString
},
address: {
type: GraphQLString
},
postal_code: {
type: GraphQLString
},
city: {
type: GraphQLString
},
state: {
type: GraphQLString
},
country: {
type: GraphQLString
},
phone: {
type: GraphQLString
}
},
resolve: (root, args) => {
return api.users.update(
Object.assign(args, {
firstName: args.first_name,
lastName: args.first_name,
companyName: args.company_name,
postalCode: args.postal_code
})
);
}
};
// module.exports.changeUserPassword = {
// type: UserType,
// description: 'This is a separate rule for password changes, so different policies can be used for an user trying to modify other data, or only their own password',
// args: {
// id: {
// type: new GraphQLNonNull(GraphQLID)
// },
// password: {
// type: GraphQLString
// },
// password_confirmation: {
// type: GraphQLString
// }
// },
// resolve: (root, args) => {
// return api.users.updatePassword(args);
// }
// };

View File

@ -1,13 +0,0 @@
const AccountType = require('../types/login');
const api = require('../../api');
module.exports = {
type: AccountType,
resolve() {
return api.account.get().then(account => {
return Object.assign(account, {
isUser: false
});
});
}
};

View File

@ -1,19 +0,0 @@
const DatacenterType = require('../types/datacenter');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList } = graphql;
module.exports = {
type: new GraphQLList(DatacenterType),
resolve() {
return api.datacenters().then(datacenters => {
return Object.keys(datacenters).map(name => {
return {
url: datacenters[name],
name
};
});
});
}
};

View File

@ -1,12 +0,0 @@
const FabricType = require('../types/fabrics');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList } = graphql;
module.exports = {
type: new GraphQLList(FabricType),
resolve() {
return api.fabrics.list();
}
};

View File

@ -1,20 +0,0 @@
const FirewallRuleType = require('../types/firewall-rule');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList, GraphQLID } = graphql;
module.exports = {
type: new GraphQLList(FirewallRuleType),
args: {
id: {
type: GraphQLID,
description: 'Filter on id'
}
},
resolve(root, args) {
const { list, get } = api.firewallRules;
return !args.id ? list() : get(args.id).then(rule => [rule]);
}
};

View File

@ -1,52 +0,0 @@
const ImageType = require('../types/image');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList, GraphQLBoolean, GraphQLString, GraphQLID } = graphql;
module.exports = {
type: new GraphQLList(ImageType),
args: {
id: {
type: GraphQLID,
description: 'Filter on id'
},
name: {
type: GraphQLString,
description: 'Filter on "friendly" name'
},
os: {
type: GraphQLString,
description: 'Filter on the underlying operating system'
},
version: {
type: GraphQLString,
description: 'Filter on the version'
},
public: {
type: GraphQLBoolean,
description: 'Filter public/private images'
},
state: {
type: GraphQLString,
description: 'Filter on image state. By default only active images are shown. Use "all" to list all images'
},
owner: {
type: GraphQLString,
description: 'Filter on owner UUID'
},
type: {
type: GraphQLString,
description: 'Filter on image type'
}
},
resolve(root, args) {
const { list, get } = api.images;
return args.id
? get({
id: args.id
}).then(img => [img])
: list(args);
}
};

View File

@ -1,20 +0,0 @@
const { GraphQLObjectType } = require('graphql');
module.exports = new GraphQLObjectType({
name: 'RootQueryType',
fields: {
account: require('./account'),
users: require('./users'),
policies: require('./policies'),
roles: require('./roles'),
datacenters: require('./datacenters'),
services: require('./services'),
images: require('./images'),
packages: require('./packages'),
machines: require('./machines'),
firewallRules: require('./firewall-rules'),
// fabrics: require('./fabrics')
networks: require('./networks')
// nics: require('./nics')
}
});

View File

@ -1,74 +0,0 @@
const MachineType = require('../types/machine');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLInt, GraphQLList, GraphQLString, GraphQLID } = graphql;
module.exports = {
type: new GraphQLList(MachineType),
args: {
id: {
type: GraphQLID
},
brand: {
type: GraphQLString,
description: 'Filter on the type of instance (e.g. lx)'
},
name: {
type: GraphQLString,
description: 'Machine name to find (will make your list size 1, or 0 if nothing found)'
},
image: {
type: GraphQLString,
description: 'Image id; returns instances provisioned with that image'
},
state: {
type: GraphQLString,
description: 'Filter on the current state (e.g. running)'
},
memory: {
type: GraphQLInt,
description: 'Filter on the current size of the RAM deployed (in MiB)'
},
tombstone: {
type: GraphQLInt,
description: 'Filter on instances destroyed in the last N minutes'
},
first: {
type: GraphQLInt,
description: 'Return a max of N instances; default is 1000 (which is also the maximum allowable result set size)'
},
after: {
type: GraphQLInt,
description: 'Get a `first` number of instances starting at this offset'
},
tags: {
type: new GraphQLList(GraphQLString),
description: 'Filter on existing tags'
},
docker: {
type: GraphQLString,
description: 'Whether to only list Docker instances, or only non-Docker instances, if present. Defaults to showing all instances.'
},
credentials: {
type: GraphQLString,
description: 'Whether to include the generated credentials for instances, if present. Defaults to false'
}
},
resolve(root, args) {
const { list, get } = api.machines;
const { after, first } = args;
const newArgs = Object.assign(args, {
limit: first,
offset: after
});
return args.id
? get({
id: args.id
}).then(machine => [machine])
: list(newArgs);
}
};

View File

@ -1,19 +0,0 @@
const NetworkType = require('../types/network');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList, GraphQLID } = graphql;
module.exports = {
type: new GraphQLList(NetworkType),
args: {
id: {
type: GraphQLID
}
},
resolve(root, args) {
const { list, get } = api.networks;
return !args.id ? list() : get(args).then(network => [network]);
}
};

View File

@ -1,19 +0,0 @@
const NicType = require('../types/nic');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList, GraphQLString } = graphql;
module.exports = {
type: new GraphQLList(NicType),
args: {
mac: {
type: GraphQLString
}
},
resolve(root, args) {
const { list, get } = api.nics;
return !args.id ? list() : get(args).then(nic => [nic]);
}
};

View File

@ -1,56 +0,0 @@
const PackageType = require('../types/package');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLInt, GraphQLList, GraphQLString, GraphQLID } = graphql;
module.exports = {
type: new GraphQLList(PackageType),
args: {
id: {
type: GraphQLID,
description: 'Filter on package id'
},
name: {
type: GraphQLString,
description: 'Filter on the "friendly" name'
},
memory: {
type: GraphQLInt,
description: 'Filter on how much memory will by available (in MiB)'
},
disk: {
type: GraphQLInt,
description: 'Filter on how much disk space will be available (in MiB)'
},
swap: {
type: GraphQLInt,
description: 'Filter on how much swap space will be available (in MiB)'
},
lwps: {
type: GraphQLInt,
description: 'Filter on maximum number of light-weight processes (threads) allowed'
},
vcpus: {
type: GraphQLInt,
description: 'Filter on number of vCPUs'
},
version: {
type: GraphQLString,
description: 'Filter on the version'
},
group: {
type: GraphQLString,
description: 'Filter on the group belonging to'
}
},
resolve(root, args) {
const { list, get } = api.packages;
return args.id
? get({
id: args.id
}).then(pkg => [pkg])
: list(args);
}
};

View File

@ -1,20 +0,0 @@
const PolicyType = require('../types/policy');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList, GraphQLID } = graphql;
module.exports = {
type: new GraphQLList(PolicyType),
args: {
id: {
type: GraphQLID,
description: '`id` of the `PolicyType` to filter'
}
},
resolve(root, args) {
const { list, get } = api.policies;
return !args.id ? list() : get(args).then(policy => [policy]);
}
};

View File

@ -1,20 +0,0 @@
const RoleType = require('../types/role');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList, GraphQLID } = graphql;
module.exports = {
type: new GraphQLList(RoleType),
args: {
id: {
type: GraphQLID,
description: '`id` or `name` of the `RoleType` to filter'
}
},
resolve(root, args) {
const { list, get } = api.roles;
return !args.id ? list() : get(args).then(role => [role]);
}
};

View File

@ -1,19 +0,0 @@
const ServiceType = require('../types/service');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList } = graphql;
module.exports = {
type: new GraphQLList(ServiceType),
resolve() {
return api.services().then(services => {
return Object.keys(services).map(name => {
return {
url: services[name],
name
};
});
});
}
};

View File

@ -1,26 +0,0 @@
const UserType = require('../types/login');
const graphql = require('graphql');
const api = require('../../api');
const { GraphQLList, GraphQLID } = graphql;
module.exports = {
type: new GraphQLList(UserType),
args: {
id: {
type: GraphQLID,
description: '`id` or `login` of the `UserType` to filter'
}
},
resolve(root, args) {
const { list, get } = api.users;
return !args.id
? list()
: get(args).then(user => [user]).then(user => {
return Object.assign(user, {
isUser: true
});
});
}
};

View File

@ -1,54 +0,0 @@
const DynamicObjectType = require('./dynamic-object');
const { GraphQLString, GraphQLObjectType, GraphQLBoolean } = require('graphql');
const CallerType = new GraphQLObjectType({
name: 'CallerType',
fields: {
type: {
type: GraphQLString,
description: 'Authentication type for the action request. One of "basic", "operator", "signature" or "token"'
},
user: {
type: GraphQLString,
description: 'When the authentication type is "basic", this member will be present and include user login'
},
ip: {
type: GraphQLString,
description: 'The IP addresses this from which the action was requested. Not present if type is "operator"'
},
keyId: {
type: GraphQLString,
description: 'When authentication type is either "signature" or "token", SSH key identifier'
}
}
});
module.exports = new GraphQLObjectType({
name: 'AuditType',
fields: {
action: {
type: GraphQLString,
description: 'The name of the action'
},
parameters: {
type: DynamicObjectType,
description: 'The original set of parameters sent when the action was requested'
},
success: {
type: GraphQLBoolean,
description: "`true` or `false`, depending on the action's success",
resolve: root => {
return root.success === 'yes';
}
},
caller: {
type: CallerType,
description: 'Account requesting the action'
},
time: {
type: GraphQLString,
description: 'When the action finished'
}
}
});

View File

@ -1,14 +0,0 @@
const { GraphQLString, GraphQLObjectType } = require('graphql');
module.exports = new GraphQLObjectType({
name: 'DatacenterType',
fields: {
name: {
type: GraphQLString,
description: 'location of the datacenter'
},
url: {
type: GraphQLString
}
}
});

View File

@ -1,41 +0,0 @@
const { GraphQLScalarType, Kind } = require('graphql');
const kinds = {
[Kind.STRING]: ast => {
return ast.value;
},
[Kind.BOOLEAN]: ast => {
return kinds[Kind.STRING](ast);
},
[Kind.INT]: ast => {
return Number(ast.value);
},
[Kind.FLOAT]: ast => {
return kinds[Kind.INT](ast);
},
[Kind.OBJECT]: ast => {
const value = Object.create(null);
ast.fields.forEach(field => {
value[field.name.value] = parseLiteral(field.value);
});
return value;
},
[Kind.LIST]: ast => {
return ast.values.map(parseLiteral);
}
};
// https://github.com/taion/graphql-type-json/blob/master/src/index.js
const parseLiteral = ast => {
const kind = kinds[ast.kind];
return kind ? kinds[ast.kind](ast) : null;
};
// from http://stackoverflow.com/a/34229603
module.exports = new GraphQLScalarType({
name: 'DynamicObjectType',
serialize: v => v,
parseValue: v => v,
parseLiteral: parseLiteral
});

View File

@ -1,19 +0,0 @@
const { GraphQLString, GraphQLObjectType, GraphQLInt } = require('graphql');
module.exports = new GraphQLObjectType({
name: 'FabricsType',
fields: {
name: {
type: GraphQLString,
description: 'A unique name to identify the VLAN'
},
vlan_id: {
type: GraphQLInt,
description: "A number from 0-4095 that indicates the VLAN's id"
},
description: {
type: GraphQLString,
description: 'An optional description of the VLAN'
}
}
});

View File

@ -1,90 +0,0 @@
const api = require('../../api');
const {
GraphQLString,
GraphQLBoolean,
GraphQLObjectType,
GraphQLList,
GraphQLID,
GraphQLInt
} = require('graphql');
const FirewallRuleSyntaxType = new GraphQLObjectType({
name: 'FirewallRuleSyntaxType',
fields: {
text: {
type: GraphQLString
},
from: {
type: GraphQLString
},
to: {
type: GraphQLString
},
action: {
type: GraphQLString
},
protocol: {
type: GraphQLString
},
port: {
type: GraphQLInt
}
}
});
module.exports = new GraphQLObjectType({
name: 'FirewallRuleType',
// function to allow circular dependencies
fields: () => ({
id: {
type: GraphQLID,
description: 'Unique identifier for this rule'
},
enabled: {
type: GraphQLBoolean,
description: 'Indicates if the rule is enabled',
resolve: root => {
return !!root.enabled;
}
},
rule: {
type: FirewallRuleSyntaxType,
description: 'Firewall rule',
resolve: ({ rule }) => {
const regex = /from (.*?) to (.*?) (allow|deny) (.*?) port (\d*)/i;
const tokens = rule.match(regex);
return {
from: tokens[1],
to: tokens[2],
action: tokens[3],
protocol: tokens[4],
port: tokens[5],
text: rule
};
}
},
global: {
type: GraphQLBoolean,
description: 'Indicates if the rule is global',
resolve: root => {
return !!root.global;
}
},
description: {
type: GraphQLString,
description: 'Human-readable description for the rule'
},
machines: {
// circular dependency
type: new GraphQLList(require('./machine')),
description: 'Lists all instances a firewall rule is applied to',
resolve: root => {
return api.firewallRules.listMachines({
id: root.id
});
}
}
})
});

View File

@ -1,116 +0,0 @@
const DynamicObjectType = require('./dynamic-object');
const {
GraphQLBoolean,
GraphQLString,
GraphQLObjectType,
GraphQLInt,
GraphQLList,
GraphQLID
} = require('graphql');
const ErrorType = new GraphQLObjectType({
name: 'ErrorType',
fields: {
code: {
type: GraphQLString,
description: 'A CamelCase string code for this error, e.g. "PrepareImageDidNotRun". See GetImage docs for a table of error.code values'
},
message: {
type: GraphQLString,
description: 'A short description of the image creation failure'
}
}
});
const ImageFileType = new GraphQLObjectType({
name: 'ImageFileType',
fields: {
compression: {
type: GraphQLString,
description: 'The type of file compression used for the image file. One of "bzip2", "gzip", "none"'
},
sha1: {
type: GraphQLString,
description: 'SHA-1 hex digest of the file content. Used for corruption checking'
},
size: {
type: GraphQLInt,
description: 'File size in bytes'
}
}
});
module.exports = new GraphQLObjectType({
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',
fields: {
id: {
type: GraphQLID,
description: 'Unique id for this image'
},
name: {
type: GraphQLString,
description: 'The "friendly" name for this image'
},
os: {
type: GraphQLString,
description: 'The underlying operating system for this image'
},
version: {
type: GraphQLString,
description: 'The version for this image'
},
type: {
type: GraphQLString,
description: 'What kind of image this is. The values differ after v8.0.0+'
},
requirements: {
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'
},
homepage: {
type: GraphQLString,
description: 'The URL for a web page with more detailed information for this image'
},
files: {
type: new GraphQLList(ImageFileType),
description: 'An array of image files that make up each image. Currently only a single file per image is supported'
},
published_at: {
type: GraphQLString,
description: 'The time this image has been made publicly available'
},
owner: {
type: GraphQLString,
description: 'The UUID of the user who owns this image'
},
public: {
type: GraphQLBoolean,
description: 'Indicates if this image is publicly available',
resolve: root => {
return !!root['public'];
}
},
state: {
type: GraphQLString,
description: 'The current state of the image. One of "active", "unactivated", "disabled", "creating", "failed"'
},
tags: {
type: DynamicObjectType,
description: 'An object of key/value pairs that allows clients to categorize images by any given criteria'
},
eula: {
type: GraphQLString,
description: 'URL of the End User License Agreement (EULA) for the image'
},
acl: {
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'
},
error: {
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>"}'
}
}
});

View File

@ -1,16 +0,0 @@
const { GraphQLString, GraphQLObjectType } = require('graphql');
module.exports = new GraphQLObjectType({
name: 'KeyType',
fields: {
name: {
type: GraphQLString
},
fingerprint: {
type: GraphQLString
},
key: {
type: GraphQLString
}
}
});

View File

@ -1,108 +0,0 @@
const KeyType = require('./key');
const api = require('../../api');
const {
GraphQLBoolean,
GraphQLString,
GraphQLList,
GraphQLObjectType,
GraphQLID
} = require('graphql');
module.exports = new GraphQLObjectType({
name: 'LoginType',
fields: {
id: {
type: GraphQLID,
description: 'Unique id for this user/account'
},
login: {
type: GraphQLString,
description: 'Account/Sub-user login name'
},
email: {
type: GraphQLString,
description: 'Email address'
},
company_name: {
type: GraphQLString,
resolve: root => {
return !!root.company_name || root.companyName;
}
},
first_name: {
type: GraphQLString,
resolve: root => {
return !!root.first_name || root.firstName;
}
},
last_name: {
type: GraphQLString,
resolve: root => {
return !!root.last_name || root.lastName;
}
},
address: {
type: GraphQLString
},
postal_code: {
type: GraphQLString,
resolve: root => {
return !!root.postal_code || root.postalCode;
}
},
city: {
type: GraphQLString
},
state: {
type: GraphQLString
},
country: {
type: GraphQLString
},
phone: {
type: GraphQLString
},
cns_enabled: {
type: GraphQLBoolean,
description: 'true if Triton CNS is enabled for account',
resolve: root => {
return root.isUser ? null : !!root.triton_cns_enabled;
}
},
keys: {
type: new GraphQLList(KeyType),
description: 'Get keys for user/account',
args: {
name: {
type: GraphQLString,
description: 'Filter on key name'
},
fingerprint: {
type: GraphQLString,
description: 'Filter on key fingerprint'
}
},
resolve(root, args) {
const _api = root.isUser ? api.keys.user : api.keys.account;
const { list, get } = _api;
const newArgs = Object.assign(args, {
userId: root.id
});
const filtered = args.name || args.fingerprint;
return !filtered ? list(newArgs) : get(newArgs).then(key => [key]);
}
},
updated: {
type: GraphQLString,
description: "When this user/account's details was last updated"
},
created: {
type: GraphQLString,
description: 'When this user/account was created'
}
}
});

Some files were not shown because too many files have changed in this diff Show More