Skip to content

应用声明文件

  • 声明文件,位于应用根路径:manifest.json
json
{
  "name": "fine-example",
  "nickname": "案例",
  "version": "1.0",
  "filename": "example-1.0",
  "type": "app",
  "source": "static",
  "system": "window",
  "author": "凡图科技",
  "description": "案例应用,用于文档演示",
  "createTime": "2024-07-11 00:00:00",
  "logo": "http://www.finemap.cn/logo.svg"
}
完整配置
json
// 以springcloud应用作为示例的完整配置
{
  "name": "fine-example",
  "nickname": "案例",
  "version": "1.0",
  "filename": "example-1.0",
  "type": "app",
  "source": "springcloud",
  "system": "window",
  "author": "作者",
  "description": "描述",
  "createTime": "2024-07-11 00:00:00",
  "logo": "http://www.finemap.cn/logo.svg",
  "isRunning": true,
  "startup":"bin\\restart.bat",
  "shutdown":"bin\\progress.bat",
  "progress":"bin\\startup.bat",
  "status":"bin\\shutdown.bat",
  "restart":"bin\\status.bat",
  "url": [
    {
      "name": "fine-example",
      "nickname": "案例",
      "logo": "http://www.finemap.cn/logo.svg",
      "show": false,
      "location": "location /fine-example { \n    proxy_pass http://127.0.0.1:83/fine-example; \n    proxy_connect_timeout 60s; \n    proxy_read_timeout 180s; \n} "
    },
    {
      "name": "example",
      "nickname": "案例",
      "logo": "http://www.finemap.cn/logo.svg",
      "show": false,
      "location": "location /example { \n    alias ../../webapps/example-1.0/static/; \n    index index.html; \n    try_files $uri $uri/ /example/index.html; \n} ",
      "type":"dialog",
      "isEdit":true,
      "attribute":{
        "type":"iframe",
        "width":800,
        "height": 600,
        "maxWidth": 1000,
        "maxheight": 800,
        "minWidth": 600,
        "minheight": 400,
        "offset": ["100px", "50px"],
        "shade":	true,
        "fullscreen":	true,
        "resize":	true,
        "draggable":	true,
      }
    }
  ],
  "data":{
      "mysql": {
          "name": "fine-example",
          "install": {
              "2.2.3": "mysql-schema.sql"
          },
          "update": {
              "2.2.2": "mysql-schema-update-2.2.2.sql",
              "2.2.3": "mysql-schema-update-2.2.3.sql"
          }
      },
      "nacos": {
          "dataId": "",
          "group": "DEFAULT_GROUP",
          "format": "yaml",
          "file": "application.yaml"
      }
  }
}

基础结构

名称必填属性作用
nameString应用名称(英文,单词用‘-’分隔)
1. 应用唯一标识
2. 文件路径默认前缀
3. 作为应用服务名称
nicknameString应用昵称(可以是中文)
versionString版本号(1.0.0:主版本.次版本.修订版本)
filenameString文件路径(在应用中的文件夹名称)
typeString应用类型lib | app对应webapps)
sourceString应用来源static | springboot | springcloud | other
systemString | Array运行系统(window | linux | [window,linux])
authorString应用作者
descriptionString应用描述
createTimeString创建时间
logoString应用logo链接(读取资源文件logo)
extendObject应用扩展属性
isRunningBoolean(true)应用是否需要运行
startupString应用启动程序
shutdownString应用关闭程序
progressString应用进程检查
statusString应用启动状态
restartString应用重启程序
property-Object应用属性(系统运行属性)
urlArray应用链接
toolArray应用组件
dataObject初始化数据

扩展属性

名称属性作用
getRoleListString应用角色列表接口
getPermissionListString应用权限列表接口

脚本

文件作用
bin/startup启动程序
bin/shutdown关闭程序
bin/progress进程检查
bin/status启动状态
bin/restart重启程序

应用属性

应用属性提示

  • 系统属性,应用创建过程中,不可使用该属性。
系统属性
名称必填属性默认值作用
isSystemBooleanfalse是否系统必带应用(true:不能卸载)
isStartupBooleannull是否可以用户自己启动(false:不能自己启动)
isShutdownBooleannull是否可以用户自己关闭(false:不能自己关闭)
isRestartBooleannull是否可以用户自己重启(false:不能自己重启)
运行属性
名称必填属性默认值作用
installTimeString-应用安装时间
startTimeString-应用启动时间
processTimeString-应用运行时间(启动成功)
closingTimeString-应用关闭时间

应用链接

名称必填属性默认值作用
nameString基础结构name应用名称
nicknameString基础结构nickname应用昵称(可以是中文)
logoString-应用logo链接(读取静态文件logo)
showBooleantrue是否显示到应用列表中
locationString-路径映射(nginx,location块规则)
typeStringdialog打开方式 (dialog,_blank,_self
isEditBooleantrue是否可以编辑
attributeObject-应用扩展属性

扩展属性

名称必填属性默认值作用
typeStringiframe打开方式( iframe | web )
widthString | Number-应用对话框宽度
heightString | Number-应用对话框高度
maxWidthString | Number-应用对话框最大宽度
maxheightString | Number-应用对话框最大高度
minWidthString | Number-应用对话框最小宽度
minheightString | Number-应用对话框最小高度
offsetString | Array-应用对话框显示位置:['100px', '50px']
shadeBooleantrue应用对话框是否有遮罩
fullscreenBooleantrue应用对话框是否可以全屏
resizeBooleantrue应用对话框是否允许拉伸
draggableBooleantrue应用对话框是否可以拖拽

静态文件

json
{
  "url": [
    {
      "name": "example",
      "nickname": "案例",
      "logo":"http://www.finemap.cn/logo.svg",
      "show": true,
      "location": "location /example {
                      alias ../../webapps/example-1.0/static/;
                      index index.html;
                      try_files $uri $uri/ /example/index.html;
                  }"
      //"location": "location /example { \n    alias ../../webapps/example-1.0/static/; \n    index index.html; \n    try_files $uri $uri/ /example/index.html; \n} "
    }
  ]
}

反向代理

json
{
  "url": [
    {
      "name": "fine-example",
      "nickname": "案例",
      "logo":"http://www.finemap.cn/logo.svg",
      "show": false,
      "location": "location /fine-example {
                      proxy_pass http://127.0.0.1:81/fine-example;
                      proxy_connect_timeout 60s;
                      proxy_read_timeout 180s;
                      try_files $uri $uri/ /fine-example/index.html;
                  }"
      //"location": "location /fine-example { \n    proxy_pass http://127.0.0.1:81/fine-example; \n    proxy_connect_timeout 60s; \n    proxy_read_timeout 180s; \n    try_files $uri $uri/ /fine-example/index.html; \n} "
    }
  ]
}

应用组件

名称必填属性默认值作用
nameString基础结构name组件名称(名称使用英文)
nicknameString基础结构nickname组件昵称(可以是中文)
sizeString1x1组件大小 (nxn:高x宽)
tagAttrObject-组件标签属性({"name":"value"}
typeString- (为空:不打开)打开方式 (,dialog,_blank,_self
urlString-打开链接 (可以来源于location)
attributeObject-组件扩展属性,同应用扩展属性
contentObject-组件内容
iframeString-iframe组件链接(content为空使用iframe)

组件内容

名称必填属性默认值作用
htmlString-组件文本链接
cssString | Array-组件样式链接
jsString | Array-组件js链接
callbackString-组件加载完成回调函数名称 默认参数(event,node)

初始化数据

mysql数据

  • 数据库初始化: 在安装过程中,会将sql运行到对应的mysql数据库中
名称必填属性作用
nameString应用名称(英文,单词用‘-’分隔)
installString | Object安装文件(文件或者列表)
updateObject更新文件
mysql数据库配置
json
{
  "data":{
      "mysql": {
          "name": "fine-example",
          "install": {
              "2.2.3": "fine-example.sql"
          },
          "update": {
              "2.2.2": "fine-example-update-2.2.2.sql",
              "2.2.3": "fine-example-update-2.2.3.sql"
          }
      }
  }
}

nacos配置

  • nacos配置: 在安装过程中,会将配置文件配置到对应的Nacos(如果为多条数据,可以使用数组)
名称必填属性作用
dataIdStringNacos配置标识符
groupStringNacos配置分组
formatStringNacos配置格式
fileStringNacos配置格式文件
json
{
  "data":{
      "nacos": {
          "dataId": "",
          "group": "DEFAULT_GROUP",
          "format": "yaml",
          "file": "application.yaml"
      }
  }
}

案例

静态应用

静态应用-声明文件
json
// static应用完整配置示例
{
  "name": "fine-example",
  "nickname": "案例",
  "version": "1.0",
  "filename": "example-1.0",
  "type": "app",
  "source": "static",
  "system": "window",
  "author": "作者",
  "description": "描述",
  "createTime": "2024-07-11 00:00:00",
  "isRunning": true,
  "logo": "http://www.finemap.cn/logo.svg",
  "url": [
    {
      "name": "example",
      "nickname": "案例",
      "logo": "http://www.finemap.cn/logo.svg",
      "show": true,
      "location": "location /example { \n    alias ../../webapps/example-1.0/static/; \n    index index.html; \n    try_files $uri $uri/ /example/index.html; \n} ",
      "type":"dialog",
      "isEdit":true,
      "attribute":{
        "type":"iframe",
        "width":800,
        "height": 600,
        "maxWidth": 1000,
        "maxheight": 800,
        "minWidth": 600,
        "minheight": 400,
        "offset": ["100px", "50px"],
        "shade":	true,
        "fullscreen":	true,
        "resize":	true,
        "draggable":	true,
      }
    }
  ]
}

springboot应用

单例应用-声明文件
json
//springboot应用完整配置示例
{
  "name": "fine-example",
  "nickname": "案例",
  "version": "1.0",
  "filename": "example-1.0",
  "type": "app",
  "source": "springboot",
  "system": "window",
  "author": "作者",
  "description": "描述",
  "createTime": "2024-07-11 00:00:00",
  "logo": "http://www.finemap.cn/logo.svg",
  "isRunning": true,
  "startup":"bin\\restart.bat",
  "shutdown":"bin\\progress.bat",
  "progress":"bin\\startup.bat",
  "status":"bin\\shutdown.bat",
  "restart":"bin\\status.bat",
  "url": [
    {
      "name": "fine-example",
      "nickname": "案例",
      "logo": "http://www.finemap.cn/logo.svg",
      "show": false,
      "location": "location /fine-example { \n    proxy_pass http://127.0.0.1:83/fine-example; \n    proxy_connect_timeout 60s; \n    proxy_read_timeout 180s; \n} "
    },
    {
      "name": "example",
      "nickname": "案例",
      "logo": "http://www.finemap.cn/logo.svg",
      "show": true,
      "location": "location /example { \n    alias ../../webapps/example-1.0/static/; \n    index index.html; \n    try_files $uri $uri/ /example/index.html; \n} ",
      "type":"dialog",
      "isEdit":true,
      "attribute":{
        "type":"iframe",
        "width":800,
        "height": 600,
        "maxWidth": 1000,
        "maxheight": 800,
        "minWidth": 600,
        "minheight": 400,
        "offset": ["100px", "50px"],
        "shade":	true,
        "fullscreen":	true,
        "resize":	true,
        "draggable":	true,
      }
    }
  ],
  "data":{
      "mysql": {
          "name": "fine-example",
          "install": {
              "2.2.3": "mysql-schema.sql"
          },
          "update": {
              "2.2.2": "mysql-schema-update-2.2.2.sql",
              "2.2.3": "mysql-schema-update-2.2.3.sql"
          }
      }
  }
}

springcloud应用

微服务应用-声明文件
json
// springcloud应用完整配置示例
{
  "name": "fine-example",
  "nickname": "案例",
  "version": "1.0",
  "filename": "example-1.0",
  "type": "app",
  "source": "springcloud",
  "system": "window",
  "author": "作者",
  "description": "描述",
  "createTime": "2024-07-11 00:00:00",
  "logo": "http://www.finemap.cn/logo.svg",
  "isRunning": true,
  "startup":"bin\\restart.bat",
  "shutdown":"bin\\progress.bat",
  "progress":"bin\\startup.bat",
  "status":"bin\\shutdown.bat",
  "restart":"bin\\status.bat",
  "url": [
    {
      "name": "fine-example",
      "nickname": "案例",
      "logo": "http://www.finemap.cn/logo.svg",
      "show": false,
      "location": "location /fine-example { \n    proxy_pass http://127.0.0.1:83/fine-example; \n    proxy_connect_timeout 60s; \n    proxy_read_timeout 180s; \n} "
    },
    {
      "name": "example",
      "nickname": "案例",
      "logo": "http://www.finemap.cn/logo.svg",
      "show": true,
      "location": "location /example { \n    alias ../../webapps/example-1.0/static/; \n    index index.html; \n    try_files $uri $uri/ /example/index.html; \n} ",
      "type":"dialog",
      "isEdit":true,
      "attribute":{
        "type":"iframe",
        "width":800,
        "height": 600,
        "maxWidth": 1000,
        "maxheight": 800,
        "minWidth": 600,
        "minheight": 400,
        "offset": ["100px", "50px"],
        "shade":	true,
        "fullscreen":	true,
        "resize":	true,
        "draggable":	true,
      }
    }
  ],
  "data":{
      "mysql": {
          "name": "fine-example",
          "install": {
              "2.2.3": "mysql-schema.sql"
          },
          "update": {
              "2.2.2": "mysql-schema-update-2.2.2.sql",
              "2.2.3": "mysql-schema-update-2.2.3.sql"
          }
      },
      "nacos": {
          "name": "",
          "install": {},
          "update": {}
      }
  }
}

应用组件

应用中-声明文件
json
// static+组件 应用完整配置示例
{
  "name": "fine-example",
  "nickname": "案例",
  "version": "1.0",
  "filename": "example-1.0",
  "type": "app",
  "source": "static",
  "system": "window",
  "author": "作者",
  "description": "描述",
  "createTime": "2024-07-11 00:00:00",
  "isRunning": true,
  "logo": "http://www.finemap.cn/logo.svg",
  "url": [
    {
      "name": "example",
      "nickname": "案例",
      "logo": "http://www.finemap.cn/logo.svg",
      "show": true,
      "location": "location /example { \n    alias ../../webapps/example-1.0/static/; \n    index index.html; \n    try_files $uri $uri/ /example/index.html; \n} ",
      "type":"dialog",
      "isEdit":true,
      "attribute":{
        "type":"iframe",
        "width":800,
        "height": 600,
        "maxWidth": 1000,
        "maxheight": 800,
        "minWidth": 600,
        "minheight": 400,
        "offset": ["100px", "50px"],
        "shade":	true,
        "fullscreen":	true,
        "resize":	true,
        "draggable":	true,
      }
    }
  ],
  "tool": [
    {
      "name":"example-weather-middle",
      "nickname":"天气组件",
      "size":"2x2",
      "tagAttr":{
        "id":"cbaf79e3-13d4-45d7-8f06-f8e63a0c5fa8"
      },
      "type":"dialog",
      "url":"/example",
      "attribute":{
        "type":"iframe",
        "width":800,
        "height": 600,
        "maxWidth": 1000,
        "maxheight": 800,
        "minWidth": 600,
        "minheight": 400,
        "offset": ["100px", "50px"],
        "shade":  true,
        "fullscreen": true,
        "resize": true,
        "draggable":  true,
      },
      "content":{
        "html":"/example/2x2/weather-middle.html",
        "css":"/example/2x2/weather-middle.css",
        "js":"/example/2x2/weather-middle.js"
      }
    },
    {
      "name":"example-weather-big",
      "nickname":"天气组件",
      "size":"2x4",
      "iframe":"/example/weather-big.html"
    }
  ]
}