ia64/xen-unstable

changeset 1943:d5d66a7484bf

bitkeeper revision 1.1108.23.10 (41078cf5vf2z71barbrPnZ5i-BsO6w)

Wizard.py, CreateDomain.py:
fixed typo
Wizard.py:
Rename: tools/python/xen/sv/Wizzard.py -> tools/python/xen/sv/Wizard.py
author smh22@tempest.cl.cam.ac.uk
date Wed Jul 28 11:24:37 2004 +0000 (2004-07-28)
parents d3c2a4bdc6b4
children 8978b0ba3adb 698b17696712
files .rootkeys tools/python/xen/sv/CreateDomain.py tools/python/xen/sv/Wizard.py tools/python/xen/sv/Wizzard.py
line diff
     1.1 --- a/.rootkeys	Tue Jul 27 23:40:38 2004 +0000
     1.2 +++ b/.rootkeys	Wed Jul 28 11:24:37 2004 +0000
     1.3 @@ -379,7 +379,7 @@ 40fcefb2QZAn3u3sX-M7NXBjOv5HGg tools/pyt
     1.4  40fcefb2vnfDbl4w_yCTedROPuqs0g tools/python/xen/sv/Main.py
     1.5  40fcefb24h-04WaHag-Tg4nxWPhTig tools/python/xen/sv/NodeInfo.py
     1.6  40fcefb2Sif__6AqrANeBQZZfvP-6w tools/python/xen/sv/TabView.py
     1.7 -41052eb8UrgtUkuJPg7oY1tutVQHsg tools/python/xen/sv/Wizzard.py
     1.8 +41052eb8UrgtUkuJPg7oY1tutVQHsg tools/python/xen/sv/Wizard.py
     1.9  40fcefb2DqteqCCZYDCvvh4Q5jBd0w tools/python/xen/sv/__init__.py
    1.10  40fcefb4rnaZNjqsBu7A5V2rlLyqRw tools/python/xen/sv/util.py
    1.11  40d8915cyoVA0hJxiBFNymL7YvDaRg tools/python/xen/util/Brctl.py
     2.1 --- a/tools/python/xen/sv/CreateDomain.py	Tue Jul 27 23:40:38 2004 +0000
     2.2 +++ b/tools/python/xen/sv/CreateDomain.py	Wed Jul 28 11:24:37 2004 +0000
     2.3 @@ -1,6 +1,6 @@
     2.4 -from xen.sv.Wizzard import Wizzard, Sheet
     2.5 +from xen.sv.Wizard import Wizard, Sheet
     2.6  
     2.7 -class CreateDomain( Wizzard ):
     2.8 +class CreateDomain( Wizard ):
     2.9      def __init__( self, urlWriter ):
    2.10      	
    2.11      	sheets = { 0: CreatePage0,
    2.12 @@ -8,7 +8,7 @@ class CreateDomain( Wizzard ):
    2.13            	   2: CreatePage2,
    2.14                     3: CreatePage3 }
    2.15      
    2.16 -    	Wizzard.__init__( self, urlWriter, "Create Domain Wizzard", sheets )
    2.17 +    	Wizard.__init__( self, urlWriter, "Create Domain Wizard", sheets )
    2.18         
    2.19  class CreatePage0( Sheet ):
    2.20  
    2.21 @@ -40,4 +40,4 @@ class CreatePage3( Sheet ):
    2.22      
    2.23      	feilds = [( 'name', 'Name')]
    2.24          
    2.25 -        Sheet.__init__( self, urlWriter, feilds, "Create New Domain - 4" )       
    2.26 \ No newline at end of file
    2.27 +        Sheet.__init__( self, urlWriter, feilds, "Create New Domain - 4" )       
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tools/python/xen/sv/Wizard.py	Wed Jul 28 11:24:37 2004 +0000
     3.3 @@ -0,0 +1,66 @@
     3.4 +from xen.sv.util import *
     3.5 +from xen.sv.HTMLBase import HTMLBase
     3.6 +from xen.xend import sxp
     3.7 +
     3.8 +class Wizard( HTMLBase ):
     3.9 +
    3.10 +    def __init__( self, urlWriter, title, sheets ):
    3.11 +        HTMLBase.__init__( self )
    3.12 +        self.title = title
    3.13 +        self.sheets = sheets
    3.14 +        self.currSheet = 0
    3.15 +        self.urlWriter = urlWriter
    3.16 +        
    3.17 +    def write_MENU( self, request ):
    3.18 +    	request.write( "<p class='small'><a href='%s'>%s</a></p>" % (self.urlWriter( '' ), self.title) ) 
    3.19 +    
    3.20 +    def write_BODY( self, request ):
    3.21 +        
    3.22 +   	request.write( "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>" )
    3.23 +        request.write( "<p align='center'><u>%s</u></p></td></tr><tr><td>" % self.title )
    3.24 +        
    3.25 +        currSheet = getVar( 'sheet', request )
    3.26 +    
    3.27 +        if not currSheet is None:
    3.28 +        
    3.29 +            self.currSheet = int( currSheet )
    3.30 +            
    3.31 +        self.sheets[ self.currSheet ]( self.urlWriter ).write_BODY( request )
    3.32 +        
    3.33 +        request.write( "</td></tr><tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>" )
    3.34 +        request.write( "<td width='80%'></td><td width='20%' align='center'>" )
    3.35 +        request.write( "<p align='center'><img src='images/previous.png' onclick='doOp( \"prev\" )' onmouseover='update( \"wizText\", \"Previous\" )' onmouseout='update( \"wizText\", \"&nbsp;\" )'>&nbsp;" )
    3.36 +        request.write( "<img src='images/next.png' onclick='doOp( \"next\" )' onmouseover='update( \"wizText\", \"Next\" )' onmouseout='update( \"wizText\", \"&nbsp;\" )'></p>" )
    3.37 +        request.write( "<p align='center'><span id='wizText'></span></p></td></tr></table>" )
    3.38 +        request.write( "</td></tr></table>" )
    3.39 +        
    3.40 +class Sheet( HTMLBase ):
    3.41 +
    3.42 +    def __init__( self, urlWriter, feilds, title ):
    3.43 +        HTMLBase.__init__( self )
    3.44 +        self.urlWriter = urlWriter
    3.45 +        self.feilds = feilds
    3.46 +        self.title = title
    3.47 +        
    3.48 +    def parseForm( self, request ):
    3.49 +    	return sxp.toString( request.args )
    3.50 +        
    3.51 +    def write_BODY( self, request ):
    3.52 +   	request.write( "<p>%s</p>" % self.title )
    3.53 +    
    3.54 +    	previous_values = request.args
    3.55 +        
    3.56 +    	for (feild, name) in self.feilds:
    3.57 +            value = sxp.child_value( previous_values, feild )
    3.58 +            if value is None:
    3.59 +            	value = ''
    3.60 +            request.write( "<p>%s<input type='text' name='%s' value='%s'></p>" % (name, feild, value) )
    3.61 +            
    3.62 +    def op_next( self, request ):
    3.63 +    	pass
    3.64 +        
    3.65 +    def op_prev( self, request ):
    3.66 +    	pass        
    3.67 +            
    3.68 +    
    3.69 +      
     4.1 --- a/tools/python/xen/sv/Wizzard.py	Tue Jul 27 23:40:38 2004 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,66 +0,0 @@
     4.4 -from xen.sv.util import *
     4.5 -from xen.sv.HTMLBase import HTMLBase
     4.6 -from xen.xend import sxp
     4.7 -
     4.8 -class Wizzard( HTMLBase ):
     4.9 -
    4.10 -    def __init__( self, urlWriter, title, sheets ):
    4.11 -        HTMLBase.__init__( self )
    4.12 -        self.title = title
    4.13 -        self.sheets = sheets
    4.14 -        self.currSheet = 0
    4.15 -        self.urlWriter = urlWriter
    4.16 -        
    4.17 -    def write_MENU( self, request ):
    4.18 -    	request.write( "<p class='small'><a href='%s'>%s</a></p>" % (self.urlWriter( '' ), self.title) ) 
    4.19 -    
    4.20 -    def write_BODY( self, request ):
    4.21 -        
    4.22 -   	request.write( "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>" )
    4.23 -        request.write( "<p align='center'><u>%s</u></p></td></tr><tr><td>" % self.title )
    4.24 -        
    4.25 -        currSheet = getVar( 'sheet', request )
    4.26 -    
    4.27 -        if not currSheet is None:
    4.28 -        
    4.29 -            self.currSheet = int( currSheet )
    4.30 -            
    4.31 -        self.sheets[ self.currSheet ]( self.urlWriter ).write_BODY( request )
    4.32 -        
    4.33 -        request.write( "</td></tr><tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>" )
    4.34 -        request.write( "<td width='80%'></td><td width='20%' align='center'>" )
    4.35 -        request.write( "<p align='center'><img src='images/previous.png' onclick='doOp( \"prev\" )' onmouseover='update( \"wizText\", \"Previous\" )' onmouseout='update( \"wizText\", \"&nbsp;\" )'>&nbsp;" )
    4.36 -        request.write( "<img src='images/next.png' onclick='doOp( \"next\" )' onmouseover='update( \"wizText\", \"Next\" )' onmouseout='update( \"wizText\", \"&nbsp;\" )'></p>" )
    4.37 -        request.write( "<p align='center'><span id='wizText'></span></p></td></tr></table>" )
    4.38 -        request.write( "</td></tr></table>" )
    4.39 -        
    4.40 -class Sheet( HTMLBase ):
    4.41 -
    4.42 -    def __init__( self, urlWriter, feilds, title ):
    4.43 -        HTMLBase.__init__( self )
    4.44 -        self.urlWriter = urlWriter
    4.45 -        self.feilds = feilds
    4.46 -        self.title = title
    4.47 -        
    4.48 -    def parseForm( self, request ):
    4.49 -    	return sxp.toString( request.args )
    4.50 -        
    4.51 -    def write_BODY( self, request ):
    4.52 -   	request.write( "<p>%s</p>" % self.title )
    4.53 -    
    4.54 -    	previous_values = request.args
    4.55 -        
    4.56 -    	for (feild, name) in self.feilds:
    4.57 -            value = sxp.child_value( previous_values, feild )
    4.58 -            if value is None:
    4.59 -            	value = ''
    4.60 -            request.write( "<p>%s<input type='text' name='%s' value='%s'></p>" % (name, feild, value) )
    4.61 -            
    4.62 -    def op_next( self, request ):
    4.63 -    	pass
    4.64 -        
    4.65 -    def op_prev( self, request ):
    4.66 -    	pass        
    4.67 -            
    4.68 -    
    4.69 -