6c13b4fd7fc4334683e6345e9e640147bd50e2b2
braney
Wed May 18 13:44:14 2011 -0700
add some printf's for hub clear
diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c
index dc1d1f6..0fd4aaa 100644
--- src/hg/hgHubConnect/hgHubConnect.c
+++ src/hg/hgHubConnect/hgHubConnect.c
@@ -1,279 +1,281 @@
/* hgHubConnect - the CGI web-based program to select track data hubs to connect with. */
#include "common.h"
#include "hash.h"
#include "linefile.h"
#include "errabort.h"
#include "errCatch.h"
#include "hCommon.h"
#include "dystring.h"
#include "jksql.h"
#include "cheapcgi.h"
#include "htmshell.h"
#include "hdb.h"
#include "hui.h"
#include "cart.h"
#include "dbDb.h"
#include "web.h"
#include "trackHub.h"
#include "hubConnect.h"
#include "dystring.h"
#include "hPrint.h"
#define hgHub "hgHub_" /* prefix for all control variables */
#define hgHubDo hgHub "do_" /* prefix for all commands */
#define hgHubDoAdd hgHubDo "add"
#define hgHubDoClear hgHubDo "clear"
struct cart *cart; /* The user's ui state. */
struct hash *oldVars = NULL;
static char *destUrl = "../cgi-bin/hgTracks";
static char *pageTitle = "Import Tracks from Data Hubs";
char *database = NULL;
char *organism = NULL;
boolean nameInCommaList(char *name, char *commaList);
static void hgHubConnectUnlisted()
/* Put up the list of unlisted hubs and other controls for the page. */
{
printf("Unlisted Hubs
");
struct hubConnectStatus *hub, *hubList = hubConnectStatusListFromCart(cart);
int count = 0;
for(hub = hubList; hub; hub = hub->next)
{
/* if the hub is public, then don't list it here */
if (!isHubUnlisted(hub))
continue;
if (count)
webPrintLinkTableNewRow();
else
webPrintLinkTableStart();
count++;
if (isEmpty(hub->errorMessage))
{
webPrintLinkCellStart();
char hubName[32];
safef(hubName, sizeof(hubName), "%s%u", hgHubConnectHubVarPrefix, hub->id);
cartMakeCheckBox(cart, hubName, FALSE);
webPrintLinkCellEnd();
}
else
webPrintLinkCell("error");
webPrintLinkCell(hub->shortLabel);
if (isEmpty(hub->errorMessage))
webPrintLinkCell(hub->longLabel);
else
webPrintLinkCell(hub->errorMessage);
webPrintLinkCell(hub->hubUrl);
}
if (count)
webPrintLinkTableEnd();
else
printf("No Unlisted Track Hubs for this genome assembly
");
}
static void makeNewHubButton()
{
printf("
clearing hub %s\n",url);
if (url != NULL)
hubClearStatus(url);
else
errAbort("must specify url in %s\n", hgHubDataText);
+printf("Completed\n");
}
void doMiddle(struct cart *theCart)
/* Write header and body of html page. */
{
cart = theCart;
setUdcCacheDir();
if (cartVarExists(cart, hgHubDoAdd))
doAddUnlistedHub(cart, NULL);
else if (cartVarExists(cart, hgHubDoClear))
doClearHub(cart);
else
{
cartWebStart(cart, NULL, pageTitle);
printf(
"Track data hubs are collections of tracks from outside of UCSC that can be imported into "
"the Genome Browser. To import a public hub check the box in the list below. "
"After import the hub will show up as a group of tracks with its own blue "
"bar and label underneath the main browser graphic, and in the configure page.
\n"
);
makeGenomePrint();
hubCheckForNew(database, cart);
printf("
");
printf("
");
makeNewHubButton();
}
cartWebEnd();
}
-char *excludeVars[] = {"Submit", "submit", "hc_one_url", hgHubConnectCgiDestUrl, hgHubDoAdd, hgHubDoClear hgHubDataText, NULL};
+char *excludeVars[] = {"Submit", "submit", "hc_one_url", hgHubConnectCgiDestUrl, hgHubDoAdd, hgHubDoClear, hgHubDataText, NULL};
int main(int argc, char *argv[])
/* Process command line. */
{
oldVars = hashNew(10);
cgiSpoof(&argc, argv);
cartEmptyShell(doMiddle, hUserCookie(), excludeVars, oldVars);
return 0;
}