GithubHelp home page GithubHelp logo

abhinavmishra14 / js-console Goto Github PK

View Code? Open in Web Editor NEW

This project forked from afaust/js-console

0.0 2.0 0.0 11.26 MB

Administration Console component for Alfresco Share, that enables the execution of arbitrary JavaScript code against the repository

License: Other

Java 14.56% JavaScript 80.34% CSS 1.13% FreeMarker 3.24% Fluent 0.01% Dockerfile 0.27% Batchfile 0.47%

js-console's Introduction

Javascript Console Admin Console component for Alfresco 7.x

Build Status

Author: Florian Maul (fme AG)

This project contains a Javascript Console component for the Alfresco Share's Administration Console, that enables the execution of arbitrary javascript code in the repository.

Usage

Add the dependencies to the Alfresco repository and share POM files of your WAR projects.

For the Repository

<dependencies>
  ...
  <dependency>
    <groupId>de.fmaul</groupId>
    <artifactId>javascript-console-repo</artifactId>
    <version>0.6</version>
    <type>amp</type>
  </dependency>
  ...
</dependencies>

<overlays>
  ...
  <overlay>
    <groupId>de.fmaul</groupId>
    <artifactId>javascript-console-repo</artifactId>
    <type>amp</type>
  </overlay>
  ...
</overlays>

For Share

<dependencies>
  ...
  <dependency>
    <groupId>de.fmaul</groupId>
    <artifactId>javascript-console-share</artifactId>
    <version>0.6</version>
    <type>amp</type>
  </dependency>
  ...
</dependencies>

<overlays>
  ...
  <overlay>
    <groupId>de.fmaul</groupId>
    <artifactId>javascript-console-share</artifactId>
    <type>amp</type>
  </overlay>
  ...
</overlays>

Watch the video

https://www.youtube.com/watch?v=c3JIeVY8Nnk

New Features

  • autocomplete with tern.js

  • new json output view for validation and formatting json from the freemarker template processing JSONView

  • JSHint integration in javascript editor- it validates input on the fly and integrates the alfresco root objects like search, node... JSHINT

  • performance statistics - displays overall time, time for javascript and freemarker processing, time for network and time for rest of the server side processing PERFORMANCE

  • Editor Theming - allows you to theme the javascript and freemarker codemirror editor Editor themes

  • better error marking of server runtime errors in the editors Error

  • update codemirror to version 3 and enabling many codemirror addons(activeline, hightlight selection, new autocomplete module)

Installation

The component has been developed to install on top of an existing Alfresco 7.x installation. The javascript-console-repo-<version>.amp or javascript-console-share-<version>.amp needs to be installed into the Alfresco Repository / Share webapp using the Alfresco Module Management Tool:

java -jar alfresco-mmt.jar install javascript-console-repo-<version>.amp /path/to/alfresco.war
java -jar alfresco-mmt.jar install javascript-console-share-<version>.amp /path/to/share.war

You can also use the Alfresco Maven SDK to install or overlay the AMP during the build of a Repository / Share WAR project. See https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/plugins/alfresco-maven-plugin/advanced-usage.html for details.

Building

To build the module and its AMP / JAR files, run the following command from the base project directory:

mvn clean install

Using the component

  • Log in to Alfresco Share and navigate to an Administration page such as Users or Groups
  • In the left-hand-side navigation, click Javascript Console
  • Enter Alfresco repository javascript code in the textarea at the top. Press the execute button to run the script.
  • You can use the special print(..) javascript command to output messages to the output window.
  • use Ctrl+Space for code completion. Note that only global objects and specific variables (document, space, variables ending in ...node) are completed.

js-console's People

Contributors

flox1an avatar jgoldhammer avatar afaust avatar abhinavmishra14 avatar byaminov avatar douglascrp avatar elqr avatar wabson avatar nicolas-raoul avatar tvhdev avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.