<commit_before>/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true*/
/*global Backbone, $, _, window, templateEngine, arangoHelper, GraphViewerUI, require */

(function() {
  "use strict";

  window.GraphManagementView = Backbone.View.extend({
    el: '#content',
    template: templateEngine.createTemplate("graphManagementView.ejs"),
    edgeDefintionTemplate: templateEngine.createTemplate("edgeDefinitionTable.ejs"),
    eCollList : [],
    removedECollList : [],

    events: {
      "click #deleteGraph"                  : "deleteGraph",
      "click .icon_arangodb_settings2"      : "editGraph",
      "click #createGraph"                  : "addNewGraph",
      "keyup #graphManagementSearchInput"   : "search",
      "click #graphManagementSearchSubmit"  : "search",
      "click .tile-graph"                   : "loadGraphViewer"
    },

    loadGraphViewer: function(e) {
      var name = $(e.currentTarget).attr("id");
      name = name.substr(0, name.length - 5);
      var adapterConfig = {
        type: "gharial",
        graphName: name,
        baseUrl: require("internal").arango.databasePrefix("/")
      };
      var width = $("#content").width() - 75;
      $("#content").html("");
      this.ui = new GraphViewerUI($("#content")[0], adapterConfig, width, 680, {
        nodeShaper: {
          label: "_key",
          color: {
            type: "attribute",
            key: "_key"
          }
        }

      }, true);
    },

    handleResize: function(w) {
      if (!this.width || this.width !== w) {
        this.width = w;
        if (this.ui) {<commit_msg>fixed toggle error<commit_after>/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true*/
/*global Backbone, $, _, window, templateEngine, arangoHelper, GraphViewerUI, require */

(function() {
  "use strict";

  window.GraphManagementView = Backbone.View.extend({
    el: '#content',
    template: templateEngine.createTemplate("graphManagementView.ejs"),
    edgeDefintionTemplate: templateEngine.createTemplate("edgeDefinitionTable.ejs"),
    eCollList : [],
    removedECollList : [],

    events: {
      "click #deleteGraph"                        : "deleteGraph",
      "click .icon_arangodb_settings2.editGraph"  : "editGraph",
      "click #createGraph"                        : "addNewGraph",
      "keyup #graphManagementSearchInput"         : "search",
      "click #graphManagementSearchSubmit"        : "search",
      "click .tile-graph"                         : "loadGraphViewer"
    },

    loadGraphViewer: function(e) {
      var name = $(e.currentTarget).attr("id");
      name = name.substr(0, name.length - 5);
      var adapterConfig = {
        type: "gharial",
        graphName: name,
        baseUrl: require("internal").arango.databasePrefix("/")
      };
      var width = $("#content").width() - 75;
      $("#content").html("");
      this.ui = new GraphViewerUI($("#content")[0], adapterConfig, width, 680, {
        nodeShaper: {
          label: "_key",
          color: {
            type: "attribute",
            key: "_key"
          }
        }

      }, true);
    },

    handleResize: function(w) {
      if (!this.width || this.width !== w) {
        this.width = w;
        if (this.ui) {
{'fraction_non_alphanumeric': 0.1512937595129376, 'fraction_numerical': 0.007914764079147641, 'mean_word_length': 2.332657200811359, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6271691', 'n_tokens_mistral': 994, 'n_tokens_neox': 963, 'n_words': 200}