From 6701e00d376daeecd7a07d5eceb0272e137d8eaf Mon Sep 17 00:00:00 2001 From: Jude N Date: Sun, 6 Aug 2017 12:32:30 -0400 Subject: [PATCH] Checkpoint commit - blips show up as a sidebar now instead of at the bottom --- TODO.md | 4 + mix.exs | 3 +- mix.lock | 1 + rel/config.exs | 47 ++++ .../radar_data_point_controller_test.exs | 2 +- web/router.ex | 8 - web/templates/radar/index.html.eex | 218 +++++++++--------- web/templates/radar_data_point/new.html.eex | 1 - 8 files changed, 170 insertions(+), 114 deletions(-) create mode 100644 rel/config.exs diff --git a/TODO.md b/TODO.md index d68841e..57c48f5 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,7 @@ - Bugs: - Why's the trial and adopt ections so much larger than the asses and hold ? + - Is it a problem the index is potentially reset after adding/deleting blips ? + - Fix the ref table so items are printed out in order - Big Features - The ability to drag and drop items within the map @@ -20,3 +22,5 @@ - Move new-items and ref-table divs to a sliding panal - Resize the radar so its reactive ( + +- Add an 'edit' tab along with the delete ? Probably just easier to delete and reenter. diff --git a/mix.exs b/mix.exs index 3fc2fd7..3d89f8c 100644 --- a/mix.exs +++ b/mix.exs @@ -37,7 +37,8 @@ defmodule TechRadarEditor.Mixfile do {:phoenix_html, "~> 2.6"}, {:phoenix_live_reload, "~> 1.0", only: :dev}, {:gettext, "~> 0.11"}, - {:cowboy, "~> 1.0"}] + {:cowboy, "~> 1.0"}, + {:distillery, "~> 1.0"}] end # Aliases are shortcuts or tasks specific to the current project. diff --git a/mix.lock b/mix.lock index 9c38e9c..edc8c17 100644 --- a/mix.lock +++ b/mix.lock @@ -3,6 +3,7 @@ "cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], [], "hexpm"}, "db_connection": {:hex, :db_connection, "1.1.2", "2865c2a4bae0714e2213a0ce60a1b12d76a6efba0c51fbda59c9ab8d1accc7a8", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"}, "decimal": {:hex, :decimal, "1.3.1", "157b3cedb2bfcb5359372a7766dd7a41091ad34578296e951f58a946fcab49c6", [:mix], [], "hexpm"}, + "distillery": {:hex, :distillery, "1.4.1", "546d851bf27ae8fe0727e10e4fc4e146ad836eecee138263a60431e688044ed3", [], [], "hexpm"}, "ecto": {:hex, :ecto, "2.1.4", "d1ba932813ec0e0d9db481ef2c17777f1cefb11fc90fa7c142ff354972dfba7e", [:mix], [{:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: true]}, {:decimal, "~> 1.2", [hex: :decimal, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.8.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"}, "fs": {:hex, :fs, "0.9.2", "ed17036c26c3f70ac49781ed9220a50c36775c6ca2cf8182d123b6566e49ec59", [:rebar], [], "hexpm"}, "gettext": {:hex, :gettext, "0.13.1", "5e0daf4e7636d771c4c71ad5f3f53ba09a9ae5c250e1ab9c42ba9edccc476263", [:mix], [], "hexpm"}, diff --git a/rel/config.exs b/rel/config.exs new file mode 100644 index 0000000..f58fae2 --- /dev/null +++ b/rel/config.exs @@ -0,0 +1,47 @@ +# Import all plugins from `rel/plugins` +# They can then be used by adding `plugin MyPlugin` to +# either an environment, or release definition, where +# `MyPlugin` is the name of the plugin module. +Path.join(["rel", "plugins", "*.exs"]) +|> Path.wildcard() +|> Enum.map(&Code.eval_file(&1)) + +use Mix.Releases.Config, + # This sets the default release built by `mix release` + default_release: :default, + # This sets the default environment used by `mix release` + default_environment: Mix.env() + +# For a full list of config options for both releases +# and environments, visit https://hexdocs.pm/distillery/configuration.html + + +# You may define one or more environments in this file, +# an environment's settings will override those of a release +# when building in that environment, this combination of release +# and environment configuration is called a profile + +environment :dev do + set dev_mode: true + set include_erts: false + set cookie: :"NBhg=&2xapMkhKasblD2V3wWc}6H=JWAH3M;*_hl*@<2iI6co?Q8:}]$!2H`A)[(" +end + +environment :prod do + set include_erts: true + set include_src: false + set cookie: :"AObX{{4)q7^jvvp.qSlKVp$ZbrY?pa|%XJ5^f[Vw6Pnk@Ok.j4xU^/[dIC*S@^|E" +end + +# You may define one or more releases in this file. +# If you have not set a default release, or selected one +# when running `mix release`, the first release in the file +# will be used by default + +release :tech_radar_editor do + set version: current_version(:tech_radar_editor) + set applications: [ + :runtime_tools + ] +end + diff --git a/test/controllers/radar_data_point_controller_test.exs b/test/controllers/radar_data_point_controller_test.exs index d687e34..65a3b7f 100644 --- a/test/controllers/radar_data_point_controller_test.exs +++ b/test/controllers/radar_data_point_controller_test.exs @@ -26,7 +26,7 @@ defmodule TechRadarEditor.RadarDataPointControllerTest do assert html_response(conn, 200) =~ "New radar data point" end - test "show s chosen resource", %{conn: conn} do + test "shows chosen resource", %{conn: conn} do radar_data_point = Repo.insert! %RadarDataPoint{} conn = get conn, radar_data_point_path(conn, :show, radar_data_point) assert html_response(conn, 200) =~ "Show radar data point" diff --git a/web/router.ex b/web/router.ex index 7b20d95..49190e2 100644 --- a/web/router.ex +++ b/web/router.ex @@ -15,14 +15,6 @@ defmodule TechRadarEditor.Router do scope "/", TechRadarEditor do pipe_through :browser # Use the default browser stack - -# get "/", PageController, :index -# get "/radar", RadarController, :index - -# get "/original", PageController, :index -# get "/", RadarController, :index -# post "/", RadarController, :create # ???? - resources "/", RadarController, only: [:index, :create, :delete] end diff --git a/web/templates/radar/index.html.eex b/web/templates/radar/index.html.eex index 28684e9..59da375 100644 --- a/web/templates/radar/index.html.eex +++ b/web/templates/radar/index.html.eex @@ -1,110 +1,122 @@ -
-
-
- - <%= form_for @changeset, radar_path(@conn, :create), fn f -> %> - - - - - - - - - - - - - - - - - -
QuadrantCycleNameDescription
- <%= select f, :quadrant, Enum.with_index(TechRadarEditor.RadarDataPoint.quadrants,1) %> - - <%= select f, :cycle, Enum.with_index(TechRadarEditor.RadarDataPoint.cycles,1) %> - - <%= text_input f, :name %> - - <%= text_input f, :description %> - - <%= hidden_input f, :is_new, value: "true" %> - <%= submit "Add", class: "btn btn-primary" %> -
- <% end %> -
-
-
+
+
+
+ × +
+ <%= form_for @changeset, radar_path(@conn, :create), fn f -> %> + + + + + + + + + + + + + + + + + +
QuadrantCycleNameDescription
+ <%= select f, :quadrant, Enum.with_index(TechRadarEditor.RadarDataPoint.quadrants,1) %> + + <%= select f, :cycle, Enum.with_index(TechRadarEditor.RadarDataPoint.cycles,1) %> + + <%= text_input f, :name %> + + <%= text_input f, :description %> + + <%= hidden_input f, :is_new, value: "true" %> + <%= submit "Add", class: "btn btn-primary" %> +
+ <% end %> +
+
+
+
+
Admin Radar Data Point diff --git a/web/templates/radar_data_point/new.html.eex b/web/templates/radar_data_point/new.html.eex index 93f68e0..f0644cd 100644 --- a/web/templates/radar_data_point/new.html.eex +++ b/web/templates/radar_data_point/new.html.eex @@ -1,4 +1,3 @@ -

New radar data point

<%= render "form.html", changeset: @changeset, -- 2.39.2