jui-grid

WebJar for jui-grid

License

License

MIT
Categories

Categories

JavaScript Languages Github Development Tools Version Controls
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

github-com-juijs-jui-grid
Last Version

Last Version

2.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

jui-grid
WebJar for jui-grid
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/juijs/jui-grid

Download github-com-juijs-jui-grid

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/github-com-juijs-jui-grid/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>github-com-juijs-jui-grid</artifactId>
    <version>2.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-juijs-jui-grid/
implementation 'org.webjars.bower:github-com-juijs-jui-grid:2.0.3'
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-juijs-jui-grid/
implementation ("org.webjars.bower:github-com-juijs-jui-grid:2.0.3")
'org.webjars.bower:github-com-juijs-jui-grid:jar:2.0.3'
<dependency org="org.webjars.bower" name="github-com-juijs-jui-grid" rev="2.0.3">
  <artifact name="github-com-juijs-jui-grid" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='github-com-juijs-jui-grid', version='2.0.3')
)
libraryDependencies += "org.webjars.bower" % "github-com-juijs-jui-grid" % "2.0.3"
[org.webjars.bower/github-com-juijs-jui-grid "2.0.3"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bower : jquery jar [1.8.0,)

Project Modules

There are no modules declared in this project.

Installation

NPM

npm install juijs-grid

Browser

<link rel="stylesheet" href="../dist/jui-grid.classic.css" />
<script src="../dist/vendors.js"></script>
<script src="../dist/jui-grid.js"></script>

ES Modules

The difference with the existing method is that you need to add the module directly using the 'use' function.

import jui from 'juijs-grid'
import TableComp from 'juijs-grid/src/components/table.js'
import Styles from './index.less'

jui.use(TableComp);

Below is the index.less file. You can only use the style you want to bundle.

.jui {
  @import "../node_modules/juijs-grid/src/styles/base/mixins.less";
  @import "../node_modules/juijs-grid/src/styles/common.less";
  @import "../node_modules/juijs-grid/src/styles/common.theme.less";
  @import "../node_modules/juijs-grid/src/styles/table.less";
  @import "../node_modules/juijs-grid/src/styles/table.theme.less";
  @import "../node_modules/juijs-grid/src/styles/theme/classic.less";
}

Usage

<body class="jui">
    <table id="table" class="table expand" style="width: 1024px;">
      <thead>
      <tr>
          <th></th>
          <th>Min</th>
          <th>Max</th>
          <th>Count</th>
          <th>Hash</th>
          <th>Failure</th>
          <th>SumTime</th>
          <th>AvgTime</th>
          <th>Name</th>
      </tr>
      </thead>
      <tbody>
      </tbody>
  </table>
  <script data-jui="#table" data-tpl="row" type="text/template">
    <tr>
        <td><!= row.seq !></td>
        <td><!= row.data["min,m"] !></td>
        <td><!= max !> <i class="icon-edit"></i></td>
        <td><!= count !></td>
        <td><!= hash !></td>
        <td><!= failure !></td>
        <td><!= sumTime !></td>
        <td><!= avgTime !></td>
        <td><!= name !></td>
    </tr>
  </script>
</body>

The UI component creation code is the same as the existing one.

var table_data = [
    {"min,m":0,"max":21.55,"count":1,"sumCpu":0,"hash":1495461794,"sd":0,"tpmc":0,"avgCpu":0,"failure":1,"rate":77.66,"sumTime":21.55,"name":"","avgTime":21.55,"success":0},
    {"min,m":1,"max":1.683,"count":32,"sumCpu":0,"hash":-1976684343,"sd":0.379,"tpmc":0,"avgCpu":0,"failure":27,"rate":16.321,"sumTime":4.529,"name":"/dup.jsp","avgTime":0.142,"success":5},
    {"min,m":2,"max":0.273,"count":8,"sumCpu":0,"hash":1886515434,"sd":0.068,"tpmc":0,"avgCpu":0,"failure":0,"rate":4.544,"sumTime":1.261,"name":"/oraclesql2.jsp","avgTime":0.158,"success":8},
    {"min,m":3,"max":0.014,"count":1,"sumCpu":0,"hash":1887438955,"sd":0,"tpmc":0,"avgCpu":0,"failure":1,"rate":0.05,"sumTime":0.014,"name":"/oraclesql3.jsp","avgTime":0.014,"success":0}
];

jui.ready([ "grid.table" ], function(table) {
    var obj = table("#table", {
        fields: [ null, "min,m", "max", "count", "hash", "failure", "sumTime", "avgTime", "name" ],
        sort: true,
        resize: true,
        scroll: true,
        scrollHeight: 200
    });
    
    obj.update(table_data);
});
org.webjars.bower

JUI Framework

JUI is HTML5 based UI Framework. Support many components, SVG charts and fast grid.

Versions

Version
2.0.3