Ejemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(Request $request)
 {
     $input = Request::all();
     $id = $input['project_id'];
     Chart::create(['project_id' => $input['project_id'], 'project_sponsor' => $input['project_sponsor'], 'product_owner' => $input['product_owner'], 'project_director' => $input['project_director'], 'project_manager' => $input['project_manager'], 'audit' => $input['audit'], 'group_compliance' => $input['group_compliance'], 'business_project_manager' => $input['business_project_manager'], 'business_analyst' => $input['business_analyst'], 'quality_management' => $input['quality_management'], 'it_security' => $input['it_security'], 'enterprise_architecture' => $input['enterprise_architecture'], 'strategic_procurement' => $input['strategic_procurement'], 'technical_project_manager' => $input['technical_project_manager']]);
     flash()->success('Chart has been successfully created');
     return redirect()->action('ChartsController@show', [$id]);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(Request $request)
 {
     $data = Input::all();
     if ($request->ajax()) {
         //todo validation
         $chartName = $data["chart-name"];
         $json = json_encode($data);
         $chart = Chart::create(['config' => $json, 'name' => $chartName]);
         Cache::flush();
         return ['success' => true, 'data' => ['id' => $chart->id, 'viewUrl' => route('view', $chart->id)]];
     }
 }
Ejemplo n.º 3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // Seeds the database with locations, chart types, chart units, and charts.
     Location::create(['name' => 'Stofa 101']);
     Location::create(['name' => 'Stofa 202']);
     DB::table('chart_types')->insert(array(array('type' => 'line'), array('type' => 'spline'), array('type' => 'area'), array('type' => 'areaspline')));
     DB::table('chart_units')->insert(array(array('unit' => 'Hitastig', 'symbol' => '°C', 'icon_path' => 'icon_temperature.png'), array('unit' => 'Rakastig', 'symbol' => '%', 'icon_path' => 'icon_humidity.png'), array('unit' => 'Koltvíoxíð', 'symbol' => 'ppm', 'icon_path' => 'icon_pollution.png')));
     Chart::create(['name' => 'Hitastig', 'location_id' => 1, 'type_id' => 1, 'unit_id' => 1, 'auth' => str_random(6)]);
     Chart::create(['name' => 'Rakastig', 'location_id' => 1, 'type_id' => 1, 'unit_id' => 2, 'auth' => str_random(6)]);
     Chart::create(['name' => 'Loftgæði', 'location_id' => 1, 'type_id' => 1, 'unit_id' => 3, 'auth' => str_random(6)]);
     Chart::create(['name' => 'Stofa 202 Hiti', 'location_id' => 2, 'type_id' => 2, 'unit_id' => 1, 'refresh_time_seconds' => 500, 'auth' => str_random(6)]);
     Chart::create(['name' => '202 Raki', 'location_id' => 2, 'type_id' => 3, 'unit_id' => 2, 'visible' => true, 'auth' => str_random(6)]);
     // Seed the users table
     User::create(['name' => 'Admin', 'email' => '*****@*****.**', 'password' => bcrypt('timeseries')]);
 }
Ejemplo n.º 4
0
 public function store(ChartRequest $request)
 {
     // Create a random 6 letter password for this chart
     //$request['password'] = str_random(6);
     //dd($request);
     $request['visible'] = Input::has('visible') ? 1 : 0;
     // Save the chart
     $chart = Chart::create($request->only('name', 'location_id', 'unit_id', 'type_id', 'visible', 'auth'));
     Session::flash('success', true);
     Session::flash('message', 'Aðgerð tókst: Nýtt graf');
     return Redirect::back();
 }
Ejemplo n.º 5
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(CreateProjectRequest $request)
 {
     //dd($request->input('users'));
     $input = Request::all();
     if ($input['target_mandays'] >= 60 or $input['budget'] >= 2000000) {
         $importance = "MAJOR";
     } else {
         $importance = "MINOR";
     }
     $id = Auth::user()->id;
     $pm = Auth::user()->name;
     Project::create(['cac' => $input['cac'], 'title' => $input['title'], 'user_id' => $id, 'pm' => $pm, 'status' => 'Not Yet Started', 'color' => 'Green', 'percent' => 0, 'target_start' => $input['target_start'], 'target_end' => $input['target_end'], 'actual_start' => '0000-00-00', 'actual_end' => '0000-00-00', 'budget' => $input['budget'], 'target_mandays' => $input['target_mandays'], 'actual_mandays' => '0', 'hardware' => $input['hardware'], 'software' => $input['software'], 'importance' => $importance, 'applicability' => $input['applicability'], 'confidentiality' => $input['confidentiality']]);
     $project = Project::all()->last();
     $project->users()->attach($request->input('users'));
     Chart::create(['project_id' => $project['id'], 'project_manager' => $project['pm']]);
     /* Upon creation of new project, checklist of deliverables are also created */
     $deliverables = [];
     $deliverables = ['Project Approval', 'Product Sign-off', 'Conceptual Solution Architecture Document', 'Risk and Issue Log', 'Project Definition Report', 'Project Repository', 'Project Kick-off Package', 'Proejct Organization Structure', 'Roles and Responsibilities', 'Project Timeline', 'Minutes of Project Kick-off Meeting', 'QM Classification Matrix', 'User Requirement Matrix', 'Business Process Re-engineering Document', 'Functional Specifications Document', 'Functional Specifications Sign-off', 'Conversion Plan', 'Solution Architecture Document (Logical)', 'Solution Architecture Document (Physical)', 'Technical Specifications Document', 'Technical Specifications Sign-off', 'Logical Technology Model', 'Physical Technology Model', 'Vendor System Delivery Sign-off', 'SCA Report', 'High Level SIT Plan', 'SIT Test Scripts and Cases', 'SIT Test Results', 'SIT Sign-off', 'SIT Test Probem Plan', 'High Level UAT Plan', 'Penetration Test', 'Performance Test', 'UAT Test Scripts and Results', 'UAT Test Results', 'UAT Sign-off', 'UAT Test Problem Form', 'Functional Specifications Document (Addendum)', 'Functional Specifications Change Request Form', 'Implementation Plan', 'System Documentation', 'High Level Live Test Plan', 'Training Plan', 'Training Materials', 'Preliminary Assessment for Load Test', 'Risk Management Sign-off', 'Data Governance Sign-off', 'IT Security Sign-off', 'Compliance Sign-off', 'Audit Sign-off', 'Minutes of Meeting (Pre-CRM)', 'Minutes of Meeting (CRM/PIM)', 'Data Validation Sign-off', 'Live Test Sign-off', 'Fact Gathering Feedback', 'Survey Questionnaire', 'PIA Report', 'Minutes of Meeting (PIAM/PMM)', 'Regulatory Clearance/Sign-off/Approval/Notification', 'Project Risk Assessment'];
     $i = 0;
     $required = [];
     if ($input['applicability'] == 'New or Replacement of IT Solution') {
         $required = ['M', 'O', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'O', 'M', 'M', 'O', 'M', 'M', 'M', 'M', 'O', 'O', 'O', 'N/A', 'M', 'M', 'M', 'M', 'O', 'M', 'O', 'O', 'M', 'M', 'M', 'O', 'O', 'O', 'M', 'M', 'O', 'O', 'O', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'O', 'O', 'M', 'M', 'M', 'M', 'O', 'O'];
     } elseif ($input['applicability'] == 'Enhancement or Application System Upgrade') {
         $required = ['M', 'O', '-', '-', '-', 'M', 'M', 'M', 'M', 'M', 'M', 'M', '-', 'O', 'M', 'M', 'O', '-', '-', 'M', 'M', 'O', 'O', 'O', 'N/A', 'M', 'M', 'M', 'M', 'O', 'M', 'O', 'O', 'M', 'M', 'M', 'O', 'O', 'O', 'M', 'M', 'O', 'O', 'O', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'O', 'O', 'O', 'O', 'O', 'M', 'O', 'O'];
     } elseif ($input['applicability'] == 'IT Infrastructure') {
         $required = ['M', '-', '-', '-', '-', 'M', 'M', 'M', 'M', 'M', 'M', 'M', '-', '-', '-', '-', '-', '-', 'M', 'M', 'M', 'O', 'O', 'O', 'N/A', 'M', 'M', 'M', 'M', 'O', 'M', 'O', 'O', 'M', 'M', 'M', 'O', '-', '-', 'M', 'M', 'O', 'O', 'O', 'M', '-', '-', 'M', '-', 'M', 'M', 'M', '-', 'O', 'O', 'O', 'O', 'M', 'O', 'O'];
     }
     foreach ($deliverables as $deliverable) {
         Deliverable::create(['project_id' => $project['id'], 'deliverable' => $deliverable, 'required' => $required[$i]]);
         $i = $i + 1;
     }
     flash()->success('Your new project has been created!');
     return redirect('/');
 }