This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
This is an Angular component included in some Zowe Desktop apps (like Zowe Editor) to browse and edit files and datasets on z/OS through the Zowe ZSS server APIs, in a tree-like experience. Using the Zowe context menu, there is also a growing support of right click CRUD & other actions.
NOTE: Because this relies upon ZSS APIs, it must be used in an environment which handles session lifecycles, as you must log in to ZSS prior to using those APIs. One way to utilize this is to use this within a Zowe App, within the Zowe Desktop. An alternative to ZSS if you don't have access to a mainframe is the ZSS mock server (https://github.com/zowe/zss/tree/v2.x/staging/mock)
You must set the @zowe registry scope to get this library, as it is not yet on npmjs.org
npm config set @zowe:registry https://zowe.jfrog.io/zowe/api/npm/npm-release/
npm install --save-prod @zowe/zlux-angular-file-tree
Then, navigate to your application's module file. Import the File Tree module by adding
import { FileTreeModule } from '@zowe/zlux-angular-file-tree/src/plugin';
and then, add the File Tree module into your application's module.
FileTreeModule,
...,
Now, in your application's HTML template, given they are within the scope of your module, you can import the File Explorer widget as
<zlux-file-tree (nodeClick)="onNodeClick($event)"></zlux-file-tree>
with an optional (style) input to specify the color, size, or other properties of the main tree container.
If you want to develop the File Tree and your own app simultaneously, you can do the following:
Note: @zowe/zlux-angular-file-tree is package name in package.json
cd zlux-file-explorer
npm link
cd my-app/webClient
npm link @zowe/zlux-angular-file-tree
cd my-app/webClient
npm unlink
cd zlux-file-explorer
npm uninstall
If you experience this issue
node node_modules/node-sass/scripts/install.js
npm rebuild node-sass
An alternative to option 1 is to use a local path.
Change the package.json of your app to point to the local path of the built FT. For example in package.json,
[...]
"@zowe/zlux-angular-file-tree": "file://../../your-local-path/zlux-file-explorer",
[...]
Change the package.json of your app to point to the Git repo & branch. Your Git repo may also be your fork. For example in package.json,
[...]
"@zowe/zlux-angular-file-tree": "git+https://github.com/zowe/zlux-file-explorer.git#<your-branch>",
[...]
- Set the version number you want https://github.com/zowe/zlux-file-explorer/blob/staging/package.json#L3 .
- Reinstall the app to update the package-lock.json too.
- Click on GitHub "Actions" tab at the top. Select "Build and Test Workflow".
- Click on "Run workflow" dropdown. Select desired branch and release text string i.e. "RC1" to build a FT npm release
It's a dependency not listed in package.json because it comes with PrimeNG. Our current version of PrimeNG is 6, therefore we are using FA v4 (https://fontawesome.com/v4/icons/)
This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.