...
 
Commits (2)
......@@ -60,21 +60,15 @@ module App =
( View.errorView ex (fun _ -> dispatch (ChannelsTableMsg ChannelsTable.Load)) ) ]
| Loaded channels ->
let latestReleaseChannel = channels |> latestNonPreviewChannel
let latestRuntime = string latestReleaseChannel.Index.LatestRelease
let latestSdk =
latestReleaseChannel.Info
|> Loadable.map (fun i -> i.Releases
|> List.maxBy (fun r -> r.Release.ReleaseDate)
|> fun r -> match r.Release.Sdk.VersionDisplay with
| Some v -> v
| None -> string r.Release.Sdk.Version)
let latestRuntime = string latestReleaseChannel.Index.LatestRuntime
let latestSdk = string latestReleaseChannel.Index.LatestSdk
div [ ]
[ nav [ ]
[ div [ Class "container" ]
[ h1 [ Id "title" ] [ str "Versions of" ]
a [ Href "#core"; Class "active" ] [ str ".NET Core" ]
a [ (*Href "#standard"*) Disabled true; Title "Coming soon™"; Style [ Cursor "default"; CSSProp.Color "rgba(255, 255, 255, 0.6)" ] ] [ str ".NET Standard" ]
a [ (*Href "#framework"*) Disabled true; Title "Coming soon™"; Style [ Cursor "default"; CSSProp.Color "rgba(255, 255, 255, 0.6)" ] ] [ str ".NET Framework" ]
] ]
header [ ]
[ div [ Class "container row" ]
......@@ -84,14 +78,8 @@ module App =
span [ Class "label" ]
[ str "Latest runtime" ] ]
div [ Class "cell" ]
[ ( match latestSdk with
| Loaded v -> span [ Class "version" ] [ str v ]
| Unloaded | Loading -> div [ Class "loading" ] [ ]
| Error ex ->
span [ Class "error-symbol"
Title (sprintf "Click to try again. Error details: %s" ex.Message)
OnClick (fun _ -> dispatch (ChannelsTableMsg <| ChannelsTable.channelMsg latestReleaseChannel.Guid Channel.Load)) ]
[ str "×" ] )
[ span [ Class "version" ]
[ str latestSdk ]
span [ Class "label" ]
[ str "Latest SDK" ] ] ] ]
section [ Id "search"
......
......@@ -41,14 +41,9 @@ module ChannelsTable =
index
|> List.map Channel.init
let states = channels |> List.map fst
let latestChannel =
states
|> List.filter (fun c -> c.Index.SupportPhase <> "preview")
|> List.maxBy (fun c -> c.Index.LatestRelease)
let cmds =
channels
|> List.map (fun (state, cmd) -> Cmd.map (channelMsg state.Guid) cmd)
|> fun list -> Cmd.ofMsg (channelMsg latestChannel.Guid Channel.Load) :: list
|> Cmd.batch
{ state with Channels = Loaded states }, cmds
| FetchError ex ->
......
......@@ -32,6 +32,8 @@ module Data =
{ ChannelVersion: Version
LatestRelease: Version
LatestReleaseDate: DateTime
LatestRuntime: Version
LatestSdk: Version
Product: string
SupportPhase: string
EolDate: DateTime option
......@@ -43,6 +45,8 @@ module Data =
{ ChannelVersion = get.Required.Field "channel-version" Decode.version
LatestRelease = get.Required.Field "latest-release" Decode.version
LatestReleaseDate = get.Required.Field "latest-release-date" Decode.datetime
LatestRuntime = get.Required.Field "latest-runtime" Decode.version
LatestSdk = get.Required.Field "latest-sdk" Decode.version
Product = get.Required.Field "product" Decode.string
SupportPhase = get.Required.Field "support-phase" Decode.string
EolDate = getOptionalDate get "eol-date"
......@@ -109,7 +113,7 @@ module Data =
VersionDisplay = get.Optional.Field "version-display" Decode.string
VersionAspnetcoremodule =
get.Optional.Field "version-aspnetcoremodule"
(Decode.oneOf [ Decode.list Decode.version; Decode.versionAsList ])
(Decode.oneOf [ Decode.list Decode.version; Decode.versionAsList; Decode.nil [] ])
Files = get.Required.Field "files" (Decode.list File.Decoder) })
type Symbols =
......@@ -148,6 +152,8 @@ module Data =
{ ChannelVersion: Version
LatestRelease: Version
LatestReleaseDate: DateTime
LatestRuntime: Version
LatestSdk: Version
SupportPhase: string
EolDate: DateTime option
LifecyclePolicy: Url
......@@ -159,6 +165,8 @@ module Data =
{ ChannelVersion = get.Required.Field "channel-version" Decode.version
LatestRelease = get.Required.Field "latest-release" Decode.version
LatestReleaseDate = get.Required.Field "latest-release-date" Decode.datetime
LatestRuntime = get.Required.Field "latest-runtime" Decode.version
LatestSdk = get.Required.Field "latest-sdk" Decode.version
SupportPhase = get.Required.Field "support-phase" Decode.string
EolDate = getOptionalDate get "eol-date"
LifecyclePolicy = get.Required.Field "lifecycle-policy" Decode.string
......