Index: trunk/ippMonitor/generate
===================================================================
--- trunk/ippMonitor/generate	(revision 13566)
+++ trunk/ippMonitor/generate	(revision 13595)
@@ -73,7 +73,12 @@
 	}
 
-	# the ARGS commands defines arguments to FIELDS commands
+	# the ARGS commands define arguments to FIELDS commands
 	if ($key eq "ARGS") {
 	    push @linkargs, $value;
+	}
+
+	# the OP commands define field operations
+	if ($key eq "OP") {
+	    push @opwords, $value;
 	}
 
@@ -123,4 +128,8 @@
     }
 
+    foreach $opword (@opwords) {
+	&parse_opwords ($opword);
+    }
+
     if (0) {
 	print STDERR "show: $show[0]\n";
@@ -219,7 +228,12 @@
     # add column sorting elements here
     for ($i = 0; $i < @field; $i++) {
+	($label, $value, $string) = &parse_label ($show[$i]);
 	if ($show[$i] eq "none")  { next; }
 	# printf FILE "echo \"<th class=\\\"list\\\"> $name[$i] </th>\\n\";\n";
-	printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n";
+	if ($label eq "op") {
+	    printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$opf{$value}\", \$buttonLink, \$ID, '$myFile');\n";
+	} else {
+	    printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n";
+	}
     }
 }
@@ -292,4 +306,18 @@
 	}
 
+	if ($label eq "op") {
+	    # create the basic link variable
+	    if ($link[$i]) {
+		printf FILE "  \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n";
+		# add extra GET data to target
+		if ($extras[$i]) { &parse_extras ($linkarg{$extras[$i]}); } 
+		$myLink = "\$link";
+	    } else {
+		$myLink = "\"\"";
+	    }
+	    printf FILE "  write_table_cell (\$class, $myLink, $ops{$value});\n";
+	    next;
+	}
+
 	if (($label eq "image") && !$link[$i]) {
 	    # print the actual table cell line with the image...
@@ -485,4 +513,27 @@
 }
 
+sub parse_opwords {
+    my ($value) = $_[0];
+
+    @words = split (" ", $value);
+    $name = shift (@words);
+
+    $opline = "";
+    foreach $word (@words) {
+	$fword = &parse_fieldname ($word);
+	push @outwords, $fword;
+	if ($word =~ m|^\$|) {
+	    $word = substr ($word, 1);
+	}
+	push @outfields, $word;
+    }
+    $outline = join (" ", @outwords);
+    $ops{$name} = $outline;
+    $outline = join (" ", @outfields);
+    $opf{$name} = $outline;
+
+    return 1;
+}
+
 sub init_key {
     my ($key)   = $_[0];
