Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a54b33c9
Commit
a54b33c9
authored
Sep 29, 2009
by
Matt Strum
Browse files
Checked licenses, added compression support in the RSYNC RPC call
parent
e996db45
Changes
8
Hide whitespace changes
Inline
Side-by-side
protogeni/demo/map/LICENSES.txt
0 → 100644
View file @
a54b33c9
=================================
ProtoGENI Map External Resources
=================================
Apache License, Version 2.0
---------------------------
* src/TooltipOverlay.as
No license provided
-------------------
* src/ResizeWindow.as
- http://flexdevtips.blogspot.com/2008/12/resizable-window.html
* libs/map_flex_1_16.swc
- http://code.google.com/apis/maps/documentation/flash/
* images/waiting.swf
- http://www.ajaxload.info/
Creative Commons Attribution 2.5 License
----------------------------------------
* images/*
- http://www.famfamfam.com/lab/icons/silk/
===============================
Shared code with ProtoGENI Demo
===============================
GNU Library or Lesser General Public License (LGPL)
---------------------------------------------------
XML-RPC
- http://sf.net/projects/xmlrpcflash
- http://www.osflash.org/doku.php?id=xmlrpcflash
\ No newline at end of file
protogeni/demo/map/bin-debug/pgmap.swf
View file @
a54b33c9
No preview for this file type
protogeni/demo/map/bin-release/pgmap.swf
View file @
a54b33c9
No preview for this file type
protogeni/demo/map/src/Main.as
View file @
a54b33c9
package
{
import
mx
.
controls
.
Alert
;
public
class
Main
{
public
function
getConsole
()
:
LogRoot
...
...
@@ -11,7 +13,19 @@ package
{
log
=
newLog
;
}
public
function
startTimer
()
:
void
{
d
=
new
Date
()
;
}
public
function
endTimer
()
:
void
{
var
d2
:
Date
=
new
Date
()
;
Alert
.
show
((
d
.
valueOf
()
-
d2
.
valueOf
()).
toString
())
;
}
private
static
var
log
:
LogRoot
=
null
;
private
static
var
d
:
Date
=
null
;
}
}
protogeni/demo/map/src/pgmap.mxml
View file @
a54b33c9
...
...
@@ -140,14 +140,20 @@
if
(
color
.
length
>
0
)
{
progressLabel
.
setStyle
(
"color"
,
color
)
;
}
chooseCMWindow
.
progressLabel
.
text
=
message
;
if
(
color
.
length
>
0
)
{
chooseCMWindow
.
progressLabel
.
setStyle
(
"color"
,
color
)
;
}
}
public
function
startWaiting
()
:
void
{
waitingIcon
.
visible
=
true
;
chooseCMWindow
.
waitingIcon
.
visible
=
true
;
}
public
function
stopWaiting
()
:
void
{
waitingIcon
.
visible
=
false
;
chooseCMWindow
.
waitingIcon
.
visible
=
false
;
}
]]>
</mx:Script>
...
...
protogeni/demo/map/src/pgmap/ChooseComponentManagerWindow.mxml
View file @
a54b33c9
...
...
@@ -2,7 +2,7 @@
<mx:TitleWindow
xmlns:mx=
"http://www.adobe.com/2006/mxml"
layout=
"vertical"
title=
"Choose Component Manager"
showCloseButton=
"true"
borderAlpha=
".9"
borderColor=
"#D2E1F0"
width=
"
32
0"
borderAlpha=
".9"
borderColor=
"#D2E1F0"
width=
"
40
0"
defaultButton=
"
{
okButton
}
"
close=
"close()"
creationComplete=
"okButton.setFocus()"
>
...
...
@@ -31,14 +31,15 @@
PopUpManager
.
centerPopUp
(
this
)
;
if
(
main
.
comHandler
.
Components
==
null
||
main
.
comHandler
.
Components
.
length
==
0
)
{
startRefreshList
()
;
}
}
else
okButton
.
enabled
=
true
;
//urlInput.text = main.comHandler.ComponentManagerURL;
}
public
function
startRefreshList
()
:
void
{
progressLabel
.
text
=
"Updating list..."
;
waitingIcon
.
visible
=
true
;
//
progressLabel.text = "Updating list...";
//
waitingIcon.visible = true;
if
(
main
.
comHandler
.
credential
==
null
||
main
.
comHandler
.
credential
.
base
==
null
)
{
main
.
console
.
appendText
(
"Getting credential...\n"
)
;
main
.
comHandler
.
AfterCall
=
afterCredential
;
...
...
@@ -56,15 +57,15 @@
public
function
refreshList
()
:
void
{
main
.
comHandler
.
AfterCall
=
null
;
progressLabel
.
text
=
"List updated"
;
waitingIcon
.
visible
=
false
;
okButton
.
enabled
=
true
;
//
progressLabel.text = "List updated";
//
waitingIcon.visible = false;
}
]]>
</mx:Script>
<mx:HBox
width=
"100%"
verticalAlign=
"middle"
>
<mx:Button
id=
"refreshButton"
label=
"Refresh"
icon=
"@Embed('../images/
server
.png')"
/>
<mx:Button
id=
"refreshButton"
label=
"Refresh"
icon=
"@Embed('../images/
arrow_refresh
.png')"
/>
<mx:ComboBox
editable=
"false"
width=
"100%"
id=
"listManagers"
dataProvider=
"
{
main
.
comHandler
.
Components
}
"
labelField=
"hrn"
></mx:ComboBox>
</mx:HBox>
<mx:HBox
width=
"100%"
horizontalAlign=
"right"
>
...
...
@@ -72,7 +73,7 @@
<mx:SWFLoader
id=
"waitingIcon"
source=
"@Embed('../../images/waiting.swf')"
visible=
"false"
/>
<mx:Spacer
width=
"100%"
/>
<mx:Button
id=
"cancelButton"
label=
"Cancel"
icon=
"@Embed('../images/cross.png')"
click=
"close();"
/>
<mx:Button
id=
"okButton"
label=
"Go"
icon=
"@Embed('../images/tick.png')"
click=
"success();"
/>
<mx:Button
id=
"okButton"
label=
"Go"
icon=
"@Embed('../images/tick.png')"
click=
"success();"
enabled=
"false"
/>
</mx:HBox>
</mx:TitleWindow>
protogeni/demo/map/src/pgmap/LinkGroupAdvancedWindow.mxml
View file @
a54b33c9
...
...
@@ -54,6 +54,17 @@
PopUpManager
.
centerPopUp
(
rspecView
)
;
rspecView
.
loadXml
(
link
.
rspec
)
;
}
public
function
viewNode
(
n
:
Node
)
:
void
{
var
ngWindow
:
NodeGroupAdvancedWindow
=
new
NodeGroupAdvancedWindow
()
;
ngWindow
.
main
=
main
;
PopUpManager
.
addPopUp
(
ngWindow
,
main
,
false
)
;
PopUpManager
.
centerPopUp
(
ngWindow
)
;
var
ac
:
ArrayCollection
=
new
ArrayCollection
()
;
ac
.
addItem
(
n
)
;
ngWindow
.
loadCollection
(
ac
)
;
}
]]>
</mx:Script>
<mx:HDividedBox
width=
"100%"
height=
"100%"
>
...
...
@@ -100,7 +111,10 @@
</mx:GridRow>
<mx:GridRow
width=
"100%"
>
<mx:GridItem>
<mx:Label
text=
"Connects"
fontWeight=
"bold"
/>
<mx:VBox
horizontalAlign=
"right"
width=
"100%"
>
<mx:Label
text=
"Connects"
fontWeight=
"bold"
/>
<mx:Button
label=
"View"
click=
"viewNode(link.interface1.owner);"
/>
</mx:VBox>
</mx:GridItem>
<mx:GridItem
width=
"100%"
>
<mx:VBox
width=
"100%"
>
...
...
@@ -111,7 +125,10 @@
</mx:GridRow>
<mx:GridRow
width=
"100%"
>
<mx:GridItem>
<mx:Label
text=
"to"
fontWeight=
"bold"
/>
<mx:VBox
horizontalAlign=
"right"
width=
"100%"
>
<mx:Label
text=
"to"
fontWeight=
"bold"
/>
<mx:Button
label=
"View"
click=
"viewNode(link.interface2.owner);"
/>
</mx:VBox>
</mx:GridItem>
<mx:GridItem
width=
"100%"
>
<mx:VBox
width=
"100%"
>
...
...
protogeni/demo/map/src/pgmap/ProtoGeniHandler.as
View file @
a54b33c9
...
...
@@ -17,6 +17,9 @@
import
com
.
mattism
.
http
.
xmlrpc
.
MethodFault
;
import
flash
.
events
.
ErrorEvent
;
import
flash
.
utils
.
ByteArray
;
import
mx
.
utils
.
Base64Decoder
;
public
class
ProtoGeniHandler
{
...
...
@@ -74,6 +77,8 @@
public
function
completeCredential
(
code
:
Number
,
response
:
Object
)
:
void
{
main
.
setProgress
(
"Done"
,
Common
.
successColor
)
;
main
.
stopWaiting
()
;
addResponse
()
;
if
(
code
==
0
)
{
...
...
@@ -141,6 +146,7 @@
{
opName
=
"Acquiring SSH Keys"
;
main
.
setProgress
(
opName
,
Common
.
waitColor
)
;
main
.
startWaiting
()
;
main
.
console
.
appendText
(
opName
)
;
op
.
reset
(
Geni
.
getKeys
)
;
op
.
addField
(
"credential"
,
credential
.
base
)
;
...
...
@@ -150,6 +156,8 @@
public
function
completeSshLookup
(
code
:
Number
,
response
:
Object
)
:
void
{
main
.
setProgress
(
"Done"
,
Common
.
successColor
)
;
main
.
stopWaiting
()
;
addResponse
()
;
if
(
code
==
0
)
{
...
...
@@ -172,6 +180,7 @@
main
.
console
.
appendText
(
opName
+
"...\n"
)
;
op
.
reset
(
Geni
.
discoverResources
)
;
op
.
addField
(
"credential"
,
credential
.
base
)
;
op
.
addField
(
"compress"
,
true
)
;
op
.
setUrl
(
ComponentManagerURL
)
;
op
.
call
(
completeResourceLookup
,
failure
)
;
}
...
...
@@ -184,7 +193,13 @@
if
(
code
==
0
)
{
Rspec
=
new
XML
(
response
.
value
)
;
var
x
:
Base64Decoder
=
new
Base64Decoder
()
;
x
.
decode
(
response
.
value
)
;
var
s
:
ByteArray
=
x
.
toByteArray
()
;
s
.
uncompress
()
;
var
s2
:
String
=
s
.
toString
()
;
Rspec
=
new
XML
(
s2
)
;
processRspec
()
;
}
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment