From bbac94607f09155f6dacfa4212a7d539530fe048 Mon Sep 17 00:00:00 2001 From: setop Date: Wed, 27 Nov 2024 21:34:02 +0100 Subject: [PATCH] deploy pages --- README.md | 19 - elm.json | 24 - public/index.html | 5444 +++++++++++++++++++++++++++++++++++++++++++++ src/Main.elm | 127 -- uloc.sh | 4 - 5 files changed, 5444 insertions(+), 174 deletions(-) delete mode 100644 README.md delete mode 100644 elm.json create mode 100644 public/index.html delete mode 100644 src/Main.elm delete mode 100755 uloc.sh diff --git a/README.md b/README.md deleted file mode 100644 index b9189dd..0000000 --- a/README.md +++ /dev/null @@ -1,19 +0,0 @@ - -Implements naming convention based on resource properies, such as type, location, role, application code - -Requirement : name must update in real time when properties are edited (no stale result). - -# TODO - -- [x] virtual machines - - [x] code - - [x] region - - [x] environment - - [x] role - - [x] increment -- [ ] other resource type - - [ ] resource group - - [ ] storage account -- [ ] some styling -- [ ] propose some links (azure web console, datadog, leanix) -- [ ] lookup code from app name with fuzzy search (try native component at first) diff --git a/elm.json b/elm.json deleted file mode 100644 index ce2a08d..0000000 --- a/elm.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "application", - "source-directories": [ - "src" - ], - "elm-version": "0.19.1", - "dependencies": { - "direct": { - "elm/browser": "1.0.2", - "elm/core": "1.0.5", - "elm/html": "1.0.0" - }, - "indirect": { - "elm/json": "1.1.3", - "elm/time": "1.0.0", - "elm/url": "1.0.0", - "elm/virtual-dom": "1.0.3" - } - }, - "test-dependencies": { - "direct": {}, - "indirect": {} - } -} diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..b968d5d --- /dev/null +++ b/public/index.html @@ -0,0 +1,5444 @@ + + + + + Main + + + + + +

+
+
+
+
+
\ No newline at end of file
diff --git a/src/Main.elm b/src/Main.elm
deleted file mode 100644
index dbd3e01..0000000
--- a/src/Main.elm
+++ /dev/null
@@ -1,127 +0,0 @@
-module Main exposing (..)
-
-import Browser
-import Html exposing (..)
-import Html.Attributes exposing (..)
-import Html.Events exposing (..)
-
-
-main =
-    Browser.sandbox
-        { init = init
-        , view = view
-        , update = update
-        }
-
-
-init =
-    { reg = "EW", code = "zz", env = "P", role = "APP", incr = 1 }
-
-
-regions =
-    [ ( "EW", "West Europe, Amsterdam" )
-    , ( "EN", "North Europe, Dublin" )
-    ]
-
-
-roles =
-    [ ( "APP", "Application Server" )
-    , ( "WEB", "Web Server" )
-    , ( "DBA", "Database" )
-    , ( "RDS", "Remote Desktop Server" )
-    ]
-
-
-envs =
-    [ ( "P", "Production" )
-    , ( "E", "Préproduction" )
-    , ( "U", "UAT" )
-    , ( "T", "Test" )
-    , ( "I", "Integration" )
-    ]
-
-
-type Msg
-    = InputCode String
-    | InputReg String
-    | InputRole String
-    | InputEnv String
-    | InputIncr String
-
-
-update msg model =
-    case msg of
-        InputCode s ->
-            { model | code = s }
-
-        InputReg s ->
-            { model | reg = s }
-
-        InputRole s ->
-            { model | role = s }
-
-        InputEnv s ->
-            { model | env = s }
-
-        InputIncr s ->
-            { model | incr = String.toInt s |> Maybe.withDefault 1 }
-
-
-formatName r =
-    "AL"
-        ++ r.reg
-        ++ "1"
-        -- AZ is hard coded :(
-        ++ r.code
-        ++ r.env
-        ++ r.role
-        ++ (if r.incr < 10 then
-                "0"
-
-            else
-                ""
-           )
-        ++ String.fromInt r.incr
-
-
-br_ =
-    br [] []
-
-
-renderSelect : (String -> Msg) -> List ( String, String ) -> Html Msg
-renderSelect msg options =
-    select [ onInput msg ] (options |> List.map renderOption)
-
-
-renderOption : ( String, String ) -> Html Msg
-renderOption opt =
-    option [ opt |> Tuple.first |> value ] [ opt |> Tuple.second |> text ]
-
-
-view model =
-    div []
-        [ h1 [] [ text "Name Generator 😎" ]
-        , br_
-        , text (formatName model)
-        , br_
-        , br_
-        , br_
-        , text "code"
-        , input [ onInput InputCode, value model.code ] []
-        , br_
-        , br_
-        , text "region"
-        , renderSelect InputReg regions
-        , br_
-        , br_
-        , text "environment"
-        , renderSelect InputEnv envs
-        , br_
-        , br_
-        , text "role"
-        , renderSelect InputRole roles
-        , br_
-        , br_
-        , text "increment"
-        , select [ onInput InputIncr ] (List.range 1 20 |> List.map (String.fromInt >> (\s -> ( s, s )) >> renderOption))
-        ]
diff --git a/uloc.sh b/uloc.sh
deleted file mode 100755
index db9c733..0000000
--- a/uloc.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-find . \( -name "*.sh" -or -name "*.elm" \) -and -not \( -path "./elm-stuff/*" -or -path "./.vscode/*" \) -print0 | \
-xargs -0 cat | countuniq0  # sort -u | wc -l