all files / src/utils/ Constants.js

47.83% Statements 11/23
18.75% Branches 3/16
50% Functions 1/2
45.45% Lines 10/22
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62                                                                                                       
'use strict';
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.volumeTypes = exports.taskflowActions = exports.baseURL = undefined;
exports.primaryBreadCrumbs = primaryBreadCrumbs;
 
var _Theme = require('HPCCloudStyle/Theme.mcss');
 
var _Theme2 = _interopRequireDefault(_Theme);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
var baseURL = exports.baseURL = '/api/v1';
 
// name: action in component that this action runs
// label: the button's label
// icon: an fa icon, import styles here and include them if desired.
var taskflowActions = exports.taskflowActions = {
  deleteCluster: { name: 'onDeleteCluster', label: 'Delete Cluster', icon: '' },
  terminate: { name: 'onTerminate', label: 'Terminate', icon: '' },
  visualize: { name: 'onVisualize', label: 'Visualize', icon: '' },
  rerun: { name: 'onRerun', label: 'Rerun', icon: '' },
  terminateInstance: {
    name: 'onTerminateInstance',
    label: 'Terminate EC2 Instance',
    icon: ''
  },
  moveOffline: { name: 'moveOffline', label: 'Move Files Offline', icon: '' }
};
 
var volumeTypes = exports.volumeTypes = {
  'General Purpose SSD': 'GP2',
  'Provisioned IOPS SSD': 'IO1',
  Magnetic: 'Magnetic',
  'Throughput Optimized HDD': 'ST1',
  'Cold HDD': 'SC1'
};
 
function primaryBreadCrumbs() {
  var projectId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  var simulationId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
 
  var ret = {
    paths: ['/'],
    icons: [_Theme2.default.breadCrumbRootIcon],
    titles: ['Home']
  };
  if (projectId) {
    ret.paths.push('/View/Project/' + projectId);
    ret.icons.push(_Theme2.default.breadCrumbProjectIcon);
    ret.titles.push('Project');
    if (simulationId) {
      ret.paths.push('/View/Simulation/' + simulationId);
      ret.icons.push(_Theme2.default.breadCrumbSimulationIcon);
      ret.titles.push('Simulation');
    }
  }
  return ret;
}