#!/usr/share/sysman/bin/sysmansh
# This file defines a platform console management front end
#
set env(_SUIT_SPLASH_SCREEN) 0
Main pcm {
	Window w1 {
#		Across {
#			Down {
#			   Image state_image -image checkmark-64.gif -text OK
#			   Label state_image_text
#			   Image event_image -image checkmark-64.gif -text OK
#			   Label event_image_text
#			}
			List m_sys \
			   -width 76 \
			   -height 4 \
 			   -headings { {sys 14} {name 14} {type 10} \
				 {consaccess 14} {comments 24} } \
			-buttons { b_connect  \
				   b_console \
				   b_mgmt \
				   b_events \
				   b_configure } \
			-selection single \
			-needSelection { b_connect b_console } \
			-doubleClk b_connect 
#		}
		
#		Enumerated list_opts \
#			-styleHint option \
#			-valueList { console events }
		
		List c_out \
			-width 76 \
			-height 4 \
			-autosort 0 \
			-buttons { }
	} -buttons { exit help } -defaultb exit -wmclose exit -display 1

Window logwait {
	Label logwaitmsg
} -buttons {} -display 0

#
# --- window to show console options
#
Window cons_d {
	Enumerated cons_opts \
		-valueList { view_logs view_users send_msg }
	} -defaultb ok

#
# --- window to select event options
Window events_d {
        Enumerated opts \
		-valueList { view create modify delete }
} -defaultb ok

#
# --- window to create an events file
Window events_create_d {
	Text evfile
	List pat_list \
		-height 10 \
		-width 56 \
                -headings { {pattern 41} {pri 5} {case 10} } \
                -buttons { add modify delete import }
} -defaultb ok

#
# --- window to modify an events file
Window events_modify_d {
	List evfile_list \
		-height 10 \
		-width 30 \
        -headings { {evfile 30} } \
		-buttons { }
} -defaultb ok

#
# --- window to modify an events file
Window events_modfile_d {
        List pat_list \
             -height 10 \
             -width 56 \
             -headings { {pattern 41} {pri 5} {case 10} } \
             -buttons { add modify delete } 
} -defaultb ok

#
# --- window to delete an events file
Window events_delete_d {
		List evfile_list \
		-height 10 \
		-width 30 \
        -headings { {evfile 30} } \
		-buttons { }
} -defaultb ok

#
# --- window for the selection of management options
#
Window mgmt_d {
	Enumerated mgmt_opts \
		-valueList { cmf_start_stop archive_int send_msg_all map_port }
	} -defaultb ok
#		-valueList { xterm os_mgr part }
#		-valueList { xterm cmfrestart }
#
# --- window for the selection of configure list options
#
Window configure_d {
	Enumerated config_opts \
 		-valueList { add_plat add_cons modify delete }
#		-valueList { add modify delete update_list }
#		-valueList { add modify delete discover }
	} -defaultb ok

# 
# --- window for management of the AMS options list
#
Window options_d {
	Enumerated options_opts \
		-valueList { backup archivelogs }
	}



#=======================================================
# Window for selecting the platform type to add
# 
#=======================================================

Window which_platf_d {
Enumerated platf_type \
	-valueList { MV WF }
} -buttons { ok cancel help } -defaultb ok



#===========================================================
# --- window for adding a Marvel platform to be managed  
#===========================================================

Window add_plat_marvel_d {
	Text platform_name
	Enumerated platform_type \
		-valueList { ES47 ES80 GS1280}\
		-styleHint option
	Text ip_address
	Text system_descr 

	Across {
		Text templatesl -width 40
		Button b_templatesl
	}

	Boolean enable 
	Boolean logging
	Boolean monitoring
	Across {
		Text evfile -width 40
		Button b_files
	}
 
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
} -buttons { ok apply cancel help } -defaultb ok


#==================================================================
# window for adding a Wildfire platform to be managed
# NOTE: Logging and monitoring are always off because the console
# associated with the platform is the terminal server's console. These
# options are never shown in this window.
#==================================================================

Window add_plat_WF_d {
	Text platform_name
	Enumerated platform_type \
		-valueList {GS80 GS160 GS320 }\
		-styleHint option
	Text ip_address
	Text system_descr 

	Across {
		Text ts_port_min 
		Text ts_port_max
	}

	Boolean enable 

	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
} -buttons { ok apply cancel help } -defaultb ok




# ---window for selecting the type of console to add
#
Window which_cons_d {
	Enumerated cons_type \
		-valueList { PC GC }
} -buttons { ok cancel help } -defaultb ok

# --- window for adding a console to be managed to the list 
#
Window add_cons_plat_d {
	Across {
		Text platform_name -width 40
		Button b_browse
	}
	Text system_name
	Text port
	Across {
		Text os_type
		Button b_ostype
	}
	Boolean enable
	Boolean logging
	Boolean monitoring
	Across {
		Text evfile -width 40 
		Button b_files
	}
	Text system_descr
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
} -buttons { ok apply cancel help } -defaultb ok 



# --- window for adding a console to be managed to the list 
#
Window add_cons_generic_d {
	Text system_name
	Text ip_address
	Text port
	Boolean enable
	Boolean logging
	Boolean monitoring
	Across {
		Text evfile -width 40 
		Button b_files
	}
	Text system_descr
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
} -buttons { ok apply cancel help } -defaultb ok 

# --- window for selecting a platform from the existing platforms list
#
Window select_plat_d {
	List plat_list \
		-width 60 \
		-height 6 \
		-headings { {name 20} {type 16}  {comments 24} } \
		-selection single \
		-buttons { }
} -buttons { ok cancel } -defaultb ok


# --- window for modifying a marvel platform from the managed list 
#
Window mod_plat_marvel_d {

	Text platform_name
	Enumerated platform_type \
		-valueList { ES47 ES80 GS1280}\
		-styleHint option
	Text ip_address
	Text system_descr 

	Across {
		Text templatesl -width 40
		Button b_templatesl
	}

	Boolean enable 
	Boolean logging
	Boolean monitoring
	Across {
		Text evfile -width 40
		Button b_files
	}

	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
} -buttons { ok cancel help } -defaultb ok 


# --- window for modifying a wildfire platform from the managed list 
#
Window mod_plat_wildfire_d {

	Text platform_name
	Enumerated platform_type \
		-valueList {GS80 GS160 GS320 }\
		-styleHint option
	Text ip_address
	Text system_descr 

	Across {
		Text ts_port_min 
		Text ts_port_max
	}

	Boolean enable 

	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
} -buttons { ok cancel help } -defaultb ok 


# -- window for modifying a console from the managed list 
#
Window mod_cons_plat_d {
	Text platform_name -editable 0
	Text system_name 
	Text port 
	Across {
		Text os_type
		Button b_ostype
	}
	Boolean enable 
	Boolean logging
	Boolean monitoring
	Across {
		Text evfile -width 40
		Button b_files
	}
	Text system_descr 
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
} -buttons { ok cancel help } -defaultb ok


# -- window for modifying a console from the managed list 
#
Window mod_cons_generic_d {
	Text system_name 
	Text ip_address
	Text port 
	Boolean enable 
	Boolean logging
	Boolean monitoring
	Across {
		Text evfile -width 40
		Button b_files
	}
	Text system_descr 
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
	Across {
	}
} -buttons { ok cancel help } -defaultb ok

# --- window for selecting event files.
#
Window eventfiles_d {
	List evfile_list \
		-height 10 \
		-width 30 \
                -headings { {evfile 30} } \
		-buttons { }
} -buttons { ok cancel } -defaultb ok

# --- window for deleting a platform from the managed list 
#
Window del_plat_d {
	Text platform_name -editable 0
	Text ip_address -editable 0
	Text platform_type -editable 0
	Text system_descr -editable 0
} -defaultb ok 

# -- window for confirming a platform deletion 
#
Window confirm_delete_d {
	Label delete_l
} -buttons { yes no } -defaultb yes 

# -- window for deleting a console from the managed list
#
Window del_cons_d {
	Text platform_name -editable 0 
	Text system_name -editable 0
	Text port -editable 0
	Text system_descr -editable 0 -width 45 
} -buttons { ok cancel help } -defaultb ok  -editable 0

# -- window for deleting a generic console from the managed list
#
Window del_gen_cons_d {
	Text system_name -editable 0
	Text ip_address -editable 0 
	Text port -editable 0
	Text system_descr -editable 0 -width 45 
} -buttons { ok cancel help } -defaultb ok  -editable 0

#
# --- window for adding search patterns
Window events_create_add_d {
	Label l
	Separator
	Text pattern
	Text pri
	Boolean case
} -buttons { ok apply cancel help } -defaultb ok


#
# --- window for modifying search patterns
Window events_create_mod_d {
	Label l
	Separator
	Text pattern
	Text pri	
	Boolean case
} -defaultb ok
#
# --- window for importing search patterns
#
Window events_create_import_d {
	List evfile_list \
		-height 10 \
		-width 56 \
                -headings { {evfile 56} } \
		-buttons { }
	List pat_list \
		-height 4 \
		-width 56 \
                -headings { {pattern 41} {pri 5} {case 10} } \
		-buttons { }
} -defaultb ok

#
# --- window for adding search patterns
Window events_modfile_add_d {
        Label l
        Separator
        Text pattern
	Text pri
	Boolean case
} -buttons { ok apply cancel help } -defaultb ok

#
# --- window for modifying search patterns
Window events_modfile_mod_d {
        Label l
        Separator
        Text pattern
	Text pri
	Boolean case
} -defaultb ok

# -- window for a event file deletion 
#
Window evfile_delete_d {
	Label l 
	List console_list \
	     -height 4 \
	     -width 40 \
	     -headings { {cons 40} } \
	     -buttons {}
} -buttons { ok } -defaultb ok 

# --- window to confirm the restart of the CMF daemon
Window cmfd_restart_confirm_d {
	Label l
} -buttons { yes no } -defaultb yes

# --- window to confirm the restart of the CMF daemon
Window cmfd_stop_confirm_d {
	Label l
} -buttons { yes no } -defaultb yes

#
# --- window to show connect options
#
Window connect_d {
	Enumerated connect_opts \
		-valueList { sh ro ex }
} -defaultb ok

#
# --- window to view users on console.
#
Window view_users_d {
	List out \
		-width 60 \
		-height 4 \
		-headings { {user 20} {ipaddr 20} {mode 20} } \
		-autosort 0 \
		-buttons { disconnect }
	Label nousers
} -buttons { ok help } -defaultb ok

#
# --- window to send message.
#
Window send_msg_d {
	Text msgtxt -width 50
#	Text msgtxt -width 76 -height 1
} -buttons { ok cancel help }
#

#
# --- Window to Restart/Stop cmfd.
#
Window cmf_start_stop_d {
	Label status
	Enumerated cmfd_opts \
		-valueList { restart stop }
} -defaultb ok
	
#
# --- Window to set cmfd's archiving interval
#
Window archive_int_d {
	Across {
		Text arch_time 
		Label days 
	}
} -defaultb ok


#
# --- Window to set map ports.
#
Window mapped_ports_list_d {
	List mp_list \
		-width 40 \
		-height 10 \
		-headings { {name 20} {port 8} {auth 12} } \
		-autosort 0 \
		-buttons { modify } \
		-doubleClk modify 
} -buttons { ok cancel help }

Window mapped_port_d {
	Text name -editable 0
	Text port -width 30
	Enumerated auth -valueList { yes no }
} -buttons { ok cancel help }

Window confirm_mapped_port_in_use_d {
	Label msg_l
} -buttons { yes no } -defaultb no 

Window force_conn_d {
	Label msg_l
} -buttons { yes no }

Window force_conn_wf_d {
	Label msg_l
} -buttons { ok }

Window ostype_list_d {
	List ostype_list \
		-width 30 \
		-height 10 \
		-headings { { ostype 30 } } \
		-autosort 0 \
		-buttons {}
} -buttons { ok cancel }


Window templates_list_d {
	List templates_list \
		-width 40 \
		-height 10 \
		-headings { { templates 40 } } \
		-autosort 0 \
		-buttons {}
} -buttons { ok cancel }
# --- end of window definitions
} 
