<commit_before>var mapScale = 2;
var timeScale = 1;
var frames = [];
var firstFrameNum;
var endFrameNum = 0;
var firstLoop = true;

var fps = 25;
var traceClearAlpha = 20;
var startAtTime = 0;
var stopAtTime = 100000;

var microsecsPerFrame = Math.floor(1000000 / fps);

var traceGraphics;
var mapGraphics;

var density = window.devicePixelRatio; // happens to be 2 on os x with retina display

function preload() {
  trace = loadStrings('assets/traces/simple_basic.ctrace');
}

function setup() {
  createCanvas(512, 512);
  traceGraphics = createGraphics(512 * density, 512 * density);
  mapGraphics = createGraphics(512 * density, 512 * density);
  setFrameRate(fps);

  printMap();

  processTrace();

  // Uncomment this to save the map to PNG.
  //save('map.png');
}

function processTrace() {
  console.log("will read " + trace.length + " lines")
  for (var i=0; i<trace.length; i++) {
    var line = trace[i];
    var tokens = line.split(" ");
    var timestamp = tokens[0];

    var frameNum = Math.floor(timestamp / microsecsPerFrame * timeScale);
    var reads;
    if (!frames[frameNum]) {
      reads = [];
      frames[frameNum] = {
        time: timestamp / 1000000,
        reads: reads
      };
      endFrameNum = frameNum;
      if (firstFrameNum === undefined)
        firstFrameNum = frameNum
    }
    else {
      reads = frames[frameNum].reads;
    }

    var nGroups = 0, nAccesses = 0;
    for (var t = 1; t < tokens.length; t++, nGroups++) {
      var accessFields = tokens[t].split(':')
      var rangeStart = parseInt(accessFields[1])
      var rangeLen = parseInt(accessFields[2])
      for (var a = 0; a < rangeLen; a++, nAccesses++) {
        reads[rangeStart + a] = 1
      }
    }
  }

  trace = null;
  console.log(frames.length);
}

function printMap() {
  var mg = mapGraphics;

  mg.textAlign(CENTER, CENTER);
  mg.textSize(12);

  function addrBlock(color, desc) {
    return function(x, y, size) {
      x *= mapScale * density;
      y *= mapScale * density;
      size *= mapScale * density;
      mg.fill(color);
      mg.rect(x, y, size, size);

      mg.fill(128);
      mg.text(desc, x, y, size, size);
    };
  }
  var ramColor = '#004000';
  var romColor = '#000080';
  var ioColor = '#800000';

  hilbertBlock(8, 0x0000, 0x10000, addrBlock(ramColor, "RAM"))

  hilbertBlock(8, 0x0000, 0x0100, addrBlock(ramColor, "System vars"));
  hilbertBlock(8, 0x0100, 0x0100, addrBlock(ramColor, "Stack"));
  hilbertBlock(8, 0x0200, 0x0100, addrBlock(ramColor, "System vars"));
  hilbertBlock(8, 0x0300, 0x0100, addrBlock(ramColor, "System vars"));

  hilbertBlock(8, 0x0400, 0x0400, addrBlock(ramColor, "Video memory"));

  hilbertBlock(8, 0xA000, 0x1000, addrBlock(romColor, "BASIC ROM"))
  hilbertBlock(8, 0xB000, 0x1000, addrBlock(romColor, "BASIC ROM"))

  hilbertBlock(8, 0xD000, 0x0400, addrBlock(ioColor, "VIC-II"))
  hilbertBlock(8, 0xD400, 0x0400, addrBlock(ioColor, "SID"))
  hilbertBlock(8, 0xD800, 0x0400, addrBlock(ioColor, "Color RAM"))
  hilbertBlock(8, 0xDC00, 0x0100, addrBlock(ioColor, "CIA #1"))
  hilbertBlock(8, 0xDD00, 0x0100, addrBlock(ioColor, "CIA #2"))
  hilbertBlock(8, 0xDE00, 0x0100, addrBlock(ioColor, "I/O #1"))
  hilbertBlock(8, 0xDF00, 0x0100, addrBlock(ioColor, "I/O #2"))

  hilbertBlock(8, 0xE000, 0x1000, addrBlock(romColor, "KERNAL ROM"));
  hilbertBlock(8, 0xF000, 0x1000, addrBlock(romColor, "KERNAL ROM"));
}

function hilbertBlock(maxLevel, location, sizeLinear, callback) {
  var level = Math.log2(sizeLinear) / 2;
  var size = 1 << (level - 1);

  var xy = hilbert.d2xy(maxLevel - level, location / sizeLinear);
  var x = xy[0] * size;
  var y = xy[1] * size;

  callback(x, y, size);
}

var startFrameNum = startAtTime * fps * timeScale;
var frameNum = startFrameNum;

function draw() {
  if (frameNum > endFrameNum - firstFrameNum) {
    console.log("end of trace, looping");
    frameNum = startFrameNum;
    firstLoop = false;
    return;
  }

  var frameData = frames[firstFrameNum + frameNum];
  frameNum++;

  if (!frameData) {
    console.log("empty frame " + frameNum);
    return;
  }

  if (frameData.time >= stopAtTime) {
    console.log("reached stopAtTime, looping");
    frameNum = startFrameNum;
    firstLoop = false;
    return;
  }

  background(0);
  image(mapGraphics, 0, 0, 512 * density, 512 * density, 0, 0, 512, 512);
  updateTraceGraphics(frameData);
  blendMode(ADD);
  image(traceGraphics, 0, 0, 512 * density, 512 * density, 0, 0, 512, 512);
  blendMode(BLEND);

  stroke(255);
  fill(255);
  textSize(40);
  textAlign(LEFT, BOTTOM);
  text(frameNum + ": "+ frameData.time, 0, 0, 512, 512)

  // if (firstLoop) {
  //   saveCanvas("frame" + nf(frameNum - 1, 5, 0), "png");
  // }
}

function updateTraceGraphics(frameData) {
  var tg = traceGraphics;

  tg.background(0, traceClearAlpha);

  if (!frameData)
    return;

  var reads = frameData.reads;

  for (address in reads) {
    var xy = hilbert.d2xy(8, address);
    tg.noStroke();
    tg.fill(255);
    tg.rect(xy[0] * mapScale, xy[1] * mapScale, mapScale, mapScale);
  }
}<commit_msg>ordered configuration and global variables<commit_after>// configuration
var mapScale = 2;
var timeScale = 1;
var startAtTime = 0;
var stopAtTime = 100000;
var saveAllFrames = false;
var showText = true;
var fps = 60;
var traceClearAlpha = 20;

// global variables
var endFrameNum = 0;
var firstLoop = true;
var frames = [];
var firstFrameNum;

var microsecsPerFrame = Math.floor(1000000 / fps);

var traceGraphics;
var mapGraphics;

var density = window.devicePixelRatio; // happens to be 2 on os x with retina display

function preload() {
  trace = loadStrings('assets/traces/simple_basic.ctrace');
}

function setup() {
  createCanvas(512, 512);
  traceGraphics = createGraphics(512 * density, 512 * density);
  mapGraphics = createGraphics(512 * density, 512 * density);
  setFrameRate(fps);

  printMap();

  processTrace();

  // Uncomment this to save the map to PNG.
  //save('map.png');
}

function processTrace() {
  console.log("will read " + trace.length + " lines")
  for (var i=0; i<trace.length; i++) {
    var line = trace[i];
    var tokens = line.split(" ");
    var timestamp = tokens[0];

    var frameNum = Math.floor(timestamp / microsecsPerFrame * timeScale);
    var reads;
    if (!frames[frameNum]) {
      reads = [];
      frames[frameNum] = {
        timestamp: timestamp,
        time: timestamp / 1000000,
        reads: reads
      };
      endFrameNum = frameNum;
      if (firstFrameNum === undefined)
        firstFrameNum = frameNum
    }
    else {
      reads = frames[frameNum].reads;
    }

    var nGroups = 0, nAccesses = 0;
    for (var t = 1; t < tokens.length; t++, nGroups++) {
      var accessFields = tokens[t].split(':')
      var rangeStart = parseInt(accessFields[1])
      var rangeLen = parseInt(accessFields[2])
      for (var a = 0; a < rangeLen; a++, nAccesses++) {
        reads[rangeStart + a] = 1
      }
    }
  }

  trace = null;
  console.log(frames.length);
}

function printMap() {
  var mg = mapGraphics;

  mg.textAlign(CENTER, CENTER);
  mg.textSize(12);

  function addrBlock(color, desc) {
    return function(x, y, size) {
      x *= mapScale * density;
      y *= mapScale * density;
      size *= mapScale * density;
      mg.fill(color);
      mg.rect(x, y, size, size);

      mg.fill(128);
      mg.text(desc, x, y, size, size);
    };
  }
  var ramColor = '#004000';
  var romColor = '#000080';
  var ioColor = '#800000';

  hilbertBlock(8, 0x0000, 0x10000, addrBlock(ramColor, "RAM"))

  hilbertBlock(8, 0x0000, 0x0100, addrBlock(ramColor, "System vars"));
  hilbertBlock(8, 0x0100, 0x0100, addrBlock(ramColor, "Stack"));
  hilbertBlock(8, 0x0200, 0x0100, addrBlock(ramColor, "System vars"));
  hilbertBlock(8, 0x0300, 0x0100, addrBlock(ramColor, "System vars"));

  hilbertBlock(8, 0x0400, 0x0400, addrBlock(ramColor, "Video memory"));

  hilbertBlock(8, 0xA000, 0x1000, addrBlock(romColor, "BASIC ROM"))
  hilbertBlock(8, 0xB000, 0x1000, addrBlock(romColor, "BASIC ROM"))

  hilbertBlock(8, 0xD000, 0x0400, addrBlock(ioColor, "VIC-II"))
  hilbertBlock(8, 0xD400, 0x0400, addrBlock(ioColor, "SID"))
  hilbertBlock(8, 0xD800, 0x0400, addrBlock(ioColor, "Color RAM"))
  hilbertBlock(8, 0xDC00, 0x0100, addrBlock(ioColor, "CIA #1"))
  hilbertBlock(8, 0xDD00, 0x0100, addrBlock(ioColor, "CIA #2"))
  hilbertBlock(8, 0xDE00, 0x0100, addrBlock(ioColor, "I/O #1"))
  hilbertBlock(8, 0xDF00, 0x0100, addrBlock(ioColor, "I/O #2"))

  hilbertBlock(8, 0xE000, 0x1000, addrBlock(romColor, "KERNAL ROM"));
  hilbertBlock(8, 0xF000, 0x1000, addrBlock(romColor, "KERNAL ROM"));
}

function hilbertBlock(maxLevel, location, sizeLinear, callback) {
  var level = Math.log2(sizeLinear) / 2;
  var size = 1 << (level - 1);

  var xy = hilbert.d2xy(maxLevel - level, location / sizeLinear);
  var x = xy[0] * size;
  var y = xy[1] * size;

  callback(x, y, size);
}

var startFrameNum = startAtTime * fps * timeScale;
var frameNum = startFrameNum;

function draw() {
  if (frameNum > endFrameNum - firstFrameNum) {
    console.log("end of trace, looping");
    frameNum = startFrameNum;
    firstLoop = false;
    return;
  }

  var frameData = frames[firstFrameNum + frameNum];
  frameNum++;

  if (!frameData) {
    console.log("empty frame " + frameNum);
    return;
  }

  if (frameData.time >= stopAtTime) {
    console.log("reached stopAtTime, looping");
    frameNum = startFrameNum;
    firstLoop = false;
    return;
  }

  background(0);
  image(mapGraphics, 0, 0, 512 * density, 512 * density, 0, 0, 512, 512);
  updateTraceGraphics(frameData);
  blendMode(ADD);
  image(traceGraphics, 0, 0, 512 * density, 512 * density, 0, 0, 512, 512);
  blendMode(BLEND);

  if (showText) {
    stroke(255);
    fill(255);
    textSize(40);
    textAlign(LEFT, BOTTOM);
    text(frameNum + ": "+ frameData.timestamp, 0, 0, 512, 512)
  }

  if (saveAllFrames && firstLoop) {
    saveCanvas("frame" + frameData.timestamp, "png");
  }
}

function updateTraceGraphics(frameData) {
  var tg = traceGraphics;

  tg.background(0, traceClearAlpha);

  if (!frameData)
    return;

  var reads = frameData.reads;

  for (address in reads) {
    var xy = hilbert.d2xy(8, address);
    tg.noStroke();
    tg.fill(255);
    tg.rect(xy[0] * mapScale, xy[1] * mapScale, mapScale, mapScale);
  }
}<|endoftext|>


<commit_before>import angular from 'angular';

angular.module('examineContentsController', []).

controller('ExamineContentsController', ['$routeSegment', 'SelectedFiles', 'Transfer', function($routeSegment, SelectedFiles, Transfer) {
  var vm = this;

  vm.$routeSegment = $routeSegment;
  vm.type = $routeSegment.$routeParams.type;
  vm.SelectedFiles = SelectedFiles;

  vm.selected = [];
  vm.all_selected = false;

  vm.select_all = files => {
    if (!vm.all_selected) {
      vm.selected = files.map(file => file.id);
      vm.all_selected = true;
    } else {
      vm.selected = [];
      vm.all_selected = false;
    }
  };

  vm.submit = ids => {
    var tag = this.tag;
    if (!tag) {
      return;
    }

    Transfer.add_list_of_tags(ids, tag);
    this.tag = '';
  };
}]).

controller('ExamineContentsFileController', ['$routeSegment', 'File', function($routeSegment, File) {
  var vm = this;

  vm.id = $routeSegment.$routeParams.id;
  vm.type = $routeSegment.$routeParams.type;
  File.bulk_extractor_info(vm.id, [vm.type]).then(data => {
    vm.file = data;
  });
}]);
<commit_msg>Examine contents controller: add comments<commit_after>import angular from 'angular';

angular.module('examineContentsController', []).

// Controls the table which displays bulk_extractor log contents.
controller('ExamineContentsController', ['$routeSegment', 'SelectedFiles', 'Transfer', function($routeSegment, SelectedFiles, Transfer) {
  var vm = this;

  vm.$routeSegment = $routeSegment;
  vm.type = $routeSegment.$routeParams.type;
  vm.SelectedFiles = SelectedFiles;

  vm.selected = [];
  vm.all_selected = false;

  vm.select_all = files => {
    if (!vm.all_selected) {
      vm.selected = files.map(file => file.id);
      vm.all_selected = true;
    } else {
      vm.selected = [];
      vm.all_selected = false;
    }
  };

  vm.submit = ids => {
    var tag = this.tag;
    if (!tag) {
      return;
    }

    Transfer.add_list_of_tags(ids, tag);
    this.tag = '';
  };
}]).

controller('ExamineContentsFileController', ['$routeSegment', 'File', function($routeSegment, File) {
  var vm = this;

  vm.id = $routeSegment.$routeParams.id;
  vm.type = $routeSegment.$routeParams.type;
  File.bulk_extractor_info(vm.id, [vm.type]).then(data => {
    vm.file = data;
  });
}]);
<|endoftext|>


<commit_before>// task 1
//Дана строка 'aaa@bbb@ccc@ddd@ggg@www@'.
//Найдите и замените все буквы находящиеся между символами "@ ... @" на пробелы.

var str = "aaa@bbb@ccc@ddd@ggg@www@";
console.log(str.replace(/@.*?@/g, "@   @"));

// task 2
//Запишите в replace выражение которое вернет следующий результат:

var date = "31/12/2025";
console.log(date.replace(/\//g, ' - ')); // 31 - 12 - 2025

// task 3
Напишите регулярное выражение которое для каждой картинки добавит закрывающий слеш в конце:

var text = '   ';
text = text.replace(/>/g, '\/>');

// now text = '   '
alert(text);

//task 4
//Write a pattern that matches e-mail addresses.

var reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
var str1 = 'aleksandr123@ua.net';
var str2 = 'aleksandr12..3@ua.net';
console.log(reg.test(str1));//true
console.log(reg.test(str2));//false

// task 5
//Write a JavaScript program to search a date within a string.

function testForDate(str){
  var reg = /\d{2}\/\d{2}\/\d{4}/g;
  var result = str.match(reg);
  console.log(result);
 }
testForDate("Hello, my birthday is on 20/06/1993"); // returns [20/06/1993]
testForDate("Hello, my favourite days are 20/06/1993 and 20/06/2010"); // returns [20/06/1993, 20/06/2010]
<commit_msg>Update task.js<commit_after>// task 1
//Дана строка 'aaa@bbb@ccc@ddd@ggg@www@'.
//Найдите и замените все буквы находящиеся между символами "@ ... @" на пробелы.

var str = "aaa@bbb@ccc@ddd@ggg@www@";
console.log(str.replace(/@.*?@/g, "@   @"));

// task 2
//Запишите в replace выражение которое вернет следующий результат:

var date = "31/12/2025";
console.log(date.replace(/\//g, ' - ')); // 31 - 12 - 2025

// task 3
Напишите регулярное выражение которое для каждой картинки добавит закрывающий слеш в конце:

var text = '   ';
text = text.replace(/(]*)(>)/g, '$1\/>');

// now text = '   '
alert(text);

//task 4
//Write a pattern that matches e-mail addresses.

var reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
var str1 = 'aleksandr123@ua.net';
var str2 = 'aleksandr12..3@ua.net';
console.log(reg.test(str1));//true
console.log(reg.test(str2));//false

// task 5
//Write a JavaScript program to search a date within a string.

function testForDate(str){
  var reg = /\d{2}\/\d{2}\/\d{4}/g;
  var result = str.match(reg);
  console.log(result);
 }
testForDate("Hello, my birthday is on 20/06/1993"); // returns [20/06/1993]
testForDate("Hello, my favourite days are 20/06/1993 and 20/06/2010"); // returns [20/06/1993, 20/06/2010]
<|endoftext|>


<commit_before>(function() {

    angular
        .module('app')
        .controller('SignUpDialogController', [

            '$scope',
            '$timeout',
            '$rootScope',
            '$localStorage',
            '$state',
            'collegesListService',
            'tokenService',
            '$auth',
            '$filter',
            'todoListService',
            '$mdDialog',
            '$rootScope',
            SignUpDialogController
        ]);

    function SignUpDialogController($scope, $timeout, $rootScope, $localStorage, $state, collegesListService, tokenService, $auth, $filter, todoListService, $mdDialog, $rootScope) {
        var vm = this;

        $scope.signup = 1;
        $scope.message = '';
        $rootScope.$on("callShowSignUpFunc", function(event, message) {
            $scope.showSignUp();
            $scope.message = message;
        });
        $scope.showLogin = function() {
            $rootScope.$emit("callShowLoginFunc", {});
            $scope.signup = 0;
        }
        $scope.showSignUp = function(){
            $scope.signup = 1;

        }
        $scope.loading = false;
        $scope.querySearch = querySearch;
        $scope.signUp = {};
        vm.tags = [];
        if (localStorage.getItem('id_token') != null) {
            // $state.go("home.dashboard");
            $rootScope.authenticated = true;
            $mdDialog.hide();
        }
        $scope.signUp.college_id = 0;
        // tokenService.get("colleges").then(function(colleges) {
        //     $scope.colleges = colleges.data;
        // });
        $scope.items = creativityCategories.items;
        $scope.itemsMobile = creativityCategories.itemsMobile;

        $scope.searchData = $filter('filter')($scope.filteredPeople, {
            name: 'a'
        });
        //Search Autocomplete start

        $scope.querySearch = querySearch;

        function querySearch(query) {

            $scope.searchData = $filter('limitTo')($filter('filter')($scope.filteredPeople, { name: query }), 5);
        }

        // Search Autocomplete End

        $scope.signUp = {};
        $scope.selectedItemChange = function(id) {
            console.log(id);
            $scope.signUp.college = id;
            $scope.signUp.college_id = id;
        };
        $scope.authenticate = function(provider) {
            $scope.loading = true;
            $auth.authenticate(provider).then(function(response) {
                    $scope.signUp.token = response.access_token;
                    $scope.signUp.type = provider;
                    $scope.signUp.skills = $scope.selectedSkills;
                    $scope.signUp.intrests = $scope.interests;
                    tokenService.post("signup", $scope.signUp)
                        .then(function(abc) {
                            localStorage.setItem('id_token', abc.token);
                            //                          localStorage.setItem('username', abc.student.username);
                            //                        localStorage.setItem('college_id', abc.student.college_id);
                            //                      localStorage.setItem('image', abc.student.image);
                            $rootScope.token = abc.token;
                            $rootScope.image = abc.image;
                            // $state.go("home.dashboard");
                            $rootScope.authenticated = true;
                            $mdDialog.hide();
                        }).catch(function(abc) {
                            localStorage.setItem('id_token', abc.token);
                            $scope.problem = abc.status;
                            $rootScope.token = abc.token;
                            // $state.go("home.dashboard");
                            $rootScope.authenticated = true;
                            $mdDialog.hide();

                        });

                })
                .catch(function(response) {

                    $scope.signUp.token = response.access_token;
                    $scope.signUp.type = provider;
                    $scope.signUp.skills = $scope.selectedSkills;
                    $scope.signUp.intrests = $scope.interests;
                    $scope.signUp.college_id = $scope.college;
                    tokenService.post("signup", $scope.signUp)
                        .then(function(abc) {
                            localStorage.setItem('id_token', abc.token);
                            $rootScope.token = abc.token;
                            // $state.go("home.dashboard");
                            $rootScope.authenticated = true;
                            $mdDialog.hide();
                        })
                        .catch(function(abc) {
                            $scope.loading = false;

                        });
                });

        };
        $scope.selected = [];
        $scope.interests = [];

        $scope.toggle = function(item, list) {
            var idx = list.indexOf(item);
            if (idx > -1) {
                list.splice(idx, 1);
            } else {
                list.push(item);
                $scope.buttonClass = 'md-primary md-raised';
            }
            item.intrested = !item.intrested;
            $scope.interests = list;
            $scope.continue = ($scope.interests.length > 3);
        };
        $scope.exists = function(item, list) {
            return list.indexOf(item) > -1;
        };
        $scope.currentState = 1;

        $rootScope.$on('event:social-sign-in-success', function(event, response) {
            // console.log("Social sign in success")
            // console.log(userDetails);
            $scope.loading = true;

            $scope.signUp.token = response.token;
            $scope.signUp.type = "google";
            $scope.signUp.skills = $scope.selectedSkills;
            $scope.signUp.intrests = $scope.interests;
            $scope.signUp.college_id = $scope.college;

            tokenService.post("signup", $scope.signUp)
                .then(function(abc) {
                    localStorage.setItem('id_token', abc.token);
                    $rootScope.token = abc.token;
                    // $state.go("home.dashboard");
                    $rootScope.authenticated = true;
                    $mdDialog.hide();

                })
                .catch(function() {
                    $scope.loading = false;
                    $scope.problem = "Could not sign you up try again later.";

                });

            // $scope.$apply(function() {

            //     $scope.currentState = 2;
            // })
            $timeout(function() {
                //$scope.currentState = 2;
                // $scope.someData = someData;
            }, 0);
        });

        todoListService
            .loadAllItems()
            .then(function(menuItems) {
                $scope.filteredPeople = [].concat(menuItems);
            });

    }
})();
<commit_msg>fixed misiing services<commit_after>(function() {

    angular
        .module('app')
        .controller('SignUpDialogController', [

            '$scope',
            '$timeout',
            '$rootScope',
            '$localStorage',
            '$state',
            'tokenService',
            '$auth',
            'creativityCategories',
            '$filter',
            '$mdDialog',
            '$rootScope',
            SignUpDialogController
        ]);

    function SignUpDialogController($scope, $timeout, $rootScope, $localStorage, $state,  tokenService, $auth,creativityCategories, $filter, $mdDialog, $rootScope) {
        var vm = this;

        $scope.signup = 1;
        $scope.message = '';
        $rootScope.$on("callShowSignUpFunc", function(event, message) {
            $scope.showSignUp();
            $scope.message = message;
        });
        $scope.showLogin = function() {
            $rootScope.$emit("callShowLoginFunc", {});
            $scope.signup = 0;
        }
        $scope.showSignUp = function(){
            $scope.signup = 1;

        }
        $scope.loading = false;
        $scope.querySearch = querySearch;
        $scope.signUp = {};
        vm.tags = [];
        if (localStorage.getItem('id_token') != null) {
            // $state.go("home.dashboard");
            $rootScope.authenticated = true;
            $mdDialog.hide();
        }
        $scope.signUp.college_id = 0;
        // tokenService.get("colleges").then(function(colleges) {
        //     $scope.colleges = colleges.data;
        // });
        $scope.items = creativityCategories.items;
        $scope.itemsMobile = creativityCategories.itemsMobile;

        $scope.searchData = $filter('filter')($scope.filteredPeople, {
            name: 'a'
        });
        //Search Autocomplete start

        $scope.querySearch = querySearch;

        function querySearch(query) {

            $scope.searchData = $filter('limitTo')($filter('filter')($scope.filteredPeople, { name: query }), 5);
        }

        // Search Autocomplete End

        $scope.signUp = {};
        $scope.selectedItemChange = function(id) {
            console.log(id);
            $scope.signUp.college = id;
            $scope.signUp.college_id = id;
        };
        $scope.authenticate = function(provider) {
            $scope.loading = true;
            $auth.authenticate(provider).then(function(response) {
                    $scope.signUp.token = response.access_token;
                    $scope.signUp.type = provider;
                    $scope.signUp.skills = $scope.selectedSkills;
                    $scope.signUp.intrests = $scope.interests;
                    tokenService.post("signup", $scope.signUp)
                        .then(function(abc) {
                            localStorage.setItem('id_token', abc.token);
                            //                          localStorage.setItem('username', abc.student.username);
                            //                        localStorage.setItem('college_id', abc.student.college_id);
                            //                      localStorage.setItem('image', abc.student.image);
                            $rootScope.token = abc.token;
                            $rootScope.image = abc.image;
                            // $state.go("home.dashboard");
                            $rootScope.authenticated = true;
                            $mdDialog.hide();
                        }).catch(function(abc) {
                            localStorage.setItem('id_token', abc.token);
                            $scope.problem = abc.status;
                            $rootScope.token = abc.token;
                            // $state.go("home.dashboard");
                            $rootScope.authenticated = true;
                            $mdDialog.hide();

                        });

                })
                .catch(function(response) {

                    $scope.signUp.token = response.access_token;
                    $scope.signUp.type = provider;
                    $scope.signUp.skills = $scope.selectedSkills;
                    $scope.signUp.intrests = $scope.interests;
                    $scope.signUp.college_id = $scope.college;
                    tokenService.post("signup", $scope.signUp)
                        .then(function(abc) {
                            localStorage.setItem('id_token', abc.token);
                            $rootScope.token = abc.token;
                            // $state.go("home.dashboard");
                            $rootScope.authenticated = true;
                            $mdDialog.hide();
                        })
                        .catch(function(abc) {
                            $scope.loading = false;

                        });
                });

        };
        $scope.selected = [];
        $scope.interests = [];

        $scope.toggle = function(item, list) {
            var idx = list.indexOf(item);
            if (idx > -1) {
                list.splice(idx, 1);
            } else {
                list.push(item);
                $scope.buttonClass = 'md-primary md-raised';
            }
            item.intrested = !item.intrested;
            $scope.interests = list;
            $scope.continue = ($scope.interests.length > 3);
        };
        $scope.exists = function(item, list) {
            return list.indexOf(item) > -1;
        };
        $scope.currentState = 1;

        $rootScope.$on('event:social-sign-in-success', function(event, response) {
            // console.log("Social sign in success")
            // console.log(userDetails);
            $scope.loading = true;

            $scope.signUp.token = response.token;
            $scope.signUp.type = "google";
            $scope.signUp.skills = $scope.selectedSkills;
            $scope.signUp.intrests = $scope.interests;
            $scope.signUp.college_id = $scope.college;

            tokenService.post("signup", $scope.signUp)
                .then(function(abc) {
                    localStorage.setItem('id_token', abc.token);
                    $rootScope.token = abc.token;
                    // $state.go("home.dashboard");
                    $rootScope.authenticated = true;
                    $mdDialog.hide();

                })
                .catch(function() {
                    $scope.loading = false;
                    $scope.problem = "Could not sign you up try again later.";

                });

            // $scope.$apply(function() {

            //     $scope.currentState = 2;
            // })
            $timeout(function() {
                //$scope.currentState = 2;
                // $scope.someData = someData;
            }, 0);
        });

    }
})();
<|endoftext|>


<commit_before>import React, { Component } from "react"
import PropTypes from "prop-types"
import { patchTimeSlot } from '../../apiCalls';

class TimeSlotModal extends Component {
  constructor(props) {
    super(props)
    this.state = {
      sessionSelected: this.props.matchedSession
      ? this.props.matchedSession
      : ''
    }
  }

  componentDidMount() {
    const { csrf, slot, matchedSession } = this.props
  }

  changeSession = (e) => {
    let session = this.props.sessions.find(s => s.title === e.target.value )
    this.setState({ sessionSelected: session })
  }

  close = () => {
    this.props.closeModal()
  }

  saveChanges = () => {
    const { sessionSelected } = this.state
    const { csrf, closeModal, handleMoveSessionResponse, title, track, presenter, description } = this.props

    let slot
    if (!sessionSelected) {
      slot = Object.assign(this.props.slot, {title, track_id: track, presenter, description})
    } else {
      slot = this.props.slot
    }

    patchTimeSlot(slot, (sessionSelected || null), csrf)
      .then(response => response.json())
      .then(data => {
        const { sessions, slots, unscheduled_sessions } = data
        handleMoveSessionResponse(sessions, unscheduled_sessions, slots)
        closeModal()
      })
  }

  render() {
    const {
      slot,
      matchedSession,
      unscheduledSessions,
      tracks,
      sessionFormats,
      title,
      track,
      presenter,
      description,
      updateSlot
    } = this.props

    const { sessionSelected } = this.state

    let sessionOptions
    if (sessionSelected) {
      sessionOptions = matchedSession
        ? [matchedSession, ...unscheduledSessions]
        : [sessionSelected, ...unscheduledSessions.filter(s => s.id !== sessionSelected.id)]
    } else {
      sessionOptions = [{title: ''}, ...unscheduledSessions]
    }
    sessionOptions = sessionOptions.map(session => (
      <option key={'session ' + session.id} value={session.title}>{session.title}</option>
    ))

    let sessionInfo
    if (sessionSelected) {
      sessionInfo = <>

          Title:

{sessionSelected.title}

          Track:

{tracks.find(track => track.id === sessionSelected.track_id || 'No track').name}

          Abstract:

{sessionSelected.abstract}

          Recommended duration:

{sessionFormats.find(s => s.id === sessionSelected.session_format_id).duration + ' minutes'}

      </>
    }

    let timeSlotForm = <>

        Title:
        <input
          type='text'
          name='title'
          value={this.props.title}
          onChange={this.props.updateSlot}
        />

        Track:
        <select name='track' value={this.props.track} onChange={this.props.updateSlot}>
          <option value=''></option>
          {tracks.map(t => (
            <option value={t.id}>{t.name}</option>
          ))}
        </select>

        Presenter:
        <input
          type='text'
          name='presenter'
          value={this.props.presenter}
          onChange={this.props.updateSlot}
        />

        Description:
        <textarea
          type='text'
          name='description'
          value={this.props.description}
          onChange={this.props.updateSlot}
        />

    </>

    return (

Edit Time Slot

              Program Session
              <select
                value={this.state.sessionSelected.title}
                onChange={this.changeSession} >
                {sessionOptions}
              </select>

            {sessionSelected ? sessionInfo : timeSlotForm}

            <button
              className='btn btn-default'
              onClick={() => this.close()}>Cancel</button>
            <button
              className='btn btn-success'
              onClick={this.saveChanges}
            >Save</button>

    )
  }
}

TimeSlotModal.propTypes = {

}

export default TimeSlotModal
<commit_msg>Add key to mapped options in modal to avoid react error message<commit_after>import React, { Component } from "react"
import PropTypes from "prop-types"
import { patchTimeSlot } from '../../apiCalls';

class TimeSlotModal extends Component {
  constructor(props) {
    super(props)
    this.state = {
      sessionSelected: this.props.matchedSession
      ? this.props.matchedSession
      : ''
    }
  }

  componentDidMount() {
    const { csrf, slot, matchedSession } = this.props
  }

  changeSession = (e) => {
    let session = this.props.sessions.find(s => s.title === e.target.value )
    this.setState({ sessionSelected: session })
  }

  close = () => {
    this.props.closeModal()
  }

  saveChanges = () => {
    const { sessionSelected } = this.state
    const { csrf, closeModal, handleMoveSessionResponse, title, track, presenter, description } = this.props

    let slot
    if (!sessionSelected) {
      slot = Object.assign(this.props.slot, {title, track_id: track, presenter, description})
    } else {
      slot = this.props.slot
    }

    patchTimeSlot(slot, (sessionSelected || null), csrf)
      .then(response => response.json())
      .then(data => {
        const { sessions, slots, unscheduled_sessions } = data
        handleMoveSessionResponse(sessions, unscheduled_sessions, slots)
        closeModal()
      })
  }

  render() {
    const {
      slot,
      matchedSession,
      unscheduledSessions,
      tracks,
      sessionFormats,
      title,
      track,
      presenter,
      description,
      updateSlot
    } = this.props

    const { sessionSelected } = this.state

    let sessionOptions
    if (sessionSelected) {
      sessionOptions = matchedSession
        ? [matchedSession, ...unscheduledSessions]
        : [sessionSelected, ...unscheduledSessions.filter(s => s.id !== sessionSelected.id)]
    } else {
      sessionOptions = [{title: ''}, ...unscheduledSessions]
    }
    sessionOptions = sessionOptions.map(session => (
      <option key={'session ' + session.id} value={session.title}>{session.title}</option>
    ))

    let sessionInfo
    if (sessionSelected) {
      sessionInfo = <>

          Title:

{sessionSelected.title}

          Track:

{tracks.find(track => track.id === sessionSelected.track_id || 'No track').name}

          Abstract:

{sessionSelected.abstract}

          Recommended duration:

{sessionFormats.find(s => s.id === sessionSelected.session_format_id).duration + ' minutes'}

      </>
    }

    let timeSlotForm = <>

        Title:
        <input
          type='text'
          name='title'
          value={this.props.title}
          onChange={this.props.updateSlot}
        />

        Track:
        <select name='track' value={this.props.track} onChange={this.props.updateSlot}>
          <option value=''></option>
          {tracks.map(t => (
            <option key={t.id} value={t.id}>{t.name}</option>
          ))}
        </select>

        Presenter:
        <input
          type='text'
          name='presenter'
          value={this.props.presenter}
          onChange={this.props.updateSlot}
        />

        Description:
        <textarea
          type='text'
          name='description'
          value={this.props.description}
          onChange={this.props.updateSlot}
        />

    </>

    return (

Edit Time Slot

              Program Session
              <select
                value={this.state.sessionSelected.title}
                onChange={this.changeSession} >
                {sessionOptions}
              </select>

            {sessionSelected ? sessionInfo : timeSlotForm}

            <button
              className='btn btn-default'
              onClick={() => this.close()}>Cancel</button>
            <button
              className='btn btn-success'
              onClick={this.saveChanges}
            >Save</button>

    )
  }
}

TimeSlotModal.propTypes = {

}

export default TimeSlotModal
<|endoftext|>


<commit_before>/**
 * Copyright - A Produle Systems Private Limited. All Rights Reserved.
 *
 * @desc Entry point act as a starting point for application
 *
 */

function UC_MainController()
{
	var thisClass = this;

	this.appController = new UC_AppController();
	this.dashboardController = new UC_DashboardController();
	this.visitorListController = new UC_VisitorListController();
	this.userController = new UC_UserController();
	this.filterController = new UC_FilterController();
	this.messagingController = new UC_MessagingController();
	this.rtcController = new UC_RTCController();

    this.rivetUserNameObj = null;

	this.constructor = function()
	{

        thisClass.appController.constructor();
        thisClass.dashboardController.constructor();
        thisClass.visitorListController.constructor();
        thisClass.userController.constructor();
        thisClass.filterController.constructor();
        thisClass.messagingController.constructor();

		thisClass.rtcController.sessionID = UC_Utils.guidGenerator();
		thisClass.rtcController.connect();

        thisClass.initRivetBinds();

        $(".uc_tab_trigger").on("click",thisClass.toggleTabs);

        $(document).on("click",".ucSwitchContentTrigger",thisClass.switchContent);

        $(".ucSwitchContentContainer").hide();
        $("#uc_tab_data_dashboard").show();
        $("#ucMainDashboard").addClass("ucCurrentPage");

        $(".ucSideBarMenuTrigger").on("click",thisClass.menuContainer);
        $(".ucSidebarCloseBtn").on("click",thisClass.closeMenuContainer);

        $(".mfTooltip").tooltip();

        $(document).on('click', function (e) {
            $('[data-toggle="popover"],[data-original-title]').each(function () {
                if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
                    (($(this).popover('hide').data('bs.popover')||{}).inState||{}).click = false  // fix for BS 3.3.6
                }

            });
        });

        $(window).resize(function(){
        	thisClass.interfaceResize();
        });

        thisClass.interfaceResize();
	};

    /*
     * @desc Init all Binding reference objects for rivets
     */
	this.initRivetBinds = function()
	{
		thisClass.rivetUserNameObj = rivets.bind(
            document.querySelector('#uc_currentuser_name'), {
                currentUserName: UC_UserSession.user.firstName+" "+UC_UserSession.user.lastName
            }
        );
	};

    /**
     * @desc Toggles between tabs. This is a global function, not specific to specific tab group
     */
    this.toggleTabs = function()
    {
        $("."+$(this).attr("data-tabgroup-class")).hide();
        $("#"+$(this).attr("data-tabgroup-tabid")).show();

        $(this).closest(".btn-group").find(".btn").removeClass("active");
        $(this).addClass("active");
    };

    /**
     * @desc
     */
    this.switchContent = function(e)
    {
    	var divID = $(this).attr("switch-to");
        $(".ucSwitchContentContainer").hide();
        $("#"+divID).show();

        $(".ucSwitchContentTrigger").removeClass("ucCurrentPage");
        $(this).addClass("ucCurrentPage");

        thisClass.closeMenuContainer(e);
    };
    /**
     * @desc Responsive for Sidebar
     */

    this.menuContainer = function(e)
    {
    		e.stopPropagation();

    	    if($('.ucSidebar,.ucMainContent,.ucIndexPageWrapper, body,  #ucHeader').hasClass('open'))
    	    {
    	    	$( ".ucSidebar,.ucMainContent,.ucIndexPageWrapper, body , #ucHeader" ).removeClass( "open" );
    	    	$("html, body").css({"overflow": "auto"});

    	    } else {
    	    	$( ".ucSidebar,.ucMainContent, .ucIndexPageWrapper, body , #ucHeader" ).addClass( "open" );
    	    	$("html, body").css({"overflow": "hidden"});

    	    }

    };
    /**
     * @desc Closing the sidebar
     */

    this.closeMenuContainer = function(e)
    {
    		e.stopPropagation();
    		$( ".ucSidebar,.ucMainContent,.ucIndexPageWrapper, body , #ucHeader" ).removeClass( "open" );
    		$("html, body").css({"overflow": "auto"});

    };
    /**
     * @desc Resize Div layouts by calculating current window size so we have a fixed window size application like a desktop app
     */
    this.interfaceResize  = function()
	{
    	if($('.ucSidebar').length==1)
    		{
    		$('.ucSidebar').height($(window).height()-$('.ucSidebar').offset().top-30);
    		}

    	 var sidebarWidth = 0;
    	 if($('.ucSidebar').css("display") == "block")
    	{
    		 sidebarWidth = $('.ucSidebar').width() + 40;

    	}

    	 $('.ucTableWrapper').height($(window).height()-195);
    	 $('.ucTableWrapper').width($(window).width()-sidebarWidth-20);
	};
}
<commit_msg>UC-88 Responsive Code Updated<commit_after>/**
 * Copyright - A Produle Systems Private Limited. All Rights Reserved.
 *
 * @desc Entry point act as a starting point for application
 *
 */

function UC_MainController()
{
	var thisClass = this;

	this.appController = new UC_AppController();
	this.dashboardController = new UC_DashboardController();
	this.visitorListController = new UC_VisitorListController();
	this.userController = new UC_UserController();
	this.filterController = new UC_FilterController();
	this.messagingController = new UC_MessagingController();
	this.rtcController = new UC_RTCController();

    this.rivetUserNameObj = null;

	this.constructor = function()
	{

        thisClass.appController.constructor();
        thisClass.dashboardController.constructor();
        thisClass.visitorListController.constructor();
        thisClass.userController.constructor();
        thisClass.filterController.constructor();
        thisClass.messagingController.constructor();

		thisClass.rtcController.sessionID = UC_Utils.guidGenerator();
		thisClass.rtcController.connect();

        thisClass.initRivetBinds();

        $(".uc_tab_trigger").on("click",thisClass.toggleTabs);

        $(document).on("click",".ucSwitchContentTrigger",thisClass.switchContent);

        $(".ucSwitchContentContainer").hide();
        $("#uc_tab_data_dashboard").show();
        $("#ucMainDashboard").addClass("ucCurrentPage");

        $(".ucSideBarMenuTrigger").on("click",thisClass.menuContainer);
        $(".ucSidebarCloseBtn").on("click",thisClass.closeMenuContainer);

        $(".mfTooltip").tooltip();

        $(document).on('click', function (e) {
            $('[data-toggle="popover"],[data-original-title]').each(function () {
                if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
                    (($(this).popover('hide').data('bs.popover')||{}).inState||{}).click = false  // fix for BS 3.3.6
                }

            });
        });

        $(window).resize(function(){
        	thisClass.interfaceResize();
        });

        thisClass.interfaceResize();
	};

    /*
     * @desc Init all Binding reference objects for rivets
     */
	this.initRivetBinds = function()
	{
		thisClass.rivetUserNameObj = rivets.bind(
            document.querySelector('#uc_currentuser_name'), {
                currentUserName: UC_UserSession.user.firstName+" "+UC_UserSession.user.lastName
            }
        );
	};

    /**
     * @desc Toggles between tabs. This is a global function, not specific to specific tab group
     */
    this.toggleTabs = function()
    {
        $("."+$(this).attr("data-tabgroup-class")).hide();
        $("#"+$(this).attr("data-tabgroup-tabid")).show();

        $(this).closest(".btn-group").find(".btn").removeClass("active");
        $(this).addClass("active");
    };

    /**
     * @desc
     */
    this.switchContent = function(e)
    {
    	var divID = $(this).attr("switch-to");
        $(".ucSwitchContentContainer").hide();
        $("#"+divID).show();

        $(".ucSwitchContentTrigger").removeClass("ucCurrentPage");
        $(this).addClass("ucCurrentPage");

        thisClass.closeMenuContainer(e);
    };
    /**
     * @desc Responsive for Sidebar
     */

    this.menuContainer = function(e)
    {
    		e.stopPropagation();

    	    if($('.ucSidebar,.ucMainContent,.ucIndexPageWrapper, body,  #ucHeader').hasClass('open'))
    	    {
    	    	$( ".ucSidebar,.ucMainContent,.ucIndexPageWrapper, body , #ucHeader" ).removeClass( "open" );
    	    	$("html, body").css({"overflow": "auto"});

    	    } else {
    	    	$( ".ucSidebar,.ucMainContent, .ucIndexPageWrapper, body , #ucHeader" ).addClass( "open" );
    	    	$("html, body").css({"overflow": "hidden"});

    	    }

    };
    /**
     * @desc Closing the sidebar
     */

    this.closeMenuContainer = function(e)
    {
    		e.stopPropagation();
    		$( ".ucSidebar,.ucMainContent,.ucIndexPageWrapper, body , #ucHeader" ).removeClass( "open" );
    		$("html, body").css({"overflow": "auto"});

    };
    /**
     * @desc Resize Div layouts by calculating current window size so we have a fixed window size application like a desktop app
     */
    this.interfaceResize  = function()
	{
    	if($('.ucSidebar').length==1)
    		{
    		$('.ucSidebar').height($(window).height()-$('.ucSidebar').offset().top-30);
    		}

    	 var sidebarWidth = 0;
    	 if($('.ucSidebar').css("display") == "block")
    	{
    		 sidebarWidth = $('.ucSidebar').width() + 40;

    	}

    	 $('.ucTableWrapper').height($(window).height()-195);
    	 $('.ucTableWrapper').width($(window).width()-sidebarWidth-20);
	};
}
<|endoftext|>


<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import SettingsHeader from '../SettingsHeader';
import { ContentColumn } from '../../../styles/js/shared';

const TeamDataComponent = ({ dataReportUrl }) => (
  <ContentColumn large>
    <SettingsHeader
      title={
        <FormattedMessage
          id="teamDataComponent.title"
          defaultMessage="Workspace data"
        />
      }
      subtitle={
        <FormattedMessage
          id="teamDataComponent.subtitle"
          defaultMessage="Download data and metadata from Check. Get insight and analysis about workspace and tipline usage."
        />
      }
      helpUrl="https://help.checkmedia.org/en/articles/4511362"
    />
    <Card>
      <CardContent>
        { dataReportUrl ?
          <React.Fragment>
            <Typography variant="body1" component="p" paragraph>
              <FormattedMessage id="teamDataComponent.notSet1" defaultMessage="Click the button below to open your data report in a new window." />
            </Typography>
            <Box mt={2} mb={2}>
              <Button
                variant="contained"
                color="primary"
                onClick={() => { window.open(dataReportUrl); }}
              >
                <FormattedMessage id="teamDataComponent.viewDataReport" defaultMessage="View data report" />
              </Button>
            </Box>
            <Typography variant="body1" component="p" paragraph>
              <FormattedMessage id="teamDataComponent.notSet2" defaultMessage="To request any customization of your data report, please reach out to support." />
            </Typography>
          </React.Fragment> :
          <React.Fragment>
            <Typography variant="body1" component="p" paragraph>
              <FormattedMessage
                id="teamDataComponent.set1"
                defaultMessage="Fill {thisShortForm} to request access to your data report."
                values={{
                  thisShortForm: (

                      <FormattedMessage id="teamDataComponent.formLinkText" defaultMessage="this short form" />

                  ),
                }}
              />
            </Typography>
            <Typography variant="body1" component="p" paragraph>
              <FormattedMessage id="teamDataComponent.set2" defaultMessage="Your data report will be enabled within one business day." />
            </Typography>
          </React.Fragment> }
      </CardContent>
    </Card>
  </ContentColumn>
);

TeamDataComponent.defaultProps = {
  dataReportUrl: null,
};

TeamDataComponent.propTypes = {
  dataReportUrl: PropTypes.string, // or null
};

export default TeamDataComponent;
<commit_msg>Ticket CHECK-85: Updating the Airtable link<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import SettingsHeader from '../SettingsHeader';
import { ContentColumn } from '../../../styles/js/shared';

const TeamDataComponent = ({ dataReportUrl }) => (
  <ContentColumn large>
    <SettingsHeader
      title={
        <FormattedMessage
          id="teamDataComponent.title"
          defaultMessage="Workspace data"
        />
      }
      subtitle={
        <FormattedMessage
          id="teamDataComponent.subtitle"
          defaultMessage="Download data and metadata from Check. Get insight and analysis about workspace and tipline usage."
        />
      }
      helpUrl="https://help.checkmedia.org/en/articles/4511362"
    />
    <Card>
      <CardContent>
        { dataReportUrl ?
          <React.Fragment>
            <Typography variant="body1" component="p" paragraph>
              <FormattedMessage id="teamDataComponent.notSet1" defaultMessage="Click the button below to open your data report in a new window." />
            </Typography>
            <Box mt={2} mb={2}>
              <Button
                variant="contained"
                color="primary"
                onClick={() => { window.open(dataReportUrl); }}
              >
                <FormattedMessage id="teamDataComponent.viewDataReport" defaultMessage="View data report" />
              </Button>
            </Box>
            <Typography variant="body1" component="p" paragraph>
              <FormattedMessage id="teamDataComponent.notSet2" defaultMessage="To request any customization of your data report, please reach out to support." />
            </Typography>
          </React.Fragment> :
          <React.Fragment>
            <Typography variant="body1" component="p" paragraph>
              <FormattedMessage
                id="teamDataComponent.set1"
                defaultMessage="Fill {thisShortForm} to request access to your data report."
                values={{
                  thisShortForm: (

                      <FormattedMessage id="teamDataComponent.formLinkText" defaultMessage="this short form" />

                  ),
                }}
              />
            </Typography>
            <Typography variant="body1" component="p" paragraph>
              <FormattedMessage id="teamDataComponent.set2" defaultMessage="Your data report will be enabled within one business day." />
            </Typography>
          </React.Fragment> }
      </CardContent>
    </Card>
  </ContentColumn>
);

TeamDataComponent.defaultProps = {
  dataReportUrl: null,
};

TeamDataComponent.propTypes = {
  dataReportUrl: PropTypes.string, // or null
};

export default TeamDataComponent;
<|endoftext|>


<commit_before>// vim: sw=4:ts=4:nu:nospell:fdc=4
/*
 *  Copyright 2014 Fred Hutchinson Cancer Research Center
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

makeNavTree = function(webPartDiv) {

    Ext.QuickTips.init();

    inputArray = [{
        children: [{
            cls: "file",
            href: "/project/HIPC/Lyoplate/begin.view?",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Lyoplate Study",
            text: "Lyoplate Study"
        }, {
            cls: "file",
            href: "/project/HIPC/IS1/begin.view?",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "ImmuneSignatures Study",
            text: "ImmuneSignatures Study"
        }],
        cls: "folder",
        expanded: true,
        leaf: false,
        qtip: "Resources",
        text: "Special Projects"
    }, {
        children: [{
            cls: "file",
            href: "/project/home/support/begin.view",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Issues List",
            text: "Issues List"
        }, {
            cls: "file",
            href: "https://github.com/RGLab/ImmuneSpaceR/issues",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "ImmuneSpaceR",
            text: "ImmuneSpaceR"
        }, {
            cls: "file",
            href: "https://immunespace.herokuapp.com",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Slack",
            text: "Slack"
        }, {
            cls: "file",
            href: "/project/home/Support/begin.view?pageId=Data changes",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Release Notes",
            text: "Release Notes"
        }, {
            cls: "file",
            href: "https://www.notion.so/immunespace/0a739a057f234cb6a67d964d2e1bb66d?v=ef29d3978dd64c3bbb2f4f4ba78dc927",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Roadmap",
            text: "Roadmap"
        }],
        cls: "folder",
        expanded: true,
        leaf: false,
        qtip: "Support",
        text: "Support"
    }, {
            cls: "file",
            href: "https://test.immunespace.org/project/home/begin.view?pageId=HIPC%20Standards",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "HIPC Data Standards",
            text: "HIPC Data Standards"
        }, {
            cls: "file",
            href: "http://www.immuneprofiling.org",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "HIPC Website",
            text: "HIPC Website"
        }, {
            cls: "file",
            href: "http://www.immport.org",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "ImmPort Database",
            text: "ImmPort Database"
        }],
        cls: "folder",
        expanded: false,
        leaf: false,
        qtip: "Resources",
        text: "Resources"
    }, {
        children: [{
            children: [{
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-boston",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Boston Children's Hospital",
                text: "Boston Children's"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-centInfRD",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Center for Infectious Disease Research",
                text: "CIDR"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-columbia",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Columbia University",
                text: "Columbia University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-drexel",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Drexel University",
                text: "Drexel University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-emory2",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Emory University",
                text: "Emory University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-lajolla",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "La Jolla Institute for Allergy and Immunology",
                text: "La Jolla Institute"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-mssm",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Icahn School of Medicine at Mount Sinai / University of California, Berkeley",
                text: "Mount Sinai"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-ucla",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "University of California Los Angeles",
                text: "UCLA"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-yale2",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Yale University",
                text: "Yale University"
            }],
            cls: "folder",
            expanded: true,
            leaf: false,
            qtip: "Current Members",
            text: "Current Members"
        }, {
            children: [{
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-baylor",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Baylor Research Institute",
                text: "Baylor Research Institute"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-emory",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Emory University",
                text: "Emory University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-danafarber",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Dana-Farber Cancer Institute",
                text: "Harvard University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-mayo",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Mayo Clinic",
                text: "Mayo Clinic"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-seattlebio",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Seattle Biomedical Research Institute",
                text: "Seattle Biomed Research Institute"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-stanford",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Stanford University",
                text: "Stanford University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-yale",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Yale University",
                text: "Yale University"
            }],
            cls: "folder",
            expanded: false,
            leaf: false,
            qtip: "Past Members",
            text: "Past Members"
        }],
        cls: "folder",
        expanded: false,
        leaf: false,
        qtip: "HIPC Centers",
        text: "HIPC Centers"
    }];

    navTree = new Ext.tree.TreePanel({
        animate: true,
        autoScroll: true,
        border: false,
        cls: 'ISCore',
        enableDD: false,
        lines: true,
        listeners: {
            checkchange: function(node, checked) {},
            click: function(node) {}
        },
        loader: new Ext.tree.TreeLoader(), // register a TreeLoader to make use of createNode()
        renderTo: webPartDiv,
        root: new Ext.tree.AsyncTreeNode({
            children: inputArray,
            draggable: false,
            expanded: true
        }),
        rootVisible: false
    });

    navTree.render();
};
<commit_msg>missing [<commit_after>// vim: sw=4:ts=4:nu:nospell:fdc=4
/*
 *  Copyright 2014 Fred Hutchinson Cancer Research Center
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

makeNavTree = function(webPartDiv) {

    Ext.QuickTips.init();

    inputArray = [{
        children: [{
            cls: "file",
            href: "/project/HIPC/Lyoplate/begin.view?",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Lyoplate Study",
            text: "Lyoplate Study"
        }, {
            cls: "file",
            href: "/project/HIPC/IS1/begin.view?",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "ImmuneSignatures Study",
            text: "ImmuneSignatures Study"
        }],
        cls: "folder",
        expanded: true,
        leaf: false,
        qtip: "Resources",
        text: "Special Projects"
    }, {
        children: [{
            cls: "file",
            href: "/project/home/support/begin.view",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Issues List",
            text: "Issues List"
        }, {
            cls: "file",
            href: "https://github.com/RGLab/ImmuneSpaceR/issues",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "ImmuneSpaceR",
            text: "ImmuneSpaceR"
        }, {
            cls: "file",
            href: "https://immunespace.herokuapp.com",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Slack",
            text: "Slack"
        }, {
            cls: "file",
            href: "/project/home/Support/begin.view?pageId=Data changes",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Release Notes",
            text: "Release Notes"
        }, {
            cls: "file",
            href: "https://www.notion.so/immunespace/0a739a057f234cb6a67d964d2e1bb66d?v=ef29d3978dd64c3bbb2f4f4ba78dc927",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "Roadmap",
            text: "Roadmap"
        }],
        cls: "folder",
        expanded: true,
        leaf: false,
        qtip: "Support",
        text: "Support"
    }, [{
            cls: "file",
            href: "https://test.immunespace.org/project/home/begin.view?pageId=HIPC%20Standards",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "HIPC Data Standards",
            text: "HIPC Data Standards"
        }, {
            cls: "file",
            href: "http://www.immuneprofiling.org",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "HIPC Website",
            text: "HIPC Website"
        }, {
            cls: "file",
            href: "http://www.immport.org",
            hrefTarget: "_blank",
            leaf: true,
            qtip: "ImmPort Database",
            text: "ImmPort Database"
        }],
        cls: "folder",
        expanded: false,
        leaf: false,
        qtip: "Resources",
        text: "Resources"
    }, {
        children: [{
            children: [{
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-boston",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Boston Children's Hospital",
                text: "Boston Children's"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-centInfRD",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Center for Infectious Disease Research",
                text: "CIDR"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-columbia",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Columbia University",
                text: "Columbia University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-drexel",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Drexel University",
                text: "Drexel University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-emory2",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Emory University",
                text: "Emory University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-lajolla",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "La Jolla Institute for Allergy and Immunology",
                text: "La Jolla Institute"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-mssm",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Icahn School of Medicine at Mount Sinai / University of California, Berkeley",
                text: "Mount Sinai"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-ucla",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "University of California Los Angeles",
                text: "UCLA"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-yale2",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Yale University",
                text: "Yale University"
            }],
            cls: "folder",
            expanded: true,
            leaf: false,
            qtip: "Current Members",
            text: "Current Members"
        }, {
            children: [{
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-baylor",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Baylor Research Institute",
                text: "Baylor Research Institute"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-emory",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Emory University",
                text: "Emory University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-danafarber",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Dana-Farber Cancer Institute",
                text: "Harvard University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-mayo",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Mayo Clinic",
                text: "Mayo Clinic"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-seattlebio",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Seattle Biomedical Research Institute",
                text: "Seattle Biomed Research Institute"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-stanford",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Stanford University",
                text: "Stanford University"
            }, {
                cls: "file",
                href: "https://www.immuneprofiling.org/hipc/page/showPage?pg=projects-yale",
                hrefTarget: "_blank",
                leaf: true,
                qtip: "Yale University",
                text: "Yale University"
            }],
            cls: "folder",
            expanded: false,
            leaf: false,
            qtip: "Past Members",
            text: "Past Members"
        }],
        cls: "folder",
        expanded: false,
        leaf: false,
        qtip: "HIPC Centers",
        text: "HIPC Centers"
    }];

    navTree = new Ext.tree.TreePanel({
        animate: true,
        autoScroll: true,
        border: false,
        cls: 'ISCore',
        enableDD: false,
        lines: true,
        listeners: {
            checkchange: function(node, checked) {},
            click: function(node) {}
        },
        loader: new Ext.tree.TreeLoader(), // register a TreeLoader to make use of createNode()
        renderTo: webPartDiv,
        root: new Ext.tree.AsyncTreeNode({
            children: inputArray,
            draggable: false,
            expanded: true
        }),
        rootVisible: false
    });

    navTree.render();
};
<|endoftext|>