From e2aefda183de4f1c1256d97f7ce09f8bee5477db Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Tue, 9 May 2017 14:24:20 -0400 Subject: [ONAP-rebase] Rebase as 1.1.0-SNAPSHOT Consolidate into a single maven project; no more separate model and client jars. Change-Id: Ibbba982250b74c0dfd09ee1c65c0fb6c158dd632 Signed-off-by: Christopher Lott Signed-off-by: Christopher Lott (cl778h) --- .../main/webapp/app/fusion/ase/scripts/buttons.js | 382 --------------------- 1 file changed, 382 deletions(-) delete mode 100644 dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/buttons.js (limited to 'dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/buttons.js') diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/buttons.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/buttons.js deleted file mode 100644 index 798ada1..0000000 --- a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/buttons.js +++ /dev/null @@ -1,382 +0,0 @@ - - -// Contains functions for the buttons - -var steps = []; - -window.rows = 0, window.initialRows = 14, window.cols = window.initialCols = 8; //Define initial rows and cols -var presets = [["None"],["Demo",["UE A","com.ecomp.ue3"],["vA-SBG","com.ecomp.dc1.a_sbg"],["vNS","com.ecomp.dc1.ns"],["vAS","com.ecomp.dc1.as"],["TF/BGCF","com.ecomp.usp.tf_bgcf"],["ENUM","com.ecomp.usp.enum"],["n-SBG","com.ecomp.dc1.n_sbg"],["SIP PSX","com.ecomp.vni.sip_psx"],["BVoIP AS","com.ecomp.vni.bvoip_as"],["IPBE","com.ecomp.vni.ipbe"],["IPFR UE B","com.ecomp.ue5"]],["Layer3Access",["Order Trigger System"],["MSO"],["SDN-C"],["A&AI"],["PO"]]]; -var presetNames = []; -for(var i = 0; i'+presets[i][0]+'
' - } - bootbox.dialog({ - backdrop:true, - animate:false, - onEscape: function() {}, - title: 'Create New Project', - size: 'large', - message: 'Project from preset :
'+availablePresetHTML+'



' - }); - function confirm () { - bootbox.confirm({ - size:'small', - message:"***This will erase everything***", - callback: function(result){ - if (result == true){ - bootbox.hideAll(); - newProject(null,null,14); - } - } - }); - } -} - -function newProjectFromPreset(type){ - newProject(null,null,14); - if (type!=null) window.selectedPreset = type; - for (var i=0; i= 1 ) { step = 0; } - for (i = 0; i'; - -// document.getElementById("numbers").innerHTML +='

  • '; - //var lineHTML='


    '; - if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { - templineheight = 17 - } else { - templineheight = Math.ceil((gridPitchy)/2) - } - var lineHTML='


    '; - $("#lines").append(lineHTML); - if (linesToMakeDouble!=null && linesToMakeDouble.indexOf(rows.toString())!=-1){ - toggleDoubleLine(document.getElementById("row"+rows),linesToMakeDouble,doubleLineText,doubleLineType); - step++; - console.log(step); - } -} - -function toggleDoubleLine (target,lines,text,type) { - while (target.id.substring(0,3)!="row"){ - target = target.parentNode; - } - //console.log(target.style); - if ($(target).hasClass('dottedLine')){ - $(target).removeClass('dottedLine'); - $(target).addClass('doubleLine'); - if (text==null){ - bootbox.confirm({ - closeButton:false,backdrop:true,animate:false, - size:'small', - title: "Add Separator Text", - onEscape: function() {}, - message: ''+ - '

    Message type :
    ', - callback: function(result){ - if (result == true){ - //EXECUTE THIS ON OKAY/// - var innerText = $('#separatorInnerText').val(); - document.getElementById(target.id).setAttribute('messageType',$('#messageType').val()) - pushToDict(innerText, "separator"); - locationOfTag = parseInt($(target).position().top)-4; - target.innerHTML = '
    '+innerText+'
    '; - ///////////////////////// - } - } - }); - $("#separatorInnerText").autocomplete({ - source: separatorTags, - autoFocus: true, - delay: 0 - }); - $("#messageType").autocomplete({ - source: messageTags, - autoFocus: true, - delay: 0 - }); - - var currentInput = $("#separatorInnerText").val(); - $("#separatorInnerText").selectRange(0,currentInput.length); - $("#separatorInnerText").click(function(){ - var currentInput = $("#separatorInnerText").val(); - $("#separatorInnerText").selectRange(0,currentInput.length); - }); - $("#separatorInnerText").keyup( function(e) { - if (e.keyCode == 13){ - $(document.getElementsByClassName('btn-primary')[0]).click(); - } - }); - $("#messageType").keyup( function(e) { - if (e.keyCode == 13){ - $(document.getElementsByClassName('btn-primary')[0]).click(); - } - }); - } - else if (text!=null && lines==null){ - locationOfTag = parseInt($(target).position().top)-4; - document.getElementById(target.id).setAttribute('messageType',type) - target.innerHTML = '
    '+text+'
    '; - } - else{ - locationOfTag = parseInt($(target).position().top)-4; - document.getElementById(target.id).setAttribute('messageType',type[lines.indexOf(target.id.substring(3))]) - target.innerHTML = '
    '+text[lines.indexOf(target.id.substring(3))]+'
    '; - } - } - else { - target.innerHTML = ''; - $(target).removeClass('doubleLine'); - $(target).addClass('dottedLine'); - } -} - -//Adds width -function addWidth() { - cols++; //adds 2 cols per button press - document.getElementById('grid').style.width = 98 + (cols-initialCols)*12 + '%'; //Increases grid width % by 5% right - document.getElementById('horRows').style.width = 81 + (cols-initialCols)*12 + '%'; //Increases line width % by 5% right -} - -function fitToDoc () { - doubleLineNumbers.length=0; - doubleLineText.length=0; - doubleLineType.length=0; - var doubleElements = document.getElementsByClassName("doubleLine"); - $.each(doubleElements,function(index, value){ - doubleLineNumbers.push(($(value).attr('id')).substring(3)); - doubleLineText.push(value.children[0].innerHTML); - doubleLineType.push($(value).attr('messageType')); - }); - if (nodeArr.length==0 && arrowArr.length==0) return; - var maxX = 0; - for (var i=0; imaxX){ - maxX = nodeArr[i][6]; - } - } - var maxY = 0; - for (var i=0; imaxY){ - maxY = parseInt(arrowArr[i][4]); - } - } - var rowsNeeded = Math.ceil((maxY-60)/42); - document.getElementById("numbers").innerHTML =''; - document.getElementById("lines").innerHTML =''; - if(maxX<$("#grid").width() - $("#sideBar").width()){ - do{ - cols--; //adds 2 cols per button press - document.getElementById('grid').style.width = 98 + (cols-initialCols)*12 + '%'; //Increases grid width % by 5% right - document.getElementById('horRows').style.width = 81 + (cols-initialCols)*12 + '%'; //Increases line width % by 5% right - }while (maxX<$("#grid").width() - $("#sideBar").width()) - } - rows=0; - for(var i=0; iFlow SDE' + - '

    This program was designed to aid in the process of creating, editing, and sharing sequence diagrams by utilizing drag-n-drop javascript ' + - 'frameworks.


    https://github.com/kevingilboy/Advanced-Service-Editor

    '+ - '

    Editing: Getting Started

    1. Simply drag a module from the sidebar to the main grid on the screen.
    2. ' + - '
    3. Once you begin dragging, a grey dotted line will guide you to the appropriate dropzone area. The dropzone is highlighted ' + - 'blue upon dragging a appropriate module inside of it.
    4. ' + - '
    5. You will be prompted to enter text to be displayed inside of the module. Height and width can be added using the buttons ' + - 'on the left side of the screen.
    6. To delete a module, drag it to the trash can.
    '+ - - '

    Nodes

    Nodes are designated by blue, rounded rectangles and ' + - 'can be dragged to the dropzone above the horizontal grid lines. Nodes automatically generate "lifelines" that run to the ' + - 'of the page. When arrows are resized, they snap to these lifelines. A node\'s dependent arrows (those that touch its ' + - 'lifelines) remain stuck to it while the node is dragged and rearranged. Dragging a node on top of another node results ' + - 'in the overlapped node and all nodes to its right to be shifted over one unit to the right.

    ' + - '

    Arrows

    Arrows can be ' + - 'dragged to the main dropzone that contains many horizontal lines. Arrows can be resized and snap to nearby lifelines at ' + - 'the end of resizing.

    ' + - '

    Notes

    Notes are designated by yellow rectangles and can be ' + - 'dragged to the main dropzone that contains many horizontal lines.

    ' + - - '

    File Management

    There are many options to save your work and load it to either a ' + - 'new workspace or current one.

    '+ - - '

    Saving

    ' + - - '

    Saving workspace

    To save everything in the current workspace, click the save ' + - 'button in the lower left hand corner. A menu will pop up with multiple save destinations:

      '+ - '
    • Locally: Files are saved as text files with JSON formatting. They are downloaded to the users downloads folder. '+ - 'The filename dictates what the file is called but the description dictates what the workspace is called.
    • '+ - '
    • Database: Users must first log in to use database connection. When logged in, a text input field is available '+ - 'for the user to insert a workspace description. The description dictates what the workspace is called.
    • '+ - '
    • BPMN: The workspace is converted to a BPMN 2.0 filetype which is compatable with Camunda\'s bpmn.io and eclipse plugin.'+ - 'The file can either be downloaded for import to bpmn.io or a preview can be shown by clicking "show". This uses a '+ - 'Camunda released plugin that displays the file on an integrated canvas.
    • '+ - '

    ' + - - '

    Export node(s)

    It is also possible to export a single node and its dependent ' + - 'arrows. To do so, right click on any node and click export. Enter a file name and click "Export". Exporting is useful ' + - 'for saving frequently used nodes as they can be imported and appended to any project with ease.

    ' + - - '

    Loading

    ' + - '

    Loading workspace

    To load a previous workspace, click the load ' + - 'button in the lower left hand corner. A menu will pop up with multiple loading destinations:

      '+ - '
    • Locally: Files can be retrieved from a local filesystem and imported into the workspace.
    • '+ - '
    • Database: Users must first log in to use database connection. When logged in, a table shows the files that are '+ - 'on the database.

    '+ - '

    Load types

    There are two ways to load a file into the current workspace:

    '+ - '
    • Replace

      To load an entire, previously saved workspace and replace the current one, ' + - 'click the load button in the lower left hand corner. You will be prompted to choose a file and then click "Replace".

    • ' + - - '
    • Append

      To load an entire, previously saved workspace on top of a current one, ' + - 'click the load button in the lower left hand corner. You will be prompted to choose a file and then click "Append". ' + - 'An append location marker will show up and you can click anywhere on the designated dropzone to change the location where the ' + - 'file will be appended. After choosing a spot, click "Okay". If you choose a location that intersects with another node, ' + - 'that node and the nodes to its right will be shifted one unit to the right.

    ' + - - '

    Import node(s)

    To import a node that has previously been exported, right click ' + - 'on the node dropzone and click "import". You will be prompted to choose a file and then click "Import". ' + - 'An append location marker will show up and you can click anywhere on the designated dropzone to change the location where the ' + - 'file will be appended. After choosing a spot, click "Okay". If you choose a location that intersects with another node, ' + - 'that node and the nodes to its right will be shifted one unit to the right.

    ' + - - '

    Renaming

    ' + - '

    Rename workspace

    To rename your workspace, double click on the title bar ' + - 'and type a new title. This does not change the names of previously saved versions of the workspace.

    ' + - - '

    Features

    There are many features in this program to allow for its ease of use.

    '+ - - '

    Arrow endpoint detection

    When an arrow on the screen lacks a left or right ' + - 'endpoint, the arrow is colored (red = 0 connections, yellow = 1 connection) and *Link missing lifeline ' + - 'appears in the sidebar. Clicking this text flashes the invalid arrows. When a successful connection has been made, ' + - 'the arrow fades to green and then to transparent.

    ' + - '

    Autocomplete with technical dictionary

    When prompted to enter the inner text of a module, ' + - 'the editor searches through its preloaded dictionary to offer suggestions for text. Entering a term that is not in the ' + - 'dictionary appends it to the dictionary for the entirity of the session.

    ' + - '

    Autofit

    Clicking the autofit button fits the screen size to the exact dimensions of the ' + - 'diagram. Highly recommended before making a printable output as it will scale the diagram and allow for max print size.

    ' + - '

    Context menus (right-clicking)

    Right clicking on nodes and arrows deploys a custom context menu allowing ' + - 'you to perform many operations on modules such as cut, copy, paste, delete, rename, import and export.

    ' + - '

    Multi-select (using Ctrl & Shift)

    Holding the control key allows the user to select multiple' + - 'nodes in any order. Holding the shift key allows the user to select multiple nodes in a row. Selecting multiple nodes allows ' + - 'you to perform an operation (such as drag, cut, copy, paste, delete, and export).

    ' + - '

    Printing

    Clicking "print" allows you to export the current workspace to a ' + - 'printable (saveable and email-able) pdf document. These docments are meant for presentation and cannot be ' + - 'reimported into the workspace.

    ' + - '

    Russian-Doll Nodes

    Nodes can be nested inside of other nodes. This can be done by either 1) ' + - 'right-clicking on a single node and selecting "make child inside" 2) selecting a group of nodes, right-clicking, and selecting ' + - '"make group from selected". Blank slots can be added inside groups for nodes to be dragged into by right clicking and selecting '+ - '"make slot inside". Upon making a group, connected arrows are broken and shaded yellow forcing the user to reconnect the arrows '+ - 'to the nodes inner components. Nested nodes can be expanded and collapsed by double clicking on them. Arrow connections are preserved through '+ - 'this process

    ' + - '

    Restore from trash

    Clicking on the trash can brings up a menu that allows you ' + - 'to restore previously deleted modules and append them to the current workspace. Follow instructions on load:append for how to append.

    '+ - '

    Separators

    Double-clicking on a horizontal grid line allows the user to make a double-lined ' + - 'separator on the diagram.

    ' - }) -} \ No newline at end of file -- cgit 1.2.3-korg