This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ThriftApi = require('../ThriftApi'); | |
| var model = require('./model'); | |
| exports.entityMap = ThriftApi.createEntityMapGetter(model); | |
| exports.byId = ThriftApi.createByIdGetter(model); | |
| exports.jobList = [ | |
| exports.entityMap, | |
| ['thriftApiCache', 'jobTemplate'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function(model) { | |
| const entity = model.entity; | |
| let apiActions = {}; | |
| // This method can be used in situations where a model's data is fetched via | |
| // a separate request, and we just want to process the resulting data | |
| apiActions.receiveAll = function(result) { | |
| Flux.dispatch(actionTypes.API_FETCH_SUCCESS, { | |
| model: model, | |
| result: result, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @param {Object?} params | |
| * @return {Promise} | |
| */ | |
| exports.fetchAll = function(params) { | |
| if (params && params.teamId) { | |
| return Thrift.enhanced.Job.indexForTeam(params).then(jobs => { | |
| processForeignKeys(jobs); | |
| return jobs; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @param {Object?} params | |
| * @return {Promise} | |
| */ | |
| exports.fetchAll = function(params) { | |
| return Thrift.enhanced.JobRole.index(params); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import classnames from 'classnames'; | |
| import React from 'react'; | |
| import {Link} from 'react-router'; | |
| import Flux from 'modules/flux'; | |
| import Job from 'modules/Job'; | |
| import WebEx from 'WebEx/modules/WebEx'; | |
| import './WebExJobList.scss'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Base Job object */ | |
| struct Job { | |
| 1: string id, | |
| /** Name of the job */ | |
| 2: string title, | |
| /** Top level step group */ | |
| 3: step.BaseStep stepGroup, | |
| 4: team.Team team, | |
| /** Template from which this Job was created */ | |
| 5: string jobTemplateId, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import _ from 'lodash'; | |
| import AltContainer from 'alt/AltContainer'; | |
| import classnames from 'classnames'; | |
| import React from 'react'; | |
| import {Link} from 'react-router'; | |
| import BaseComponent from 'components/BaseComponent'; | |
| import alt from 'modules/Thrift/alt-inst'; | |
| import './WebExJobList.scss'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function reconnect() { | |
| const webSocketProvider = new WebSocketProvider(); | |
| const status = flux.evaluate(['signaling']); | |
| if (status.get('readyState') === READY_STATE_OPEN) { | |
| webSocketProvider.stopTimer(RECONNECT_TIMER_NAME); | |
| checkConnection(); | |
| } else { | |
| webSocketProvider.startTimer(RECONNECT_TIMER_NAME, ONE_MINUTE, reconnect); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // If all goes well: | |
| // 1. The connect action triggers an onopen event (immediately) | |
| // 2. The onOpenHandler sends an identification message (immediately) | |
| // 3. The server returns a ping (immediately) | |
| // | |
| // If the connect action returns an immediate error, CONNECT_ERROR fires. | |
| // | |
| // In some cases, however, no open or close event is ever received from the | |
| // server, so we need to fire a checkConnection event shortly after | |
| // connecting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import MessageActions from './MessageActions'; | |
| import { Map } from 'immutable'; | |
| let providerInstance = null; | |
| let timers = Map({}); | |
| // hardReset is a boolean | |
| export default class WebSocketProvider { | |
| constructor(host, token, hardReset) { | |
| if(!providerInstance || hardReset) { |