<commit_before>/*************************************************
 * Copyright (c) 2015 Ansible, Inc.
 *
 * All Rights Reserved
 *************************************************/

import controller from './scheduler.controller';
import addController from './schedulerAdd.controller';
import editController from './schedulerEdit.controller';
import {templateUrl} from '../shared/template-url/template-url.factory';
import schedulerDatePicker from './schedulerDatePicker.directive';

export default
    angular.module('scheduler', [])
        .controller('schedulerController', controller)
        .controller('schedulerAddController', addController)
        .controller('schedulerEditController', editController)
        .directive('schedulerDatePicker', schedulerDatePicker)
        .run(['$stateExtender', function($stateExtender) {
            $stateExtender.addState({
                name: 'jobTemplateSchedules',
                route: '/job_templates/:id/schedules',
                templateUrl: templateUrl("scheduler/scheduler"),
                controller: 'schedulerController',
                data: {
                    activityStream: true,
                    activityStreamTarget: 'job_template',
                    activityStreamId: 'id'
                },
                ncyBreadcrumb: {
                    parent: 'jobTemplates.edit',
                    label: 'SCHEDULES'
                }
            });
            $stateExtender.addState({
                name: 'jobTemplateSchedules.add',
                route: '/add',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerAddController',
                ncyBreadcrumb: {
                    parent: 'jobTemplateSchedules',
                    label: 'CREATE SCHEDULE'
                }
            });
            $stateExtender.addState({
                name: 'jobTemplateSchedules.edit',
                route: '/:schedule_id',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerEditController',
                ncyBreadcrumb: {
                    parent: 'jobTemplateSchedules',
                    label: '{{schedule_obj.name}}'
                }
            });
            $stateExtender.addState({
                name: 'projectSchedules',
                route: '/projects/:id/schedules',
                templateUrl: templateUrl("scheduler/scheduler"),
                controller: 'schedulerController',
                data: {
                    activityStream: true,
                    activityStreamTarget: 'project',
                    activityStreamId: 'id'
                },
                ncyBreadcrumb: {
                    parent: 'projects.edit',
                    label: 'SCHEDULES'
                }
            });
            $stateExtender.addState({
                name: 'projectSchedules.add',
                route: '/add',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerAddController',
                ncyBreadcrumb: {
                    parent: 'projectSchedules',
                    label: 'CREATE SCHEDULE'
                }
            });
            $stateExtender.addState({
                name: 'projectSchedules.edit',
                route: '/:schedule_id',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerEditController',
                ncyBreadcrumb: {
                    parent: 'projectSchedules',
                    label: '{{schedule_obj.name}}'
                }
            });
            $stateExtender.addState({
                name: 'inventoryManage.schedules',
                route: '/:id/schedules',
                views: {
                    'form@inventoryManage': {
                        templateUrl: templateUrl("scheduler/scheduler"),
                        controller: 'schedulerController'
                    }
                },
                ncyBreadcrumb: {
                    label: "SCHEDULES"
                }
            });
            $stateExtender.addState({
                name: 'inventoryManage.schedules.add',
                route: '/add',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerAddController',
                ncyBreadcrumb: {
                    label: "CREATE SCHEDULE"
                }
            });
            $stateExtender.addState({
                name: 'inventoryManage.schedules.edit',
                route: '/:schedule_id',<commit_msg>fix scheduler ux of inventory manage to be consistent<commit_after>/*************************************************
 * Copyright (c) 2015 Ansible, Inc.
 *
 * All Rights Reserved
 *************************************************/

import controller from './scheduler.controller';
import addController from './schedulerAdd.controller';
import editController from './schedulerEdit.controller';
import {templateUrl} from '../shared/template-url/template-url.factory';
import schedulerDatePicker from './schedulerDatePicker.directive';

export default
    angular.module('scheduler', [])
        .controller('schedulerController', controller)
        .controller('schedulerAddController', addController)
        .controller('schedulerEditController', editController)
        .directive('schedulerDatePicker', schedulerDatePicker)
        .run(['$stateExtender', function($stateExtender) {
            $stateExtender.addState({
                name: 'jobTemplateSchedules',
                route: '/job_templates/:id/schedules',
                templateUrl: templateUrl("scheduler/scheduler"),
                controller: 'schedulerController',
                data: {
                    activityStream: true,
                    activityStreamTarget: 'job_template',
                    activityStreamId: 'id'
                },
                ncyBreadcrumb: {
                    parent: 'jobTemplates.edit',
                    label: 'SCHEDULES'
                }
            });
            $stateExtender.addState({
                name: 'jobTemplateSchedules.add',
                route: '/add',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerAddController',
                ncyBreadcrumb: {
                    parent: 'jobTemplateSchedules',
                    label: 'CREATE SCHEDULE'
                }
            });
            $stateExtender.addState({
                name: 'jobTemplateSchedules.edit',
                route: '/:schedule_id',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerEditController',
                ncyBreadcrumb: {
                    parent: 'jobTemplateSchedules',
                    label: '{{schedule_obj.name}}'
                }
            });
            $stateExtender.addState({
                name: 'projectSchedules',
                route: '/projects/:id/schedules',
                templateUrl: templateUrl("scheduler/scheduler"),
                controller: 'schedulerController',
                data: {
                    activityStream: true,
                    activityStreamTarget: 'project',
                    activityStreamId: 'id'
                },
                ncyBreadcrumb: {
                    parent: 'projects.edit',
                    label: 'SCHEDULES'
                }
            });
            $stateExtender.addState({
                name: 'projectSchedules.add',
                route: '/add',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerAddController',
                ncyBreadcrumb: {
                    parent: 'projectSchedules',
                    label: 'CREATE SCHEDULE'
                }
            });
            $stateExtender.addState({
                name: 'projectSchedules.edit',
                route: '/:schedule_id',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerEditController',
                ncyBreadcrumb: {
                    parent: 'projectSchedules',
                    label: '{{schedule_obj.name}}'
                }
            });
            $stateExtender.addState({
                name: 'inventoryManage.schedules',
                route: '/:id/schedules',
                views: {
                    'form@inventoryManage': {
                        templateUrl: templateUrl("scheduler/scheduler"),
                        controller: 'schedulerController'
                    },
                    // don't display groups and hosts lists to be
                    // consistent with other scheduler views
                    'groupsList@inventoryManage': {
                        template: ''
                    },
                    'hostsList@inventoryManage': {
                        template: '',
                    }
                },
                ncyBreadcrumb: {
                    label: "SCHEDULES"
                }
            });
            $stateExtender.addState({
                name: 'inventoryManage.schedules.add',
                route: '/add',
                templateUrl: templateUrl("scheduler/schedulerForm"),
                controller: 'schedulerAddController',
                ncyBreadcrumb: {
                    label: "CREATE SCHEDULE"
                }
            });
            $stateExtender.addState({
                name: 'inventoryManage.schedules.edit',
                route: '/:schedule_id',
{'fraction_non_alphanumeric': 0.11823170100424475, 'fraction_numerical': 0.0008282430893467233, 'mean_word_length': 1.423482187656799, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7230342', 'n_tokens_mistral': 2338, 'n_tokens_neox': 2143, 'n_words': 372}