{"id":21849009,"url":"https://github.com/ispyb/exi","last_synced_at":"2025-06-13T15:11:53.120Z","repository":{"id":47660687,"uuid":"53658415","full_name":"ispyb/EXI","owner":"ispyb","description":"Extended User Interface for ISPyB based on ISPyB's API","archived":false,"fork":false,"pushed_at":"2021-08-19T08:17:00.000Z","size":67962,"stargazers_count":4,"open_issues_count":83,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-14T15:15:29.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ispyb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-11T10:12:29.000Z","updated_at":"2024-06-24T18:39:33.000Z","dependencies_parsed_at":"2022-09-25T07:54:12.216Z","dependency_job_id":null,"html_url":"https://github.com/ispyb/EXI","commit_stats":null,"previous_names":[],"tags_count":104,"template":false,"template_full_name":null,"purl":"pkg:github/ispyb/EXI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispyb%2FEXI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispyb%2FEXI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispyb%2FEXI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispyb%2FEXI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ispyb","download_url":"https://codeload.github.com/ispyb/EXI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispyb%2FEXI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259668724,"owners_count":22893136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T00:10:05.708Z","updated_at":"2025-06-13T15:11:48.096Z","avatar_url":"https://github.com/ispyb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \n# EXI\n\nEXI is just another user interface for ISPyB and supports: MX, BioSAXS and EM. It connects to ISPyB via RESTful webservices.\n\n\n\n## Overview\n1. [Install EXI](#install-exi)\n    * [Requirements](#requirements)\n    * [Build](#build)\n    * [Configure](#configure)\n    \n2. [Development](#development)  \n    * [Run](#run)\n    * [Update a JS dependency](#update-a-js-dependency)\n    * [DUST](#dust)\n    * [Demo Application](#demo-application)\n         * [Controller](#controller)\n\n\n## Install EXI\n### Requirements\n\nIn order to build EXI, you need to have:\n- The latest npm and git 1.7 or later. Earlier versions might work, but are not supported. \n- Bower (installable from npm)\n- Grunt version v0.4.5 or later (http://gruntjs.com/)\n- npm\n\n\n### Build\n\nClone a copy of the main EXI git repo by running:\n\n```bash\ngit clone git://github.com/ispyb/EXI.git\n```\n\nEnter into the installation directory and run the build script:\n\n```bash\nnpm install\n```\n\nDownload dependencies by running:\n\n```bash\nbower install\n```\n\nIf you want to see which dependencies EXI needs run:\n```bash\nbower list\n```\n\nBuild EXI by running Grunt, the javascript task runner\n\n```bash\ngrunt\n```\n\n\n## Configure\n\nIn order to configure EXI some modifications should be done on config.js that it may be found on:\n* /saxs/config.js \n* /mx/config.js\n* /test/config.js\n* /tracking/config.js\n\nIt allows to use different configuration for different techniques/beamlines.\n\nThe format of the file is JSON and it looks like this\n\n```json\n{\n   \"sites\":[\n      {\n         \"name\":\"ESRF\",\n         \"url\":\"https://wwws.esrf.fr/ispyb/ispyb-ws/rest\",\n         \"beamlines\":{\n            \"SAXS\":[\n                { \n                   \"name\" : \"BM29\"                   \n               }\n            ],\n            \"EM\" :[\n                   { \n                      \"name\" : \"CM01\"\n                   }\n            ],\n            \"MX\":[\n              { \n                   \"name\" : \"ID23-1\",\n                   \"sampleChangerType\" : 'FlexHCDDual'\n               },\n               { \n                   \"name\" : \"ID23-2\",\n                   \"sampleChangerType\" : 'FlexHCDUnipuckPlate'\n               },\n               { \n                   \"name\" : \"ID29\",\n                   \"sampleChangerType\" : 'FlexHCDDual'\n               },\n               { \n                   \"name\" : \"ID30A-1\",\n                   \"sampleChangerType\" : 'RoboDiffHCDSC3'\n               },\n            ]\n         }\n      }\n]\n}\n```\n\nDetectors node defines the detectors used as a hash map \"name of detector\" : \u003cProperties\u003e\n\nSites node define to which sources EXI will be able to connect. These are the main parameters to be defined:\n* name: this name is an ID for the site and will appear when you sign in\n* url : a valid url pointing to the rest webservices from a ISPyB active instance\n* exiurl : !ONTEST this is pointing to the offline data analysis server set of webservices\n* Beamlines\n* \n\n## Development\n### Run\nIf you want to build a version where the javascript will be not minified for developing then use the profile dev\n\n```bash\ngrunt dev\n```\nGlobally install http-server in case you haven't done this before\n```bash\nnpm i -g http-server\n```\n\nStart the http-server.  Http-server will display the URL to open EXI in your favourite browser.\n```bash\nhttp-server\n```\n\nSee [http-server on Github](https://github.com/indexzero/http-server) for configuration options.\n\n### Update a JS dependency\n\n\nUsing bower one can update a package by typing:\n```\nbower update ispyb-js-api\n```\n\n\n### DUST\n\nEXI makes an intensive use of HTML templates. Dustjs has been chosen as engine because:\n1. High integration with Grunt\n2. Easy to use\n3. Maintened by linkedin\n4. Possibility to precompile the template in order to execute them faster\n\n\nUse case:\n- Template can be uses when we want to render HTML within a Ext component. For instance a column on a Ext.grid.Panel object\n\n#### How to use dust on EXI?\n1. Create a javascript file on  /templates\n2. The name of the file will correspond with the name of the template that dust will give to the precompiled function\nExample: templates/test.js\n```\n\u003ctable\u003e\n{#.}\n\u003ctr\u003e\n\u003ctd\u003e\n{.count}\n\u003c/td\u003e\n\u003ctd\u003e\n{.step}\n\u003c/td\u003e\n\u003c/tr\u003e\n{/.}\n\u003c/table\u003e\n```\n\n3. Run Grunt or Grunt dev. Because we need to precompile the templates we need to build the application before hand\n4. Use the template\n```javascript\ndust.render(\"workflowstepsection_workflowstep\", [{step:'test1', count:5},{step:'test2', count:4},], function(err, out){\n\t\tconsole.log(out);\n     });\n\n```\n\nThe expected output is:\n```\n\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e5\u003c/td\u003e\u003ctd\u003etest1\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e4\u003c/td\u003e\u003ctd\u003etest2\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n```\n\n#### Grunt and dustjs\n\nThere is a new task on Grunt. It takes all the javascript files on templates folder and it precompiles on the min folder\n```\ndustjs: {\n\t    compile: {\n\t      files: {\n\t        'min/precompiled.templates.min.js': ['templates/*js']\n\t      }\n\t    }\n\t  }\n```\n\n### Demo Application\n\nEXI contains a demo application called test in order to understand how EXI is done. You can access by typing:\n```\nhttp://myserver:8082/EXI/test/dev.html#\n```\nThis will open a website with a menu bar similar to:\n![alt text](https://raw.githubusercontent.com/antolinos/EXI/issue_347/readme/example-menu.png \"Test App\")\n\nDemo app is composed basically by few files under js/test folder:\n- testcontroller.js\n- exitest.js\n- testmainview.js\n- testlistview.js\n- testlistview.template.js\n- testmainmenu\n\n#### Controller\n \nEXI controllers uses PATHJS to make an action based on the url. Demo application user TestController class that is written in  [testcontroller.js](https://github.com/antolinos/EXI/blob/issue_347/js/test/controller/testcontroller.js).\nThis is an example how an action is defined:\n```javascript\nPath.map(\"#/:name/main\").to(function() {\n\t\tvar name = this.params['name'];\n\t\tvar mainView = new TestMainView();\n\t\tEXI.addMainPanel(mainView);\t\n\t\tmainView.load( name);\n\t}).enter(this.setPageBackground);\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fispyb%2Fexi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fispyb%2Fexi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fispyb%2Fexi/lists"}