Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dmx-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
71
Issues
71
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmx-platform
dmx-platform
Commits
79aba1ce
Commit
79aba1ce
authored
May 27, 2019
by
Jörg Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidate Workspaces migrations
parent
6af71d98
Pipeline
#6635
passed with stages
in 3 minutes and 45 seconds
Changes
21
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
352 additions
and
373 deletions
+352
-373
modules/dmx-accesscontrol/src/main/java/systems/dmx/accesscontrol/migrations/Migration2.java
...java/systems/dmx/accesscontrol/migrations/Migration2.java
+6
-7
modules/dmx-accesscontrol/src/main/java/systems/dmx/accesscontrol/migrations/Migration3.java
...java/systems/dmx/accesscontrol/migrations/Migration3.java
+1
-1
modules/dmx-accesscontrol/src/main/resources/migrations/migration1.json
...cesscontrol/src/main/resources/migrations/migration1.json
+2
-2
modules/dmx-bookmarks/src/main/resources/migrations/migration1.json
...x-bookmarks/src/main/resources/migrations/migration1.json
+2
-2
modules/dmx-config/src/main/resources/migrations/migration1.json
.../dmx-config/src/main/resources/migrations/migration1.json
+24
-24
modules/dmx-contacts/src/main/resources/migrations/migration1.json
...mx-contacts/src/main/resources/migrations/migration1.json
+2
-2
modules/dmx-contacts/src/main/resources/migrations/migration2.json
...mx-contacts/src/main/resources/migrations/migration2.json
+2
-2
modules/dmx-events/src/main/resources/migrations/migration1.json
.../dmx-events/src/main/resources/migrations/migration1.json
+2
-2
modules/dmx-files/src/main/resources/migrations/migration1.json
...s/dmx-files/src/main/resources/migrations/migration1.json
+87
-87
modules/dmx-files/src/main/resources/migrations/migration2.json
...s/dmx-files/src/main/resources/migrations/migration2.json
+9
-9
modules/dmx-topicmaps/src/main/resources/migrations/migration1.json
...x-topicmaps/src/main/resources/migrations/migration1.json
+2
-2
modules/dmx-webclient/src/main/java/systems/dmx/webclient/migrations/Migration2.java
...ain/java/systems/dmx/webclient/migrations/Migration2.java
+1
-1
modules/dmx-webclient/src/main/java/systems/dmx/webclient/migrations/Migration3.java
...ain/java/systems/dmx/webclient/migrations/Migration3.java
+1
-1
modules/dmx-webclient/src/main/js/main.js
modules/dmx-webclient/src/main/js/main.js
+1
-1
modules/dmx-webclient/src/main/resources/migrations/migration1.json
...x-webclient/src/main/resources/migrations/migration1.json
+92
-90
modules/dmx-workspaces/src/main/java/systems/dmx/workspaces/migrations/Migration3.java
...in/java/systems/dmx/workspaces/migrations/Migration3.java
+20
-9
modules/dmx-workspaces/src/main/java/systems/dmx/workspaces/migrations/Migration4.java
...in/java/systems/dmx/workspaces/migrations/Migration4.java
+0
-37
modules/dmx-workspaces/src/main/resources/migrations/migration1.json
...-workspaces/src/main/resources/migrations/migration1.json
+48
-3
modules/dmx-workspaces/src/main/resources/migrations/migration2.json
...-workspaces/src/main/resources/migrations/migration2.json
+49
-25
modules/dmx-workspaces/src/main/resources/migrations/migration5.json
...-workspaces/src/main/resources/migrations/migration5.json
+0
-65
modules/dmx-workspaces/src/main/resources/plugin.properties
modules/dmx-workspaces/src/main/resources/plugin.properties
+1
-1
No files found.
modules/dmx-accesscontrol/src/main/java/systems/dmx/accesscontrol/migrations/Migration2.java
View file @
79aba1ce
...
...
@@ -13,10 +13,10 @@ import systems.dmx.core.service.Migration;
* Create "System" and "Administration" workspaces.
* Set owner of "System", "Administration", and "DMX" workspaces.
* <p>
* Part of DMX 5.0
* Part of DMX 5.0
-beta-3
* Runs ALWAYS
* <p>
* Note: the "admin" user account is created in migration
4
. At this moment both must exist, the "Login enabled"
* Note: the "admin" user account is created in migration
3
. At this moment both must exist, the "Login enabled"
* config topic type (created in migration 1), and the "Administration" workspace (created here).
*/
public
class
Migration2
extends
Migration
{
...
...
@@ -33,11 +33,10 @@ public class Migration2 extends Migration {
@Override
public
void
run
()
{
// Note 1: at migration running time our plugin listeners are not yet registered (furthermore there is no user
// logged in). So we set the workspace owner manually here.
// Note 2: we don't set a particular creator/modifier here as we don't want suggest the workspaces have been
// created by the "admin" user. Instead the creator/modifier of the workspaces remain undefined as the
// workspaces are actually created by the system itself.
// Note 1: at migration time our plugin listeners are not yet registered (furthermore no user is logged in).
// We set the workspace owners manually.
// Note 2: we don't set a creator/modifier; we don't want suggest the workspaces have been created by the
// "admin" user. Instead creator/modifier remain undefined as the workspaces are created by the system itself.
//
// "System"
Topic
systemWorkspace
=
wsService
.
createWorkspace
(
...
...
modules/dmx-accesscontrol/src/main/java/systems/dmx/accesscontrol/migrations/Migration3.java
View file @
79aba1ce
...
...
@@ -11,7 +11,7 @@ import systems.dmx.core.service.accesscontrol.Credentials;
/**
* Create "admin" user account.
* <p>
* Part of DMX 5.0
* Part of DMX 5.0
-beta-3
* Runs ALWAYS
* <p>
* Note: both must exist already, the "Login enabled" config topic type (created in migration 1), and the
...
...
modules/dmx-accesscontrol/src/main/resources/migrations/migration1.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
{
"topic_types"
:
[
...
...
modules/dmx-bookmarks/src/main/resources/migrations/migration1.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
{
"topic_types"
:
[
...
...
modules/dmx-config/src/main/resources/migrations/migration1.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
{
"assoc_types"
:
[
"assoc_types"
:
[
{
"value"
:
"Configuration"
,
"uri"
:
"dmx.config.configuration"
,
"dataTypeUri"
:
"dmx.core.text"
,
"viewConfigTopics"
:
[
{
"value"
:
"Configuration"
,
"uri"
:
"dmx.config.configuration"
,
"dataTypeUri"
:
"dmx.core.text"
,
"viewConfigTopics"
:
[
{
"typeUri"
:
"dmx.webclient.view_config"
,
"childs"
:
{
"dmx.webclient.color"
:
"hsl(255, 40%, 53%)"
,
"dmx.webclient.color#dmx.webclient.background_color"
:
"hsl(255, 80%, 96%)"
}
}
]
"typeUri"
:
"dmx.webclient.view_config"
,
"childs"
:
{
"dmx.webclient.color"
:
"hsl(255, 40%, 53%)"
,
"dmx.webclient.color#dmx.webclient.background_color"
:
"hsl(255, 80%, 96%)"
}
}
],
"topics"
:
[
//
Role
Types
{
"value"
:
"Configurable"
,
"uri"
:
"dmx.config.configurable"
,
"typeUri"
:
"dmx.core.role_type"
}
]
]
}
],
"topics"
:
[
//
Role
Types
{
"value"
:
"Configurable"
,
"uri"
:
"dmx.config.configurable"
,
"typeUri"
:
"dmx.core.role_type"
}
]
}
modules/dmx-contacts/src/main/resources/migrations/migration1.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
[
{
...
...
modules/dmx-contacts/src/main/resources/migrations/migration2.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
{
"topic_types"
:
[
...
...
modules/dmx-events/src/main/resources/migrations/migration1.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
{
"topic_types"
:
[
...
...
modules/dmx-files/src/main/resources/migrations/migration1.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
{
"topic_types"
:
[
//
File
"topic_types"
:
[
//
File
{
"value"
:
"File Content"
,
"uri"
:
"dmx.files.file_content"
,
"dataTypeUri"
:
"dmx.core.html"
},
{
"value"
:
"File Name"
,
"uri"
:
"dmx.files.file_name"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Path"
,
"uri"
:
"dmx.files.path"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Media Type"
,
"uri"
:
"dmx.files.media_type"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Size"
,
"uri"
:
"dmx.files.size"
,
"dataTypeUri"
:
"dmx.core.number"
},
{
"value"
:
"File"
,
"uri"
:
"dmx.files.file"
,
"dataTypeUri"
:
"dmx.core.identity"
,
"assocDefs"
:
[
{
"value"
:
"File Content"
,
"uri"
:
"dmx.files.file_content"
,
"dataTypeUri"
:
"dmx.core.html"
"childTypeUri"
:
"dmx.files.file_content"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"value"
:
"File N
ame"
,
"uri"
:
"dmx.files.file_nam
e"
,
"dataTypeUri"
:
"dmx.core.text"
"childTypeUri"
:
"dmx.files.file_n
ame"
,
"childCardinalityUri"
:
"dmx.core.on
e"
,
"includeInLabel"
:
true
},
{
"value"
:
"Path"
,
"uri"
:
"dmx.files.path"
,
"dataTypeUri"
:
"dmx.core.text"
"childTypeUri"
:
"dmx.files.path"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"value"
:
"Media Type"
,
"uri"
:
"dmx.files.media_type"
,
"dataTypeUri"
:
"dmx.core.text"
"childTypeUri"
:
"dmx.files.media_type"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"value"
:
"Size"
,
"uri"
:
"dmx.files.size"
,
"dataTypeUri"
:
"dmx.core.number"
"childTypeUri"
:
"dmx.files.size"
,
"childCardinalityUri"
:
"dmx.core.one"
},
],
"viewConfigTopics"
:
[
{
"value"
:
"File"
,
"uri"
:
"dmx.files.file"
,
"dataTypeUri"
:
"dmx.core.identity"
,
"assocDefs"
:
[
{
"childTypeUri"
:
"dmx.files.file_content"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.files.file_name"
,
"childCardinalityUri"
:
"dmx.core.one"
,
"includeInLabel"
:
true
},
{
"childTypeUri"
:
"dmx.files.path"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.files.media_type"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.files.size"
,
"childCardinalityUri"
:
"dmx.core.one"
},
],
"viewConfigTopics"
:
[
{
"typeUri"
:
"dmx.webclient.view_config"
,
"childs"
:
{
"dmx.webclient.icon"
:
"
\u
f15b"
}
}
]
},
//
Folder
"typeUri"
:
"dmx.webclient.view_config"
,
"childs"
:
{
"dmx.webclient.icon"
:
"
\u
f15b"
}
}
]
},
//
Folder
{
"value"
:
"Folder Name"
,
"uri"
:
"dmx.files.folder_name"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Folder Content"
,
"uri"
:
"dmx.files.folder_content"
,
"dataTypeUri"
:
"dmx.core.html"
},
{
"value"
:
"Folder"
,
"uri"
:
"dmx.files.folder"
,
"dataTypeUri"
:
"dmx.core.identity"
,
"assocDefs"
:
[
{
"value"
:
"Folder Name"
,
"uri"
:
"dmx.files.folder_name"
,
"dataTypeUri"
:
"dmx.core.text"
"childTypeUri"
:
"dmx.files.folder_name"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"value"
:
"Folder Content"
,
"uri"
:
"dmx.files.folder_content"
,
"dataTypeUri"
:
"dmx.core.html"
"childTypeUri"
:
"dmx.files.path"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"value"
:
"Folder"
,
"uri"
:
"dmx.files.folder"
,
"dataTypeUri"
:
"dmx.core.identity"
,
"assocDefs"
:
[
{
"childTypeUri"
:
"dmx.files.folder_name"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.files.path"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.files.folder_content"
,
"childCardinalityUri"
:
"dmx.core.one"
}
],
"viewConfigTopics"
:
[
{
"typeUri"
:
"dmx.webclient.view_config"
,
"childs"
:
{
"dmx.webclient.icon"
:
"
\u
f07b"
}
}
]
"childTypeUri"
:
"dmx.files.folder_content"
,
"childCardinalityUri"
:
"dmx.core.one"
}
],
"viewConfigTopics"
:
[
{
"typeUri"
:
"dmx.webclient.view_config"
,
"childs"
:
{
"dmx.webclient.icon"
:
"
\u
f07b"
}
}
]
]
}
]
}
modules/dmx-files/src/main/resources/migrations/migration2.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
{
"topic_types"
:
[
{
"value"
:
"Disk Quota (MB)"
,
"uri"
:
"dmx.files.disk_quota"
,
"dataTypeUri"
:
"dmx.core.number"
}
]
"topic_types"
:
[
{
"value"
:
"Disk Quota (MB)"
,
"uri"
:
"dmx.files.disk_quota"
,
"dataTypeUri"
:
"dmx.core.number"
}
]
}
modules/dmx-topicmaps/src/main/resources/migrations/migration1.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
{
"topic_types"
:
[
...
...
modules/dmx-webclient/src/main/java/systems/dmx/webclient/migrations/Migration2.java
View file @
79aba1ce
...
...
@@ -8,7 +8,7 @@ import systems.dmx.core.service.Migration;
/**
* Add view configs to Core types.
* <p>
* Part of DMX 5.0
* Part of DMX 5.0
-beta-3
* Runs ALWAYS
*/
public
class
Migration2
extends
Migration
{
...
...
modules/dmx-webclient/src/main/java/systems/dmx/webclient/migrations/Migration3.java
View file @
79aba1ce
...
...
@@ -17,7 +17,7 @@ import java.util.logging.Logger;
* Note: while a "clean install" the Core types, and other types created before Webclient is activated, are repaired.
* While "update" all existing types are repaired, including the ones created by installed 3rd-party modules.
* <p>
* Part of DMX 5.0
* Part of DMX 5.0
-beta-3
* Runs ALWAYS
*/
public
class
Migration3
extends
Migration
{
...
...
modules/dmx-webclient/src/main/js/main.js
View file @
79aba1ce
...
...
@@ -9,7 +9,7 @@ import 'font-awesome/css/font-awesome.css'
import
'
./element-ui
'
import
'
./websocket
'
console
.
log
(
'
[DMX] 2019/05/2
6
'
)
console
.
log
(
'
[DMX] 2019/05/2
7
'
)
// 1) Init dm5 library
// The dm5 library must be inited *before* the dm5-webclient component is instantiated.
...
...
modules/dmx-webclient/src/main/resources/migrations/migration1.json
View file @
79aba1ce
#
Part
of
DMX
5.0
#
Runs
ALWAYS
//
Part
of
DMX
5.0
-beta
-3
//
Runs
ALWAYS
[{
[
{
//
View
Configuration
"topic_types"
:
[
{
"value"
:
"Icon"
,
"uri"
:
"dmx.webclient.icon"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Color"
,
"uri"
:
"dmx.webclient.color"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Add to Create Menu"
,
"uri"
:
"dmx.webclient.add_to_create_menu"
,
"dataTypeUri"
:
"dmx.core.boolean"
},
{
"value"
:
"Widget"
,
"uri"
:
"dmx.webclient.widget"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Clearable"
,
"uri"
:
"dmx.webclient.clearable"
,
"dataTypeUri"
:
"dmx.core.boolean"
},
{
"value"
:
"Customizable"
,
"uri"
:
"dmx.webclient.customizable"
,
"dataTypeUri"
:
"dmx.core.boolean"
}
{
"value"
:
"Icon"
,
"uri"
:
"dmx.webclient.icon"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Color"
,
"uri"
:
"dmx.webclient.color"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Add to Create Menu"
,
"uri"
:
"dmx.webclient.add_to_create_menu"
,
"dataTypeUri"
:
"dmx.core.boolean"
},
{
"value"
:
"Widget"
,
"uri"
:
"dmx.webclient.widget"
,
"dataTypeUri"
:
"dmx.core.text"
},
{
"value"
:
"Clearable"
,
"uri"
:
"dmx.webclient.clearable"
,
"dataTypeUri"
:
"dmx.core.boolean"
},
{
"value"
:
"Customizable"
,
"uri"
:
"dmx.webclient.customizable"
,
"dataTypeUri"
:
"dmx.core.boolean"
}
],
"assoc_types"
:
[
{
"value"
:
"Background Color"
,
"uri"
:
"dmx.webclient.background_color"
,
"dataTypeUri"
:
"dmx.core.text"
}
{
"value"
:
"Background Color"
,
"uri"
:
"dmx.webclient.background_color"
,
"dataTypeUri"
:
"dmx.core.text"
}
],
//
Note:
the
Widget
instances
must
be
created
*before*
the
"View Configuration"
composite.
//
The
Widget
assoc
def
refers
to
a
Widget
instance.
"topics"
:
[
//
Widgets
{
"value"
:
"Select"
,
"uri"
:
"dmx.webclient.select"
,
"typeUri"
:
"dmx.webclient.widget"
}
//
Widgets
{
"value"
:
"Select"
,
"uri"
:
"dmx.webclient.select"
,
"typeUri"
:
"dmx.webclient.widget"
}
]
},
{
},
{
"topic_types"
:
[
{
"value"
:
"View Configuration"
,
"uri"
:
"dmx.webclient.view_config"
,
"dataTypeUri"
:
"dmx.core.identity"
,
"assocDefs"
:
[
{
"childTypeUri"
:
"dmx.webclient.icon"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.webclient.color"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.webclient.color"
,
"childCardinalityUri"
:
"dmx.core.one"
,
"customAssocTypeUri"
:
"dmx.webclient.background_color"
},
{
"childTypeUri"
:
"dmx.webclient.add_to_create_menu"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.webclient.widget"
,
"childCardinalityUri"
:
"dmx.core.one"
,
"viewConfigTopics"
:
[
{
"typeUri"
:
"dmx.webclient.view_config"
,
"childs"
:
{
"dmx.webclient.widget"
:
"ref_uri:dmx.webclient.select"
,
"dmx.webclient.clearable"
:
true
}
}
]
},
{
"childTypeUri"
:
"dmx.webclient.clearable"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.webclient.customizable"
,
"childCardinalityUri"
:
"dmx.core.one"
{
"value"
:
"View Configuration"
,
"uri"
:
"dmx.webclient.view_config"
,
"dataTypeUri"
:
"dmx.core.identity"
,
"assocDefs"
:
[
{
"childTypeUri"
:
"dmx.webclient.icon"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.webclient.color"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.webclient.color"
,
"childCardinalityUri"
:
"dmx.core.one"
,
"customAssocTypeUri"
:
"dmx.webclient.background_color"
},
{
"childTypeUri"
:
"dmx.webclient.add_to_create_menu"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.webclient.widget"
,
"childCardinalityUri"
:
"dmx.core.one"
,
"viewConfigTopics"
:
[
{
"typeUri"
:
"dmx.webclient.view_config"
,
"childs"
:
{
"dmx.webclient.widget"
:
"ref_uri:dmx.webclient.select"
,
"dmx.webclient.clearable"
:
true
}
}
]
}
},
{
"childTypeUri"
:
"dmx.webclient.clearable"
,
"childCardinalityUri"
:
"dmx.core.one"
},
{
"childTypeUri"
:
"dmx.webclient.customizable"
,
"childCardinalityUri"
:
"dmx.core.one"
}
]
}
]
}]
}
]
modules/dmx-workspaces/src/main/java/systems/dmx/workspaces/migrations/Migration3.java
View file @
79aba1ce
package
systems.dmx.workspaces.migrations
;
import
systems.dmx.workspaces.WorkspacesService
;
import
systems.dmx.core.service.Inject
;