From fac5d451d6b2d15e895cc1b389019f3ab65ee208 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Sat, 1 Sep 2018 10:46:39 +0200 Subject: [PATCH] use space instead of slash as separator between test-name and metric (in tables) so that the hear could be wrapped in a more narrow column if needed (e.g. if the number of test sets/metric is large) --- Handler/Shared.hs | 3 +++ Handler/Tables.hs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Handler/Shared.hs b/Handler/Shared.hs index 7c5fa1d..321cf6d 100644 --- a/Handler/Shared.hs +++ b/Handler/Shared.hs @@ -353,6 +353,9 @@ formatParameter param = parameterName param ++ "=" ++ parameterValue param formatTest :: Test -> Text formatTest test = (testName test) ++ "/" ++ (T.pack $ show $ testMetric test) +formatTestForHtml :: Test -> Text +formatTestForHtml test = (testName test) ++ " " ++ (T.pack $ show $ testMetric test) + findFilePossiblyCompressed :: FilePath -> IO (Maybe FilePath) findFilePossiblyCompressed baseFilePath = do let possibleFiles = [baseFilePath] ++ (map (baseFilePath <.>) ["gz", "bz2", "xz"]) diff --git a/Handler/Tables.hs b/Handler/Tables.hs index 073aa09..45c287b 100644 --- a/Handler/Tables.hs +++ b/Handler/Tables.hs @@ -112,7 +112,7 @@ statusCell :: Text -> RepoScheme -> Repo -> (a -> (SubmissionId, Submission, Var statusCell challengeName repoScheme challengeRepo fun = Table.widget "" (statusCellWidget challengeName repoScheme challengeRepo . fun) resultCell :: Test -> (a -> Maybe Evaluation) -> Table App a -resultCell test fun = hoverTextCell (formatTest test) (formatTruncatedScore (testPrecision test) . fun) (formatFullScore . fun) +resultCell test fun = hoverTextCell (formatTestForHtml test) (formatTruncatedScore (testPrecision test) . fun) (formatFullScore . fun) statusCellWidget :: Eq a => Text -> RepoScheme -> Repo -> (SubmissionId, Submission, VariantId, Variant, a, Maybe a) -> WidgetFor App () statusCellWidget challengeName repoScheme challengeRepo (submissionId, submission, variantId, _, userId, mauthId) = $(widgetFile "submission-status")