cachet icon indicating copy to clipboard operation
cachet copied to clipboard

Setup page

Open jbrooksuk opened this issue 12 years ago • 17 comments

When installing from Heroku, it'd be good to have some kind of setup page which:

  • [x] Setup required app_name, app_url, show_support settings.
  • [x] Creates an admin account.

jbrooksuk avatar Nov 21 '14 21:11 jbrooksuk

I've started on a really basic setup page. When deploying to Heroku, the success url will take you to it. So far it only creates some settings.

jbrooksuk avatar Nov 24 '14 10:11 jbrooksuk

@jbrooksuk looking at inviting users

manavo avatar Nov 25 '14 15:11 manavo

Did you see the level field? I was using that as a reference to see whether it's the "admin" user or not. Nothing special yet.

jbrooksuk avatar Nov 25 '14 15:11 jbrooksuk

Hadn't noticed it, but will make use of it!

manavo avatar Nov 25 '14 15:11 manavo

We'll most likely need more control in the future, so it's just a starting point.

jbrooksuk avatar Nov 25 '14 15:11 jbrooksuk

We should implement https://github.com/Zizaco/confide, has a good role management.

pedrommone avatar Nov 25 '14 15:11 pedrommone

@Ehesp what do you think about using Angular here? My thinking is that for adding new items:

  • Users
  • Webhooks
  • Components
  • Incidents

It'll be super easy to use two-way data binding without much manual work.

jbrooksuk avatar Nov 29 '14 15:11 jbrooksuk

@Ehesp bump.

jbrooksuk avatar Dec 01 '14 08:12 jbrooksuk

If we just want data binding, Angular might be an overkill? This is a really good library that does just that: http://rivetsjs.com/

manavo avatar Dec 01 '14 10:12 manavo

if Rivet can play nicely with jQuery, it would probably be a better option. From what I see, jQuery is still needed for the Ajax stuff?

Basically the thing we need to think about it Blade. If we start to go down the Ajax/data binding route, Blade becomes useless. Then if some pages don't use say Rivet, and others do you've got a mix of different ways of doing the same things which become confusing.

Also, since it's done via Ajax your controllers/routes need to behave differently and can't use the default CSRF stuff.

In my opinion, it's all or nothing.

Ehesp avatar Dec 01 '14 10:12 Ehesp

Yep, would need jQuery for all the calls, but we already have jQuery so no overhead there.

If we go down the data binding route it makes Blade a bit less useful. But it still has some use for building layouts, etc.

CSRF can definitely be used, just need a small tweak: http://stackoverflow.com/a/20446415/349012

manavo avatar Dec 01 '14 10:12 manavo

How would data binding result in Blade being less useful? Serious question, as I'm new to Angular and the concept of two-way data bindings (in that sense).

jbrooksuk avatar Dec 01 '14 10:12 jbrooksuk

You dont necessarily need Angular/jQuery etc for data-binding anyway. Can be done easily enough with native JS, by using the pub sub pattern. Its not tooo difficult, but things like Angular do make it alot easier!

ilikeprograms avatar Dec 01 '14 11:12 ilikeprograms

@manavo Okay cool, we'll write some OOJ anyway for it all :)

@ilikeprograms Yeah but it's a lot of manual code to write for the sake of pulling in a package. All we need really is data binding, something to grab the data from the API and we're good to go.

Ehesp avatar Dec 01 '14 11:12 Ehesp

@Ehesp Mmmm kinda yeah :p

I mean its not toooo much work to write a main data-binding controller, but still. Could just use a package, if its not too much overhead etc I guess :)

Was just throwing it out there as an option!

ilikeprograms avatar Dec 01 '14 11:12 ilikeprograms

Ok, to make this simpler for all of us, here is my idea:

  • The setup page is only used to create the admin user and set the most basic app configuration (name and url).
  • After that we redirect the user to the dashboard where they can create components, incidents and add users etc.
  • We could provide new users with a walkthrough type thing (Guiders.js) that explains each tab if needed.

This does two things:

  1. It makes Cachet look easier to setup. It still is, but there is less "oh my god, I've got loads to fill in"
  2. It's easier for us to create a basic setup page and redirect rather than essentially recreating the dashboard within the setup.

jbrooksuk avatar Dec 01 '14 13:12 jbrooksuk

I'm going with my idea above. As such this issue is now closed.

jbrooksuk avatar Dec 01 '14 14:12 jbrooksuk