diff --git a/app/assets/sass/partials/_sidebar.scss b/app/assets/sass/partials/_sidebar.scss
index c8fa35e2..59bbc00f 100644
--- a/app/assets/sass/partials/_sidebar.scss
+++ b/app/assets/sass/partials/_sidebar.scss
@@ -55,6 +55,12 @@ body.dashboard {
text-decoration: none;
}
}
+
+ &.sub-nav-item {
+ a {
+ padding-left: 40px;
+ }
+ }
}
}
}
diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php
index 5733f1fe..24718312 100644
--- a/app/controllers/DashboardController.php
+++ b/app/controllers/DashboardController.php
@@ -33,6 +33,16 @@ class DashboardController extends Controller {
]);
}
+ /**
+ * Shows the add component view.
+ * @return \Illuminate\View\View
+ */
+ public function showAddComponent() {
+ return View::make('dashboard.component-add')->with([
+ 'pageTitle' => 'Add Component - Dashboard',
+ ]);
+ }
+
/**
* Creates a new component.
* @return \Illuminate\Http\RedirectResponse
diff --git a/app/lang/en/cachet.php b/app/lang/en/cachet.php
index 5f6465e3..86184dd1 100644
--- a/app/lang/en/cachet.php
+++ b/app/lang/en/cachet.php
@@ -32,6 +32,7 @@ return array(
'dashboard' => array(
'dashboard' => 'Dashboard',
'components' => 'Components',
+ 'component-add' => 'Add Component',
'incidents' => 'Incidents',
'metrics' => 'Metrics',
'status_page' => 'Status Page',
diff --git a/app/routes/dashboard.php b/app/routes/dashboard.php
index 561ad3c9..2aab7ade 100644
--- a/app/routes/dashboard.php
+++ b/app/routes/dashboard.php
@@ -6,7 +6,8 @@ Route::group(['before' => 'auth', 'prefix' => 'dashboard'], function() {
// TODO: Switch for Route::controller?
Route::get('components', ['as' => 'dashboard.components', 'uses' => 'DashboardController@showComponents']);
- Route::post('components/create', 'DashboardController@createComponentAction');
+ Route::get('components/add', ['as' => 'dashboard.components.add', 'uses' => 'DashboardController@showAddComponent']);
+ Route::post('components/add', 'DashboardController@createComponentAction');
Route::get('components/{component}/delete', 'DashboardController@deleteComponentAction');
Route::get('incidents', ['as' => 'dashboard.incidents', 'uses' => 'DashboardController@showIncidents']);
diff --git a/app/views/dashboard/component-add.blade.php b/app/views/dashboard/component-add.blade.php
new file mode 100644
index 00000000..985f4179
--- /dev/null
+++ b/app/views/dashboard/component-add.blade.php
@@ -0,0 +1,37 @@
+@extends('layout.dashboard')
+
+@section('content')
+
+
+
+
Create a component
+ @if($component = Session::get('component'))
+
+ @if($component->isValid())
+ Awesome. Component added.
+ @else
+ Whoops. Something went wrong with the component. {{ $component->getErrors() }}
+ @endif
+
+ @endif
+
+
+
+
+@stop
diff --git a/app/views/dashboard/components.blade.php b/app/views/dashboard/components.blade.php
index 6fd7c310..ee07a6cb 100644
--- a/app/views/dashboard/components.blade.php
+++ b/app/views/dashboard/components.blade.php
@@ -26,33 +26,6 @@
You should add a component.
@endforelse
-
- Create a component
- @if($component = Session::get('component'))
-
- @if($component->isValid())
- Awesome. Component added.
- @else
- Whoops. Something went wrong with the component. {{ $component->getErrors() }}
- @endif
-
- @endif
-
-
@stop
diff --git a/app/views/partials/dashboard/sidebar.blade.php b/app/views/partials/dashboard/sidebar.blade.php
index 8bc35e0c..9f2b407f 100644
--- a/app/views/partials/dashboard/sidebar.blade.php
+++ b/app/views/partials/dashboard/sidebar.blade.php
@@ -22,6 +22,11 @@
{{ Lang::get('cachet.dashboard.components') }}
+
+
+ {{ Lang::get('cachet.dashboard.component-add') }}
+
+
{{ Lang::get('cachet.dashboard.incidents') }}
diff --git a/public/build/css/all-dbb960ea.css b/public/build/css/all-ced1a963.css
similarity index 99%
rename from public/build/css/all-dbb960ea.css
rename to public/build/css/all-ced1a963.css
index d1d4e850..9f713b39 100644
--- a/public/build/css/all-dbb960ea.css
+++ b/public/build/css/all-ced1a963.css
@@ -4350,6 +4350,8 @@ body.dashboard .sidebar {
padding-right: 10px; }
body.dashboard .sidebar .sidebar-inner ul li a:hover {
text-decoration: none; }
+ body.dashboard .sidebar .sidebar-inner ul li.sub-nav-item a {
+ padding-left: 40px; }
body.dashboard .content {
padding-top: 69px;
diff --git a/public/build/css/all.css b/public/build/css/all.css
index d1d4e850..9f713b39 100644
--- a/public/build/css/all.css
+++ b/public/build/css/all.css
@@ -4350,6 +4350,8 @@ body.dashboard .sidebar {
padding-right: 10px; }
body.dashboard .sidebar .sidebar-inner ul li a:hover {
text-decoration: none; }
+ body.dashboard .sidebar .sidebar-inner ul li.sub-nav-item a {
+ padding-left: 40px; }
body.dashboard .content {
padding-top: 69px;
diff --git a/public/build/rev-manifest.json b/public/build/rev-manifest.json
index d0906a5b..6195d5c2 100644
--- a/public/build/rev-manifest.json
+++ b/public/build/rev-manifest.json
@@ -1,4 +1,4 @@
{
- "css/all.css": "css/all-dbb960ea.css",
+ "css/all.css": "css/all-ced1a963.css",
"js/all.js": "js/all-d8f5640f.js"
}
\ No newline at end of file