Changeset 2686


Ignore:
Timestamp:
Nov 15, 2011 12:11:49 PM (10 years ago)
Author:
gah
Message:
 
Location:
trunk/gui
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/aclocal.m4

    r2117 r2686  
    1 builtin(include,./tclconfig/tcl.m4)
     1builtin(include,./cf/tcl.m4)
  • trunk/gui/scripts/analyzer.tcl

    r2611 r2686  
    438438            set ::errorInfo "\n\n== RAPPTURE INPUT ==\n[$_tool xml xml]"
    439439            Rappture::bugreport::register "Problem launching job:\n$result"
     440            Rappture::bugreport::attachment [$_tool xml xml]
    440441            Rappture::bugreport::send
    441442        }
  • trunk/gui/scripts/bugreport.tcl

    r2611 r2686  
    435435
    436436# ----------------------------------------------------------------------
     437# USAGE: attachment <string>
     438#
     439# Low-level function used to capture information about a bug report
     440# prior to calling "send", which actually sends the ticket.  We usually
     441# let the user preview the information and decide whether or not to
     442# send the ticket.
     443# ----------------------------------------------------------------------
     444proc Rappture::bugreport::attachment { string } {
     445    variable details
     446    set details(attachment) $string
     447}
     448
     449# ----------------------------------------------------------------------
    437450# USAGE: send
    438451#
     
    456469        set report "$cmts\n\n[string repeat = 72]\n$report"
    457470    }
    458 
     471    set toolFile ""
     472    if { [info exists details(attachment)] } {
     473        set toolFile "/tmp/tool[pid].xml"
     474        set f [open $toolFile "w"]
     475        puts $f $details(attachment)
     476        close $f
     477        unset details(attachment)
     478    }
    459479    set query [http::formatQuery \
    460480        option com_support \
     481        controller tickets \
     482        upload $toolFile \
    461483        task create \
    462484        no_html 1 \
     
    472494        type $settings(type) \
    473495    ]
    474    
    475496    set url [Rappture::Tool::resources -huburl]
    476497    if { $url == "" } {
     
    492513    http::cleanup $token
    493514
     515    if { $toolFile != "" } {
     516        file delete $toolFile
     517    }
    494518    if {[regexp {Ticket #[0-9]* +\(.*?\) +[0-9]+ +times} $info match]} {
    495519        return $match
     
    654678set btags [bindtags .bugreport]
    655679bindtags .bugreport [linsert $btags 0 BugReportOnTop]
     680
Note: See TracChangeset for help on using the changeset viewer.