do->cloud rename

This commit is contained in:
Henry Ault 2015-05-21 17:22:56 -07:00
parent 5703d91b33
commit e6d8ec36d0
6 changed files with 44 additions and 19 deletions

View File

@ -150,7 +150,7 @@ $% [%diff %json json]
'code'^code
:- 'client_id'
'd8f46b95af38c1ab3d78ad34c2157a6959c23eb0eb5d8e393f650f08e6a75c6f'
'redirect_uri'^'http://localhost:8443/home/pub/do/fab'
'redirect_uri'^'http://localhost:8443/home/pub/cloud/fab'
==
++ httpreq
|= $: ost=bone pour-path=wire
@ -180,7 +180,7 @@ $% [%diff %json json]
:_ +>.$
[ost %diff %json (state-to-json drops.vat)]~
::
++ poke-do-auth
++ poke-cloud-auth
|= [[ost=bone you=ship] [cde=cord typ=cord]]
^- [(list move) _+>.$]
~& [cde typ]
@ -194,9 +194,8 @@ $% [%diff %json json]
:_ +>.$
~
::
++ poke-do-secret
++ poke-cloud-secret
|= [[ost=bone you=ship] secret=cord typ=cord]
~& +<+
^- [(list move) _+>.$]
::=+ [newvat code path]=[vat(auth auth.vat) ...]
::=. vat newvat
@ -253,7 +252,8 @@ $% [%diff %json json]
%. act
=> jo
%- ot
:~ name/so region/so size/so image/(su dem) ssh/(ar so) backups/(mu bo)
:~ name/so region/so size/so image/(su dem) :: id key:img object
ssh/(ar so) backups/(mu bo)
'ipv6'^(mu bo) 'priv_networking'^(mu bo) 'user_data'^(mu so)
==
:- (create-droplet ost deets)

View File

@ -0,0 +1,16 @@
:: this mark is used to receive incoming oauth2 tokens that we use to poke our %gall server
::
:::: /hook/door/do-auth/mar
::
/? 310
!:
|_ cod=cord
::
++ grab :: converter arm
|%
++ noun ,@t :: clam from noun
++ json (cork (ot authcode/so platform/so ~):jo need) :: (need (so:jo jon))
--
--

View File

@ -0,0 +1,9 @@
!:
|_ cod=cord
::
++ grab :: converter am
|%
++ noun ,@t :: clam from noun
++ json (cork (ot secret/so platform/so ~):jo need) :: (need (so:jo jon))
--
--

View File

@ -14,11 +14,11 @@
;html
;head
;script@"/~/at/home/lib/urb.js";
;script: urb.appl = 'do'
;script: urb.appl = 'cloud'
;script@"https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js";
;script@"https://cdnjs.cloudflare.com/ajax/libs/react/0.12.2/react.js";
::;link/"/main/pub/do/src/main.css"(rel "stylesheet");
;title: DO Instance Tracker
::;link/"/main/pub/cloud/src/main.css"(rel "stylesheet");
;title: DO & GCE Manager
==
;body
;* =+ d=?~(do ~ (trip u.do))
@ -26,6 +26,6 @@
:_ ~
;script: authcode='{?~(d g d)}'; console.log(authcode)
;div#container;
;script@"/home/pub/do/src/main.js";
;script@"/home/pub/cloud/src/main.js";
==
==

View File

@ -12,14 +12,14 @@ input = React.DOM.input
Droplet = React.createClass({
dropletAction:function(id, action){
urb.send({
appl:"do",
appl:"cloud",
data: {action: action,
id: id}})
},
rebootDroplet: function() {
urb.send({
appl: "do",
appl: "cloud",
data: {action: 'reboot',
id: this.props.id}})
},
@ -52,10 +52,10 @@ Page = recl({
console.log(platform);
if(window.authcode.length !== ''){
urb.send({
appl: "do",
appl: "cloud",
data: {authcode:window.authcode,
platform:platform},
mark: "do-auth"})
mark: "cloud-auth"})
} else { console.log("nocode") }
}
},
@ -65,22 +65,22 @@ Page = recl({
console.log(platform,codeid)
secret= $(codeid).val()
if(secret !== '') {
urb.send({appl: "do",
urb.send({appl: "cloud",
data: {secret:secret,
platform:platform},
mark: "do-secret"})
mark: "cloud-secret"})
}
}
},
getList: function(){
urb.send({appl: "do",
urb.send({appl: "cloud",
data: {action:"list"},
mark: "json"})
},
createDroplet: function(){
urb.send({appl: "do",
urb.send({appl: "cloud",
data: {
action:'create',
name:$('#name').val(),
@ -97,8 +97,8 @@ Page = recl({
},
render: function(){
href = "https://cloud.digitalocean.com/v1/oauth/authorize?client_id=d8f46b95af38c1ab3d78ad34c2157a6959c23eb0eb5d8e393f650f08e6a75c6f&redirect_uri=http%3A%2F%2Flocalhost%3A8443%2Fhome%2Fpub%2Fdo%2Ffab&response_type=code&scope=read+write"
ghref = "https://accounts.google.com/o/oauth2/auth?response_type=token&scope=https://www.googleapis.com/auth/compute&state=someinfo&redirect_uri=http://localhost:8443/home/pub/do/fab&client_id=720541965785-jr3c6ijo8abonu9qj77qre1itsdra52r.apps.googleusercontent.com"
href = "https://cloud.digitalocean.com/v1/oauth/authorize?client_id=d8f46b95af38c1ab3d78ad34c2157a6959c23eb0eb5d8e393f650f08e6a75c6f&redirect_uri=http%3A%2F%2Flocalhost%3A8443%2Fhome%2Fpub%2Fcloud%2Ffab&response_type=code&scope=read+write"
ghref = "https://accounts.google.com/o/oauth2/auth?response_type=token&scope=https://www.googleapis.com/auth/compute&state=someinfo&redirect_uri=http://localhost:8443/home/pub/cloud/fab&client_id=720541965785-jr3c6ijo8abonu9qj77qre1itsdra52r.apps.googleusercontent.com"
return (div({}, [
div({},
a({href:href},[