How to use @uirouter/angularjs - 10 common examples

To help you get started, we’ve selected a few @uirouter/angularjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spinnaker / deck / app / scripts / modules / core / src / pipeline / config / stages / disableAsg / templates / disableAsgStage.controller.ts View on Github external
class DisableAsgExecutionDetailsCtrl extends BaseExecutionDetailsCtrl {
  constructor ($scope: IExecutionDetailsScope,
               $stateParams: StateParams,
               executionDetailsSectionService: ExecutionDetailsSectionService) {
    'ngInject';
    super($scope, $stateParams, executionDetailsSectionService);

    super.setScopeConfigSections(['disableServerGroupConfig', 'taskStatus']);
  }
}

export const DISABLE_ASG_EXECUTION_DETAILS_CTRL = 'spinnaker.core.pipeline.stage.disableAsg.executionDetails.controller';

module(DISABLE_ASG_EXECUTION_DETAILS_CTRL, [
  require('@uirouter/angularjs').default,
  EXECUTION_DETAILS_SECTION_SERVICE,
]).controller('disableAsgExecutionDetailsCtrl', DisableAsgExecutionDetailsCtrl);
github spinnaker / deck / app / scripts / modules / openstack / src / serverGroup / configure / wizard / advanced / advancedSettings.controller.js View on Github external
'use strict';

const angular = require('angular');

module.exports = angular
  .module('spinnaker.openstack.serverGroup.configure.wizard.advancedSettings', [
    require('@uirouter/angularjs').default,
    require('angular-ui-bootstrap'),
    require('../../../../common/cacheBackedMultiSelectField.directive').name,
  ])
  .controller('openstackServerGroupAdvancedSettingsCtrl', [
    '$scope',
    function($scope) {
      $scope.selectedAZs = $scope.command.zones
        ? $scope.command.zones.map(i => {
            return { id: i, name: i };
          })
        : [];

      $scope.updateAvailabilityZones = function() {
        $scope.allAvailabilityZones = getAvailabilityZones();
      };
github spinnaker / deck / app / scripts / modules / openstack / src / serverGroup / details / serverGroupDetails.openstack.controller.js View on Github external
CONFIRMATION_MODAL_SERVICE,
  FirewallLabels,
  NetworkReader,
  OVERRIDE_REGISTRY,
  SECURITY_GROUP_READER,
  ServerGroupReader,
  ServerGroupWarningMessageService,
  SERVER_GROUP_WRITER,
  SubnetReader,
} from '@spinnaker/core';

require('../configure/serverGroup.configure.openstack.module');

module.exports = angular
  .module('spinnaker.serverGroup.details.openstack.controller', [
    require('@uirouter/angularjs').default,
    CONFIRMATION_MODAL_SERVICE,
    SERVER_GROUP_WRITER,
    SECURITY_GROUP_READER,
    OVERRIDE_REGISTRY,
    require('../configure/ServerGroupCommandBuilder').name,
    require('../serverGroup.transformer').name,
  ])
  .controller('openstackServerGroupDetailsCtrl', [
    '$scope',
    '$state',
    'app',
    'serverGroup',
    'openstackServerGroupCommandBuilder',
    '$uibModal',
    'confirmationModalService',
    'serverGroupWriter',
github spinnaker / deck / app / scripts / modules / amazon / src / loadBalancer / configure / classic / createClassicLoadBalancer.controller.js View on Github external
CACHE_INITIALIZER_SERVICE,
  INFRASTRUCTURE_CACHE_SERVICE,
  LOAD_BALANCER_WRITE_SERVICE,
  NAMING_SERVICE,
  SECURITY_GROUP_READER,
  SUBNET_READ_SERVICE,
  TASK_MONITOR_BUILDER,
  V2_MODAL_WIZARD_SERVICE
} from '@spinnaker/core';

import { AWSProviderSettings } from 'amazon/aws.settings';
import { AWS_LOAD_BALANCER_TRANFORMER } from 'amazon/loadBalancer/loadBalancer.transformer';
import { SUBNET_SELECT_FIELD_COMPONENT } from 'amazon/subnet/subnetSelectField.component';

module.exports = angular.module('spinnaker.amazon.loadBalancer.classic.create.controller', [
  require('@uirouter/angularjs').default,
  LOAD_BALANCER_WRITE_SERVICE,
  ACCOUNT_SERVICE,
  AWS_LOAD_BALANCER_TRANFORMER,
  SECURITY_GROUP_READER,
  V2_MODAL_WIZARD_SERVICE,
  TASK_MONITOR_BUILDER,
  SUBNET_READ_SERVICE,
  CACHE_INITIALIZER_SERVICE,
  INFRASTRUCTURE_CACHE_SERVICE,
  NAMING_SERVICE,
  require('../common/loadBalancerAvailabilityZoneSelector.directive.js'),
  SUBNET_SELECT_FIELD_COMPONENT,
])
  .controller('awsCreateClassicLoadBalancerCtrl', function($scope, $uibModalInstance, $state,
                                                           accountService, awsLoadBalancerTransformer, securityGroupReader,
                                                           cacheInitializer, infrastructureCaches,
github spinnaker / deck / app / scripts / modules / cloudfoundry / serverGroup / details / serverGroupDetails.cf.controller.js View on Github external
'use strict';

const angular = require('angular');
import _ from 'lodash';

import {
  CONFIRMATION_MODAL_SERVICE,
  ServerGroupReader,
  SERVER_GROUP_WRITER,
  ServerGroupTemplates,
  ServerGroupWarningMessageService,
} from '@spinnaker/core';

module.exports = angular
  .module('spinnaker.serverGroup.details.cf.controller', [
    require('@uirouter/angularjs').default,
    require('../configure/ServerGroupCommandBuilder.js').name,
    CONFIRMATION_MODAL_SERVICE,
    SERVER_GROUP_WRITER,
    require('./resize/resizeServerGroup.controller').name,
    require('./rollback/rollbackServerGroup.controller').name,
  ])
  .controller('cfServerGroupDetailsCtrl', function(
    $scope,
    $state,
    $templateCache,
    $interpolate,
    app,
    serverGroup,
    cfServerGroupCommandBuilder,
    $uibModal,
    confirmationModalService,
github spinnaker / deck / app / scripts / modules / core / src / delivery / details / singleExecutionDetails.controller.js View on Github external
'use strict';

import {EXECUTION_SERVICE} from '../service/execution.service';
import {SCHEDULER_FACTORY} from 'core/scheduler/scheduler.factory';

const angular = require('angular');

module.exports = angular.module('spinnaker.singleExecutionDetails.controller', [
    require('@uirouter/angularjs').default,
    EXECUTION_SERVICE,
    SCHEDULER_FACTORY,
  ])
  .controller('SingleExecutionDetailsCtrl', function ($scope, $state, executionService, schedulerFactory, app) {

    let executionScheduler = schedulerFactory.createScheduler(5000);

    let getExecution = () => {
      this.application = app;
      if (this.application.notFound) {
        return;
      }
      executionService.getExecution($state.params.executionId).then((execution) => {
        this.execution = this.execution || execution;
        executionService.transformExecution(this.application, execution);
        executionService.synchronizeExecution(this.execution, execution);
github spinnaker / deck / app / scripts / modules / cloudfoundry / loadBalancer / details / LoadBalancerDetailsCtrl.js View on Github external
'use strict';

const angular = require('angular');

import {
  AccountService,
  CONFIRMATION_MODAL_SERVICE,
  LOAD_BALANCER_READ_SERVICE,
  LoadBalancerWriter,
} from '@spinnaker/core';

module.exports = angular
  .module('spinnaker.loadBalancer.cf.details.controller', [
    require('@uirouter/angularjs').default,
    CONFIRMATION_MODAL_SERVICE,
    LOAD_BALANCER_READ_SERVICE,
  ])
  .controller('cfLoadBalancerDetailsCtrl', function(
    $scope,
    $state,
    $uibModal,
    loadBalancer,
    app,
    confirmationModalService,
    loadBalancerReader,
    $q,
  ) {
    let application = app;

    $scope.state = {
github spinnaker / deck / app / scripts / modules / titus / src / pipeline / stages / runJob / runJobExecutionDetails.controller.js View on Github external
'use strict';

import { get, has, filter } from 'lodash';
import { AccountService, SETTINGS } from '@spinnaker/core';

const angular = require('angular');

module.exports = angular
  .module('spinnaker.titus.pipeline.stage.runJob.executionDetails.controller', [require('@uirouter/angularjs').default])
  .controller('titusRunJobExecutionDetailsCtrl', function($scope, $stateParams, executionDetailsSectionService) {
    $scope.configSections = ['runJobConfig', 'taskStatus'];
    $scope.gateUrl = SETTINGS.gateUrl;

    let initialized = () => {
      $scope.detailsSection = $stateParams.details;

      let [job] = get($scope.stage.context['deploy.jobs'], $scope.stage.context.cluster.region, []);
      $scope.job = job;

      if (has($scope.stage.context, 'jobStatus.completionDetails')) {
        $scope.task = $scope.stage.context.jobStatus.completionDetails.taskId;
      }

      AccountService.getAccountDetails($scope.stage.context.credentials).then(details => {
        $scope.titusUiEndpoint = filter(details.regions, { name: $scope.stage.context.cluster.region })[0].endpoint;
github spinnaker / deck / app / scripts / modules / amazon / src / pipeline / stages / cloneServerGroup / cloneServerGroupExecutionDetails.controller.js View on Github external
'use strict';

const angular = require('angular');
import _ from 'lodash';

import { CLUSTER_FILTER_SERVICE, URL_BUILDER_SERVICE } from '@spinnaker/core';

module.exports = angular.module('spinnaker.amazon.pipeline.stage.cloneServerGroup.executionDetails.controller', [
  require('@uirouter/angularjs').default,
  CLUSTER_FILTER_SERVICE,
  URL_BUILDER_SERVICE
])
  .controller('awsCloneServerGroupExecutionDetailsCtrl', function ($scope, $stateParams, executionDetailsSectionService,
                                                                   urlBuilderService, clusterFilterService) {

    $scope.configSections = ['cloneServerGroupConfig', 'taskStatus'];

    let initialized = () => {
      $scope.detailsSection = $stateParams.details;

      let context = $scope.stage.context || {},
        results = [];

      function addDeployedArtifacts(key) {
        let deployedArtifacts = _.find(resultObjects, key);
github spinnaker / deck / app / scripts / modules / core / src / pipeline / config / stages / shrinkCluster / templates / shrinkClusterExecutionDetails.controller.ts View on Github external
class ShrinkClusterExecutionDetailsCtrl extends BaseExecutionDetailsCtrl {
  constructor (public $scope: IExecutionDetailsScope,
               $stateParams: StateParams,
               executionDetailsSectionService: ExecutionDetailsSectionService) {
    'ngInject';
    super($scope, $stateParams, executionDetailsSectionService);

    super.setScopeConfigSections(['shrinkClusterConfig', 'taskStatus']);
  }
}

export const SHRINK_CLUSTER_EXECUTION_DETAILS_CTRL = 'spinnaker.core.pipeline.stage.shrinkCluster.executionDetails.controller';

module(SHRINK_CLUSTER_EXECUTION_DETAILS_CTRL, [
  require('@uirouter/angularjs').default,
  EXECUTION_DETAILS_SECTION_SERVICE,
]).controller('shrinkClusterExecutionDetailsCtrl', ShrinkClusterExecutionDetailsCtrl);

@uirouter/angularjs

State-based routing for AngularJS 1.x

MIT
Latest version published 4 months ago

Package Health Score

84 / 100
Full package analysis