maestrano/mno-enterprise-angular

View on GitHub
src/app/components/mno-app-onboarding-btn/mno-app-onboarding-btn.html

Summary

Maintainability
Test Coverage
<div ng-show="$ctrl.isLoadingAppInstances">
  <i class="fa fa-refresh fa-spin fa-2x button-loader"></i>
</div>

<div ng-show="!$ctrl.isLoadingAppInstances" ng-switch on="$ctrl.appInstance.status">
  <div ng-switch-when="CONFLICT" class="message">
    <i class="fa fa-exclamation-triangle"></i>
    {{ 'mno_enterprise.templates.components.app_install_btn.conflicting_app' | translate }}
    <span>{{$ctrl.conflictingApp.name}}</span>
  </div>
  <div ng-switch-when="INSTALLED_LAUNCH">
    <span ng-hide="$ctrl.appInstance.stack == 'connector'">
      <div>
        {{ 'mno_enterprise.templates.components.app_install_btn.app_requires_no_set_up' | translate }}
      </div>
      <div class="text-muted">
        {{ 'mno_enterprise.templates.components.app_install_btn.app_connects_on_launch' | translate }}
      </div>
    </span>
    <span ng-show="$ctrl.appInstance.stack == 'connector'">
      <i class="fa fa-check fa-2x button-check"></i>
      <div class="text-muted">
        {{ 'mno_enterprise.templates.components.app_install_btn.app_connected' | translate }}
      </div>
    </span>
  </div>
  <div ng-switch-when="INSTALLED_CONNECT">
    <a href="" uib-tooltip="{{'mno_enterprise.templates.components.app_install_btn.create_account_tooltip' | translate}}" tooltip-placement="top" type="button" ng-click="$ctrl.launchAppInstance()" class="btn btn-warning btn-block">
      {{ 'mno_enterprise.templates.components.app_install_btn.create_account' | translate }}
    </a>
    <a href="" ng-click="$ctrl.connectAppInstance()" class="btn btn-warning btn-block">
      {{ 'mno_enterprise.templates.components.app_install_btn.connect_app' | translate }}
    </a>
  </div>
  <a href="" ng-switch-when="ADD_ON" uib-tooltip="{{'mno_enterprise.templates.components.app_install_btn.access_addon_tooltip' | translate}}" tooltip-placement="top" ng-click="$ctrl.launchAppInstance()" class="btn btn-warning btn-block">
    {{ 'mno_enterprise.templates.components.app_install_btn.access_addon' | translate }}
  </a>
</div>